top of page

Limiting wear offset amount

Submitted by Suhas L. More of Macro CNC Solutions


If an operator makes a mistake with an offset entry, the results can be disastrous. While it may not be possible to completely eliminate the potential for mistakes, you may be able to error-trap some pretty obvious error conditions. When making wear offset adjustments, for example, an operator should never need to have more than about plus or minus 0.3 inches in a wear offset (X or Z register). If they do, they’ve probably made an entry mistake – possibly typing 0.5 instead of 0.0005 – or 0.005, or even 0.05.


Error trapping this kind of mistake is easy with custom macro B. Consider this main program:

In the main program just before each turret index:

  • .

  • .

  • .

  • G65 P1000 T0101 U0.3 W0.3 (Test offset)

  • T0101 (Turret index)

  • .

  • .

  • .

Before every turret index, include a G65 command to call the testing macro the tool station number (we’ve duplicated the turret index word), the maximum wear offset X value (with U) and the maximum wear offset Z value (with W). With our example, if more than 0.3 or less than -0.3 is in an X or Z wear offset register, an alarm will be sounded.


Here is the custom macro that does the error-checking:

  • O1000 (Custom macro)

  • T#20

  • #5=FIX[#20/100]

  • #6=#20-[#5*100]

  • #1=#[2000+#6]

  • #2=#[2000+#6]

  • IF[#1 GT #21] GOTO 99

  • IF[#1 LT [0-#21]] GOTO 99

  • IF[#2 GT #23] GOTO 999

  • IF[#2 LT [0-#23]] GOTO 999

  • GOTO 100

  • N99

  • #3000=101(X OFFSET OUT OF RANGE)

  • N999

  • #3000=102(Z OFFSET OUT OF RANGE)

  • N100

  • M99


109 views0 comments

Recent Posts

See All

Watch Out For That Tailstock Center!

Many turning centers, commonly called universal style turning centers, have the ability to do chucking work, bar work, and shaft work. These machines have horizontal spindles, meaning the workpiece is

bottom of page