LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal Event for ALL Controls

Hello All,

I've got a complicated event loop set up. When I start the VI for the first time, I'd like to fire all the controls by reading their current state, and writing it back so everything gets initialized properly. Is there a signalling property for ALL controls? I found an "all controls" array as part of the "pane" property -- is there an easy way to loop through them all, read the values and write it back with signalling?

Thanks
-Ted
0 Kudos
Message 1 of 3
(2,604 Views)
Well, the controls[] property gives you indicators and controls and most likely you don't have events for indicators (even though I do sometimes ;))
 
Also, all latch action booleans won't work that way.
 
If you blindly want to fire all controls, you could do something like in the attached code skeleton.
 
Most likely, there are better ways to solve the problem. ;). You probably have multiple controls firing the same event, so you would do duplicate work. It might also be that your controls need to be triggered in a certain order.
 
I have the feeling that your code could be simplified. What needs to possibly be "initialized"? Shift registers can be initialized outside the loop. Why don't you run your VI, manually operate all your controls to update all indicators, then make all values default. Save the VI. See how much is left that still needs to be initialized. Just add a copy of that code before the main loop. 🙂

Message Edited by altenbach on 06-16-2007 01:44 PM

0 Kudos
Message 2 of 3
(2,596 Views)
Thanks for the reply.. There probably is a simpler solution: This code is attached to our custom hardware, and I write only to specific registers when certain controls are activated. If I cycle power on our custom hardware, it comes up completely unconfigured. For now, I'm using an array of events to fire on startup. I'll take a look to see if there's a cleaner way to do based on what you wrote.

Cheers
-Ted
0 Kudos
Message 3 of 3
(2,586 Views)