LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger value change from array

I have an array of Boolean controls on the front panel. I want to trigger an event when any member of the array changes. Unfortunately, this isn't happening. I've checked by placing a break point in the event structure on the value change for the array and it doesn't fire when the boolean buttons change. I haven't tried this for numeric arrays. Is there a solution to this problem?

0 Kudos
Message 1 of 5
(2,879 Views)

Show your code.  Attach your VI.

 

It should work, unless you are doing something wrong.

0 Kudos
Message 2 of 5
(2,874 Views)

I believe you have Indicator and not controls.  Events will get triggered when you change the value in the FP unless you have a Registered event to trigger. 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 5
(2,859 Views)

A possible solution might look like this. Remember that when values change by wire the change event is not fired. To address this behaviour you can use the Value(signaling) Event, a Dynamically Registered Event on the value change of the array or a User Event. In this example I chose the first suggestion.

BooleanArrayEvent.png

0 Kudos
Message 4 of 5
(2,855 Views)

Well, I went back to the program to cut it down so I could post it and it worked right away - no edits. I suspect that what happened was the aray was originally an indicator array. I changed it to control so I could change it from the front panel and when the event didn't fire, I deleted the event case and remade it, but it still wouldn't fire. Getting out of Labview entirely and coming back in resolved the issue (something I should have tried earlier). So it looks like I just managed to confuse Labview temporarily. Thanks for the replies.

0 Kudos
Message 5 of 5
(2,825 Views)