I thought I had radius compensation sorted in Mach3, having successfully run several jobs using radius and length compensation - even along with a G18 interpolation plane change to the XZ plane - without a hitch. What I thought I’d worked out is that as long as you don’t use any other form of offset code (G55–9, G52, G92 etc.) radius compensation would work reliably.
The only offset I now use is a set of XY values manually entered into the DRO’s to offset the machining origin point. Once entered, these values appear, by default, in the G54 offset table in the Offsets screen. I found that entering them into the G54 table on the Offsets page seemed to not be as reliable. I even make sure that I enter these values directly into the axis DRO’s while the machine is at its zero, or home, position rather than moving the tool position to the machining origin point and simply zeroing them.
I use the tool table and length offset (G43/44) to handle the Z axis.
I thought I had it made - until the following program.
I am making a keypad for Mach 3 and this program is to cut the holes in the panel to let the switches poke through. The structure is fairly simple.
The main program positions on the centre of each hole and calls subroutine 2222.
It lowers the tool and calls subroutine 2224 to mill a ‘lap’ of the hole.
Control passes back to 2222 which lowers the tool and calls 2224 again.
It does this five times and then goes back to the main program which moves the tool to a safe position and ends the program.
With a single hole position programmed and using radius compensation, it works perfectly.
With all hole positions, but with G42 deleted from block N510, it works perfectly.
(This is how I produced the panel shown in the photo. It’s also why the apertures are one tool radius too big all round.)
Here we get to the weird bit. If I load the program as is it produces a graphic in the tool path display which reproduces the hole pattern and programmed path perfectly (in blue.). However, there is also a white line leading from the centre point of each hole to the centre point of the very first hole.
On actual physical execution, the first hole machines perfectly, the tool moves to the centre point of the next hole to be machined, and then ...... on the execution of block N510, the tool returns to the centre point of the FIRST HOLE AGAIN, (X.708 Y.737) and machines it all over again. It does this for every other hole.
Anyone have any ideas?
As a comment, radius compensation in Mach3 is extremely flaky and this seems to be borne out by numerous plaintive posts where you can almost hear the heads being scratched over its behaviour. In stark comparison, length compensation seems to be very robust.
PS:
By selecting the ‘Block Delete’ button (Block Skip actually.) the program will execute with just one hole.
Without Block Delete on, delete G42 from block N510 to see the difference it makes.
N10 (CNC CONTROL PANEL SWITCH MASK)
N20 (VERSION 3.1)
N20 (NOTES: TOOL LENGTH OFFSET TO WORK SURFACE)
N30 (X DATUM - L/H EDGE OF PANEL BLANK)
N40 (Y DATUM - BOTTOM EDGE OF PANEL BLANK)
N50
N60 G0 G90 G20 T1 M6 (ABSOLUTE, INCH, TOOL 1, SELECT)
N100 G0 G44 X.708 Y.737 Z.080 (MOVE TO 1ST SWITCH HOLE POSN, INVOKE L/COMP)
N105 #201=-.250 #202=.500 (SET PARAMETER VAUES FOR SUB 2224- SMALL HOLE)
N110 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N120 G0 X1.609 Y.737 (MOVE TO 2ND SWITCH POSN.)
/N130 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N140 G0 X1.609 Y1.537 (MOVE TO 3RD SWITCH POSN.)
/N150 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N160 G0 X.708 Y1.537 (MOVE TO 4TH SWITCH POSN.)
/N170 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N180 G0 X.708 Y2.338 (MOVE TO 5TH SWITCH POSN.)
/N190 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N200 G0 X1.609 Y2.338 (MOVE TO 6TH SWITCH POSN.)
/N210 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N220 G0 X.958 Y3.139 (MOVE TO 7TH SWITCH POSN.)
/N225 #201=-.500 #202=1.000 (SET PARAMETER VALUES FOR SUB 2224 - LARGE HOLE)
/N230 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N240 G0 X2.609 Y1.437 (MOVE TO 8TH SWITCH POSN.)
/N245 #201=-.250 #202=.500 (SET PARAMETER VAUES FOR SUB 2224 - SMALL HOLE)
/N250 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N260 G0 X3.210 Y2.038 (MOVE TO 9TH SWITCH POSN.)
/N270 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N280 G0 X3.210 Y.837 (MOVE TO 10TH SWITCH POSN.)
/N290 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N260 G0 X3.810 Y1.437 (MOVE TO 11TH SWITCH POSN.)
/N270 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N280 G0 X4.711 Y1.838 (MOVE TO 12TH SWITCH POSN.)
/N290 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
/N280 G0 X4.711 Y1.037 (MOVE TO 13TH SWITCH POSN.)
/N290 M98 P2222 (CALL CUTOUT MILLING SUBROUTINE)
N400 G0 G49 X0 Y0 Z-2.000 M5 (LIFT TOOL, CANCEL LENGTH OFFSET, STOP SPINDLE)
(MOVE TO RELOAD POSN)
N410 M30 (END PROGRAM, REWIND)
O2222 (LABEL SUBROUTINE)
N510 G91 G42 Y-.250 M3(MOVE TO START, RELATIVE W/ RADCOMP, START SPINDLE)
N520 G1 Z-.160 F150 (PLUNGE DOWN 1)
N530 M98 P2224 (CALL POCKETING SUBROUTINE)
/N540 Z-.080 (PLUNGE DOWN 2)
/N550 M98 P2224 (CALL POCKETING SUBROUTINE)
/N560 Z-.080 (PLUNGE DOWN 3)
/N570 M98 P2224 (CALL POCKETING SUBROUTINE)
/N580 Z-.080 (PLUNGE DOWN 4)
/N590 M98 P2224 (CALL POCKETING SUBROUTINE)
/N600 Z-.080 (PLUNGE DOWN 5)
/N610 M98 P2224 (CALL POCKETING SUBROUTINE)
N660 G0 G90 Z.080 (LIFT TOOL - ABSOLUTE, RAPID)
N670 G91 G40 Y.200 (CANCEL RAD COMP - RELATIVE)
N670 G90 (CHANGE TO ABSOLUTE)
N680 M99 (END SUBROUTINE)
O2224 (LABEL POCKETING SUBROUTINE)
N800 X#201 F8 (MILL TO 1ST CORNER)
N810 Y.500 (MILL TO 2ND CORNER)
N820 X#202 (MILL TO 3RD CORNER)
N830 Y-.500 (MILL TO 4TH CORNER)
N840 X#201 (MILL TO START POINT)
N850 M99 (END SUBROUTINE)