From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

windows 1KHz time loop limitation reason

Solved!
Go to solution

I am using timed loop in Labview2011 . I am not able to operate the time loop above 1kHz or less than 1 msec .i read in some answer on the forum that due to windows it is not possible to operate above 1kHz but reason was not given .i want to know Why windows can not operate time loop above 1kHz ?

 

 

Yours sincerely

0 Kudos
Message 1 of 10
(7,533 Views)

The only timing source required by Windows is the millisecond timer.  Therefore the timed loop will default to using that clock limiting the timed loop to millisecond resolution.  Windows DOES support a precision timer that can be used to control the average loop rate with higher resolution HOWEVER, this does not solve many problems since it is still non-deterministic And, you loose the timed loops unique execution system (reserved Threadpool)  worse, it introduces a variable resolution on different hardware (Not all precision timers operate at the same clock rate)

 

But you can read more about timing in this community nugget.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 10
(7,524 Views)

Thanks for Answering.

i have been trying . i wanted to run timed loop at micro sec period. It is possible by using TARGRTING PC in Labview but i just want to know why windows con not operate in Mhz in Labview time loops.

 

Your sincerely ,

0 Kudos
Message 3 of 10
(7,519 Views)

@Ali211 wrote:

Thanks for Answering.

i have been trying . i wanted to run timed loop at micro sec period. It is possible by using TARGRTING PC in Labview but i just want to know why windows con not operate in Mhz in Labview time loops.

 

Your sincerely ,


You can find the answer to this in Jeff's reply here.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 10
(7,505 Views)

If you wanna try the LabVIEW Real-Time Module and building a desktop real-time target, etc., this might be helpful for you.

 

http://sine.ni.com/cs/app/doc/p/id/cs-14703

 

 

0 Kudos
Message 5 of 10
(7,485 Views)

I am working with Labview RT and i know about PC targeting configuration But i dont know the reason behind windows limitaion of 1KHz at max?

 

Yours sincerely

0 Kudos
Message 6 of 10
(7,439 Views)

As billko already said, your answer is in Jeff's reply above.

 

Thus if you want to go to the microsecond range, you need to use a real-time operating system that you can download from NI websites. And you wanna use the RT LabVIEW with that real time system.

0 Kudos
Message 7 of 10
(7,421 Views)
Solution
Accepted by Ali211

@Ali211 wrote:

I am working with Labview RT and i know about PC targeting configuration But i dont know the reason behind windows limitaion of 1KHz at max?

 

Yours sincerely


 

The issue is the clock source.

 

I have used a hardware clock (an NI DAQ device with a built in clock) to drive a timed loop at 2KHz but that was only possible using a hardware clock.

 

For the MHz cycle rates you mentioned above, you will have to move to an FPGA to get that type of perfromance.

 

As to WHY?

 

Stepping into the "way-back-machine" and setting the target date for about 1979 we find that PC came equiped with keyboads but a mouse was an add-on. If you added a mouse you found that 50% of your CPU was used every time you moved the mouse. Since all we had was DOS back then no big deal. Moving forward in time to Windows 3.1 we are still running on top of DOS but we could now use a mouse.

 

Now to make it look like the mouse cursor was keeping up with the mouse moves, interputs were firing repeatedly and teh screen needed updated as quickly as possible. SO it turned out that using an SO clock that fire a 1 KHz was fast enough to keep up with the mouse.

 

Windows was designed to use a 1KHz clock and until MS decides to use a faster clock, we have to lieve in that environment... unless you abandon Windows and move to another OS.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 10
(7,407 Views)

@Ben wrote:

<snip>

Stepping into the "way-back-machine"...

<snippety-snip>


Wonder if anyone knows/remebers what the "way-back machine" is any more, or does is the knowledge lost when we go, Ben?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 9 of 10
(7,396 Views)

@billko wrote:

@Ben wrote:

<snip>

Stepping into the "way-back-machine"...

<snippety-snip>


Wonder if anyone knows/remebers what the "way-back machine" is any more, or does is the knowledge lost when we go, Ben?


Don't worry, I see little kids watching Bullwinkle (and therefore Peabody with his boy Sherman).

 


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 10 of 10
(7,392 Views)