243
6-2 MODBUS communication
6-2-1 Function overview
XD, XL series PLC support both Modbus master and Modbus slave.
Master mode: When PLC is set to be master, it can communicate with other slave devices
which have MODBUS-RTU or MODBUS-ASCII protocol via Modbus instructions; it also
can change data with other devices.
For example: Xinje XD3 series PLC can control inverter by Modbus.
Slave mode: When PLC is set to be slave, it can only response with other master devices.
Master and slave: In RS485 network, there can be one master and several slaves at one time
(see below diagram). The master station can read and write any slave station. Two slave
stations cannot communicate with each other. Master station should write program and read
or write one slave station; slave station has no program but only response the master
station.(Wiring
:
connect all 485+, connect all 485-)
In RS232 network (see below diagram), there can only be one master and one slave at one
time.
There is dotted line in the diagram. It means any PLC can be master station when all PLC in
the network don’t send data. As the PLC do not have unified clock standard, communication
will fail when more than one PLC send data at one time. It is not recommended to use.
Note:
1. For XD/XL series PLC, RS232 and RS485 only support half-duplex.
2. For XC series PLC, if master PLC send one data to slave PLC, and master PLC send data
again before slave PLC receiving the last one completely, slave PLC end data error may occur;
For XD/XL series PLC, we solve this problem by adding waiting time before communication,
which means the slave PLC will receive the next data only after some time the last data
finished.
tudonghoatoancau.com