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:

contour ramp arcs


Brian Pallas
 Share

Recommended Posts

So I have a toolpath where it is ramping around a slot.   Except, for one lap, the code isn't the same.  I have full arc moves for everything, but then on one lap, instead of arcs being output, there are lines.  Why would it do that on just one lap around, and it isn't the first one or last one?  If I output the path with no ramping, it is all arc moves.

 

 

(SUB H-LIVE - .085 DIA X .010R)
 
M05
M98 P7000
G55
 
T1515
 
G17 G98
M245(CONNECT SUB C AXIS)
M269 (SUB BRAKE OFF)
G0 X1.1113 Y0. Z-1.0 C-45. M8
Z-.1
M268 (SUB BRAKE ON)
G97 S6000 M14
 
(FINISH SLOT)
 
G1 Z.077 F30.
X1.095 F10.
G3 X.9756 Y.2486 Z.086 R.5475
G2 X.9916 Y.2526 Z.0865 R.0045
Y-.2526 Z.1048 R.5564
X.9756 Y-.2486 Z.1053 R.0045
G3 X1.095 Y0. Z.1143 R.5475

(same corner that gets lines later)
X.9756 Y.2486 Z.1233 R.5475
G2 X.9916 Y.2526 Z.1238 R.0045


Y-.2526 Z.1421 R.5564
X.9756 Y-.2486 Z.1426 R.0045
G3 X1.095 Y0. Z.1516 R.5475
X.9756 Y.2486 Z.1607 R.5475

(lines moves here one corner)
G1 X.9748 Y.2513 Z.1608
X.9773 Y.2538 Z.1609
X.9823 Y.255
X.9877 Y.2546 Z.161
X.9917 Y.2526 Z.1611


G2 X.9916 Y-.2526 Z.1795 R.5564
X.9756 Y-.2486 Z.18 R.0045
G3 X1.095 Y0. Z.189 R.5475

(here is the same corner again back to an arc move)
X.9756 Y.2486 Z.198 R.5475
G2 X.9916 Y.2526 Z.1985 R.0045


Y-.2526 Z.2168 R.5564
X.9756 Y-.2486 Z.2173 R.0045
G3 X1.095 Y0. Z.2263 R.5475
X.9756 Y.2486 Z.2353 R.5475
G2 X.9916 Y.2526 Z.2358 R.0045
X1.077 Y.1402 Z.24 R.5564
X.9916 Y-.2526 R.5565
X.9756 Y-.2486 R.0045
G3 X1.095 Y0. R.5475
X.9756 Y.2486 R.5475
G2 X.9916 Y.2526 R.0045
X1.077 Y.1402 R.5564
G1 X1.0613 Y.1382
G0 Z-.1
Z-1. M9
M05
M246(DISCONNECT SUB C AXIS)
M269 (SUB BRAKE OFF)
M9
M98 P7000

 

 

The time it gets lines, the last endpoint the X is .0001 different than the times it gets arc moves, so maybe that is why it can't put an arc there?  But why wouldn't it calculate the positions the same each time?  ( Yes, I have too much free time :) )

slot.pdf

Link to comment
Share on other sites

I played around with the "tolerances" and the control def.  Not sure if that is what you were referring to.

  Changing didn't help what I was looking for, but I checked the "truncate" box and that took care of it.  Just having mcam cut off everything after the 4th decimal position, instead of rounding anything,  Looks like it will work for this, we'll see if it causes any other issues. 

Link to comment
Share on other sites

I've seen issues with 4 decimal place rounding in numerous situations. While they can sometimes be eliminated with changing tolerance settings, and editing geometry, some of the rounding up/down issues are caused by the way that a computer stores values internally.

Most numbers are stored as "Floating Point" values, and this can lead to the .0001 variations in the output of XYZ position values.

There is a secret method to get around this. At the top of your post, you can initialize the 'round_opt$' variable. I think the value of '11' is the most common setting for fixing the rounding issue...

round_opt$ : 11

 

Link to comment
Share on other sites

I had same issue with arcs on ramping. I change in control definition in tolerances page the value of "min change in arc plane for helix" to 0.0001 and it "cured" the issue for me.

And Colin, I tried adding round_opt$:11 and the rounding issue is still there on arc helix moves  in some example I try to "cure".

Link to comment
Share on other sites

Check out this thread for more information about that special Command Variable.

There are multiple possible values for 'round_opt$', but no info about the possible values in the MP Documentation Portfolio.

Your best bet is to try each different "license plate" option mentioned in that thread, and see if the output changes. If you look in that thread, you can use, 1, 10, 11, or 21. There may be more options, available, but I remember those being the most commonly used.

The thing is, this also may not be the Post / Control Def, but also the condition of the geometry itself. Are each of the lines and arcs perfect? Don't just analyze the geometry at 4 decimal place precision. Set your Analyze precision to at least 6 decimal places, then look at the positions of each endpoint, and the center point. Also do the same with your lines. Make sure the XYZ values are good before you just go chasing down the rabbit hole of tolerances, and CD/Post settings. Always make sure the input is good before worrying about the output from the Post.

If you use Analyze Entity Properties, you can edit the geometry directly in the dialog box. I like to make sure to convert the sweep of any arcs that aren't in the normal 0-360 range. What do I mean by that? Sometimes when you analyze an arc, you'll see that the "start angle" is something like "450.xx" degrees, and the "end angle" is "540.xx". Why? Because of translation issues, or just how the geometry was built. If I run into a set of angles like that, I will subtract the same amount from each one, to "redefine" the Arc within the normal angle range. So for those numbers above, I'd reset the start angle to "90.", and the end angle to "180.", which would still define an arc with 90 degrees of total sweep. This is probably overkill on my part, and just my OCD showing, but I like to be able to "see" the arc I'm dealing with without having to do the quick calculations in my head. I will sometimes also swap the start/end angle values, to make sure the sweep of the arc is positive.

One final piece of advice is also to use the "Combine Views" command, to make sure your Arcs are on the Top/Front/Right planes, then perform your analysis to determine the XYZ values, and make sure all lines/arcs are fully trimmed together.

 

Link to comment
Share on other sites

I don't think that changing any value of a variable or control def settings can fix the floating point problem witch exist from the beginning of computer programming, just because the MP language doesn't have an algorithm to deal with this rounding issue. But I might be wrong...actually I wish I'm wrong. That's why I DARE! any of you out there to look at the attached file, and by any means get an consistent arc output on those helix moves. I posted this issue on another forum also for your reference and some other link below.

Thanks

http://forum.mastercam.com/Topic19630.aspx

https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Arc.mcam

Link to comment
Share on other sites
On 5/24/2017 at 5:25 PM, Grievous said:

I had same issue with arcs on ramping. I change in control definition in tolerances page the value of "min change in arc plane for helix" to 0.0001 and it "cured" the issue for me.

And Colin, I tried adding round_opt$:11 and the rounding issue is still there on arc helix moves  in some example I try to "cure".

You mean like this?

 

%
:0001(ARC)
(DATE=DD-MM-YY - 27-05-17 TIME=HH:MM - 08:50)
(MCX FILE - C:\USERS\JOHN\DESKTOP\ARC.MCAM)
(NC FILE - C:\USERS\JOHN\DOCUMENTS\MY MCAM2017\MILL\NC\ARC.NC)
(MATERIAL - ALUMINUM INCH - 2024)
(T1|3/16 EM |H1|D1|WEAR COMP|TOOL DIA. - .1875)
(T2|3/8 EM |H2|D2|WEAR COMP|TOOL DIA. - .375|XY STOCK TO LEAVE - .005|Z STOCK TO LEAVE - 0.)
N100 G20
N102 G0 G17 G40 G80 G90 G94 G98
N104 G0 G28 G91 Z0.
N106 G0 G28 X0. Y0.
(3/16 EM |TOOL - 1|DIA. OFF. - 1|LEN. - 1|TOOL DIA. - .1875)
(HELIX BORE)
N108 T1 M6
N110 G0 G54 G90 X-2.5 Y0. C0. B0. S4000 M3
N112 G43 H1 Z1.
N114 Z.1
N116 G1 Z0. F15.
N118 G41 D1 X-2.53125
N120 G3 X-2.5 Y-.03125 Z-.005 I.03125
N122 X-2.46875 Y0. Z-.01 J.03125
N124 X-2.5 Y.03125 Z-.015 I-.03125
N126 X-2.53125 Y0. Z-.02 J-.03125
N128 X-2.5 Y-.03125 Z-.025 I.03125
N130 X-2.46875 Y0. Z-.03 J.03125
N132 X-2.5 Y.03125 Z-.035 I-.03125
N134 X-2.53125 Y0. Z-.04 J-.03125
N136 X-2.5 Y-.03125 Z-.045 I.03125
N138 X-2.46875 Y0. Z-.05 J.03125
N140 X-2.5 Y.03125 Z-.055 I-.03125
N142 X-2.53125 Y0. Z-.06 J-.03125
N144 X-2.5 Y-.03125 Z-.065 I.03125
N146 X-2.46875 Y0. Z-.07 J.03125
N148 X-2.5 Y.03125 Z-.075 I-.03125
N150 X-2.53125 Y0. Z-.08 J-.03125
N152 X-2.5 Y-.03125 Z-.085 I.03125
N154 X-2.46875 Y0. Z-.09 J.03125
N156 X-2.5 Y.03125 Z-.095 I-.03125
N158 X-2.53125 Y0. Z-.1 J-.03125
N160 X-2.5 Y-.03125 Z-.105 I.03125
N162 X-2.46875 Y0. Z-.11 J.03125
N164 X-2.5 Y.03125 I-.03125
N166 X-2.53125 Y0. J-.03125
N168 X-2.5 Y-.03125 I.03125
N170 X-2.46875 Y0. J.03125
N172 G1 G40 X-2.5
N174 G0 Z1.
N176 X2.5
N178 Z.1
N180 G1 Z0.
N182 G41 D1 X2.46875
N184 G3 X2.5 Y-.03125 Z-.005 I.03125
N186 X2.53125 Y0. Z-.01 J.03125
N188 X2.5 Y.03125 Z-.015 I-.03125
N190 X2.46875 Y0. Z-.02 J-.03125
N192 X2.5 Y-.03125 Z-.025 I.03125
N194 X2.53125 Y0. Z-.03 J.03125
N196 X2.5 Y.03125 Z-.035 I-.03125
N198 X2.46875 Y0. Z-.04 J-.03125
N200 X2.5 Y-.03125 Z-.045 I.03125
N202 X2.53125 Y0. Z-.05 J.03125
N204 X2.5 Y.03125 Z-.055 I-.03125
N206 X2.46875 Y0. Z-.06 J-.03125
N208 X2.5 Y-.03125 Z-.065 I.03125
N210 X2.53125 Y0. Z-.07 J.03125
N212 X2.5 Y.03125 Z-.075 I-.03125
N214 X2.46875 Y0. Z-.08 J-.03125
N216 X2.5 Y-.03125 Z-.085 I.03125
N218 X2.53125 Y0. Z-.09 J.03125
N220 X2.5 Y.03125 Z-.095 I-.03125
N222 X2.46875 Y0. Z-.1 J-.03125
N224 X2.5 Y-.03125 Z-.105 I.03125
N226 X2.53125 Y0. Z-.11 J.03125
N228 X2.5 Y.03125 I-.03125
N230 X2.46875 Y0. J-.03125
N232 X2.5 Y-.03125 I.03125
N234 X2.53125 Y0. J.03125
N236 G1 G40 X2.5
N238 G0 Z1.
N240 M5
N242 G0 G28 G91 Z0.
N244 G28
N246 M01
N248 G0 G17 G40 G80 G90 G94 G98
N250 G0 G28 G91 Z0.
(3/8 EM |TOOL - 2|DIA. OFF. - 2|LEN. - 2|TOOL DIA. - .375)
(HELIX BORE)
N252 T2 M6
N254 G0 G54 G90 X-.754 Y4.1 C180. B-90. S2000 M3
N256 G43 H2 Z1.
N258 Z.065
N260 G1 Z.015 F10.
N262 G41 D2 X-.93675
N264 G3 X-.754 Y3.91725 Z.01 I.18275
N266 X-.57125 Y4.1 Z.005 J.18275
N268 X-.754 Y4.28275 Z0. I-.18275
N270 X-.93675 Y4.1 Z-.005 J-.18275
N272 X-.754 Y3.91725 Z-.01 I.18275
N274 X-.57125 Y4.1 Z-.015 J.18275
N276 X-.754 Y4.28275 Z-.02 I-.18275
N278 X-.93675 Y4.1 Z-.025 J-.18275
N280 X-.754 Y3.91725 Z-.03 I.18275
N282 X-.57125 Y4.1 Z-.035 J.18275
N284 X-.754 Y4.28275 Z-.04 I-.18275
N286 X-.93675 Y4.1 Z-.045 J-.18275
N288 X-.754 Y3.91725 Z-.05 I.18275
N290 X-.57125 Y4.1 Z-.055 J.18275
N292 X-.754 Y4.28275 Z-.06 I-.18275
N294 X-.93675 Y4.1 Z-.065 J-.18275
N296 X-.754 Y3.91725 Z-.07 I.18275
N298 X-.57125 Y4.1 Z-.075 J.18275
N300 X-.754 Y4.28275 Z-.08 I-.18275
N302 X-.93675 Y4.1 Z-.085 J-.18275
N304 X-.754 Y3.91725 Z-.09 I.18275
N306 X-.57125 Y4.1 Z-.095 J.18275
N308 X-.754 Y4.28275 Z-.1 I-.18275
N310 X-.93675 Y4.1 Z-.105 J-.18275
N312 X-.754 Y3.91725 Z-.11 I.18275
N314 X-.57125 Y4.1 Z-.115 J.18275
N316 X-.754 Y4.28275 Z-.12 I-.18275
N318 X-.93675 Y4.1 Z-.125 J-.18275
N320 X-.754 Y3.91725 Z-.13 I.18275
N322 X-.57125 Y4.1 Z-.135 J.18275
N324 X-.754 Y4.28275 Z-.14 I-.18275
N326 X-.93675 Y4.1 Z-.145 J-.18275
N328 X-.754 Y3.91725 Z-.15 I.18275
N330 X-.57125 Y4.1 Z-.155 J.18275
N332 X-.754 Y4.28275 Z-.16 I-.18275
N334 X-.93675 Y4.1 Z-.165 J-.18275
N336 X-.754 Y3.91725 Z-.17 I.18275
N338 X-.57125 Y4.1 Z-.175 J.18275
N340 X-.754 Y4.28275 Z-.18 I-.18275
N342 X-.93675 Y4.1 Z-.185 J-.18275
N344 X-.754 Y3.91725 Z-.19 I.18275
N346 X-.57125 Y4.1 Z-.195 J.18275
N348 X-.754 Y4.28275 Z-.2 I-.18275
N350 X-.93675 Y4.1 Z-.205 J-.18275
N352 X-.754 Y3.91725 Z-.21 I.18275
N354 X-.57125 Y4.1 Z-.215 J.18275
N356 X-.754 Y4.28275 Z-.22 I-.18275
N358 X-.93675 Y4.1 Z-.225 J-.18275
N360 X-.754 Y3.91725 Z-.23 I.18275
N362 X-.57125 Y4.1 Z-.235 J.18275
N364 X-.754 Y4.28275 Z-.24 I-.18275
N366 X-.93675 Y4.1 Z-.245 J-.18275
N368 X-.754 Y3.91725 Z-.25 I.18275
N370 X-.57125 Y4.1 Z-.255 J.18275
N372 X-.754 Y4.28275 Z-.26 I-.18275
N374 X-.93675 Y4.1 Z-.265 J-.18275
N376 X-.754 Y3.91725 Z-.27 I.18275
N378 X-.57125 Y4.1 Z-.275 J.18275
N380 X-.754 Y4.28275 Z-.28 I-.18275
N382 X-.93675 Y4.1 Z-.285 J-.18275
N384 X-.754 Y3.91725 Z-.29 I.18275
N386 X-.57125 Y4.1 Z-.295 J.18275
N388 X-.754 Y4.28275 Z-.3 I-.18275
N390 X-.93675 Y4.1 Z-.305 J-.18275
N392 X-.754 Y3.91725 Z-.31 I.18275
N394 X-.57125 Y4.1 Z-.315 J.18275
N396 X-.754 Y4.28275 Z-.32 I-.18275
N398 X-.93675 Y4.1 Z-.325 J-.18275
N400 X-.754 Y3.91725 Z-.33 I.18275
N402 X-.57125 Y4.1 Z-.335 J.18275
N404 X-.754 Y4.28275 Z-.34 I-.18275
N406 X-.93675 Y4.1 Z-.345 J-.18275
N408 X-.754 Y3.91725 Z-.35 I.18275
N410 X-.57125 Y4.1 Z-.355 J.18275
N412 X-.754 Y4.28275 Z-.36 I-.18275
N414 X-.93675 Y4.1 Z-.365 J-.18275
N416 X-.754 Y3.91725 Z-.37 I.18275
N418 X-.57125 Y4.1 Z-.375 J.18275
N420 X-.754 Y4.28275 Z-.38 I-.18275
N422 X-.93675 Y4.1 Z-.385 J-.18275
N424 X-.754 Y3.91725 Z-.39 I.18275
N426 X-.57125 Y4.1 Z-.395 J.18275
N428 X-.754 Y4.28275 Z-.4 I-.18275
N430 X-.93675 Y4.1 Z-.405 J-.18275
N432 X-.754 Y3.91725 Z-.41 I.18275
N434 X-.57125 Y4.1 Z-.415 J.18275
N436 X-.754 Y4.28275 Z-.42 I-.18275
N438 X-.93675 Y4.1 Z-.425 J-.18275
N440 X-.754 Y3.91725 Z-.43 I.18275
N442 X-.57125 Y4.1 Z-.435 J.18275
N444 X-.754 Y4.28275 Z-.44 I-.18275
N446 X-.93675 Y4.1 Z-.445 J-.18275
N448 X-.754 Y3.91725 Z-.45 I.18275
N450 X-.57125 Y4.1 Z-.455 J.18275
N452 X-.754 Y4.28275 I-.18275
N454 X-.93675 Y4.1 J-.18275
N456 X-.754 Y3.91725 I.18275
N458 X-.57125 Y4.1 J.18275
N460 G1 G40 X-.754
N462 G0 Z1.
N464 M5
N466 G0 G28 G91 Z0.
N468 G0 G28 X0. Y0.
N470 G28 C0. B0.
N472 M30
%

 

 

With an arc size of .7505......if you want consistency, you HAVE to go out to 5 places as you have noted but you can get it...

and if you machine barks at the .0001 difference, you should most likely be running at 5 places......

Edited by Guest
Link to comment
Share on other sites
Quote

 

The "min change in arc plane for helix" setting to .0001 fixed the original problem I was chasing, without causing other side effects that I can tell so far.

 I uncheked the "truncate" box, back to how it was originally.  That caused some other issues to appear in other places.

I have not tried using the "arc 3d" chook yet.

I didn't see the "round_opt$" variable in the post I am using, so couldn't really play with that on this.

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...