LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Diff wait until next ms & wait function

1. What is difference between wait until next ms & wait function.
2. I have input data 9 to wait until next ms & at output terminal is see is 2.43184E+7. What does that mean?

0 Kudos
Message 1 of 7
(3,377 Views)

Hi Vindhy,

 

the answer to BOTH questions can be read in the LabVIEW help for those two functions.

Did you read the help?

Which part isn't explained in the help?

 

Wait, WaitForNextMultiple

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,375 Views)

Sry I didn't post my queation corrent.

Let me rephrase again.

 

1. When both function wait for sepecified amount of time then what's the difference. 

2. Also wait until next ms help says "However, it is possible that the first loop period might be short", what does that mean.

3. Help says that function returns value of the millisecond timer after the wait. How does it relate e.g for input value 9 I get some radom time?

 

 

0 Kudos
Message 3 of 7
(3,323 Views)

Apok's link will answer most of your questions.

 

The value that comes out of the function is not random.  It is the value of the millisecond clock.  The one the PC maintains, and is basically the amount of time that has passed since the PC was turned on.  (Of course the value can roll over.)

0 Kudos
Message 5 of 7
(3,296 Views)

Hi Vindhy,

 

3. Help says that function returns value of the millisecond timer after the wait. How does it relate e.g for input value 9 I get some radom time?

- You don't get a "random time", you get the millisecond timer value. That timer count the milliseconds since start of your computer…

- There is no relation between your input value and the current millisecond timer value…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(3,294 Views)

@Vindhyachal.Takniki wrote:

1. When both function wait for sepecified amount of time then what's the difference. 

2. Also wait until next ms help says "However, it is possible that the first loop period might be short", what does that mean.

3. Help says that function returns value of the millisecond timer after the wait. How does it relate e.g for input value 9 I get some radom time?


1, 2.  The Wait (ms) does wait the amount you told it.  The Wait Until Next ms waits until the ms timer reaches a value that is divisible by the amount you told it.  It does not actually wait the amount of time you told it.  So if you start at 89 for the ms timer and use the Wait Until Next ms with a wait of 100ms, the wait will actually be 11ms (will wait until 100 is reached by the timer).

 

3. As other have said, they just spit out the value of the timer when the wait ended.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 7
(3,284 Views)