562
33 PROGRAMMING
33.3 Program Example
■Reverse direction positioning
When X25 is turned on, the positioning is started for the target position (100 pulses). If current address is less than 100
pulses, positioning operation output in the forward direction.
Input/output assignment
The input/output assignment is as follows. (Page 351 Input assignment, Page 356 Assignment of output numbers)
For example connection of MELSERVO series servo amplifier, refer to Page 879 Connection Example of Servo Amplifier.
Input assignment
Output assignment
Input number Signal name Connection destination
X3 Near-point signal Sensor, limit switch
X4 Zero signal Servo amplifier
X10 Pulse stop command input External switch
X11 Pulse decelerate and stop command input
X12 Forward limit input Sensor, limit switch
X13 Reverse limit input
X15 Servo ready Servo amplifier
X21 OPR External switch
X22 JOG+
X23 JOG-
X24 Forward direction positioning
X25 Reverse direction positioning
Output number Signal name Connection destination
Y0 Pulse train (Pulse output destination) Servo amplifier
Y4 Direction (Rotation direction signal)
Y16 Clear signal
Deceleration
time
(100 ms)
Acceleration
time
(100 ms)
Bias speed (0 pps)
Positioning
address
100 pulse Current position
Speed
Reverse direction
Reverse direction positioning
X25
Instruction execution
complete flag M116
Command speed,
Maximum speed
(100000 pps)