Having trouble writing a peck milling subroutine using cutter comp. Any suggestions?We have a Haas VF2, with the very latest software.
Having trouble writing a peck milling subroutine using cutter comp. Any suggestions?We have a Haas VF2, with the very latest software.
You mean plunge roughing? Never heard of "Peck milling". What exactly is your issue? Nobody can help unless they actually know what is not working.
Ditto.
Peck drilling?
Plunge roughing?
Trochoidal milling? (It could be considered a form of Peck Milling).
More info please.
An open mind is a virtue...so long as all the common sense has not leaked out.
What I mean here is that I want to mill contours at progressively deeper Z depths using a subroutine, if possible. I've run Hurcos for years and it just asks for "peck depth". With cutter comp., if possible.
Can you post a sample of your code? There are many way this can be done with g-codes and sub programing but none of them will be as simple as the Hurco's.
Ahh. I think most people are going to call that Z level roughing or something similar.
G0 G80 G90
M6 T1
G43 H1
M3 Ssss
G54 G0 Xxxx Yyyy
Z.25 M8
G1 Z-.375 F50.
M97 P100
G1 Z-.75 F50.
M97 P100
G1 Z-1.125
M97 P100
G0 Z.25 M9
M6 T2
(ETC)
N100 G1 G41 D1 Xxxx Yyyy
(PROFILE CODE HERE)
G1 G40 Xxxx Yyyy
M99
You could do the tool change and prep commands in the subroutine if you think you will have to restart at any of your Z levels.
That is simple. Put your contour code in a subroutine and have an incremental Z move in the line for the subroutine call which also has an L count. Something like this:
G00 X Y Z0.1 (Start position clear of the contour)
G91 G01 Z-.10 F20. M97 P1000 L10
etc
etc
etc
M30
N1000 G90 (All the contour code)
M99
To use tool comp have the tool comp command in the subroutine and cancel tool comp back to the start position.
An open mind is a virtue...so long as all the common sense has not leaked out.
This just a generic sample of a program stepping down at .025. I had trouble changing the peck to .050, even though I altered the z start position and the number of loops, along with the incremental steps. When I wrote a small contour using cutter comp, I followed the rules for turning cutter comp. on and off and made sure I started and stopped in the same spot. When I test ran the program, it moved down one "peck" and finished the other loops at that same depth.
%
O01000
(MULTIPLE PASS PROGRAM EXAMPLE)
T1 M06
G00 G54 G90 X0 Y0.
S1250 M03
G43 H01 Z1. M08
G01 Z0 F50.
M97 P100 L20
G00 G90 Z1. M09
G53 Z0 M05
G53 Y0
M30
N100 (MULTIPLE PASS MILLING SUB.)
G91 G01 X0. Z-0.025
G90 Y-3.5 F10.
G00 G91 X0.01 Z0.025
G90 Y0.
X0.
G91 Z-0.025
M99
%
The code you posted works fine. Where is the code that didn't work.
An open mind is a virtue...so long as all the common sense has not leaked out.
Excellent answers, both, and much appreciated!! One more question; Does this mean that a subroutine can only do one thing at a time?
Geof, sadly, I deleted it, but I will recreate it after work. Thanks a lot!!
A subroutine can do whatever you want it to do. It can be a complete program including toolchanges and changes in work zeroes or it can be simply a list of X, Y coordinates that can be used by a spotting, drilling and tapping sequence.
An open mind is a virtue...so long as all the common sense has not leaked out.
I believe I changed it to look something like this;
This just a generic sample of a program stepping down at .025. I had trouble changing the peck to .050, even though I altered the z start position and the number of loops, along with the incremental steps. When I wrote a small contour using cutter comp, I followed the rules for turning cutter comp. on and off and made sure I started and stopped in the same spot. When I test ran the program, it moved down one "peck" and finished the other loops at that same depth.
%
O01000
(MULTIPLE PASS PROGRAM EXAMPLE)
T1 M06
G00 G54 G90 X0.5 Y-1.5
S1250 M03
G43 H01 Z1. M08
G01 Z0 F50.
M97 P100 L20
G00 G90 Z1. M09
G53 Z0 M05
G53 Y0
M30
N100 (MULTIPLE PASS MILLING SUB.)
G91 G01 X0.5 Y-1.5 Z-0.025
G90 G41 X1.25 F10.
Y1.5
G40 X.5
G00 Y-1.5 Z0.025
G91 Z-0.025
M99
%
So, this is correct then?
%
O01000
(MULTIPLE PASS PROGRAM EXAMPLE)
T1 M06
G00 G54 G90 X0.5 Y-1.5
S1250 M03
G43 H01 Z1. M08
G01 Z0 F50.
M97 P100 L20
G00 G90 Z1. M09
G53 Z0 M05
G53 Y0
M30
N100 (MULTIPLE PASS MILLING SUB.)
G91 G01 X0.5 Y-1.5 Z-0.025
G90 G41 X1.25 F10.
Y1.5
G40 X.5
G00 Z.1
G00 Y-1.5 Z0.0
G91 Z-0.025
M99
%
Like this? Don't I want to do some kind of Z retract between passes?
So, this is correct then?
%
O01000
(MULTIPLE PASS PROGRAM EXAMPLE)
T1 M06
G00 G54 G90 X0.5 Y-1.5
S1250 M03
G43 H01 Z1. M08
G01 Z0 F50.
M97 P100 L20
G00 G90 Z1. M09
G53 Z0 M05
G53 Y0
M30
N100 (MULTIPLE PASS MILLING SUB.)
G91 G01 X0.5 Y-1.5 Z-0.025
G90 G41 X1.25 F10.
Y1.5
G40 X.5
G00 Y-1.5
G91 Z-0.025
M99
%