LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Loop Timing

Solved!
Go to solution

Hi All.

In my application I am using 3 loops 

(1) Mian loop

(2) 10mSec Timed loop for Cyclic Transmission of a CAN Message

(3) 20mSec Timed loop for Reading incoming CAN messages

All is working and no serious issues so far however I have noticed that the Timed loops the Timing is not very stable I have seen deviations between 2 and 4 mSec ( I suppose this is part due  OS ) .

My question is is there any way in labVIEW to make the Timed loops execute with a more accurate execution rate, 

Any help comments are appreciated 

PIC1.jpg

Regards 

QMESAR

 

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 1 of 3
(2,287 Views)
Solution
Accepted by QMESAR

That is because you are running on Windows.  I have found that Timed Loops are really worthless on Windows systems.  They just add overhead with little to no gain and even block possible optimizations.  I recommend changing them to normal While loops and put in a wait for whatever you want your loop rate to be.

 

If you need the timing accuracy, then you need a Real Time system.


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 2 of 3
(2,259 Views)

Thank you very much for the information.

I have thought that it is WIN OS that is causing it ,

I have once done a CAN application in VB.Net which we accesses the Multimedia Timers for timing control and I must say that the MM Timers are running accurately and thought labVIEW had the possibility to access the MM Timers.It is no problem at the moment as the machine is only throwing an CAN Timeout after 1 cycle miss(10mSec) deviating 2-4 mSec around the 10mSec is ok for now .

 

Regards 

Peter

  

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 3 of 3
(2,251 Views)