What's new
What's new

Canned cycle on fanuc 21i-t

Hertz

Stainless
Joined
Apr 27, 2009
Location
Sudbury, Ontario, Canada
Hi, What is the canned cycle command to do a full retract drill cycle on a lathe? I have emailed Mastercam over and over about fixing the post to full retract but they keep sending it back to me with this.

G83z-1.r.1q125f.006

This cycle does not peck full retract. It goes in .125, stops, goes another .125, stops etc. Never retracts. I asked them to set it so I can retract full. I don't know what the proper command is for this cycle. I heard from some that its a G73 with Q and P values however if I put a P value in, I get an invalid code alarm. If anyone has a 21i-T series controller, could you post what your canned cycles look like? Thanks.
 
Mastercam is sending you the only face drilling cycle I can find in the Fanuc manual for a 16i/18i-TA control. I don't have a 21i-T manual at home. I doubt I will find anything different in the 21i-T manual.

I've never encountered a G76 in a Fanuc controlled lathe that was used for anything other than threading. I seriously doubt I ever will.

I could not find a G8_ command in the Fanuc manual I have at home that shows a cycle capable of doing what you want. Possibly there is, but the only lathes we have that use the G80 cycles use it for live tooling only. Normally I don't use them preferring the control of manual programming.

Speaking of getting Mastercam to fix a problem in their lathe section of the software....good luck with that. I went over the problem with their G76 canned cycle years ago with our reseller. They forwarded all the information to Mastercam. There have been many revisions since then. Including going to MastercamX. The problem still exists. Have my doubts it will ever get fixed. The lathe portion of Mastercam is treated as a second class citizen. Mill users must be their big money makers. I don't see how the fix could be all that complicated, but apparently it is.

Now I can post a cycle capable of doing what you want when I get back to work after the Holidays. However, it is not part of Mastercam because it is not a Fanuc drill routine. You would have to get your reseller to make the modification to the post, or pay someone else to do it. This cycle should have already been added to our posts, but like other post requests we have made from our reseller just ain't happening. Some of the problem is that I haven't been bugging them to get the work done that they were already paid to do. I've been swamped for a long time.

This cycle is one that comes with Hardinge lathes. Except I've modified it a bit. Not only can you now load it into a control without having to either 1) manually add the last line back in once downloaded, or 2) modify (or delete before sending) the M99 and then changing it back after downloading, but I also changed it so there is no need for an alarm to be part of the program. I also recently added 2 more variables that allow me to run it in IPR or IPM. and added the possibility of having a dwell at the bottom of each peck. The subroutine always has had the ability to specify a dwell in seconds at the retract point. For my modified version, you specify the number of desired revolutions at the bottom and the subprogram does the math for you to change dwell to seconds. Nice thing about this is you don't have to redo the math every time you change the drills RPM.

It made my life easier with the recent jobs we have been getting that require deep drilling with live tooling. This is for face drilling. I was working on a similar subroutine for cross drilling, but never finished it.

I would be glad to post the subroutine if you think it is something you could use.
 
Set parameter RTR (5101#2 on 0i which may be same on your control) to 1 for complete retraction.

Sinha
 
Last edited:
Thanks for the offer g-code guy. I will keep you in mind. Sinha, will this parameter keep me from using the non retract peck? I would like to be able to use both. On insert drills in aluminum, I use the chip break cycle but with normal drills, I need to fully retract them. Steel is not bad cause I don't retract at all with insert drills but still need to retract on HSS bits. Basically i need to be able to use all 3 options. Currently I can drill straight through without pecks and I can drill with chip break pecks. If I change the parameter, will I lose that option?
 
Hi, What is the canned cycle command to do a full retract drill cycle on a lathe? I have emailed Mastercam over and over about fixing the post to full retract but they keep sending it back to me with this.

G83z-1.r.1q125f.006

Your cycle example, G83 Z-1.0 R.1.0 Q125 F0.006, is correct if bit 2 of parameter No 5101 set to 1 as Sinha suggested is the case with a Fanuc Oi control. This parameter is the same for the 21i control.

The drill will retract to the R level and a P value can be added if you want a dwell at the bottom of the hole.

Regards,

Bill
 
Thanks for the offer g-code guy. I will keep you in mind. Sinha, will this parameter keep me from using the non retract peck? I would like to be able to use both. On insert drills in aluminum, I use the chip break cycle but with normal drills, I need to fully retract them. Steel is not bad cause I don't retract at all with insert drills but still need to retract on HSS bits. Basically i need to be able to use all 3 options. Currently I can drill straight through without pecks and I can drill with chip break pecks. If I change the parameter, will I lose that option?

Hertz,
However 5101.2 is set will determine how this cycle will behave. Accordingly, whilst Bit 2 is set to 1, the drill will retract to the R level.

As well as G10 being used to load and modify tool and work shift offsets, G10 can be used in Programmable Parameter entry. Therefore, it would be possible to change between the two different G83 modes within your program. Without giving it too much thought, I suggest you could put the G83 format in a Macro program and pass the Depth, Peck distance, R level, Feed etc, as well as a flag to set the G83 style you want to use. This Macro program could live in your control all the time and be called when required.

Post back if you need information on how to do this.

Writing a MasterCam post to output to do this would not be too difficult.



Regards,

Bill
 
Ok thanks. Now we have been fine tuning our lathe post with the dealer. Would they be able to do this? Or would they charge extra. Seeing as the post is not to my standards yet, I can't see it being a problem right? What is G10? I would prefer if I could have everything done from the computer so the program goes out and nothing has to be done to it.
 
That parameter didn't work. It changed something though. Seems like it is doing the same thing but more stops/pecks and takes longer. Should the cycle with that change look like this?

G83Z-1.2R0.Q1250F.006
 
Use Q1250 which is same as .125 inch
R is not creating problem. Can use R0.1 or some other value.
 
Q1250 IS what I used. The line above is what I am using but its not full retracting. I tried R at .1 and 0. The only difference is when the drill comes to start drilling, it backs off .1 before starting. Kinda useless, so I leave it at 0. I start at X0 and Z.1.
 
OK. I will look into the manual tomorrow and try to find an answer.
Meanwhile,
1. Where is your Z0?
(and does the display show Z 0.0000 when you manually jog to this position?)
2. Where is the tool at the time of commanding G83?
3. Are you sure that you have typed negative Z in G83 block (excuse me for this silly question)?
4. Try G87 also.
 
No silly question, It happens a lot when we over look the smallest thing. My z0 is the face of the part. The display shows z.1 just before it starts cutting as the program goes to z.1 x0 before the cycle starts. Negative is programmed in. if it wasn't, the drill would not drill at all right? It is drilling, it just doesn't peck. I have not tried G87. I will try it. Thanks.
 
No silly question, It happens a lot when we over look the smallest thing. My z0 is the face of the part. The display shows z.1 just before it starts cutting as the program goes to z.1 x0 before the cycle starts. Negative is programmed in. if it wasn't, the drill would not drill at all right? It is drilling, it just doesn't peck. I have not tried G87. I will try it. Thanks.

G87 is a side drilling cycle, that will not help you.

G74 is a face drilling/grooving cycle but on all machines I've serviced the action is as shown in the attachment; no retract to R level between pecks.

I'm surprised that the G83 with 5101.2 set does not work as you would like. I tried it on a machine here and it switches accordingly with the parameter change, and definitely does a full retract after each peck with 5101.2 set.

G74.JPG


Ok thanks. Now we have been fine tuning our lathe post with the dealer. Would they be able to do this? Or would they charge extra. Seeing as the post is not to my standards yet, I can't see it being a problem right? What is G10? I would prefer if I could have everything done from the computer so the program goes out and nothing has to be done to it.
Your MasterCam dealer would be able to alter your Post to do this. If the guy writing the Post is worth his salt, all would be done on the PC.

G10 is a code that can be used to load and, or modify offsets. It can also be used to modify parameters from program level, using a different syntax of course. Its not advised that all parameters be changed this way, but 5101.2 is one that is safe to do so. I've never had to use it, but I did test it just now to prove it for your app.

If for whatever reason you can't get G83 to work as you wish, write your own custom cycle using User Macro. You could make that cycle as smart as you like with diminishing "Peck In" as the depth became greater and with the full retract. You could call it from your program using a user defined G Code and your MasterCam Post would simply output this code with all the required parameters to be passed to the Macro program.


Regards,

Bill
 
Q1250 IS what I used. The line above is what I am using but its not full retracting. I tried R at .1 and 0. The only difference is when the drill comes to start drilling, it backs off .1 before starting. Kinda useless, so I leave it at 0. I start at X0 and Z.1.

The R function inside your G83 line does now have the function of backing of or diving in, depending on - or + value.

So R-0.1 will make the drill start drilling at 0.1 deeper then your Z starting position before the G83 line.

If 5101 has 8 zero's , wich zero did you change to 1 ?
 
The R function inside your G83 line does now have the function of backing of or diving in, depending on - or + value.

So R-0.1 will make the drill start drilling at 0.1 deeper then your Z starting position before the G83 line.

If 5101 has 8 zero's , wich zero did you change to 1 ?


I realize how the R value works, lol. Putting in R.1 backs off the drill .1 behind the start point of where my Z is, in this case .1. I leave it at 0 and it stays at the Z start which in this case is z.1. To make it come in .1 I would have to put R-.1. This would come to the start point z.1, then rapid in to z0. This is what I was specifying as useless. In 5101 I changed #2 to 1.
 
Yes. G87 is for side drilling. It won't help you. Thanks Angelw for pointing out.

For usual parameter setting, this cycle works in incremental mode. Therefore,
R is the distance from the initial level to R-point level, and
Z is the distance from the R-point to the bottom of hole.

5101#2 means third bit from right. Did you, by any chance, change the second bit from right? (again a "silly" question)

What value you have in parameter 5114?

Post 2-3 blocks just before commanding G83.

Though it may not matter, did you specify M-codes for C-axis indexing mode and clamp?

If nothing works, delete Q-word, and call G83 repeatedly (it would become a normal drilling cycle without pecking, with complete rapid retraction to R-point), each time with a larger Z-value, so as to drill the full depth finally. A small macro can be used for automatic repetition of G83.

Somebody must figure out the reason for unusual behavior of G83 on your machine.

Sinha
 
Read the attachment for a reducing-peck, full-retraction drilling macro on a lathe, which can be used on a lathe even without live tooling (for central drilling), without using any canned cycle.

You would not need many of the features of this macro; these are given for instruction purpose only.

Sinha
 

Attachments

  • deep-hole peck drilling on lathe.zip
    93.7 KB · Views: 256








 
Back
Top