From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

stop button controling different loops not updating

This seems like a fairly mundane problem, but can't seem to get arround it.
 
I am using one stop button to terminate operations on several while loops which run in paralle.  When the stop button is pushed, the conditons does not change to true, even after several loop iterations.
 
thank you for your advice
 
Alfonso
A. Lopez
0 Kudos
Message 1 of 5
(2,814 Views)

How are you passing the value of the stop button between the loops? What's the mechanical action of the button? What kind of operations are inside the while loops? Are there any that take a long time to run (i.e. very long delays)? If you could post your VI or an example that demonstrates the problem, it would help.

p.s. In the future, you should post questions like this to the LabVIEW board (I'm assuming that's the language you are using). This doesn't sound like a DAQ problem.

Message 2 of 5
(2,805 Views)

OK,  I will re post to the other board.

 

The stop button function is changed when pressed (default in lab view).  the stop button value is passed to all loops via a wire tunnel.  All loops have a millisecond multiple timer to synchronize operation. 

I read in help the while loop only reads the first input of the stop button and then does not "look" at any further changes.  So I now know I can not pass a stop comand in this manner. I tried a local variable, but this does not allow me to wire the local variable to the stop condition. 

thanks

Alfonso

A. Lopez
0 Kudos
Message 3 of 5
(2,802 Views)

Well, if you wired the stop button from inside one while loop to the others, then the other while loops don't run in parallel. In fact, they wouldn't even start until the first while loop was done and no, Latch When Released mechanical action does not permit the creation of a local variable. The simplest solution for you is to change the mechanical action. Change it to Switch Wehn Released and then you can use a local. You can set the stop button back to false with another local variable.

Message Edited by Dennis Knutson on 03-15-200609:34 AM

Message 4 of 5
(2,800 Views)

Great point Dennis and thanks for your reply!

Actually this EXACT same problem is featured in our LabVIEW basics class as an illustration of Dataflow Programming.  I recommend that anyone interested in LabVIEW programming take a look at registering for a local course.  Feel free to contact NI for more information.

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 5 of 5
(2,785 Views)