LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute subVI - specific time

Solved!
Go to solution

Hello folks!

 

I have a generic application which execute a timed loop sequence. Inside loop, I tried to generate a random number and get the curent time/date when the number was generated.As you can see,

 

E.g :I set the period to 50 ms.In ElapseTime indicator , the difference between two successive elements varies between 47ms and 62 ms. My intention is to obtain 50 for this diferrrence.

 

0 Kudos
Message 1 of 5
(2,285 Views)

I get exactly 50ms increments if I set it to 50ms. What is your OS?

0 Kudos
Message 2 of 5
(2,281 Views)

Hi,

 

I also get those 47 to 62ms variations when setting a delay of 50ms (WinXP). That is due to limitations of the OS: before Win7 (or WinVista?) the resolution of GetDateTime is ~16ms, whereas Win7 offers a resolution of 1ms.

So the problem is not the exact timing of the TimedLoop but the limitations of measuring time on Windows OS...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,279 Views)

The OS is WinXP.

 

Is there a way to "cheat" that?

 

Thanks for your replies!

0 Kudos
Message 4 of 5
(2,274 Views)
Solution
Accepted by topic author Samoth

Hi Samoth,

 

no need to cheat. Just use the "Global Endtime" output of the TimedWhileLoop...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,272 Views)