13. Program Support Functions
13.5 User Macro Specifications
360
(5) WHILE - DOm must be designated first and
ENDm last.
Not
possible
END 1 ;
WHILE ~ DO1 ;
(6) WHILE - DOm and ENDm must correspond on a
1:1 (pairing) basis in the same program.
Not
possible
END 1 ;
WHILE ~ DO1 ;
WHILE ~ DO1 ;
(7) Two WHILE - DOm's must not overlap.
Not
possible
END 2 ;
END 1 ;
WHILE ~ DO2 ;
WHILE ~ DO1 ;
~
~
~
(8) Branching externally is possible from the WHILE
- DOm range.
Possible
Nn
WHILE ~ DO1 ;
IF ~ GOTOn ;
END 1 ;
(9) No branching is possible inside WHILE - DOm.
No
t
p
ossi
bl
e
Not
p
ossi
bl
e
END1;
IF~GOTOn;
END1;
IF~GOTOn;
Nn;
END1;
WHILE~DO1;
WHILE~DO1;
Nn;
WHILE~DO1;
(10) Subprograms can be called by G22, G65 or
G66 between WHILE - DOm's.
Possible
G65
L100;
END1;
Main program
WHILE~DO1;
WHILE~DO02;
END2;
G23;
Subprogram
M02;
To subprogram
(11) Calls can be initiated by G65 or G66 between
WHILE - DOm's and commands can be issued
again from 1. Up to 27 nesting levels are
possible for the main program and
subprograms.
WHILE ~ DO1 ;
END 1 ;
G23 ;
WHILE ~ DO1 ;
G65 L100 ;
END 1 ;
Subprogram
(
)
Main program
Pos
s
ible
To subprogram
M02 ;
~
~
~
(12) A program error will occur at G23 if WHILE and
END are not paired in the subprogram
(including macro subprogram).
Don ENDn
constitutes
illegal usage.
WHILE
~DO1;
G23;
Main program
Subprogram
G22
L100;
M02;
To subprogram
(Note)
As the canned cycles G73 and G83 and the special canned cycle G34 use WHILE, these
will be added multiple times.