bartandras
Topic Author
Posts: 1
Joined: 06 Sep 2019, 12:36

modbus + autostart

06 Sep 2019, 12:41

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: 491
Joined: 15 Dec 2016, 13:19

Re: modbus + autostart

12 Sep 2019, 16:39

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".

Who is online

Users browsing this forum: No registered users and 0 guests