- 19 -
Chapter 2. MC Programming
10) XSET2
Input type
XSET2 <P variable> or XSET2 <L variable1> <L variable2>
Terminology
<P variable>: Set the variable for a position from the Position Table.(P0 ~ P99)
<L variable>: Set the variable for a position from the L-VAR Table.(L0 ~ L1999)
Related
variable
P variable, L variable
Explanation
The X-axis current position(absolute coordinate) and the motor position(machine
coordinate) are reset to the set variable coordinate.
The action is same as the XSET command, and the machine coordinate of X-axis motor
position, i.e. the encoder coordinate is reset, too.
Even though automatic operation ends, the coordinate isn’t recovered.
In closed loop control of MCU-XA2 and MCU-XP2, the position of a servo motor shifts as
much as the servo motor offset. For the case of using L variable, the 1
st
L variable
means X-axis coordinate. The 2
nd
L variable is simply ignored.
Example
of
use
XSET2 P2
XSET2 L2 L3
XSET2 PL0
XSET2
LL0
LL1
Reset the X-axis position by using the X-axis position value of a P2
variable.
Reset the X-axis position by using a L2 variable value.
Reset the X-axis position by using the X-axis position value of a P
variable pointed out by a L0 variable.
Reset the X-axis position by using an L variable value pointed out by a
L0 variable.
Example
VEL 0
MOV P0
XSET2 P2
VEL 1
MOV P1
Setting value of P0: 50.000, 30.000
Setting value of P2: 10.000, 10.000
Setting value of P1: 60.000, 40.000
Fig. 2.8 X-axis absolute coordinate and machine coordinate reset function
Velocity
Time
F0
F1
Current position(0.000,0.000)
P0 position (50.000, 30.000)
P1 position (60.000, 40.000)
P0 movement amount
(50.000, 30.000)
P1 movement amount
(50.000, 10.000)
The position values 50.000 and 30.000 are reset
to 10.000 and 30.000 by the XSET2 P2.
Summary of Contents for MCU 2 Axis
Page 1: ...User s Manual 2 AXES...