Chapter 12 Troubleshooting
1
Distance
Distance and the start position for reference jointly determine the target position which the axis will reach
under control of the instruction. The target position= the start position for reference + Distance.
When Distance is set to 0, the target position for the axis motion is set as current position. The instruction
execution is finished in the next cycle since its execution and Done changes to TRUE.
As illustrated in the following left figure, the start position for reference is 10000. The axis moves in the
positive direction and the target position is 20000 (10000+10000) when Distance>0 (10000).
In the following right figure, the axis moves in the negative direction and the target position is 0
(10000-10000) when Distance<0(-10000).
Programming Example 1
The programming example is as follows when one MC_MoveRelative instruction is used.
1. The variables and program
Pwr MC_Power
Position
20000
10000
Distance=10000 Distance=-1000 0
Position
20000
10000
Start Position
Distance>0 Distance<0
Star t Positio n
Target Position
Target Position
Time Time
0
11-39