How to use the new G83 command Roger Caffin 14/08/2016 G83 is one of a set of canned drilling routines. It provides peck drilling for deep holes. The format on a lathe is G83 X~ Z~ Q~ R~ L~; on a mill it is G83 X~ Y~ Z~ A~ B~ C~ R~ Q~ L~. The problem with conventional drilling of deep holes is that the swarf can collect in the drill flutes and cause a blockage or a jam. To be sure, if you have large drills which can take high-pressure coolant down the middle you can blow the swarf out of the hole, but not all machines have this capability and it is a bit hard to achieve with small diameter drills anyhow. So peck drilling allows you to take a series of incremental pecks at the hole, while withdrawing the drill from the hole in between each peck to clear the swarf off. The length of the peck is set by Q~, and the retraction position is set by R~. Mach3 implements the G83 command by invoking a macro called M1083.m1s, to be found in either the Mach3Mill or Mach3Turn folders as appropriate. Unfortunately the version distributed with the Mach3 installation has some strange defects or limitations. It works reasonably well for the milling version when the retract distance Rd is positive, but not when it is negative. It seems to jump to the Z = R~ value (with a G0 command). If the surface is at Z=0, this can be unfortunate. In addition, the same macro code has an annoying behaviour with deep holes and a positive R~. After the high speed retraction to the surface, the drill returns to the bottom of the hole at the slow drilling feed rate. This can become very slow and tiring. A second problem is that each retraction actually takes the tip of the drill out of the hole. Repeatedly reinserting the tip of the drill into an existing hole often causes some scoring of the bore near the start of the hole. Once the drill is into the hole by a little way the tip of the drill does not cause any further damage. It would be nice to be able to specify a negative value for the retract distance and have the G83 command retract only as far as that negative distance. That is, for G83 ... R-3 the drill would retract, but only to Z=-3. This would normally suffice to clear the flutes of swarf, but the tip of the drill would remain inside the hole and (hopefully) not cause any damage. It does not seem that the NIST Standard RS274 forbids this; in fact it tends to be somewhat vague about it. At the same time it would be nice to handle the other problems outlined above. To do all this required a substantial rewrite of the M1083 macro. The slow return to the bottom of the hole turned out to be due to a 'missing' G0 command between the retraction and the start of the next peck; this was fixed. The jump to the negative R value was also due to the way the drill cycle was being handled. There is fairly comprehensive documentation at the start of the new M1083 macro covering the effect of G98/G99 on the retract behaviour and the use of the G83.1 option. With conventional use of the new G83 command the behaviour is largely the same, except for the rapid descent to the start of the next peck cycle. Deep drilling operations become much faster. When a negative value is given for the R parameter, the routine starts with a slow (G01) feed from the starting value of Z to the negative R~ position. As it is unlikely that a huge negative value will be given for R~ and the drilling in this stage is near the surface, a peck cycle is not needed here. Once Z is at the negative R~ position, a more conventional G83 cycle takes over. There is a limitation here. Under normal use the G83 cycle will leave the drill at the R position, and if R is negative that means the drill will still be engaged in the hole. User Beware: retract further before moving sideways! Some notes should be made here about other values in the G83 command. The lathe version permits the inclusion of an X~ value, while the mill version permits the inclusion of X~, Y~, A~, B~ & C~. The macro M1083 does not use any of these values, so it may be assumed that Mach3 handles movement on those axes prior to calling M1083. The idea of including an X~ value in a lathe drilling command does seem slightly questionable, unless the spindle can be locked and there is a drill head in the turret. Few hobby users would have this gear. Omitting the X~ parameter completely would normally be advised. The idea of invoking rotary axis movement in this command (on a mill) is slightly mind boggling and has not been tested! It is also permitted to include an L parameter in the G83 command. This is even more curious, as it only makes any sort of sense if the system is in incremental mode rather than absolute mode. However, putting the whole system into incremental mode produces some extremely weird results during the macro execution which could be destructive. It is conceivable that the G83 code in Mach3 might flick the system into and out of incremental mode to handle X & Y movements while being in absolute mode for the drilling, but this has not been tested. One would need to do a lot of air cutting to test this enough. Finally, the new M1083 macro starts with a line 'test=false'. If this is changed to 'test=true' then a record of the execution of the macro will be made in LogFile.tap in the Mach3/gcode folder. This does not alter the exexcution of the macro in any other way. Such an edit is best done with Wordpad rather than Notepad due to the formatting.