Instruction manual
6 - 164
6 POSITIONING CONTROL
(b) PLC program
PLC program example for position follow-up control is shown below.
Substitute 2 for D1 after program
start.
0
3
SM400
X0
M20RST
DP.DDWR H3E1 D4000 M0D1000D0
PLC program
16
38
M10
M2
M20RST
52
M30
END
67
K2 D1
MOVP
M10PLS
M3240
M30RST
X1
M0
M3
DP.SFCS H3E1 M2 D1100K150
M20SET
D1200D40DMOV
42
M20
M2441 M2442
D1200 D1000D=
M30SET
DP.DDWR H3E1
D4000 M4
D1300D0
M30RST
M4
12
K0 D1300
DMOV
K150000 D1000
DMOV
Starts by turning X0 on.
Substitute 150000 for D1000 .
Substitute 0 for D1300 .
Reads data of D1000 of self CPU for
Multiple CPU system by turning M10 on,
and writes to D4000 of CPU No.2.
Starts the Motion SFC program No.150.
Resets M20 and sets M30 at the axis 3
positioning completion and D1200 =
D1000.
Reads data of D1300 of self CPU for
Multiple CPU system by turning M30 on,
and writes to D4000 of CPU No.2.
M1
Substitutes the value of D40 for D1200.
(Note): The automatic refresh setting example for position follow-up control is shown next page.