Page 1 of 1

Customized code on RevPi Connect?

Posted: 16 Mar 2021, 13:30
by Balakrishna
Hi All, I am using Revpi connect. In my project, I would like to use Revpi connect to read information from other device using Revpi Modbus TCP and implement logic in Revpi and send a control command to another device through Revpi Modbus RTU. I am new to RevPi and exploring examples. Is it possible to implement customized code in Revpi Connect to control both the devices at the same time using Modbus TCP and RTU?. Please do the needful. Thank you.

Re: Customized code on RevPi Connect?

Posted: 17 Mar 2021, 09:31
by dirk
Hi Balakrishna, have a look at the following video tutorials on the subject of Modbus here there are a total of four that are interesting for you.

https://revolution.kunbus.com/tutorials ... en_US#VT20
Tutorial 20 – Modbus TCP Master

https://revolution.kunbus.com/tutorials ... en_US#VT21
Tutorial 21 – Modbus RTU Master

https://revolution.kunbus.com/tutorials ... en_US#VT22
Tutorial 22 – Modbus TCP Slave

https://revolution.kunbus.com/tutorials ... en_US#VT23
Tutorial 23 – Modbus RTU Slave

Re: Customized code on RevPi Connect?

Posted: 17 Mar 2021, 10:39
by Balakrishna
Hi Dirk,

Thank you for your prompt reply. I go through these videos and able to read Modbus slave data. Now, I would like to write python code on Revpi connect. Is it possible to write my own python scripts on Revpi connect and compile & run? Please suggest any links or videos which are useful to me. Thank you.

Re: Customized code on RevPi Connect?

Posted: 01 Apr 2021, 18:12
by dirk
Hi have a look at the wonderful revpimodio2 Python library. Here is a short example:
viewtopic.php?f=6&t=2535&p=9196&hilit=bitmirror#p9196