Posts Tagged ‘PlateDrilling’

Target block of the GOTOn statement

Monday, September 4th, 2017

or un con di tional jump) The range of the GOTOn state ment ( con di tional or un con di Drilling Machine for Plate tional) is only lim

ited by the max i mum of se quence

num bers avail able for the given con trol model:

drilling Machine


Four-digit sequence number

Range of n is 1-9999


Five-digit sequence number

Range of n is 1-99999

Do NOT change the block numbers if the macro contains GOTOn branch !

Copyright 2005, Industrial Press Inc, New York, NY –

FANUC CNC Custom Macros


Chapter 13

Fanuc sys sheet metal cutter tem will gen er ate an alarm, if the se quence num ber range is ex ceeded (Se quence No

out of range er ror ) Block des ig na tion N0 is not al lowed and will also re sult in an alarm con di tion

Du pli cate N-ad dresses in the same pro gram are pos si ble, but they are not only strongly dis cour –

aged, they may as well be out right for bid den in mac ros es pe cially Def i nitely do not du pli cate the

se quence num bers (N-num bers) in a macro pro gram

A macro ex pres sion (a vari able num ber) may also be used for the block num ber spec i fied by the

un con di tional GOTOn state ment, sim i lar to the con di tional state ment, for ex am ple:

#33 = 65

Variable #33 stores the target block number


Unconditional branching to the block N65


Arbitrarily bypass this section up to N65



Target block of the GOTOn statement

Whether used con di tion ally or un con di tion ally, the GOTOn func tion should only be used when

nec es sary There are per fectly le git i mate rea sons why to use this func tion in mac ros for branch –

ing, but try to limit its usage for branch ing and loop ing There are better func tions to es tab lish this

goal, namely the WHILE func tion

IF-THEN Option

IF [ condition is true ] Angle Punching THEN [ argument ]

Only the Fanuc con trol mod els 10/11/15 sup port the IF-THEN struc ture of con di tional test ing,

0/16/18 do not (Fanuc model 21 does) The main con cept of the con di tional IF-THEN struc ture is

simplicity IF-THEN is a short cut when only two choices are available