02-27-2010 03:11 PM
Cold you please give me some information about how can I get the PC processor temperature programatically?, is it possible?
Thanks in advance
Solved! Go to Solution.
02-27-2010 09:22 PM
03-08-2010 04:15 PM - edited 03-08-2010 04:16 PM
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
03-09-2010 05:19 PM
Thakk you Coamín, the info you provide is great, I appreciate your help.
Best Regards
A Jiménez
04-30-2013 07:25 AM
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
07-03-2015 04:33 AM
I update the subject. I have the same problem with sint32.
Thanks for the help,