03-02-2010 03:24 PM - edited 03-02-2010 03:34 PM
Solved! Go to Solution.
03-02-2010 03:30 PM
The stop boolean is not being polled, so the loop is not going to stop from a user input. Not sure is that the problem or not.
Yik
03-02-2010 03:33 PM
03-02-2010 03:36 PM
03-02-2010 03:38 PM
Classic dataflow problem. When you run Fred_2 the values of its front panel controls are passed to the subVI. Changing these while the subVI is running does absolutely nothing to the subVI. Furthermore, while the subVI is running, the Stop button on its front panel is only read when it starts. While the for-loop in the subVI is running it is using the value from when the loop first started since it's being tunneled in.
If you want the loop inside the subVI to stop based on a stop condition of a Stop button on the front panel of the main VI then you need to pass a reference to the top VI's Stop button to the subVI. Inside the subVI's for-loop use the Value property to read the state of the top-level VI's Stop button. Note that you will need to change the latching action in order to be able to read the value.
03-02-2010 03:40 PM
03-02-2010 03:44 PM
03-02-2010 04:33 PM - edited 03-02-2010 04:34 PM
03-02-2010 05:07 PM
03-03-2010 09:26 AM
smercurio_fc ,
Sorry you'll have to forgive me. At the time I didn't see how editing the front panel would help make the reference a different type.
I guess my little LabVIEW world was turned upside down learning that in all these years I never had to use a reference, like this:)
I guess I should share with other that to place a reference you have find it in the library and then set it by right clicking and chosing:
VI Server Reference -> Generic -> GObject -> Control -> Boolean
You also have to make sure include data type is selected on the front panel control. The working updated vi is attached.
Regards,
-SS