dumpfbacke - 2020-12-13

hi,
i have tested SysProcess.SysProcessExecuteCommand2 with argument "vcgencmd measure_clock arm" to give back cpu clock.
its working fine.
now my question, is it basecly possible to call a phyton script SysProcess.SysProcessExecuteCommand2?
i have simple pythonscript reading processortemperatur.
if i run it in shell it gives me back the temperature in the shell.
so now when i call thist script with SysProcess.SysProcessExecuteCommand2 by "command1:= 'sudo python mytest.py'" it schould give me back in "pszStdOut" the temperature?
am i right or basecly not possible?
in each case it does not work if i try this.
this is my code:

command1:= 'sudo python mytest.py';
IF bDummyBool THEN
    SysProcess.SysProcessExecuteCommand2(pszCommand:=command1, pszStdOut:=stdout1, udiStdOutLen:= SIZEOF(stdout1),pResult := ADR(Result));
    bDummyBool := FALSE;
END_IF;de

please answer me.
thanks dumpfbacke

 

Last edit: dumpfbacke 2020-12-13