ni.com is currently undergoing scheduled maintenance.

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

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 5 条)
3,093 次查看
Labview executes code in parallel. There is nothing to prevent the tank to be immediately updated.
0 项奖励
2 条消息(共 5 条)
3,090 次查看
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 项奖励
3 条消息(共 5 条)
3,081 次查看

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 项奖励
4 条消息(共 5 条)
3,074 次查看
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 项奖励
5 条消息(共 5 条)
3,063 次查看