SSH command from CoDeSys

there are 2 ways to call linux commands.

WagoAppConfigTool works smart, because it creates sub task in the background and monitor PID if it is done, so it doesn’t block runtime. In this library you can call ./start_reboot script to reboot controller.

Second possibility is to use codesys SysProcess library (function SysProcessExecuteCommand2 in sublibrary SysProcess Implementation). This way you can call directly you command. But be aware, that it creates subprocess from called task, so the task stops untill it returns value. so this way is better to call from separate task with lowest priority.

3 Likes