LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Should I use a local, global, or shared variable to control start/stop of a program?

Your event structure wont fire. It's a common mistake, but in order for a wire/variable to activate an event you'll need the Value(signal) property. Also, the Event structure wait for events to occur (forever or until the wired timeout is met) which in this case means you'll only do 1 log write every time you click "start saving tunnel" (and thus generating an event).

 

The way it's structured now i'd simply change the event structure to a case structure with your And'ed booleans as case selector. Add a wait(100) to the main loop and it's a start. I assume there's some application at another computer updating those network shared variables?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 14
(623 Views)

Hi Yamaeda,

 

Thanks a lot. Still haven't had much luck with the event loop but finally got the case structure to work now. Also got other shared variables to update as well. Adding a wait inside the case structure certainly help. Thank you again.

 

tak

0 Kudos
Message 12 of 14
(596 Views)

The wait should actually be in the main loop to prevent it from cannibalizing/starving all cpu from other tasks. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 14
(584 Views)

Hi Yamaeda, the wait within the main loop is now refreshing at a rate of 50 ms (updating almost right the way) while the wait inside the "data writing" loop is at 1000 ms or longer. It seems to work good. Thanks again.

 

tak

0 Kudos
Message 14 of 14
(571 Views)