3. Instruction Set
Example 2
1. Add one line to the program in Example 1. When the PLC runs and SM1648 is ON, the
function is enabled for servo 1 to go back and forth.
2. As the figure shows below, the servo moves from its current position (20,000) to the absolute
target position (100,000) after M4 is ON. After that, it goes back and forth between the
absolute position 100,000 and 0.
The direction indication flag SM1656 is ON when the servo goes toward the target position for
the first time after Servo-ON. After that, the flag repeats the state, changing from ON to OFF.
3. You can modify the target position at any time in the motion, but the new target position is only
valid for the next back and forth cycle.