NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Working out what chassis you're using in C/C++

Hi All

We've got a cRio 9068 and 9067. For the 9068 we've created a C++ application which records info from NI9222 cards and serial data. We'd like to use the same C code for our cRio 9067 however currently we have to manually change the type of chassis in the code. Ideally we could use some automatic function to work out what type of chasis we're running on.  Any thoughts? Thanks!

Jamie

0 Kudos
Message 1 of 6
(4,174 Views)

Do you need this information for differentiating on bitfiles? How are you using the chassis type in your code?

0 Kudos
Message 2 of 6
(3,449 Views)

The NI System Configuration distribution includes a C API that can be used to determine what target your code is running on. The NI System Configuration distribution is available here, http://www.ni.com/download/ni-system-configuration-14.5.0/5158/en/.

A couple tips, I believe you need to select LabWindows CVI support from the feature tree to get C API support. On my system the nisyscfg.h header was installed here C:\Program Files\National Instruments\Shared\ExternalCompilerSupport\C


0 Kudos
Message 3 of 6
(3,449 Views)

Yeah, we need to determine which bitfiles to use. At the moment we just have a list of bitfiles and manually set which one to use- be better to have an automatic system so could use chassis code to select which bitfile to use. I take it bitfiles compiled for a chassis will work with another chassis if exactly the same type right?

Cheers

Jamie

0 Kudos
Message 4 of 6
(3,449 Views)

jamie_mac wrote:

...

I take it bitfiles compiled for a chassis will work with another chassis if exactly the same type right?

Cheers

Jamie

Yes, basically if we're dealing with the same chassis, we're dealing with the same FPGA (model, pinout, etc.).

I'd recommend attempting to tease out what you need from temporarily installing as noted by speleato and bringing that into your setup (you're probably using Eclipse, so you should just be able to direct the project to the location of the needed headers/libs)

0 Kudos
Message 5 of 6
(3,449 Views)

Thanks spealoto. I'll look at the C code and see what I can find.

0 Kudos
Message 6 of 6
(3,449 Views)