PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the CPU temperature using LabWindows/CVI.

Hi!

 

Is there any way (i.e. an Instrument or a Library) to read the CPU temperature???

I'm using LabWindows/CVI as development environment, on a dual-core laptop.

 

Any help would be appreciated.

 

THANKS!

0 Kudos
Message 1 of 6
(4,915 Views)

Hi Max!

There isn't a specific library in CVI but you could call an executable that measures the CPU temperature.

At the following link you can free download an executable called MobileMeter:

http://www.softpedia.com/progDownload/MobileMeter-Download-24748.html

 

You can find the steps you need to call an executable in CVI in this forum.

 

Best regards,

Serena M.

0 Kudos
Message 2 of 6
(4,900 Views)

Thanks, Serena.

 

But now another question is bothered me....

 

if, using this external application, my simulation program discovers that the CPU temperature is too high, how can I lower this temperature? Is it sufficient to suspend the simulation thread(s) (for instance with the Task Switching facility of the Utility library) ?

 

Ciao, Massimo.

 

0 Kudos
Message 3 of 6
(4,898 Views)

Hi Massimo!
CPU temperature is a factor of how hard your processor is working. By running a program that holds it at 100% you're giving it a maximum strength workout.If you're concerned about high CPU temperature your options are to either reduce your CPU load or improve its cooling.

 

Usually there are lots of threads running in Windows but the threads that really consume CPU are those that use a lot of mathematical operations, as simulations for examples.

To reduce the CPU load you could try to optimize the way your CPU works: maybe the application RMclock could help you (have a look for example at this link).

Otherwise you can improve the cooling of your laptop, increasing you fan's rpm. For example you could use SpeedFan (see this link).

 

Best regards,

Serena M. 

0 Kudos
Message 4 of 6
(4,893 Views)

Serena,

 

thanks again for your help and for the hints you gave me. But, as usual, a question produces another (or many other ...) questions.

My idea was to reduce the load of the CPUs (I have a dual core laptop), in which my simulation threads (developed with LabWindows/CVI) run. I thought of the following algorithm:

 

1) Run the simulation threads.

2) Identify the CPUs temeprature.

3) When the CPUs temperature is over a given threshold, suspend all the simulation threads.

4) Polls the CPU temperature till it falls down the threshold.

5) Go to step 1.

 

Even using an external application like those you suggested me, I cannot obtain the temperature information inside the LabWindows/CVI code. Do you know any application which can returns (in some shared memory location) the temperature info? Probably it's sufficient a text report to be analyzed inside the code ...

Do you think that the threads suspension can be realized simply by a shared resource (like a sempahore) upon which blocking any thread?

 

Thanks again, Massimo.

0 Kudos
Message 5 of 6
(4,888 Views)

Hi Massimo,

I don't know if there is some other applications that register the temperature in a shared memory location.

Some of the newer computers that are ACPI compatible have ACPI Thermal Zone, you can check this in Device Manger under System Devices. Anyway I'm not sure how this tool works, maybe you can search in the net.

To pause the threads you can use the SuspendThread() function in CVI, but this is usually used to pause a secondary thread when the primary is doing something with high priority.

I suggest you to have a look at this tutorial, to see in which way you can use this function.

 

Best regards,

Serena

0 Kudos
Message 6 of 6
(4,864 Views)