LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to Current CPU Load Amount?

Hi!

I need to setup a quick application for some critical timing I am trying to achieve.  Windows is really quite poor at achieving this.  What I really need is a real-time system, but I have what I have and I need to do what I need to do with it today.

There needs to be critical timing between two digital IO ports (in the msecs) once a switch is thrown.  If the CPU load is below 2%, I have no problems obtaining the timing I desire.  If Windows is butting in trying to do something in the background, my timing goes to poo.

Is there anyway to monitor the CPU load (w/o actually creating too much CPU load by monitoring it) so that my digital IO timing code does not fire until the CPU load is below some threshold?

Thanks!
-nic
0 Kudos
Message 1 of 4
(2,830 Views)

Hi nic

i guess there is a .NET function which can monitor what you need. i also think there is an example code for it on the ni side, but i don´t remember the location.

 

i found the location. I think this can help you

http://zone.ni.com/devzone/cda/epd/p/id/5405

Mike



Message Edited by MikeS81 on 01-25-2008 10:18 AM
0 Kudos
Message 2 of 4
(2,828 Views)
Here we go.  There is an example.  SimpleTaskMonitor that will work for me!  Thanks!
0 Kudos
Message 3 of 4
(2,817 Views)
Worked perfectly.  I'm getting about 0.5ms of percision in Windows!  Who knew it would be possible Smiley Very Happy .
0 Kudos
Message 4 of 4
(2,793 Views)