Modbus TCP as Master-Slave

Topics about the Software of Revolution Pi
Post Reply
Joca
Posts: 14
Joined: 24 Aug 2021, 17:41
Answers: 0

Modbus TCP as Master-Slave

Post by Joca »

Hello,

In a project, i need to use the Modbus TCP as Master-Slave, but i don't know the right configurations in the PiCtory.
The arquiteture of the project is like the example image, attached.

Can someone help me, to know the right way to do it?

Thanks all guys :)
Attachments
Protocol_Modbus-TCP.png
Protocol_Modbus-TCP.png (122.67 KiB) Viewed 2284 times
Conf.PNG
Conf.PNG (243.23 KiB) Viewed 2284 times
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Modbus TCP as Master-Slave

Post by nicolaiB »

Hi Joca,

please have a look at our tutorials regarding the configuration of our (virtual) Modbus modules: https://revolutionpi.com/tutorials/modb ... rect=en_US. For Modbus RTU you will need either a RevPi Connect with an integrated RS485 interface or a Core3 with an external USB to RS485 adapter.

BR Nicolai
Joca
Posts: 14
Joined: 24 Aug 2021, 17:41
Answers: 0

Re: Modbus TCP as Master-Slave

Post by Joca »

Hi Nicolai,

Yeah, i see the tutorials however i don't know how to ask, with TCP protocol, several devices and replay for another?

I have an RevPi Connect with an integrated RS485 interface, 4 devices (they use TCP protocol), and a box that integrate all the devices to a SCADA system.
My objective is to use the revpi to share the information of that 4 devices to the box?
The box needs to write/read information in the memory of the devices.


Thanks :)
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Modbus TCP as Master-Slave

Post by nicolaiB »

Hi Joca,

just to clarify if I understood your project requirements correct: You want to collect data from 4 modbus TCP slaves and export the collected data to your SCADA system via Modbus?

The first part can be done by configuring an individual modbus TCP master for each slave (https://revolutionpi.com/tutorials/modb ... -tutorial/). After that the data is available in the RevPi process image and can be used for example with Python and the library revpimodio2 or software like NodeRed. In order to make the data available to your SCADA via modbus you have to configure another modbus master or slave and write a small programm which writes the data from the corresponding registers in the process image to the corresponding output register of your virtual modbus device for SCADA.

Nicolai
Joca
Posts: 14
Joined: 24 Aug 2021, 17:41
Answers: 0

Re: Modbus TCP as Master-Slave

Post by Joca »

Hi Nicolai,

Yeah, and beyond that i need to give orders to the 4 devices.

My biggest difficulty is in sending orders to 4 devices, because they are slave and master at the same time.
I need to wirte and read infoamtions, and that is the detail that I can't see the solution

Thanks :)
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Modbus TCP as Master-Slave

Post by nicolaiB »

Hi Joca,

usually the devices have input and output registers, where the input registers are used for commands and settings. Maybe you can share the datasheet of your device?

Nicolai
Joca
Posts: 14
Joined: 24 Aug 2021, 17:41
Answers: 0

Re: Modbus TCP as Master-Slave

Post by Joca »

Hi Nicolai,

I'am trying to use a RevPi like master and slave at the same time.
I need to perform requests and response for a SCADA system, and that is my question: how its possible a revpi be master and slave?

John
User avatar
nicolaiB
KUNBUS
Posts: 877
Joined: 21 Jun 2018, 10:33
Answers: 8
Location: Berlin
Contact:

Re: Modbus TCP as Master-Slave

Post by nicolaiB »

Hi Joca,

you can configure multiple virtual modbus master and slaves in Pictory.

Nicolai
Post Reply