Modbus Read Write FBD

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Modbus Read Write

Ethernet PLC (PR-12-N, PR-18-N, PR-26-N series) Please use this block for Modbus communication.

1, Modbus RTU

The 4 options selected in the red box in the above figure are serial communication ports, which

support Modbus RTU protocol.


COM port diagram:

2, Modbus TCP

First, connect the PLCs to the LAN where the PC is located. And belong to the same network

segment. Or 2 PLCs are on the same network segment.

1, Configure Ethernet IP parameters on xLogic software.


XLogic software automatically reads the current configuration, as shown below
The parameters in the above figure:
Area A: Set the parameters such as the IP address of the PLC to connect to the network (the

Web Port remains unchanged), meaning the same as the IP address of the configuration

computer.

Area B: By default, it stays the same.

Area C:The parameter when the PLC is used as a server(TCP protocol).

Port: The port of the PLC when doing Server, try not to use 8001.

Keep Alive: Keep the connection time, the default is 5s.

Max Clients:0 – 8, When the PLC is used as a server, you can select how many channels

are used by the client at the same time, up to 8.

Timeout: overtime time.

Enable: Checked by default. Must be checked when using TCP protocol.

Area D:The parameter when the PLC is used as a server(UDP protocol).

Port: The port of the PLC when doing Server, try not to use 8001. Not the same as TCP.

Timeout: overtime time.

Enable: Checked by default. Must be checked when using UDP protocol.

Area E:Used to configure the IP and port of the servers when the PLC is used as a client. The

sum of the number of servers that can be configured and the number of Max Clients set in Area

C is 8.

Keep Alive: Keep the connection time, the default is 5s.

Type: TCP or UDP protocol,the default is TCP.

Timeout: overtime time, the default is 0s.

Area F:
Read: Read network configuration parameters.

Write: Write network configuration parameters.

Confirm & Reset: After writing the configuration, click this button to complete the

configuration and the PLC will restart.

After the parameters are configured, it is best to test whether there is successful access to the network. The
method is to run CMD.exe (on PC): ping 192.168.0.172

*
*Add another point:

Modbus TCP architecture is client – server (like for websites, you with the browser are the client that ask
information to the server, and the server reply).Modbus TCP devices can be both client-server and the protocol
is multi-master, so every device can start the communication.

Modbus RTU architecture is master – slave (master is the client, slave is the server).
**
*
**
*
*
*
*
*
*
**

A) This PLC is used as a client, and the MODBUS READ WRITE configuration is as follows:
B) This PLC is used as a server, and the MODBUS READ WRITE configuration is as follows:

You might also like