LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling FPGA VI IO items based on hardware

Solved!
Go to solution

I have one FPGA VI that I use on two pieces of hardware; the sbRIO-9636 and the sbRIO-9637. These are very similar so it allows reuse of the same VI, but there is a big difference that I am now trying to work around; the onboard temp monitoring.

 

In the sbRIO-9636, the temp monitoring is done at the FPGA level with an onboard IO item (Chassis Temperature). For the sbRIO-9637, there is no Chassis Temperature onboard IO item, so this has to be performed at the RT level via System Configuration (I tried using this on the sbRIO-9636 but only ever get "0" from the temp variable using System Configuration). The issue I am running into now is, how do I maintain one FPGA VI with an IO item that only exists on one piece of hardware?

 

I tried using a conditional disable diagram (FPGA_TARGET_CLASS == SBRIO_9636), but the default state seems to be "enabled" and therefore my code will not compile for the sbRIO-9637 since the "Chassis Temperature" IO item does not exist. I could use a Diagram Disable structure, but that would require me manually flip to disable for compilation on the sbRIO-9637. I would prefer an approach that automatically enables the IO item if compiling on the 9636.

 

Is there some other way to maintain this FPGA VI between these two pieces of hardware without having to change the VI for each one? It would great if there was a "Conditional Enable Structure."

0 Kudos
Message 1 of 3
(98 Views)
Solution
Accepted by topic author SRTie4k

@SRTie4k wrote:

I have one FPGA VI that I use on two pieces of hardware; the sbRIO-9636 and the sbRIO-9637. These are very similar so it allows reuse of the same VI, but there is a big difference that I am now trying to work around; the onboard temp monitoring.

 

In the sbRIO-9636, the temp monitoring is done at the FPGA level with an onboard IO item (Chassis Temperature). For the sbRIO-9637, there is no Chassis Temperature onboard IO item, so this has to be performed at the RT level via System Configuration (I tried using this on the sbRIO-9636 but only ever get "0" from the temp variable using System Configuration). The issue I am running into now is, how do I maintain one FPGA VI with an IO item that only exists on one piece of hardware?

 

I tried using a conditional disable diagram (FPGA_TARGET_CLASS == SBRIO_9636), but the default state seems to be "enabled" and therefore my code will not compile for the sbRIO-9637 since the "Chassis Temperature" IO item does not exist. I could use a Diagram Disable structure, but that would require me manually flip to disable for compilation on the sbRIO-9637. I would prefer an approach that automatically enables the IO item if compiling on the 9636.

 

Is there some other way to maintain this FPGA VI between these two pieces of hardware without having to change the VI for each one? It would great if there was a "Conditional Enable Structure."


I would stick with Conditional Disable.  Something in the text may be incorrect.  Check the name of the tags in the target to confirm.  You can even have a blank case and make that one be the Default.  There is code you can put in the (blank) default case which blocks compiles (as it should never be enabled).

 

Products such as the 5170, 5171, 5172 use this approach.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 2 of 3
(87 Views)

I probably should have play around a bit more before coming here haha. I simply just added a new case to conditional disable which ended up being disabled. I didn't realize "subsequent" cases are considered disabled on the diagram.

 

Everything has compiled on both devices so fingers crossed this will accomplish what I want. Thank you!

0 Kudos
Message 3 of 3
(77 Views)