here's a trick I bet most refit controls cannot do. I wrote custom Gcodes with a decimal point to do my bidding.

G90.1 set arcs to absolute arc centers
G90.2 set arcs to Radius mode arc centers
G91.1 set arcs to incremental arc centers

Here's the programming behind these Gcodes:


'************G90 G90.1 G90.2 ABSOLUTE MODE lines, arcs, and arc R mode*********
LITERAL \925 'store Gcode line to \925
INSTR \925;G90.1;\926 'look for G90.1 to set i,j,k absolute arcs
IF \926>0 THEN FANUCARC 0:\847=0:MESSAGE Absolute arc centers
INSTR \925;G90.2;\927 'look for G90.2 to set radius mode arcs
IF \927>0 THEN FANUCARC 2:\847=2:MESSAGE Radius mode arc centers

'look for G90 without a decimal point below, allow for more than 1 G90 on a line
:STARTG90
INSTR \925;G90;\928
IF \928=0 THEN EXIT 'Exit if G90 not found
IF \928>0 THEN MIDSTR \925;\928;5;\929
IF \929=G90.1 THEN GOTO :FINISHG90
IF \929=G90.2 THEN GOTO :FINISHG90
MESSAGE Absolute Mode 'the G90 had no decimal point after it
\849=0 'set flag for absolute mode
ABSCODE
ABSDISP
:FINISHG90
MIDSTR \925;{\928+3};50;\931 'remove the first G90 from string, put in \931
LENSTR \931;\932 '\932 is length of remaining string
\925=\931 A 'bugs without the " A"
IF \932>2 THEN GOTO :STARTG90 'if string is long enough check for another G90
-----G90


'************G91 G91.1 INCREMENT MODE lines and arcs*********
LITERAL \935 'store Gcode line to \935
INSTR \935;G91.1;\936 'look for G91.1 to set i,j,k incremental arcs
IF \936>0 THEN FANUCARC 1:\847=1:MESSAGE Increment arc centers

'look for G91 without a decimal point below, allow for more than 1 G91 on a line
:STARTG91
INSTR \935;G91;\938
IF \938=0 THEN EXIT 'Exit if G91 not found
IF \938>0 THEN MIDSTR \935;\938;5;\939
IF \939=G91.1 THEN GOTO :FINISHG91
MESSAGE Increment Mode 'the G91 had no decimal point after it
\849=1 'set flag for increment mode
INCCODE
INCDISP
:FINISHG91
MIDSTR \935;{\938+3};50;\941 'remove the first G91 from string, put in \941
LENSTR \941;\942 '\932 is length of remaining string
\935=\941 A 'bugs without the " A"
IF \942>2 THEN GOTO :STARTG91 'if string is long enough check for another G91
-----G91