modbus + autostart

Topics about the Software of Revolution Pi
Post Reply
bartandras
Posts: 1
Joined: 06 Sep 2019, 12:36
Answers: 0

modbus + autostart

Post by bartandras »

Hi,

I am considering using revpi for the next project. I need to communicate with 3 modbus slave units and one modbus master unit with tcp. I need to calculate values for the master from the slave values. Is a core or core3 good for this?

Also I have found info about the virtual devices, etc., how to write code, etc. But how can I autostart my program after booting in?

Thanks.
Best,
András
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: modbus + autostart

Post by dirk »

Hi András, yes you can use a RevPi Core 3 module for your project. If you need a Hardware Watchdog then you have to use a Connect Module.
Have a look at the Tutorials for ModbusTCP Master and ModbusTCP Slave.
You may use Python3 with RevPiModIO2 library which works like a charm. There is much example code online i.e. Here.
A quick and easy way to autostart your program is to put one line into "/etc/rc.local". I.e. "python3 /path/to/myprogram"
The pros do this with "systemd".
Post Reply