6 - 136
6 POSITIONING CONTROL
(4) Operation timing
Operation timing for servo program No.500 is shown below.
V
P1 P2 P3
10000
-10000
P4
t
P2 P3
PLC ready flag (M2000)
All axes servo ON command
(M2042)
Axis 4 servo ready (M2475)
Start command (PX000)
Servo program start
Axis 4 start accept flag (M2004)
All axes servo ON accept flag
(M2049)
0
(5) Servo program
Servo program No.500 for constant-speed control is shown below.
<K 500>
CPSTART1
Axis 4
Speed
INC-1
Axis 4,
FOR-TIMES
INC-1
Axis 4,
INC-1
Axis 4,
NEXT
INC-1
Axis 4,
CPEND
100000
-1000
K 100
2000
-2000
1000
Starts constant-speed control
Axis used . . . . . . . . . . Axis 4
Positioning speed . . . 10000
1 axis linear positioning control
Number of repetitions 100
Ends repetition region
End constant-speed control
1 axis linear positioning control
1 axis linear positioning control
1 axis linear positioning control
Travel value to pass point . . . -1000
Axis used . . . . . . . . . . . . . . . Axis 4
Travel value to pass point . . . 2000
Axis used . . . . . . . . . . . . . . . Axis 4
Travel value to pass point . . . -2000
Axis used . . . . . . . . . . . . . . . Axis 4
Travel value to pass point . . .1000
Axis used . . . . . . . . . . . . . . . Axis 4
(Note): Example of the Motion SFC program for positioning control is shown next page.