Omron CS1W-MC221 - 02-2008 Operation Manual page 488

Motion control units
Table of Contents

Advertisement

Programming Examples
8-1-13 Positioning at High Speed
Programming Example
Explanation
N005 and N006
Waits until optional input zero turns ON. When the input turns ON, uncondi-
tional jump N0006 is disabled and the next block will be executed.
N007
Moves by linear interpolation to (X, Y) = (250, 250) in Pass Mode.
N008
Moves by linear interpolation to (X, Y) = (500, 500) in Pass Mode. This speci-
fies the point where interrupt task number 100 (D100) will start up if the travel
distance is zero when the Stopover function is used. The following shows
where interrupt task number 100 (D100) will start up since Pass Mode opera-
tion is being used in this case.
Present position = preceding X-axis target position (N007) + stopover travel
distance
= 250 + 0
= 250
In other words, interrupt task number 100 will start up when the present posi-
tion is 250 mm.
N009 and N010
Similarly, interrupt task numbers 101 and 102 will start up at present positions
500 mm and 750 mm respectively.
This program reads the present position of the workpiece with a visual sensor,
calculates correction and writes the correction value to the MC Unit. After the
MC Unit receives the correction, it positions the axis accordingly. The CPU
Unit sends two position data items to addresses A0000 and A0001 using the
IOWR instruction and the MC Unit moves the axis immediately. Data can be
sent to the MC Unit and positioning commands can be executed in a single
scan.
N000
P000
XY
*001
********************************
*002
Waits for M code reset.
*003
********************************
N004
G01
X0
N005
G75
00
N006
G70
N005
N007
G01
XA0000
N008
G70
N004
N009
G79
N004
Waits at the reference coordinate system origin and outputs M code 500.
N005 and N006
Waits for optional number zero to turn ON. Writes position data from the CPU
Unit by IOWR instruction and turns ON optional number zero.
N007
The MC Unit positions the axis at the position specified in A0000 and A0001,
outputs M code 0001, and waits for M code reset. When the reset is received
from the CPU Unit, the MC Unit moves the axis to the standby position.
Y0
M500
YA0001
Section 8-1
F1000
M001
461

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents