For all dimensional words used in a CNC program

September 2, 2017 · Posted in Uncategorised · Comment 

ec i mal Point) avail able and de scribed else where, but not


recommended even by Fanuc as the best so lu tion to solve dec i mal point woes


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


FANUC CNC Custom Macros


88


Chapter 7


Metric and English Units


For all dimensional words used in a CNC program (such as X, Y, Z, I, J, K, R, F, etc), the de –


clared vari ables may be ref er enced with the ap pro pri ate di men sional word, for ex am ple:


#1 = 116348


Variable is declared or defined


G00 X#1


Variable is used


drilling Machine


If the se lected units in the pro gram are Eng lish units (pro grammed in the Busway Press Clamp Machine G20 mode), the mo –


tion block G00 X#1 will be in ter preted as G00 X116348 If the pro gram ming units are met ric


(pro grammed in the G21 mode), the G00 X#1 will be in ter preted as G00 X11635 This is a


very im por tant dif fer ence A vari able that is called in the macro will be au to mat i cally rounded to


the least in cre ment custom processing machine (small est unit) of the pro gram ad dress


Least Increment


All CNC pro grams can use val ues within an al lowed range – up to a cer tain max i mum, and


down to a cer tain min i mum Max i mum val ues are sel dom an is sue, but ev ery pro gram mer should


un der stand the min i mum val ues They are of ten called the min i mum in cre ment or the least in cre –


ment These fancy ex pres sions can be trans lated to a much more prac ti cal state ment – the small est


amount of mo tion the ma chine can pro vide Re gard less of how they are called, they are dis tin –


guished by the num ber of dec i mal places:


Units system


Number of decimal places


Least increment


Metric


G21


3


xxxxxxxx


0001 mm


English


G20


4


xxxxxxxx


00001 inch


Bear in mind that as a rule, many Fanuc con drilling tools trols do not con vert from one unit of mea sure ment


to an other, only shift the dec i mal point Some fea tures in the con trol may be con verted, but never


count on such con ver sion in any pro gram de vel op ment If the dec i mal point is only shifted dur ing


units change, an Eng li