LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait in While loop

Solved!
Go to solution

Hi

I want my while loop to excute according to the time constant I set in an array, but it won't follow exactly.

For example, I set the time as 1000,1000,3000,3000...: but it's more like 1000,1000,1000,3000....sometimes. but sometimes seems correct...

What's Wrong?

Thanks in advance

帖子被seafood在 05-04-2009 04:44 AM
时编辑过了
帖子被seafood在 05-04-2009 04:46 AM
时编辑过了
帖子被seafood在 05-04-2009 04:47 AM
时编辑过了
0 Kudos
Message 1 of 5
(3,519 Views)
Solution
Accepted by topic author seafood

Hi seafood,

use the "wait" function instead of the "wait until ...". Is your vi on a RT target? If the loop runs more, then available elements in your array, then you'll get 0 as wait time.

 

Mike

Message Edited by MikeS81 on 05-04-2009 11:50 AM
Message 2 of 5
(3,512 Views)

Thanks Mike, It works

Now I wonder how accurate this 'wait' could be? in micro seconds region or even smaller?

 

0 Kudos
Message 3 of 5
(3,499 Views)

Hi seafood,

the help says you get a milliseconds value. If you need it more exact, then you should think about a RT target.

 

Mike

0 Kudos
Message 4 of 5
(3,488 Views)
Bingo! If you use a RT target, you can get a subtle accuracy!
0 Kudos
Message 5 of 5
(3,455 Views)