ECNJAPR
Topic Author
Posts: 7
Joined: 06 Feb 2019, 15:02

Modbus TCP Examples

06 Feb 2019, 15:57

I am searching for information to write/read the Modbus TCP Slave/Master data from Python. I don't know what should be written in code to access de configuration from PiCtory. Are there any examples using Modbus TCP to communicate with any other device using Python. Using RevPi Connect.
 
Industrialsys
Posts: 3
Joined: 10 Feb 2019, 18:25

Re: Modbus TCP Examples

11 Feb 2019, 21:10

Hi
I'm creating a node red aplication with Rev Pi Connect. On this aplication all data is collected via Modbus TCP functions. For that purpose I execute several commands. What is your idea?
Do you pretend to know what command you should run to retreive values from proccess image to inside your application?
 
User avatar
dirk
KUNBUS
Posts: 588
Joined: 15 Dec 2016, 13:19
Location: Ostfildern
Contact:

Re: Modbus TCP Examples

12 Feb 2019, 17:51

Hi, this is a good question because we have tutorials about the usage of the Modbus TCP / RTU / Master / Slave virtual Modules in PiCtory. But with Node-Red we currently have no experience. What about that Node-RED Modbus TCP Node https://flows.nodered.org/node/node-red ... -modbustcp ? And here is a Modbus Node https://flows.nodered.org/node/node-red-contrib-modbus and here is a Modbus Python library https://pypi.org/project/pymodbus3/
 
ECNJAPR
Topic Author
Posts: 7
Joined: 06 Feb 2019, 15:02

Re: Modbus TCP Examples

14 Feb 2019, 17:33

I am using the Pi Connect to communicate from one Ethernet Port (ETH0) to the other (ETH1). I was using the pyModbusTCP Library but I got stuck at setting communication with each ethernet port in the same program.
 
Industrialsys
Posts: 3
Joined: 10 Feb 2019, 18:25

Re: Modbus TCP Examples

24 Mar 2019, 00:16

Hi to all
As I told before I integrate Node Red with my Rev Pi Connect. I was able to see that Dirk send information about the way to make Node Red the Modbus TCP Master.
My aproach was a bit different. Node Red just provide GUI for the operator and manage all information collected by Modbus TCP channel. Modbus information is collected by PiCtory. I configure all network in this tool. To bring all collected data to Node Red I used Exec node and run command to read / write. I had to active Swamp mpde because CPU overload. Please check the attached file.
Pictory is a very nice tool despite the fact it doesn't handle float variables. This fact brings some complectity when you need to use such kind data.
If further details are needed please let me know.
Attachments
1.png
1.png (275.29 KiB) Viewed 1926 times

Who is online

Users browsing this forum: No registered users and 3 guests