LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to guarantee an event structure executes at least once

I have an event structure that I want to execute one time on program start and then behave normally after that.  Is there an *elegant* way to do that?
 
Lee Jay
0 Kudos
Message 1 of 5
(2,758 Views)
on startup set the timeout to some number and put your code you wish to run inside the timeout case. then inside the time out case set it to -1 using a shift register.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 5
(2,755 Views)
That works.  And it's not as ugly as what I was going to do.
 
Thanks!
 
Lee Jay
0 Kudos
Message 3 of 5
(2,750 Views)
Jhoshkins' idea will work, but if you want the timeout to continue to function (not wait forever) you can put your code inside the True case of a True/False case structure, and use the First Call? to select it.
PaulG.
Retired
0 Kudos
Message 4 of 5
(2,746 Views)

I had timeout at forever anyway so this works just fine.

Lee Jay

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