Run Linux command
-
Hi All,
I have a python script running on a RPi, if the RPi shuts down I have a service call to restart the script, but it doesn't always work. The script is for modbus comms between the RPi and another device.
Is there a way I can run the script from within REXYGEN? I've tried the EPC block and can't seem to get it to work. Have I done something wrong or there there a better way?
Cheers,
Mike -
@MikeyH Hi Mike,
Thanks for your question. I can confirm that using EPC FB is the right way. I don't see anything wrong - maybe just "sudo" is not necessary in this case. Just put the rising edge to the "EXEC" input and it should run the command.
Does the System log say anything?
Cheers,
Tomas -
@cechurat Hi Tomas,
I had to delete all these highlighted lines. It worked perfectly then.
Cheers,
Mike -
@MikeyH Hi Mike,
thanks for sharing the solution with the community!
Good luck with your project.
Cheers,
Tomas -