LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure without local variables

Hello,

Programming a project using Labview the following problem occured:
I've got a case structure with several buttons (booleans) in the "true" case. However in the "false" case I also want to check the state of these buttons, without necessasrily using local variables. Of course wiring the lines out of the "true" case and back into the "false" case doesn't work.
Is there a solution that works?

Any help gratefully received,

Georg
0 Kudos
Message 1 of 4
(2,738 Views)
Hello schorsche,

why don't you check the booleans outside your case structure if you check them in both cases?
If you have to check them inside the case, then you probably need locals. But then you are limited to "Switch" as mechanical action (you cannot use "Latch" or have to do it programmaticly).

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,738 Views)
Georg,

An alternative way to do this is to create a reference to your boolean controls and wire the reference into your case structure. Read the value using the property node for that reference in each case.

See the attached program!

EJS
0 Kudos
Message 3 of 4
(2,738 Views)
The only reasonable solution is placing the terminals in front of the case structure and wire their output to the case structure. This tunnel will be available in all cases of the structure.

Keep away from control references, they are even worse than local variables (which you say you don't want).

Stay with the data flow whenever possible!
0 Kudos
Message 4 of 4
(2,738 Views)