![background image](http://html1.mh-extra.com/html/omron/cs1w-mc221/cs1w-mc221_operation-manual_742361473.webp)
446
Programming Examples
Section 8-1
8-1
Programming Examples
8-1-1
Positioning with PTP Control
Operation
Three positioning operations are performed and then the reference origin is
returned to. An M code is output when positioning is completed.
1,2,3...
1.
X100
Y50
(Output M code 20.)
2.
X250
Y150
3.
X300
Y200
(Output M code 700.)
4.
Return to reference origin.
Programming Example
The following programming example performs the positioning operations
listed above.
N000
P001
XY
N001
G00
X100
Y50
M20
N002
G00
X250
Y150
N003
G04
2
N004
G00
X300
Y200
M700
N005
G26
XY
N006
G79
Explanation
N001
Positions the axes to (X100, Y50) by PTP control. Absolute positioning
(default) is used, because nothing is specified.
When positioning is completed, M code 20 is output and the Unit waits for a
reset (M code reset standby).
N002
When the M code reset is received, block N002 positions the axes to (X250,
Y150) by PTP control.
N003
Waits for 2 seconds.
N004
Positions the axes to (X300, Y200) by PTP control. When positioning is com-
pleted, M code 700 is output and the next block is executed without waiting for
the reset.
N005
Returns the X and Y axes to the reference origin.
N006
Ends the program. When M code 700 is being output, it is forcibly cleared by
the PROGRAM END command.
Timing Chart
2 s
Block execution
Axis operation
M code output
Содержание CS1W-MC221 -
Страница 1: ...Motion Control Units Cat No W359 E1 04 CS1W MC221 V1 421 V1 OPERATION MANUAL ...
Страница 2: ...CS1W MC221 V1 421 V1 Motion Control Units Operation Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 11: ...xii ...
Страница 15: ...xvi ...
Страница 19: ...xx ...
Страница 27: ...xxviii Conformance to EC Directives 6 ...
Страница 133: ...106 Installation Section 2 2 2 2 4 Dimensions CS1W MC421 CS1W MC221 ...
Страница 173: ...146 Connecting Peripheral Devices Section 2 7 ...
Страница 227: ...200 Command Area Section 3 6 ...
Страница 351: ...324 Interface Specifics Section 5 4 ...
Страница 513: ...486 Absolute Encoder Interface Specifications Section 9 7 ...
Страница 575: ...548 Error Log Section 12 6 ...
Страница 589: ...562 Performance Appendix A ...
Страница 655: ...628 Control Bit Flag Timing Charts Appendix E ...
Страница 683: ...656 Origin Search Patterns Appendix F ...
Страница 685: ...658 Encoder Divider Rate and Rotation Speed for OMRON Servo Drivers Appendix G ...