11-06-2010 01:09 PM
Hello!
I cant stop VI on stop control under while loop. I want when i run VI on stop button stop VI, stop reading share variable.
Can someone help me? sorry if my problem simple because i have started learning labview 2 weeks ago.
11-06-2010 01:54 PM - edited 11-06-2010 01:54 PM
You have nested loops. Which loop would you like to to stop? If one of For Loop-s inside Main While Loop, supply it with Conditional Terminal and place terminal of the stop button inside the loop.
11-06-2010 05:27 PM
i would like to stop the main loop when i started run VI! for loop stop when appear error.that's not problm..
11-06-2010 05:57 PM
You don't make much sense. Please add a few more sentences to the problem description.
Also, please attach the VI, for example we need to know the mechanical action settings of the various buttons. Make sure the stop buttons are latch actions.
11-06-2010 08:22 PM
This VI is under construction and during development program I have encountered some problems:
I would like when i open this VI run automatically VI, colleting value and display value on indicators. And during VI is running when i press Power off to stop collect value and close VI. I've attached VI and if if anyone knows to solve my problem I would be grateful to him.
Write your suggestions to improve VI.
p.s. sorry for my english:smileywink 😉
11-06-2010 08:39 PM
You can set a VI property to cause it to run when opened.
You can also use a property node to close the front panel of your VI when done.
Check spelling "Retrieve".
Your multiple while loops are confusing. What will cause your ini while loop to stop? It looks like it will run forever until you get an error with your shared variables.
Your second inner while loop stops when you hit the Stop button. Okay. But your outer while loop starts everything all over again unless you've managed to hit the Stop2 button first.
11-06-2010 09:15 PM
Your multiple while loops are confusing. What will cause your ini while loop to stop? It looks like it will run forever until you get an error with your shared variables.
yes, ini while loop will run forever until get an error with shared variables. i must do this because if something go wrong with my PLC i will get an error and ini while loop stop.
i put main while loop to continuously collect values and i must put stop2 button. when i run VI i can't stop VI until i press abort execution.that's my bigget problem.how can i stop my VI when i don't want to collect values and display on indicators?
this VI is designed that when i login and press button like windstation,pop up this VI and display on indicators real time values of my windstation.
11-07-2010 07:25 AM
any suggest to solve problem?
11-07-2010 12:03 PM - edited 11-07-2010 12:06 PM
Sorry, you express the problem in a very unclear way.
This is your VI modified in the way that ALL loops are stopped by the same button. The changes are marked with red arrows. Please note mechanical action of the button!
Attention: This is not a good solution in any means! This is only an attempt to understand your problem and give you a hint.