ble cannot replace another

variable directly –

#[#7] is allowed

example 3 – correct

Overflow or underflow situation


= negative underflow

when 0 and 90 degrees are used in


= positive underflow

trigonometric calculation


= negative underflow


drilling Machine

= positive overflow

If variables #7 and #9 have been previously

Nesting in calculations is allowed

defined, the following nesting is correct:


More ex am ples could be added, but the list ing cov ers the most com mon con sid er ations

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

FANUC Busway Press Clamp Machine CNC Custom Macros


Chapter 7

Custom Machine Features

One of the most com mon rea sons for a CNC ma chine tool hav ing the macro fea tures avail able is

– the ma chine tool builder Ma chine man u fac tur ers of ten in cor po rate many unique fea tures into their ma chine tools, for ex am ple, ad vanced phys i cal equip ment, custom processing machine such as bro ken cut ter de tec tors,

gan try lines, pro gram ma ble guard con trols, etc These ‘hard ware’ fea tures must be con trolled by

the ‘soft ware’ The soft ware in such cases pro grammed in a PLC (Pro gram ma ble Logic Con trol)

but is fre quently sup ple mented by a spe cial macro, usu ally built into the con trol at the time of pur –

chase This macro may or may not be hid den from dis play, most likely will be pro tected, but it is

al ways very im por tant to be aware of its ex is tence

Re stric tions and min i mum or max i mum val ues spec i fied by the ma chine tool builder must al –

ways be hon ored in macro de vel op ment or modifications Pro gram mers should al ways know the

ma chine built-in ranges, for ex am ple, the work area, the min i mum and max i mum spin best mill drill dle speeds,

feedrate ranges, travel lim its, tool sizes, and so on

In their mac ros, ma chine tool build ers also use spe cial G-codes or spe cial M-codes for their

equip ment, and they will use many vari ables in the mac ros In the next chap ter, we look at vari –