- 20 -
Chapter 2. MC Programming
11) YSET2
Input type
YSET2 <P variable> or YSET2 <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 Y-axis current position(absolute coordinate) and the motor position(mechanical
coordinate) are reset to the set variable coordinate.
The action is same as the YSET command, and the mechanical coordinate of Y-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 2
nd
L variable
means the Y-axis coordinate. The 1
st
L variable is simply ignored.
Example
of
use
YSET2 P2
YSET2 L2
L3
YSET2 PL0
YSET2 LL0
LL1
Reset the Y-axis position by using the Y-axis position value of a P2
variable.
Reset the Y-axis position by using a L3 variable value.
Reset the Y-axis position by using the Y-axis position value of a P
variable pointed out by a L0 variable.
Reset the Y-axis position by using an L variable value pointed out by a
L1 variable.
Example
VEL 0
MOV P0
YSET2 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.9 Y-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
(10.000, 30.000)
The position values 50.000 and 30.000 are reset
to 50.000 and 10.000 by the YSET P2.
Содержание MCU 2 Axis
Страница 1: ...User s Manual 2 AXES...