255
Modbus-RTU instruction processing mode has changed. Users can write Modbus-RTU
instructions directly in user programs. Protocol stack will queue Modbus-RTU
communication requests. Communication is another task. In the main program, users can
write multiple Modbus-RTU communication instructions together and trigger them at the
same time through the same triggering condition. PLC will trigger these communications.
Instructions are queued according to the protocol station by Modbus-RTU, which will not
cause communication errors when multiple communication instructions are executed at the
same time as the original XC series PLC.
XD series program:
MCLW K2 K24576 K10 Y0 K2
M0
COLR K2 K24576 K10 M10 K2
MRGW K2 K10 K10 D10 K2
REGR K2 K10 K10 D20 K2
MCLW K3 K24576 K10 Y0 K2
COLR K3 K24576 K10 M20 K2
MRGW K3 K10 K10 D10 K2
REGR K3 K10 K10 D30 K2
MCLW K4 K24576 K10 Y0 K2
COLR K4 K24576 K10 M30 K2
MRGW K4 K10 K10 D10 K2
REGR K4 K10 K10 D40 K2
M200
MOV H3FF DY0
FMOV K1 D10 K10
M201
MOV H0 DY0
FMOV K0 D10 K10
//at the rising edge of M200, set
ON the master PLC Y0~Y11,
D10~D19 are set to 1, at the
rising edge of M201, set OFF
Y0~Y11 of master PLC, reset
D10~D19.
//write the Y0~Y11 of master
PLC to Y0~Y11 of slave PLC
2, read the Y0~Y11 of slave
PLC 2 to M10~M19 of master
PLC. Write the D10~D19 of
master PLC to D10~D19 of
slave PLC 2. Read the
D20~D29 of slave PLC 2 to
D20~D29 of master PLC.