06-10-2011 05:59 AM
Hello,
I want a vi and a subvi to stop simultaneously. Thus, I created a global variable, STOP, which I connected it with the stop of the main vi and also with the conditional terminal of the subvi. However, it doesn’t work. Could somebody explain where am I wrong?
Thank you in advance
06-10-2011 06:08 AM
Polling principle is the key. In Your main.vi global variable won't get "true" until subvi ends. Your code should be modified.
06-10-2011 06:16 AM
These vi's will do.
Regards.
06-10-2011 06:16 AM
Thanks for your response but could you be more specific?
06-10-2011 06:19 AM
I've changed main.vi a little. Just look.
06-10-2011 06:26 AM
Thanks again, but I am using LabVIEW 8.6.1, could you please save the vis for this LabVIEW version.
Thank you in advance
06-10-2011 06:44 AM
Nouch
06-10-2011 07:23 AM
Hi,
You are making 2 mistakes. The first is that you didn't temporize the loops. The second is that when you launch the main VI this straight away launch the subvi that get the control and don't release till something change the value of the global variable, but in that time the main isn't running, so even though you press the stop button the main is in not running mode and doesn't change the variable.
Try this with the VI server to pass trough the control between two VIs.
06-10-2011 07:35 AM
I'm sorry but I have forgot to tell you to be carefull to the machanical action of the stop button when you use the VI server method to pass the data through VIs.
06-10-2011 07:45 AM
Dear g_Ricky,
Thank you for your reply. Could you please save the vis in 8.6.1 LabVIEW version because I can't open it.
Thank you in advance