Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Cleaner code for helical entry?


Azoth
 Share

Recommended Posts

Does anyone know what can be changed to get the tool to enter the part at an even number so the code is cleaner?

I'm getting something like this

G3 X-.1798 Y.2707 Z.0278 I.1798 J-.2707
G3 X.1798 Y-.2707 Z.0153 I-.1798 J0.2707
G3 X-.1798 Y.2707 Z.0028 I.1798 J-.2707
G3 X.1798 Y-.2707 Z-.0097 I-.1798 J.2707
G3 X-.1798 Y.2707 Z-.0222 I.1798 J-.2707
G3 X.1798 Y-.2707 Z-.0347 I-.1798 J0.2707
G3 X-.1798 Y.2707 Z-.0472 I.1798 J-.2707

and I want it like this

G3 X-.325 Z.025 I.325 J0.
G3 X-.325 Z0. I.325 J0.
G3 X-.325 Z-.025 I.325 J0.
G3 X-.325 Z-.05 I.325 J0.

 

Link to comment
Share on other sites
16 minutes ago, Azoth said:

Does anyone know what can be changed to get the tool to enter the part at an even number so the code is cleaner?

I'm getting something like this


G3 X-.1798 Y.2707 Z.0278 I.1798 J-.2707
G3 X.1798 Y-.2707 Z.0153 I-.1798 J0.2707
G3 X-.1798 Y.2707 Z.0028 I.1798 J-.2707
G3 X.1798 Y-.2707 Z-.0097 I-.1798 J.2707
G3 X-.1798 Y.2707 Z-.0222 I.1798 J-.2707
G3 X.1798 Y-.2707 Z-.0347 I-.1798 J0.2707
G3 X-.1798 Y.2707 Z-.0472 I.1798 J-.2707

and I want it like this


G3 X-.325 Z.025 I.325 J0.
G3 X-.325 Z0. I.325 J0.
G3 X-.325 Z-.025 I.325 J0.
G3 X-.325 Z-.05 I.325 J0.

 

What toolpath are you using to generate the code?

If you are using a Pocket Toolpath, you can use the "Use entry point" checkbox, and input a Point in your Chain Manager. This gives you the ability to choose the Entry Point location, which would give you the clean code you are looking for.

The same goes for Circle Mill; "input geometry" is going to determine where your entry helices are generated. The location of your geometry directly corresponds with the G-code moves that get generated.

  • Like 1
Link to comment
Share on other sites

I'm using pocket. Both the above code makes the same hole in the same position. It just starts the helical sweep at the wrong angle

I used an entry point to place the hole in the center of the pocket so the remaining wall material to be removed is consistent all around.

I tried shifting the Feed Plane in Linking parameters by the amount it's off in Z so I at least get a clean Z like

Z.0125
Z0.
Z-.0125
Z-.025

but that doesn't work. It just starts the helical motion in a different direction and X, Y, Z are all messy again.

Link to comment
Share on other sites

Yeah, that's what I'm starting to think. It's just the last programmer had plenty of parts with counterbores done with helical plunge from what I've seen and they're all neat.

I'm just an operator, not the company programmer, so it isn't too important. No one's waiting on me.

Just trying to get the part running on a second machine that supposedly can't push a 1.5" drill for a starter hole so I was going to plunge and rough in one operation just to see how it goes. I could draw a helix at the correct location to follow manually or just rewrite that portion of the code by hand, but both take time where I though the point of mastercam should be to streamline the process. I guess you can have clean code or fast code, but not both... Maybe the last guy edited them himself after it spit out that mess.

 

---

I got a

"You have reached the maximum number of posts you can make per day. "

so...

@cncappsjames, I will look through his projects

@byte me, the R value gives a neater R.325, but does nothing for the XYZ mess. I still want to figure this out for future reference  so I'll update if I do.

@Leon82 The cut depth sounds like that may be it. If it's calculating the helical path from bottom up, the start point would just land where it lands.

Update

@Leon82 I shifted the cut Depth (it's a window not a pocket so deeper is ok) instead of the Feed Plane in Linking Parameters and that put the Z on 0.

I'll try it at work tomorrow on the actual part file and see how it goes.

 
Edited by Azoth
can't reply for rest of 10-18-2020
  • Like 1
Link to comment
Share on other sites
14 minutes ago, Azoth said:

Yeah, that's what I'm starting to think. It's just the last programmer had plenty of parts with counterbores done with helical plunge from what I've seen and they're all neat.

The easiest thing to do then would be to open up one of his projects and see what he did, what post he used, etc... 

  • Like 1
Link to comment
Share on other sites

Tried with 360 Arcs Allowed on a new machine group and the Z was off again. Adjusting Depth didn't work this time, but I shifted Z Clearance under Entry Motion instead and Z was on 0. again.

G0 G90 G54 X-.1888 Y-.074 S1250 M3
G43 H1 Z2. M8
Z.1482
G1 Z.125 F20.
G3 Z0. I.1888 J.324 F40.
Z-.125 I.1888 J.324
Z-.25 I.1888 J.324
Z-.375 I.1888 J.324
Z-.5 I.1888 J.324
Z-.625 I.1888 J.324
Z-.75 I.1888 J.324
Z-.875 I.1888 J.324
Z-1. I.1888 J.324
Z-1.125 I.1888 J.324
Z-1.25 I.1888 J.324
X0. Y.625 Z-1.323 I.1888 J.324
G1 Y.275

Still I think it'd be hard for an operator to know that that is a .375 radius + .75 EM = 1.5 hole from those I and J values. I'd prefer to see .375 instead of .1888

Just trying to figure it out for future reference.

I got the Z to be a clean .125 by calculating a ramp angle of 3.03679 from the length traveled, but XY / IJ still eludes me.

The previous programmer did use contour ramping instead of pocket helical entry for those counterbores. It asks for ramp depth for the clean Z.

 

Anyways, I'm done thinking about this for now. The whole production crew just got laid off today and the WorkInTexas website is giving me a headache.

Link to comment
Share on other sites

Okay, I got it. Should have read the code in full instead of seeing the mess and short circuiting my thought process.

The spiral roughing (after the plunge move) for my geometry starts in the Y+ direction (from X0., Y.625) and that's the starting point for the helix path working from Bottom to Top. BUT, it breaks the G2/G3 code into arcs from Top to Bottom. If the Helical Plunge's Axial Depth of Cut (ΔZ per loop) is not an integer divisor of the total Helix Z Distance, the X,Y Start Point will not land on an axis thus the arc break will not either and you get ugly I,J values.

Simply calculate an appropriate [Plunge Angle in Entry Motion] to make your Axial ramping DoC an easy, rational number for your Z progression. Make the distance between [Z Clearance in Entry Motion] and [Depth in Linking Parameters] an integer multiple of your ramping Axial DoC to land arc breaks on an X or Y axis (keeping your I,J values simple). Make the distance between [Z Clearance in Entry Motion] and your Z0 surface an integer multiple of the same Axial DoC to land Z on 0. If you cannot reconcile this with the depth needed for the pocket, shifting [Z Clearance in Entry Motion] and [Depth in Linking Parameters] together will throw Z off 0, but your arc breaks will still land on an axis keeping your I,J values simple.

Sorry if it looks like I'm trying to be a know-it-all. I remember things better when I fully understand them and teaching/orating is a good way to lay it out and lock it down. May as well leave it all here, too.

G0 G90 G54 X0. Y.625
G43 H354 Z2.
S1250 M3
Z.2 M8
G1 Z.125 F20.
G3 Y-.125 Z.0625 I0. J-.375 F40.
Y.625 Z0. I0. J.375
Y-.125 Z-.0625 I0. J-.375
Y.625 Z-.125 I0. J.375
Y-.125 Z-.1875 I0. J-.375
Y.625 Z-.25 I0. J.375
Y-.125 Z-.3125 I0. J-.375
Y.625 Z-.375 I0. J.375
Y-.125 Z-.4375 I0. J-.375
Y.625 Z-.5 I0. J.375
Y-.125 Z-.5625 I0. J-.375
Y.625 Z-.625 I0. J.375
Y-.125 Z-.6875 I0. J-.375
Y.625 Z-.75 I0. J.375
Y-.125 Z-.8125 I0. J-.375
Y.625 Z-.875 I0. J.375
Y-.125 Z-.9375 I0. J-.375
Y.625 Z-1. I0. J.375
Y-.125 Z-1.0625 I0. J-.375
Y.625 Z-1.125 I0. J.375
Y-.125 Z-1.1875 I0. J-.375
Y.625 Z-1.25 I0. J.375
G1 Z-1.375

3/4 Endmill .125 Radius
Helical Radius .375
Helical Ramp Angle 3.03679
Axial DOC .125
Axial Chipload .00025
Radial Chipload .008

I just wish I could have tested it. I have no idea what the Z-axis chipload should be when plunging with an endmill.

Oh, again I no longer have access, but here's a mockup of the feature in question. I believe it was a 2x4 window, 1.25 depth.

9XKHxLB.png

edit: Great, I see a new issue. I don't know why it output that last move from Z-1.25 to Z-1.375 as G1 instead of G3... meh, I'll drop it.

-Nope, got it. The part is 1.25, so it knew not to continue spiraling past that point.

Thanks, everyone

Link to comment
Share on other sites

I don't understand the "need" to see "clean" code.....

You let the CAM system do its thing....

I have had a bonehead try to tell me my helix bore wasn't on center because the starting point was wrong...after back and forth, trying to explain I didn't need to start at a certain point, he was told to go run it...lo' an behold, it was in the right position....

For the most part, I don't even scan my code over....excpt when I might be getting a little creative with a path to do something "special"...

 

  • Like 3
Link to comment
Share on other sites
  • 6 months later...

For the Fagor 8055 control. 3 -axis Vertical Milling Machine. 

To do the helical milling, there is a single line code 

G03 X Y I J K Z 

But my post is posting it for each z step. Can anyone please help to stop posting for each Z step?

what can I do to stop posting lines from 623 to 648?

The below program posted using Helix bore toolpath of Mastercam. 

image.png.534d70fbc2cdf448e0183809003fc634.png

Instead of this, I want to see the code as below

G41 X-350.75 F100.

G03 X-350.75 Y160. I-9.25 J0. K1. Z-26.

G01 G40 X-360.

so I can reduce the file size, easy to read. 

what can I change in my Mastercam or in my post processor? (I do not have much knowledge of post-processor)

The below image shows the current configuration for helical posting

image.thumb.png.b8742aeceda90a1b2630f52284fe97ec.png

 

Please guide me.

Thank you.

Regards,

Abhi Prajapati

Processor- Intel(R) xenoin(R) CPU E#0123- v6 @ 3.,50 GHz

RAM - 32 GB

Graphics - NVIDIA Quadro P2000

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...