06-21-2021 10:12 PM
Hi all,
I am trying to end the parallel loops using Rendezvous VIs when the loops reach some limit. I can do this with a click of the button using the stop button / event loop / close rendezvous, but for some reason, when I try to write a true to the stop button when a step-limit is reached, this does not work. It just hangs there, and still needs me to physically click the button. The event diagram uses value change for the stop button, which I thought is exactly what happens when I write true to the stop button (instead of clicking the button).
Can anyone explain why this is the case? My rookie attempt is attached.
Solved! Go to Solution.
06-21-2021 10:31 PM
So the reason your VI doesn't stop is because no event triggers the Event Structure.
You're setting the "Stop" button by local variable in the second loop, but this doesn't trigger a value change event.
You could optionally use a Property Node, in which case you can wire the "Value Change (Signalling)" property to true, but that's an odd kludge.
If the question here is about why, hopefully that answers it.
If instead you'd like to do something specific with options for stopping like a button or a counter, where the whole VI ends when either occurs, I'd suggest something like using Create User Event, Generate User Event, and Register/Unregister for Events, like below:
I didn't change other loops, and I haven't added the Event case you'd need for the Event Structure, but the dynamic terminals are added by right clicking on the Event Structure and clicking "Show Dynamic Event Terminals".
Then you get a new Event with a name based on the value wired to the Create User Event, here the event name would be "<Stop>: User Event" (under Dynamic).
This can be used to trigger the Event Handler when the (in this case second) loop exits.
06-22-2021 03:17 AM
A little off-topic - how do you use the rendezvous? I never felt the need to use it before, but maybe I am missing out on an easier way to do some things.
06-29-2021 08:41 PM - edited 06-29-2021 08:43 PM
Thanks cbutcher for your reply! Sorry for not getting back to you sooner! It works now and I am thankful for your speedy help.