32
2. Conditional Branch (IF Statement)
Conditional expression is specified after F.
IF [<conditional expression>] GOTO n
If the specified conditional expression is satisfied, the transfer to labeled sequence number n block. If the
specified conditional expression is not satisfied, the next block is executed.
For example:
If the value of variable # 1 is greater than 10, transferred to the block sequence number N2.
IF [# 1GT10] GOTO2 If the conditions are met, the N2 G00 G91 X10.0
If the condition is not satisfied, program execution continues downward.
IF [<conditional expression>] THEN
If the conditional expression is satisfied, the implementation of a predetermined macro statement. Only
perform a macro statement.
For example:
If the value of # 1 and # 2 are the same, 0 is assigned to # 3.
IF # 1EQ # 2 THEN # 3 = 0;
12.4.5 Macro Call
Macro program call (G65) and the difference between a subroutine call (G98) between:
1. With the G65, you can specify a custom variable data to the macro. M98 without this feature.
2. When the M98 block contains another NC command (for example, G01 X100.0 M98Pp) when, after a
subroutine call instruction is executed. Instead, G65 unconditionally calls a macro program.
3. M98 block contains another NC command (for example, G01 X100.0 M98Pp) when, in the single block
mode, the machine stops. Instead, G65 machine does not stop.
13 Fixed Cycle Function
Fixed cycle makes it easy for programming. Using fixed cycle
,
fixed mode of processing operations can be
instructed by G code in one program segment. Otherwise, multi-segment program is required. Moreover, usage of
fixed cycle can save storage space.
Table 13-1 Fixed Cycle
G Code
Drilling(-Z
)
Action in the bottom of
the bore
RoZ)
Introductions
G73
Intermittent
cutting feed
None
Fast moving
High-speed chip
drilling cycle
G74
Cutting feed
SPDL STOP
→
FWD
Cutting feed
Left-handed
tapping cycle
G76
Cutting feed
Oriented spindle
stop
Cutting feed
Fine boring cycle
G80
None
None
None
Fixed loop cancel
G81
Cutting feed
None
Fast moving
Drilling cycle
G82
Cutting feed
Time out
Fast moving
Drilling cycle
G83
Intermittent
cutting feed
None
Fast moving
Chip removal
drilling cycle
G84
Cutting feed
SPDL STOP
→
REV
Cutting feed
Tapping cycle
G85
Cutting feed
None
Cutting feed
Boring cycle