Page 1 of 1
AIO Values to MOdbus TCP Slave
Posted: 20 Jan 2020, 14:56
by h2oil
Im looking to poll values every one second from AIO card InputValue_1-4 and save these to Modbus Slave TCP to be accessible remotely.
Cant find any documentation to do this?
Re: AIO Values to MOdbus TCP Slave
Posted: 20 Jan 2020, 15:16
by dirk
Hi have a look at
this post which ist a Python snipped that you can sure easily adopt according to your needs.
You have to configure the AIO and the ModbusTCP Slave in PiCory first. You can use the virtual module ModbusTCP in PiCtory here:
https://revolution.kunbus.com/tutorials/overview-aio/
https://revolution.kunbus.com/tutorials ... tcp-slave/
Re: AIO Values to MOdbus TCP Slave
Posted: 20 Jan 2020, 16:32
by h2oil
To run this script on startup, does it have any required packages to install first?
Also what are the output tags for the Modbus Slave TCP - I cant find them in the documentation either.
Thank you
Re: AIO Values to MOdbus TCP Slave
Posted: 21 Jan 2020, 16:45
by dirk
Have a look at your PiCtory variable names here. For autostart there are many options available. The quick and dirty solution is to execute your script in "/etc/rc.local". Have a look at the
Tutorial 10 – Python headless.