LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmically triggering event structure

I am using an event structure to control options in a simple graphical display. On starting the program I wanted it to run through all of the events automaticly so that it would load the settings. I am not sure if you can do this but it would be easier than have to be the code twice and use local variables.
 
Thanks
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 1 of 5
(2,632 Views)
You can trigger the events for a control's value change programatically by calling the property node "Value(signaling)".
 
If more complicated events are used, then you have to register the dynamic events for the event structure.
0 Kudos
Message 2 of 5
(2,630 Views)

You could use a Producer/Consumer with events design structure. Basically the event structures purpose is to put elements into a queue, then an independant loop dequeue the elements and performs the needed tasks. One event should be initialize, and in your case simply enqueue all other elements once.

 

P.S. There is a template for this (I modified it to use an enum instead of a string), Click New... -> From Template -> Producer/Consumer (Events)

to help you get started.



Message Edited by TWGomez on 04-08-2008 11:54 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 3 of 5
(2,625 Views)
if you are using a state machine or a queued satae machnie architecture you can decouple the event from the action and then queue up the action from the event as well as from any other state
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 5
(2,583 Views)
thanks I'll have to try these out and see what works best
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 5 of 5
(2,555 Views)