Post processor - large drill retracts

Post processor - large drill retracts

jack-pat
Participant Participant
1,135 Views
10 Replies
Message 1 of 11

Post processor - large drill retracts

jack-pat
Participant
Participant

The post processor we use for an old lathe outputs drilling cycles as linear moves, which i have no problem with but there seems to be no way of changing the retract. It always starts feeding 2mm from the previous peck depth, we'd like to reduce this if possible. Changing values in fusion makes no difference and i'm not sure what drives it in the post processor. 

 

%PM
N1005
(
N1 G54
N2 G99 X50 Z-51
N3 G94
N4 G71
N5 G0 X200. Z200.
N6 T3030
N7 G54
N8 M8
N10 G97 S5000 M3
N11 G0 X-50. Z15.
N12 G0 Z5.
N13 Z4.
N14 Z1.
N15 G1 Z-2. F400.
N16 G0 Z4.
N17 Z0.
N18 G1 Z-2.9 F400.
N19 G0 Z4.
N20 Z-0.9
N21 G1 Z-3.7 F400.
N22 G0 Z4.
N23 Z-1.7
N24 G1 Z-4.4 F400.
N25 G0 Z4.
N26 Z-2.4
 
When we are doing deep holes it adds a lot of time onto the cycle and we have to change the pecks manually.
Post processor attached

Any help would be much appreciated! 

 

thanks

0 Likes
Accepted solutions (1)
1,136 Views
10 Replies
Replies (10)
Message 2 of 11

jonathanBUCVS
Advocate
Advocate

I was looking for this retract value in the post the other day too, and I could not find it either. 

Message 3 of 11

engineguy
Mentor
Mentor

@jack-pat 

 

The PP seems to work OK here, must be how you are setting up, in the attached images I have set to 2mm peck depth and 1mm retract (Chip Break), as you can see from the code below it is pecking 2mm in and only retracting the 1mm as set for the Feed Height in the Heights Tab.

%PM
N1001
(
N1 G54
N2 G99 X25 Z-50
N3 G94
N4 G71
N5 G0 X200. Z200.
N6 T8080
N7 G54
N8 M8
N10 G97 S1200 M3
N11 G0 X0. Z14.
N12 G0 Z4.
N13 Z1.
N14 G1 Z-2. F300.
N15 G0 Z-1.
N16 G1 Z-4. F300.
N17 G0 Z-3.
N18 G1 Z-6. F300.
N19 G0 Z-5.
N20 G1 Z-8. F300.
N21 G0 Z-7.
N22 G1 Z-10. F300.
N23 G0 Z-9.
N24 G1 Z-12. F300.
N25 G0 Z4.
N26 Z14.
N27 M9
N28 G0 X200. Z200.
N29 M30
)
EOT

Peck Drill Settings.jpgPeck Drill Settings-2.jpg


 

 

If you are using the "Deep Drilling" option then you are on "Full Retract" and after each peck it will retract to the "Feed Height" set under the "Heights" tab as you can see in the code and images below.

So, seems to me the PP is fine, just the use of the settings in Fusion need some attention.

%PM
N1001
(
N1 G54
N2 G99 X25 Z-50
N3 G94
N4 G71
N5 G0 X200. Z200.
N6 T8080
N7 G54
N8 M8
N10 G97 S1200 M3
N11 G0 X0. Z15.
N12 G0 Z5.
N13 Z4.
N14 Z2.
N15 G1 Z-2. F300.
N16 G0 Z4.
N17 Z0.
N18 G1 Z-4. F300.
N19 G0 Z4.
N20 Z-2.
N21 G1 Z-6. F300.
N22 G0 Z4.
N23 Z-4.
N24 G1 Z-8. F300.
N25 G0 Z4.
N26 Z-6.
N27 G1 Z-10. F300.
N28 G0 Z4.
N29 Z-8.
N30 G1 Z-12. F300.
N31 G0 Z5.
N32 Z15.
N33 M9
N34 G0 X200. Z200.
N35 M30
)
EOT
Deep Drilling.jpg

 

Deep Drilling-2.jpg

 

Example file attached that seems to work OK here when altering settings as above 🙂

0 Likes
Message 4 of 11

jonathanBUCVS
Advocate
Advocate

When the drill returns into the hole, it is 2mm away from the depth it last drilled, so its really feeding for 4mm instead of 2mm, which does add a lot of time to the cycle. 

 

N21 G1 Z-6. F300. (drill to 6mm depth)
N22 G0 Z4. (retract)
N23 Z-4. (rapid to 4mm depth)
N24 G1 Z-8. F300. (drill to 8mm depth)

 

Message 5 of 11

jack-pat
Participant
Participant

Many thanks, but yeah as Johnathon said -  for deep drilling it always starts feeding 2mm away from the last peck. I don't think there's anything to change this in fusion... But there must be something driving it?

 

A job we're doing currently has a deep hole with lots of pecks and all the 2mm's really add up! 

 

Thanks

 

Jack

0 Likes
Message 6 of 11

jack-pat
Participant
Participant

Does anyone have any further suggestions on this?

 

Thanks in advance

0 Likes
Message 7 of 11

a.laasW8M6T
Mentor
Mentor

Does your machine not use Cycles like G81, G73 etc. for drilling, I see they are all commented out in the post .cps.

So the Post processor will always expand the cycles into long form code, which it seems we have no control over the depth it returns to.

 

I tried playing around to get it not to expand the cycles but I don't know enough JavaScript to get it to work.

maybe @boopathi.sivakumar can help?

 

 

 

0 Likes
Message 8 of 11

jack-pat
Participant
Participant

We could use G83 for deep drilling... But would that not also have a default "lead in" after each peck? Maybe worth a try though... i still find it hard to believe there's nothing in the post controlling the 2mm! 

0 Likes
Message 9 of 11

david.lundbergC7AM5
Advocate
Advocate

In G83, the "lead in" should be controlled by a machine parameter. 

I agree though, something in the post should control the 2mm.  

 

/David

0 Likes
Message 10 of 11

boopathi.sivakumar
Autodesk
Autodesk
Accepted solution

The drilling safe distance is defaulted in post processor to 2mm so it always uses that value for retracting 

You can change the safe distance value like below

 

function onCyclePoint(x, y, z) {
  machineParameters.drillingSafeDistance = toPreciseUnit(0.1, MM);  // safe distance
  expandCyclePoint(x, y, z); // expand all drill cycles
  return;

 

 So now it uses the value as mentioned. in this case it uses 0.1 mm

 


Boopathi Sivakumar
Senior Technology Consultant

Message 11 of 11

jack-pat
Participant
Participant

Great thanks! Added this to the post now and it works perfect. 

 

 

0 Likes