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:

Changing feed in corners, my solution


mike_f
 Share

Recommended Posts

I’ve seen this question come up a few times and I thought I would let you guy’s know what I’ve done about slowing my feed rate on inside corners.

 

ALWAYS back up your post before making any changes !!!!!!!!!

 

I created the section between the [ ] brackets in the “pcirout1” section of my post.

Then in my control def. I enable misc reals , in this example, 3 & 4.

I label mr3 as “feed multiplier” and mr4 as “radial limit”.

 

pcirout1 #Output to NC of circular interpolation

pcan1, pbld, n$, `sgfeed, sgplane, sgcode, sgabsinc, pccdia,

pxout, pyout, pzout, pcout, parc,

[

if iout,

[if iout <mr4$ & iout >-mr4$ ,feed = feed*mr3$]

else,

if jout,

[if jout <mr4$ & jout >-mr4$ ,feed = feed*mr3$]

],

feed, strcantext, scoolant, e$

 

Now, in my MC file, if I have small internal radii where I want to slow down

My feed I open the misc values window and input the maximum I or J value

That I want to accept at the tools current feed in the radial limit box, and I put in a multiplier in the feed multiplier box.

Ex: If I want to cut the feed in half for any I or J values smaller than .20 I would input

A .20 into mr4 and a .50 into mr3, now “for that operation” any time my post outputs

An I or a J equal to or smaller than .2 my feed is cut in half, and in the next block my

Original feed is resumed. If I want to slow down more, I enter a .25 or .1 into my multiplier. I can also increase my feed around outside radii by using a feed multiplier

Greater than 1.0, therefore maintaining my radial chip load on outside radii.

 

The nice thing is that this works in my mill and lathe posts, you obviously have to

Enable your post to output I’s and J’s instead of R’s.

I will use this is conjuction with G61 and G61.1 at times depending on need.

 

This is a very simple way to accomplish feed changes in radial output. The only drawback is if you have multiple, different size radii in the same contour and you want different, specific feeds in each corner. You might be able to expand on this, using multiple misc reals to specify different I and J limits with corresponding feed multipliers, but this was meant to be cheap, dirty and simple and it works for me as is, so I never experimented further.

 

I hope this helps someone.

Cheers

  • Like 1
Link to comment
Share on other sites

I think there are times when you have a large radius with only a small move in i or J so doing them separately you might end up slowing down a larger radius than you meant too, to prevent this you could simplify the math to calculate the radius.

 

[

if iout,

[if iout <mr4$ & iout >-mr4$ ,feed = feed*mr3$]

else,

if jout,

[if jout <mr4$ & jout >-mr4$ ,feed = feed*mr3$]

],

 

becomes

 

[

if i$ <> 0 | j$ <>0,

[if sqrt(i$^2 + j$^2) <mr4$ ,feed = feed*mr3$]

],

 

HTH

 

edit:

 

for example your post would slow down the following .750" radius even if you had the tolerance set to .100"

 

 

N16 X1.75 Y1.9987

N18 G3 X.9987 Y2.75 I-.75 J.0013

N20 G1 X-.0013 Y2.7483

 

By checking the actual radius it will prevent that from happening. :)

  • Like 1
Link to comment
Share on other sites

Slepydrmr, excellent thought, you are obviously better at math than I am :turned: I will try that…. But, the snippet of code below is from setting the radial limiter to .25, as you can see only the block where BOTH the I and J fall below .25 does the federate change.

 

Hi Matt…. Sorry, I don’t do sharp corners J :cheers:

 

Like I said, cheap and dirty, this is not an end all solution, just something I thought was an easy fix to a problem I was having at the time.

 

N50 G41 D31 Y.25 F10.

N55 X7.1972

N60 Y3.9199

N65 X6.5006

N70 G02 X6.2567 Y4.1153 I0. J.25

N75 G03 X5.5248 Y4.7014 I-.7319 J-.1639

N80 G01 X.275

N85 G03 X.25 Y4.6764 I0. J-.025 F5.

N90 G01 Y.25 F10.

N95 X3.7236

N100 G40 Y.35

 

Thanks for the Ideas, I’m always lookin’ to make my life easier.

Link to comment
Share on other sites

Mike, I'm glad it's working for you :) at 1st glance I thought it might kick out feed changes when it shouldn't. I'll have to test it out more when i get a chance.

 

Matt, Sharp corners pose a bit a problem, at least for me, the math to calculate the angles gets a little tricky, but can be done. But then once you know it's a sharp corner you need to find your spots to adjust the feed rate. So adding in a breaking point to just before your sharp corner to slow down might be a bit of a trick.

 

I'll certainly give it a shot when i have some free time at home tonight.

Link to comment
Share on other sites

and how to do it, if I use the radius in Generic Fanuc 3X Mill?

 

In your parc section you should be able to add the following line

 

 

if abs(arcrad$) < mr4$, feed = feed*mr3$

 

here is a the whole parc section from the Generic Fanuc 3X Mill post i have. Notice the line i added at the end just before the end.

 

parc #Select the arc output
if (plane$ = zero & (arctype$ = one | arctype$ = four)) | #XY Plane
(plane$ = one & (arctypeyz$ = one | arctypeyz$ = four)) | #YZ Plane
(plane$ = two & (arctypexz$ = one | arctypexz$ = four)), #XZ Plane
[
result = newfs(two, iout)
result = newfs(two, jout)
result = newfs(two, kout)
]
else,
[
result = newfs(three, iout)
result = newfs(three, jout)
result = newfs(three, kout)
]
if (plane$ = 0 & arctype$ < five) | (plane$ = 1 & arctypeyz$ < five) |
(plane$ = 2 & arctypexz$ < five) | full_arc_flg$ | arc_pitch$,
[
#Arc output for IJK
# If you do NOT want to force out the I,J,K values,
# remove the "*" asterisks on the *i, *j, *k 's below...
if plane$ = zero, *iout, *jout, kout #XY plane code - G17
if plane$ = one, iout, *jout, *kout #YZ plane code - G19
if plane$ = two, *iout, jout, *kout #XZ plane code - G18
!i$, !j$, !k$
]
else,
[
#Arc output for R
if abs(sweep$)<=180 | (plane$ = 0 & arctype$ = five) | (plane$ = 1 & arctypeyz$ = five) |
(plane$ = 2 & arctypexz$ = five), result = nwadrs(srad, arcrad$)
else, result = nwadrs(srminus, arcrad$)
*arcrad$
if abs(arcrad$) < mr4$, feed = feed*mr3$
]

 

 

HTH :)

  • Like 1
Link to comment
Share on other sites

well Matt here's what I've come up with so far

 

It's looks a bit messy, but so far it works with contouring and pockets when there is a sharp corner

 

I haven't tested it with anything too complicated yet so please be cautious

 

mr3 is the feed multiplier

mr4 is the minimum radius before it starts to slow down in corners

mr5 is the minimum angle before it considers it sharp

mr6 is the distance before the sharp corner to start slowing down.

 

the trial i was running was

 

mr3 .5

mr4 .05

mr5 140

mr6 .02

 

And it seemed to be working okay

 

you need to add the varables

len_a : 0 #Formatted absolute value for a length calculations
len_b : 0 #Formatted absolute value for b length calculations
len_c : 0 #Formatted absolute value for c length calculations
len_ang : 0 #Formatted absolute value for angle calculations
nex_rad : 0 #Formatted absolute value for c incremental calculations

 

and add these formatted variables

fmt "X" 2 brk_x #X position output
fmt "Y" 2 brk_y #Y position output

 

and then put this in your plinout section

plinout #Output to NC of linear movement - feed
mr3$ = abs(mr3$)
mr4$ = abs(mr4$)
mr5$ = abs(mr5$)
mr6$ = abs(mr6$)
if absinc$=0 & zabs = prv_zabs & mr6$ >0,
[
len_a = sqrt((xabs-prv_xabs)^2 + (yabs-prv_yabs)^2)
if nextop$ = 1,
[
len_b = sqrt((nextx$-xabs)^2 + (nexty$-yabs)^2)
len_c = sqrt((nextx$-prv_xabs)^2 + (nexty$-prv_yabs)^2)
if len_a <> 0 & len_b <> 0,
[
len_ang = acos((len_a^2+len_b^2-len_c^2)/(2*len_a*len_)
]
else,
[
len_ang=180
]
if len_ang < mr5$,
[
if len_a < mr6$,
[
feed = feed*mr3$
]
else,
[
brk_x = xabs-((xabs-prv_xabs)*mr6$/len_a)
brk_y = yabs-((yabs-prv_yabs)*mr6$/len_a)
pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
[if brk_x <> xabs,brk_x], [if brk_y<>yabs,brk_y], pzout, feed, strcantext, pcoolant, e$
feed = feed*mr3$
]
]
]
if nextop$ =2 | nextop$ = 3,
[
nex_rad = sqrt((nextx$-nextxc$)^2+(nexty$-nextyc$)^2)
if nex_rad < mr4$,
[
brk_x = xabs-((xabs-prv_xabs)*mr6$/len_a)
brk_y = yabs-((yabs-prv_yabs)*mr6$/len_a)
pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
[if brk_x <> xabs,brk_x], [if brk_y<>yabs,brk_y], pzout, feed, strcantext, pcoolant, e$
feed = feed*mr3$
]
]
pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
pxout, pyout, pzout, feed, strcantext, pcoolant, e$
]
else,
[
pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
pxout, pyout, pzout, feed, strcantext, pcoolant, e$
]

 

here's the test code without the sharp corner check



N108 G43 H1 Z1.
N110 Z.25
N112 G1 Z0. F50.
N114 Y-.9 F100.
N116 G3 X0. Y-1. I.1 J0.
N118 G1 X.99
N120 G3 X1. Y-.99 I0. J.01
N122 G1 Y0.
N124 Y.99
N126 G3 X.99 Y1. I-.01 J0.
N128 G1 X-.99
N130 G3 X-1. Y.99 I0. J-.01
N132 G1 Y-.99
N134 G3 X-.99 Y-1. I.01 J0.
N136 G1 X0.
N138 G3 X.1 Y-.9 I0. J.1
N140 G1 Y-.8
N142 Z.2
N144 G0 Z1.
N146 X-.1
N148 Z.25
N150 G1 Z0. F50.
N152 Y-.9 F100.
N154 G3 X0. Y-1. I.1 J0.
N156 G1 X1.
N158 Y0.
N160 Y1.
N162 X-1.
N164 Y-1.
N166 X0.
N168 G3 X.1 Y-.9 I0. J.1
N170 G1 Y-.8
N172 Z.2
N174 G0 Z1.

 

here's code with the misc values set


N100 G20
N102 G0 G17 G40 G49 G80 G90
N104 T1 M6
N106 G0 G90 G54 X-.1 Y-.8 S10000 M3
N108 G43 H1 Z1.
N110 Z.25
N112 G1 Z0. F50.
N114 Y-.9 F100.
N116 G3 X0. Y-1. I.1 J0.
N118 G1 X.97
N120 X.99 F50.
N122 G3 X1. Y-.99 I0. J.01
N124 G1 Y0. F100.
N126 Y.97
N128 Y.99 F50.
N130 G3 X.99 Y1. I-.01 J0.
N132 G1 X-.97 F100.
N134 X-.99 F50.
N136 G3 X-1. Y.99 I0. J-.01
N138 G1 Y-.97 F100.
N140 Y-.99 F50.
N142 G3 X-.99 Y-1. I.01 J0.
N144 G1 X0. F100.
N146 G3 X.1 Y-.9 I0. J.1
N148 G1 Y-.8
N150 Z.2
N152 G0 Z1.
N154 X-.1
N156 Z.25
N158 G1 Z0. F50.
N160 Y-.9 F100.
N162 G3 X0. Y-1. I.1 J0.
N164 G1 X.98
N166 X1. F50.
N168 Y0. F100.
N170 Y.98
N172 Y1. F50.
N174 X-.98 F100.
N176 X-1. F50.
N178 Y-.98 F100.
N180 Y-1. F50.
N182 X0. F100.
N184 G3 X.1 Y-.9 I0. J.1
N186 G1 Y-.8
N188 Z.2
N190 G0 Z1.

 

Notice i actually made it break the lines .020" before a small arc so it slowed down before it hit the radius.

I hope this works for you, or at least gets you going in the right direction.

  • Like 2
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...