G70: Unconditional Jump - Omron CS1W-MC221 - 02-2008 Operation Manual

Motion control units
Table of Contents

Advertisement

G-language Commands

7-3-23 G70: UNCONDITIONAL JUMP

Format
Operands
Description
Programming Example
Unconditionally jumps to the specified block.
G70_<jump destination block number> [/L<number of loops>]
The following table shows the possible settings for the operands.
Operand
Destination block number
Number of loops
This command unconditionally jumps to the specified block. A fixed number of
jumps (a loop) can be created by specifying a number of loops.
When a number of loops is specified, the destination block number must be
before the current block number.
If an UNCONDITIONAL JUMP (G70) or a CONDITIONAL JUMP (G71) com-
mand is used to exit a loop before the number of loops has counted down to
zero and the jump is to a program location after the loop, the number of loops
will be cleared when another loop is started.
A second loop cannot be executed while a loop is in progress. The following
diagram demonstrates this programming error.
N003
N007
N010
Loops cannot be nested as shown above, but up to six loops can be nested by
calling subroutines containing loops. The number of loops in each subroutine
is cleared when the subroutine ends. Refer to 7-3-25 G72: SUBROUTINE
JUMP for details.
When the number of loops is set indirectly from position data with register
specification or position data number specification, the number of loops will be
0 if the value of the position data is 0. Non-integer position data values will be
rounded off to the nearest integer value. An error will also occur if the position
data is negative.
The following example shows executing another loop when a given condition
occurs in the first loop.
:
:
N020
G00
X100
N030
G71
N090/A1000=1
N020/L100 . . . . . . . . . A
N040
G70
:
:
:
:
N090
G00
X3200
N090/L50 . . . . . . . . . . B
N100
G70
:
:
In loop A, the program will jump to N020 up to 100 times while A1000 1, so
blocks N020 and N030 will be executed up to 101 times.
In loop B, the program will jump to N090 up to 50 times, so block N090 will be
executed up to 51 times.
Possible settings
N000 to N999
1 to 39,999,999
(E00) to (E31)
A0000 to A1999
G01
X100
Y100
:
:
G70
N003/L10
:
:
G70
N003/L5
Section 7-3
F100
423

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents