LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the processor temperature ussing LabVIEW

Solved!
Go to solution

Cold you please give me some information about how can I get the PC processor temperature programatically?, is it possible?

Thanks in advance

0 Kudos
Message 1 of 6
(12,592 Views)
I have not looked into this but I doubt that it is possible except on something like a cRIO or PXI system. To get temps on a PC is not a trivial thing as you need drivers to handle every type of interface chip. That's why windows task manager for instance will not report temps and you have to get a program like speedfan or something to read them.
0 Kudos
Message 2 of 6
(12,566 Views)
Solution
Accepted by ajimenez

Hi AJimenez

 

Thanks for using NI Forums. 

 

There are some ways to achieve this. But this depends directly of the hardware. If the computer doesn’t have any temperature sensor there won’t be any way to read this.

 

You can test it using the WMI.

 

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers. WMI also supplies management data to other parts of the operating system and products, for example, System Center Operations Manager, formerly Microsoft Operations Manager (MOM), or Windows Remote Management.

 

To access this from LabVIEW you have to call the .NET ensemble: Management Object Searcher. In this object you have to query the specific part of WMI. For example if we want to know the Load of the Processors in a Dual Core Computer, the object that contains this is Win32_Processor Class (complete description of the class in the link section).

 

From this class we call the method get and for every value obtain you can search the properties. You can use the specific properties as "LoadPercentage" or we can obtain a text with all the properties. In the Attachments sections there’s a example to obtain the information from the Processor. Also an Example for Temperature Probe is provided (the function of this depends on the computer hardware). Not all computers support this property.

 

External Link: MSDN: Windows Management Instrumentation (WMI)
External Link: MSDN: Win32_Processor Class
External Link: MSDN: Win32_TemperatureProbe Class 

 

*We also provide support in spanish 

 

Best Regards

Coamín Cruz

Mensaje editado por Coamín
Download All
Message 3 of 6
(12,476 Views)

Thakk you Coamín, the info you provide is great, I appreciate your help.

Best Regards

A Jiménez

0 Kudos
Message 4 of 6
(12,448 Views)

Coamin,

 

I know it was three years ago, but thanks for posting up your vis!

 

Hopefully you're still receiving subcription notifications...

 

on the front panel of the temp vi you have a note

 

 

"In the Object Information you can see all the information that 

can be retrive If Temperature is not populated it returns sin32 as value"

 

Does getting "sint32" in the temp string indicator mean that this particular method is not compatible with the hardware/OS Im using? Or could it be that I am missing something else?  I see in one of the links you provided, it says the minimum supported client is "Windows 2000 Professional [desktop apps only]"

 

The processor load vi you attached works flawlessly!  

 

I am developing my code on a win7 pro 64b machine, and my target is a win7 pro 32b machine- I have tried the temp vi as an executable on both machines and it still indicates "sint32".  Is there something that I may be missing?  

 

Thanks

-Pat

0 Kudos
Message 5 of 6
(11,044 Views)

I update the subject. I have the same problem with sint32.

 

Thanks for the help,

0 Kudos
Message 6 of 6
(9,717 Views)