07-10-2013 08:36 AM
I have a gif of a basic FPGA topology that I want to show some loopbacks in. As the user clicks on the booleans, vertical lines should appear, then disappear as they click them again, showing the current loopback topology.
To conserve resources, I opted to use an event structure. So far I have set it up for the RX_FAC and RX_TERMXCO4AU loopbacks that you see in the upper left of the picture.
Only one RX loopback and one TX loopback can be on at a time, so one of the first things that happens when the user clicks the boolean is that it sets the values of all the other booleans in that row to false, via the use of local variables.
The problem is - the event structure only executes when the user actually clicks the boolean true or false, but not if the boolean is set false via the use of a local var. In other words, let's say I have RX_TERMXCO4AU true, and RX_FAC false. If I click RX_FAC to set it true, then you'll notice RX_TERMXCO4AU goes dark/false, and RX_FAC lights up. So the value of RX_TERMXCO4AU changed, but the event structure associated with RX_TERMXCO4AU did not execute (which is why the vertical line between RX_TERMXCO4AU and TX_FACXCO4AU stays there).
This will make a lot more sense if you run the attached simple VI. Right now, events only exist for RX_FAC and RX_TERMXCO4AU, but it's sufficient to explain the problem I think.
Any help is appreciated.
Solved! Go to Solution.
07-10-2013 08:42 AM
You should use 'Value (Signaling)' property node, wherever you're updating any control/indicator using local variabl and want it to be registered by EVENT STRUCTURE.
07-10-2013 08:43 AM
The event structure is for user generated events. Writing to a local variable is a programmatic change.
What you want to do is write your value to the Value(Signalling) property of the boolean which will change the value and fire the value change event.
07-10-2013 08:45 AM
This worked! I learned something new today...
Thank you very much!
07-10-2013
09:02 AM
- last edited on
01-21-2025
01:08 PM
by
Content Cleaner
@bmishoe wrote:
I learned something new today...
One more thing you can learn, When you are passing an array input to a For loop with 'Auto indexing' enabled, you need not wire anything to For loop's 'N' terminal.
In other words:
If you enable auto-indexing on an array wired to a For Loop, LabVIEW sets the count terminal so you do not need to wire the count terminal.
In your code, you can remove the 'Array Size' nodes.