From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change FPGA Functionality based on adapter inserted

Hello,

 

I'm using the 7972 FlexRIOS and was curious if there is there a way for the FPGA to base its functionality on what is inserted into it (i.e. the 6584 or 6583)?

 

Thanks!

0 Kudos
Message 1 of 9
(2,476 Views)

I migh have not understand very well your question, but there are specific examples you can use for the adapter modules.

 

In the NI Example Finder window, select Hardware Input and Output»FlexRIO»IO Modules»

0 Kudos
Message 2 of 9
(2,418 Views)

What I am trying to do is have a FlexRIO/7972 run specific code based upon what adapter/module is inserted into it. e.x. If I plug in a 6584 into it, it runs one code, but if I insert a 6583, it runs another. I want it to do this autonomously without having to identify which module is attached (doesn't it auto-detect what is plugged into it anyway?)

0 Kudos
Message 3 of 9
(2,413 Views)

You might have some luck using the System Configuration VIs/Library on the PXI chassis target to identify the connected hardware, then loading the appropriate bitfile based on the results.

I don't have any of the appropriate hardware, so I can't check this, but that would be my first guess.


GCentral
0 Kudos
Message 4 of 9
(2,400 Views)

I believe the approach cbutcher has mentioned should work for you.

I know when you do this on a cRIO it has to write a fixed personality bitfile to the FPGA so that it can request the module information from their eeproms.

I am not sure if this is the same for flexRIO cards to identify the adapter modules, but my guess is that it would be similar.

 

I only mention the bitfile swapping in case your FPGA is meant to control external equipment/safety system after booting. The swapping of the bitfiles can be dangerous in cases like this without extra precautions.

0 Kudos
Message 5 of 9
(2,384 Views)

It appears that issue is that laview only allows us to load one adapter into the bitfile. We want to have two so that we can swap out adapters without having to change bitfiles

0 Kudos
Message 6 of 9
(2,361 Views)

I think for this discussion so far, it was assumed that you planned to compile two separate bitfiles and just load the one you wanted.


GCentral
0 Kudos
Message 7 of 9
(2,354 Views)

My apologies. I'm new to labview and thought the way I worded it made sense. I should have clarified. Thank you for all the help you've already provided.

 

So i guess the question I'm trying to get answered is if there is a way for Labview to read one bitfile and run certain code based upon what adapter is plugged in or is that beyond the realm of labview?

0 Kudos
Message 8 of 9
(2,345 Views)

It's not so much a LabVIEW problem but a physical problem.

 

You will not be able to use any NI-supplied CLIPs because these will assume ownership of certain I/O Pins.  You can't have two pieces of code writing tot he same pin without switching logic. Since NI won't have this logic built-in you would have to implement all of NI's IP yourself. This is already practically un-doable.

 

Even then, you may have conflicting hardware requirements for any given pin making such a re-configuration very awkward at best and near impossible in worst-case scenarios.  Factor in any clock rate differences which may be required and I'd wager that this is a completely doomed venture.

 

So it may or may not be do-able. How many expert man-years do you have available?

0 Kudos
Message 9 of 9
(2,340 Views)