10-22-2007 09:51 AM
10-22-2007 09:53 AM
10-22-2007 09:54 AM
I didn't see your attachment.
What triggers a stop in that sub-vi? Maybe the condition was met (for some reason).
RayR
10-22-2007 10:03 AM - edited 10-22-2007 10:03 AM
I quickly looked at your attached image.
You are using a Local Variable and a reference to another vi for your "Run/Stop". I could not see the top of your While Loop.
However, if you write elsewhere to the Local Variable (Run/Stop) or you change the values of the boolean within the sub-vi where you are sending the "run/Stop" reference, then the loop could be stopped externally to the loop (or internally with an unseen Local at top of loop).
Curious... Why are you using a Local Variable for Run/Stop???
Message Edited by JoeLabView on 10-22-2007 11:04 AM
10-22-2007 10:04 AM
10-22-2007 10:12 AM
Wait... what??... 😉
I need to step back a little and understand what you're trying to do..
Looking at your subpanel-vi.png, you're code will be facing some race condition.
When Run/Stop is true in the upper loop, that True value is immediately sent to the Local Variable is the bottom loop. So unless the Stacked Sequence Structure gets to the Run/Stop Local variable first, then the bottom loop will stop..
Okay.. now to the reason I tilted at the top of this message....
You are disabling the Run/Stop button and hiding it?? That's probably why you're using the reference... (deep breath 😉 )
You don't want to do that.. You always want to be able to control (especially stop) any code that you write. There are tricks out there, but the tricks are to help you regain control of the PC and not the VI 😄 That's why it's a good idea to describe the logic in your approach. Tell us more about what you are trying to do.
🙂
10-22-2007 10:35 AM
10-22-2007 07:59 PM
Does Front Panel activity affect both loops (and stop them)?
If so, you should have a look at Event Structures.
10-23-2007 08:12 AM
10-23-2007 02:09 PM
Hi Joseph,
Does the subVI stop running if it's running by itself as well? How about if run in a simplified version of the very outer level VI.