Programming Examples - Omron CS1W-MC221 - 02-2008 Operation Manual

Motion control units
Table of Contents

Advertisement

Programming Examples

8-1
Programming Examples
8-1-1
Positioning with PTP Control
Operation
1,2,3...
Programming Example
Explanation
Timing Chart
Block execution
Axis operation
M code output
446
Three positioning operations are performed and then the reference origin is
returned to. An M code is output when positioning is completed.
1. X100
(Output M code 20.)
Y50
2. X250
Y150
3. X300
(Output M code 700.)
Y200
4. Return to reference origin.
The following programming example performs the positioning operations
listed above.
N000
P001
XY
N001
G00
X100
N002
G00
X250
N003
G04
2
N004
G00
X300
N005
G26
XY
N006
G79
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.
Y50
M20
Y150
Y200
M700
2 s
Section 8-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-mc221Cs1w-mc221-v1Cs1w-mc421Cs1w-mc421-v1

Table of Contents