Not so sure that these statements are correct if somebody could look at them and let me know if they are correct and if it would work or if there is a better way to do this.
I am not quite sure why you are doing so much code for just a peck drilling cycle. For starters in your sub after the N10 your using #100 I don't see that being set anywere. What is it? I also don't see your drill code G73,G83. I always use a variable to establish a clearance plane. Try this, using the same R,Z,Q,F as you were.
I typically have mine set up to use all variables. It makes it more universial. But I am typically doing mine with multiple holes on a bolt circle and the macro loops. I just modified this one here to do one hole. Thats what I figured you were doing.
A=3.(CLEARANCE PLANE #1)
K=73.(G-CODE FOR DRILL CYCLE)(#6)
Q=.1(PICK SIZE FOR DRILL CYCLE)(#17)
W=.1(R-PLANE)(#23)
T=1515(TOOL NUMBER BEING USED)(#20)
Z=1.0(FINAL DEPTH OF HOLE)(#26)
X=2.5(X COORD. OF HOLE)(#24)
Y=1.5(Y COORD. OF HOLE)(#25)
F=5.0(FEED RATE)(#9)
M=8(COOLANT TYPE 8=FLOOD 18=SPINDLE 9=OFF)(#13)
S=500(SPINDLE SPEED)(#19)
I was trying to make a drill cycle for a lath so it is only have one hole in the center of the part. The lath will not read the G81,G73 I tried it out this morning and that macro didn't work for crap. The other reason that I don't put all the information in this macro is the machinist that work for me really don't under stand how a letter transpose to a number with equation and I tried to explain it to them and they just don't under stand here is how I finaly got it to work.
My apologize. I did not see anything in your first post that said you were running this on a lathe. I should have asked. If that works for you then great.
If you want to help your operators understand the Alpha numeric word usage better I usually have lists made for each macro that I have. I have attached the spreadsheet that gives you the format that I use. You say they dont quite understand how it works, but with macros the operators don't have to understand how the letters transfer to variables and how the variables calculate in the macro. That is why most macros will be locked programs once proven out. If it is a proven program then there would be no reason to understand it and tweek it. The operators have a list that program 9001 is a peckdrilling cycle on the lathe and they have a list that says
Z= DEPTH OF CUT
Q= PECK/PICK SIZE
R= R-PLANE
F= FEED
S= SPEED
T= TOOL NUMBER USED
...
ect.
The list will never change and the macro will never change. As long as they understand how the line has to be set up G65P9001Z()Q()R()F()......ect. They should not be a problem.
I found this on the web several years ago and it looks like something you could use on a lathe. It allows you to reduce the size of the peck with a limit of how small. You don't have to call it with a G65 block, just insert into your main program. I don't know the author so I can't give the proper credit
<-- Quote-->
I wrote this macro on a Citizen swiss machine; it allowed me to do a 'regressive'
peck cycle... each peck is slightly less than the previous one. This let me keep
the bore clear of chips, keep oil on the drill, and eliminated broken drills.
This will work for a 'long-hand' peck cycle without actually requiring 128K of
rapid/feed moves to be programmed. Just set the variables and go!
As I said, this was on a Citizen control, so I had to reverse the Z direction,
but it should work on any control that has a Fanuc 'look and feel'.
(Fadal users, I can convert it to use V/R variables if need be.)
Set the following values in your program before moving to the first hole.
Set #534 to 1.00 for a 'standard' peck cycle,
Otherwise, it will reduce the length of each peck by a percentage (in this case, 85%).
.. this is good for really deep holes, where chips, coolant, etc are a concern.
If you do use a regressive peck, make sure #533 is valid for the drill you are using.
Then, move to the X/Y hole location, and give it a "M98 H310" on the next line.
Then, for each hole, do an X/Y move, then another "M98 H310"
Finally, at the end of your program, add this:
I really don't know. I just cut and pasted exactly as I found it.
I have modified it to work on a Haas control.
Since Haas would use "M97 P310" to call this as a local sub program, I can imagine that Swiss would use an "H310" to do the same thing. Any Swiss users out there to help?
Edit
We use a right angle head to drill holes on our Haas EC 1600 and the drill cycles only work in "Z" axis so I agree, this is a very nice Macro.
Last edited by JWK42; 08-28-2008 at 10:42 AM.
Reason: Added a comment
On a Citizen machine, with a Mitsubishi control, you would have "Sub programs" that are internal to the main program. The way you run the sub program is with the statement "M98H###"
This means your example is correct. The M98H310 will hop to N310 and the
M99 will send it back just like an external sub program would do it.(Which also works) This just allows you to keep all you needed sub programs and the main program as one neat package.
On a Fanuc control and others you would use the "M99P310" to hop to N310 but to send it back you would have to use a "GOTO###" statement and have the "###" somewhere for it to find.