Modbus tcp ip

Hello B&R Community,

I have used an X20CP3586 PLC in a data center project. All data is transferred to the SCADA system over Modbus TCP/IP using the ModbusTcpSlave function block.

Now, there is an additional customer requirement to transfer the same data to a second SCADA system over TCP/IP.

Is it possible to use another ModbusTcpSlave function block with the same PLC IP address and the same PLC port?
If this is possible, where can I configure or enter the Slave ID for the ModbusTcpSlave function block?

Hi @Mahesh ,
Welcome to the Community!
Which library are you using? I don’t think it’s a standard B&R library.

Thanks
Ciao
Valerio

This program is used in all of my projects and functions properly. However, when data is transferred to two SCADA systems at the same time, communication is lost after a certain period. Restarting the power restores the communication. Is it possible to transfer data to multiple SCADA systems simultaneously? Please suggest a solution to ensure reliable data transfer to different SCADA systems.

Hello Mahesh,

i’m not familiar with the library, but you should keep the following in mind. You can run two slaves on the same CPU, but the ports must be different. If the Powerlink interface isn’t being used, you can use it as an Ethernet interface for the second slave. However, the IP address must be on a different subnet. If the Powerlink interface is already in use, you can also install another Powerlink interface card in the CPU and use it as an additional Ethernet interface.

Regards

Stephan

This is my library from Github :slight_smile:

br-automation-community/modbusTCP-Automation-Studio: modbusTCP library for Automation Studio

The library can handle up to 3 connections by default and you can configure more when needed. You don’t need another function block. Just connect a second time and the existing function block will detect that this is a new connection.

The library does not use unit IDs at the moment since this was not needed until now and is something that is more common on serial modbus.

Best regards

Stephan

2 Likes