ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay loop problem

I have a small problem with adding a delay to a for loop.I didn attach the whole coding but just a simple example just so u guys can understand what i am asking here..as u see ive introduced a 2000 msec delay in for loop..but as soon as i click run in this case the tank value changes to 3 but i want the calue to show 3 only after 2sec(2000msec).. how do i achieve this?
0 Kudos
Message 1 of 5
(3,007 Views)
Labview executes code in parallel. There is nothing to prevent the tank to be immediately updated.
0 Kudos
Message 2 of 5
(3,004 Views)
is it possible to add a reset button so that tank can be set to zero b4 starting the program since the previouse value at stop of execution still shows.
0 Kudos
Message 3 of 5
(2,995 Views)

Controlling when the indicator gets updated is just a matter of correct dataflow. Setting the indicator to a default value when the VI starts requires a local variable.

These are LabVIEW basics and you can use the resources at http://www.ni.com/academic/lv_training/how_learn_lv.htm to start.



Message Edited by Dennis Knutson on 04-27-2008 09:09 AM
0 Kudos
Message 4 of 5
(2,988 Views)
You could also delay the start of the loop by 2000ms. There are many possibilities, here are two more. 🙂 The rest of the code will dictate the best way to do this.
 
 
The secret is in dataflow and data dependency. Use execution highlighting to get a better understanding of it all. 😄


Message Edited by altenbach on 04-27-2008 11:00 AM
0 Kudos
Message 5 of 5
(2,977 Views)