04-18-2011 04:28 PM
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
04-19-2011 06:26 PM
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
04-20-2011 01:16 AM
The wait should actually be in the main loop to prevent it from cannibalizing/starving all cpu from other tasks. 🙂
/Y
04-20-2011 07:27 AM
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