01-02-2013 12:22 AM
I want to make a program which has 2 thread, one of which is to control some devices, and the other is to measure outputs of the devices.
To do that, I should make a 2 independent loops, but there comes a problem here.
I want to terminate 2 loops at the same time, but it's difficult for me to do that, because when I try to notify upper sequence's termination to lower loop by some value change, they have some dependency.
That's why I need your help. I want to know how to stop lower loop when the upper sequence's termination keeping their independency.
Please let me know. Thank you.
01-02-2013 12:26 AM
i missed event timeout.
01-02-2013 02:20 AM
Hi tonny,
you could use
- a local variable of a boolean flag. Set the flag in the upper sequence and read the local in your event loop...
- a value change-event of a boolean control (with a "value (signalling)"-property node)...
- a user-defined event (of a boolean control)...
- many more possibilities...
01-02-2013 07:08 AM
Is the upper loop commanding the lower loop at all? I would think you would have some type of communication between the loops. Just use that communication to send a stop command. Or the next best way is to just simply use a notifier.