09-01-2011 11:16 PM
Dear all,
I want to call an event when I click on the run button, before start any other actions. Can any one suggest me a solution other than the time out event?
Thank you
Gayanthika
Solved! Go to Solution.
09-01-2011 11:23 PM
You can associate an event to a (hidden) boolean (or other control), then fire it by writing to a value(sgnl) property node of it before the event loop starts.
09-02-2011 01:05 AM
Thanks for your answer, may I know how it is possible to identify that the user click stop button.
09-02-2011 01:11 AM
And I found another solution, We can check a boolean local variable and use a case structure in the Time out event to call the First event.
09-02-2011 02:11 AM
@0112687888 wrote:
And I found another solution, We can check a boolean local variable and use a case structure in the Time out event to call the First event.
Solution to what problem, exactly? That sentence make very little sense. Can you explain a little more what you are trying to say? Maybe attach a VI?
To see if the user has pressed the stop button, you would use a "value changed" event assigned to the stop button.
09-02-2011 09:08 AM - edited 09-02-2011 09:13 AM
There are a lot of ways to do it but I don't think you really need a "start event". If you do then you can use a hidden control as Altenbach suggests.
Another option is to use the timeout event and then set the timeout to -1 so it never fires again.
The reason I say that I don't think you need a startup event is because you can just execute some startup code before the event loop like this
The advantage of the first method is that you can have some other "reinitialize" event that sets the timeout back to 0 so the startup code is called. But all your events should be doing is sending messages to some other loop anyway so you still don't need a startup event.
Attached are both VIs in LabVIEW 8.0 format.