I want to measure and see the processor temperature in Codesys code.
Tell me how to do it?
Command request comes to the mind in SSH -VcGencmd Measure_Temp
But I do not know whether you can call such commands from Codesys?
Maybe there is an alternative way measuring temperature?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
"Read ProcessorTemperature of the Pi and Show cpuinfo in IEC -
add in /etc/CODESYSControl_Usr.cfg the [SysProcess] section
Output of the executed command will be filled into pszStdOut"
I went over the link. The project did not find. Links do not pass
As I understood the whole thing in the sysprocessexecutecommand2 function. Using it, you can call commands?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks! Saw everything!
Excellent example.
It is a pity in the project description there is no description that it is to write in codesyscontrol_usr.cfg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CS 18 SP 4 target 4.7.0.0 this method does not work, I tried to download it as root, the result was unsuccessful. Can't get temperature. It seems to me that after version 4.3.0.0 you changed something and this something breaks the system.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have already tried different options, here is a screenshot of the program and file settings, in response I see result = 1. What could this mean? Target version 4.7.0.0 CS SP18 P4. The visualization and the code itself work, the only problem is getting the temperature request command.
I want to measure and see the processor temperature in Codesys code.
Tell me how to do it?
Command request comes to the mind in SSH -VcGencmd Measure_Temp
But I do not know whether you can call such commands from Codesys?
Maybe there is an alternative way measuring temperature?
Thanks.
Hi,
"Read ProcessorTemperature of the Pi and Show cpuinfo in IEC -
add in /etc/CODESYSControl_Usr.cfg the [SysProcess] section
Output of the executed command will be filled into pszStdOut"
https://forge.codesys.com/forge/talk/Runtime/thread/04361f89ec/?limit=25&page=0
Last edit: eschwellinger 2021-09-21
Thanks! After clicking on the link I did not find the instruction.
Can you describe in more detail?
click on the link and then scoll down -> more posts then scoll until you find the screenshot - and there you'll find the project I guss.
I went over the link. The project did not find. Links do not pass
As I understood the whole thing in the sysprocessexecutecommand2 function. Using it, you can call commands?
sure..
Thanks! Saw everything!
Excellent example.
It is a pity in the project description there is no description that it is to write in codesyscontrol_usr.cfg
On target 4.5.0.0 and raspberry PI4 does not work. Maybe you need to apply the new versions in a different way?
CS 18 SP 4 target 4.7.0.0 this method does not work, I tried to download it as root, the result was unsuccessful. Can't get temperature. It seems to me that after version 4.3.0.0 you changed something and this something breaks the system.
it works with all versions the only thing is to add:
/etc/CODESYSControl_Usr.cfg:
[SysProcess]
Command=AllowAll
BR
Edwin
I have already tried different options, here is a screenshot of the program and file settings, in response I see result = 1. What could this mean? Target version 4.7.0.0 CS SP18 P4. The visualization and the code itself work, the only problem is getting the temperature request command.
seems that in newer OS image this command is not located at /opt/vc/bin/ so remove it and just execute:
'vcgencmd measure_temp' then it will work.
Thanks a lot! Now everything works!
It remains to deal with USB - Com port.