09-18-2019 11:42 AM
Gu,
Get rid of the local variable for stop2 - just use the terminal. Then, inside your event loop, just use a constant to send the value to exit that loop. Finally, use a latching action on stop2. This will eliminate your need to hit stop2 twice.
09-18-2019 12:00 PM
Hi Johntrich1971,
Thank you for your suggestion.
Could you please modify my VI and upload it? I do not fully follow you.
The local variable Stop2 is to stop both upper and lower loops on the right simultaneously.
Regards,
Gu
09-18-2019 12:06 PM
Gu,
Yes, I understand that. The event structure will still fire even if the stop2 button is not inside it. You would then just use a True constant where the stop2 button currently is. This will stop both loops.
09-18-2019 12:12 PM
Attached is my rev showing the suggested change.
It should be easy to convert this to a state machine also - an MUCH more maintainable.
09-18-2019 02:15 PM
Hi Johntrich1971,
My LV is 2015, could you please convert your VI to 2015 compatible so that I can open it?
Gu
09-18-2019 02:20 PM
Here it is in 2015.
I encourage you to try to make the changes to your code yourself so that you can get a better understanding of how these things interact.
09-18-2019 03:19 PM
Hi Johntrich1971,
Thank you.
Gu