Hi Bill:
Thanks for chiming in; I always learn something new when you contribute, and i appreciate it.
I was unaware of that particular nugget; I've never used that variant of G83 so I was going only by what I'd heard, not by anything I've actually tried.
I don't really run production anyway, so that sort of cycle optimization is almost meaningless for what I do.
I just assumed that any reasonable sophisticated Fanuc control would be able to run variable peck G83.
Cheers
Marcus
Hello Marcus,
Following is a Deep Hole Peck Drilling Macro I wrote on request of a Forum member a few years ago, where the Peck, Feed and Spindle Speed can be varied. I'm not sure if this is the final version, but without examining it in detail, my comments at the end still apply.
Regards,
Bill
%
O0001
N1 G00 G17 G21 G40 G80 G94
G91 G28 Z0.0
G28 Y0.0
T01 M06
S2000 M03
G90 G54
G00 X10.0 Y50.0
G43 Z10.0 H01 M08
G183 Z-50.0 R-20.0 Q5.0 K0.50 E0.250 F100
G91 G28 Z0.0 M09
G28 Y0.0
M01
The above will call Macro Program O9010 if 183 is registered in parameter 6050
If its to be called to repeat at a number of X,Y coordinates, the Macro can be called using the Modal Call G Code G66 as shown in the following example:
%
O0001
N1 G00 G17 G21 G40 G80 G94
G91 G28 Z0.0
G28 Y0.0
T01 M06
S2000 M03
G90 G54
G00 X10.0 Y50.0
G43 Z10.0 H01 M08
G66 P9010 Z-50.0 R-20.0 Q5.0 K0.50 E0.250 F100
G00 X40.0 Y80.0
X60.0 Y90.0
X80.0 Y100.0
X100.0 Y110.0
G67
G91 G28 Z0.0 M09
G28 Y0.0
M01
Where:
Z = #26 - Final Z
R = #18 - R Plane
Q = #17 - Peck value
K = #6 - Clearance on return
E = #8 - Dwell when retracted from hole
F = #9 - Feed Rate
S = #19 - Feed Change Z Level
W = #23 - Reduced feed
D = #7 - Speed Change Z Level
V = #22 - Initial Spindle Speed
B = #2 - Spindle Speed
H = #11 - Percentage of Spindle Speed
J = #5 - Peck reduction factor
C = #3 - Min Peck amount
The above is a Modal Call of the Macro Program, and repeat at the X,Y coordinates following the call block and before the Modal Cancel G code, G67.
In both the above methods of calling the Macro Program, the K and E arguments can be omitted and default values will be applied in the Macro program.
O9010
IF[[#9 EQ #0]OR[#17 EQ #0]OR[#18 EQ #0]OR[#26 EQ #0]]GOTO100 (ERROR TRAP FOR MISSING REQUIRED ARGUMENTS)
IF[#6 EQ #0]TH #6=0.25 (DEFAULT RETRACT OFFSET)
IF[#8 EQ #0]TH #8=0.0 (DEFAULT DWELL) (THIS BLOCK IS NOT REALLY NECESSARY - ITS JUST CLEANER PROGRAMMING)
#17=ABS[#17] (ENSURE VARIABLE IS ABSOLUTE VALUE)
#6=ABS[#6] (ENSURE VARIALBLE IS ABSOLUTE VALUE)
#27=#4003 (STORE THE GROUP 3 G CODE - G90/G91)
#28=#5043 (STORE THE INITIAL Z COORDINATE)
#1=#18 (INITIALLY SET #1 TO THE R PLANE)
#4=#18 (USE A COPY OF #18 TO MODIFY IN THE MACRO)
N10
#1=#1-#17 (Q PECK AMOUNT) (CUT IN Z COORDINATE)
IF[#1 LT #26]TH #1=#26 (ENSURES NO OVER CUTTING IN Z)
#17=#17 * #5 (CALCULATE NEW PECK VALUE)
IF[#17 LT #3]TH #17=#3 (ENSURES PECK IS NO LESS THAN SET MINIMUM)
IF[#1 LE #19]TH #9=#23 (FEED CHANGE TEST)
IF[#1 LE #7]TH #2=#22 * [[100 - #11] / 100] (SPEED CHANGE TEST)
G90 G00 Z#4
G01 Z#1 F#9
#4=#1+#6 (K - RETURN OFFSET)
G00 Z#28 (INITIAL LEVEL)
G04 X#8 (E DWELL - IF REQUIRED, SO COOLANT OR AIR BLAST CAN ENTER THE HOLE)
IF[#1 GT #26]GOTO10
GOTO200
N100
#3006=1(MISSING DATA IN CALL BLOCK)
N200
G#27 (RESTORE GROUP 3 G CODE)
M99
%
I've not tested the program on a machine. Accordingly, proceed with caution if you use it. However, I can't see any blaring mistakes.
Regards,
Bill