How To: Read LM Sensors (CPU Temp) on 752-9800 i7 Edge Computer

These steps will allow the CPU tempurature sensor to be displayed via a command line tool.

  1. SSH into the controller (root/wago)
  2. type:

apt-get update
image

3.type:

apt-get install lm-sensors
image

  1. type:

sensors-detect
image

Then type YES to add the Intel thermal sensor. Click no on the other questions until the end where it asks to add to the /etc/modules file, then type YES.

  1. To see the current temperature, simply type:

sensors
image

or to monitor continuously type:

watch sensors
image

2 Likes

Is there a way to install the lm-sensors package on a PFC200 Controller?
Or to be more specific: How can we get the CPU temperature and system supply voltage from a PFC200?

1 Like

It’s not available in PFC, only TP & EDGE Ctrl:


thermal_zone directories direct us to thermometers placed on the board.

You can read them easy without any external program:
cat /sys/class/thermal/thermal_zone0/temp
EDGE Computer:
cat /sys/class/thermal/thermal_zone0/temp
cat /sys/class/thermal/thermal_zone1/temp

3 Likes

Hello, I am searching for the same thing as Chris,
a Wago library to get the CPU temperature directly in Codesys
I am also interested in getting working environment properties like
PLC Cycle time
Memory size
the status of the PLC in general
(I am working with CC100, PFC200 and PFC300)
Should we handle this only on Linux?

hello there,

I “found” the same working way with PFC300 to get the temperatures:
With the linux command:
grep -h . /sys/class/thermal/thermal_zone*/temp | xargs | tr -d ‘\n’ (edited)
you have the right output!
Then, you create a bash script (750 rights) inside /etc/config-tools (ShowTemps.sh)
and then, you use the WagoAppConfigTool.FbConfigTool function in Codesys,
with these call
xExecute:= xGetCPUsTemp,
sCallString:= ‘ShowTemps.sh’,
sResultString=> sResultTemps

You get something like ‘48146 47246’ (I am guesing these are temp CPU0 and CPU1)
then you need one SPLIT (I used Codesys standard) and 2 converts STRING_TO_REAL and divide by 1000,
and you are ok!
Thank you Eckhard for the recording https://www.wago.com/global/lp-thank-you-onlineseminar-pfc-console

I hope this would be useful for someone else!
George