Entradas

Mostrando entradas de octubre, 2019

Retrieve CPU temperature

Imagen
Lately I had to check the CPU temperature in a critical acquisition system, and I thought it could be a good thing to share here. I know there are several applications to do this and much more, but getting it from our code allows to react conveniently to any event. Now, IMPORTANT, the VI doesn't work on its own. First you must download the Open Hardware Monitor . Extract OpenHardwareMonitorLib.dll from the zip file and put it in the same folder the VI is located. The objects exposed in it use .NET Framework 2.0 and above, but that shouldn't be a problem in any modern machine. On the other hand, this works only for Windows , obviously. And remember, the application (either an .exe or the LabVIEW IDE) must run with administrator rights (otherwise you'll get error 1172 ). Download (VI for LabVIEW 2016) Now, if you haven't worked with .NET functions in LabVIEW, this can be a good opportunity to familiarize with them. Let's take a look at the code. First we