When the reported message indicates no error, it will switch to the next transmitted command
6
M1077
M1078 M1079
485 R/W
485 R/W
rite is co
rite is fail
If time out occurs or an error is reported, the M1077 will change to On. At this time, after a delay of 30
scanning cycles, it will re-issue the original command once
14
M1077
485 R/W rite is co
D30 K40
33
M1002
ON only for 1 scan a
M200
Delay cycle
36
M100
M0
ReqTXOnce
M1
M2
M3
M4
It will repeat after sending all commands
102
M5
D30 K40
121
Practical applications:
Actual use to control the RTU-485 module.
Step 1: Set the communications format. Assume that the communications format is 115200, 8,N,2,
RTU
C2000:The default PLC station number is set as 2 (09-35)
Pr. 09-31=-12 (COM1 is controlled by the PLC ), Pr. 09-01=115.2 (The communications speed is
115200 )
Pr. 09-04=13 (The format is 8,N,2, RTU)
485 R/W
rite is time 0
MODRW
MODRW
MODRW
MODRW
MODRW
16-157
Chapter 16 PLC Function ApplicationsC2000
ROLP
K4M0
K1
K1
D30
D30
ADD
D30
MOV
K0
( M200 )
Delay cycle
( M100 )
ReqTXOnce
K2
H1
H500 D200
H500 D100
K2
HF
K2
H2
H410 D201
K3
H3
H2100 D300
K2
H2
H410 D201
MOV
K1
K4M0
D1
INC
K4M0
MOV
K1
END