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:

How can I maintain Spindle Speed / Chipload ratio across multiple posts?


Recommended Posts

Ok so the thread title pretty much says it all ..

 

Like most shops we have multiple different machines, and we often need to move jobs between them based on machine availability and time constraints.

 

My goal is to be able to create one tool path in Mastercam which uses the specified SFM and chip load for the tool and then be able to swap to a different machine without having to worry about the machine not being able to attain that SFM with that tool.

 

As an example lets assume a 2flt 1/32 ball mill which we use a lot for part marking.

 

If I program it for 125 SFM that yields a RPM of 15,279 , given a chip load of .0002 we would have a feed rate in IPM of 6.11

 

Posting this out to a machine capable of the programmed RPM we get just what we programmed, however

if the Max Spindle Speed in the Machine Definition is lower than the programmed RPM we get an adjusted Spindle Speed

 

So on a machine with a Max Spindle Speed of 10,000 in the Machine Definition we end up with 10000RPM and a feed of 6.11 IPM which means our chip load has unintentionally been changed from .0002 IPT to .0003055 IPT

 

So anyhow what I would like to do is be able to make a post modification that calculates the programmed spindle speed to feed ratio and then applies it based on the actual maximum spindle speed of the machine given in the machine definition.

 

Before I messed with this too much though I figured I would ask if anyone has already done something like this? And is it even possible, without messing with it I am not clear on whether the actual programmed Spindle speed makes it into the NCI file or if the spindle speed is actually altered by the machine def prior to the NCI.

 

Anyhow.. was just looking for any advice/pointers you all might be able to give before I dive into this.

 

(Oh and btw I know its possible to change to program in feed per rev, but that's just not gonna ever make it past the guys running the machines on the floor.. don't ask why.. old times sake maybe? resistance to change. It is what it is.. hence my desire to create something in the post)

Link to comment
Share on other sites

I have done this, mainly because I have 24 machines and we also ping-pong around with work. The way that I approached it was to determine the percentage of reduction in the speed, and apply that reduction to the feed. Like this:

redfactor : 1 #Reduction Factor for Feedrates

 

Then:

if speed > maxspeed, redfactor = maxspeed / speed

 

Finally:

feed = feed * redfactor

 

Make sure to reset the value of redfactor at ptlchg$ and ptlchg0$:

redfactor = 1

 

The above is an example of mill postlines. The same concept can be applied to lathe, but the variable names may change. (I have not checked.)

Link to comment
Share on other sites

Well .. I was going to give that a shot when I noticed that X7 wont allow me to have an rpm value in my tool that exceeds my currently selected machine def.

 

Additionally it appears that it also scales the feed values down dependent on the chipload when you swap to a different Machine Def with a lower max spindle speed.

 

I had no idea it would do that .. will need to test some more and if it works consistently I guess I just need to make on machine def with a max spindle higher than any actual machines on the floor to program with then simply post to the machine we will actually use for the job..

 

Thanks for the tips though im sure I can put that to use somewhere going forward EX-wcc

Link to comment
Share on other sites

Well, in a way its kind of a nice thing to have found.. but in another way its kind of nightmarish..

 

Basically it does maintain chipload when moving to a slower machine, however unlike my original idea of changing it in the post it changes the MCX file.. so if you save it .. now all your speeds have been slowed down and when you want to post it out to the faster machine again it doesn't revert back since it appears Mastercam has no way of knowing what the original speed was anymore.

 

Since saving multiple files and creating a lot more work to maintain the code is what were trying to avoid this is somewhat of a problem.

 

With a bit of testing it does appear that it is possible to revert the speeds and feeds back using re-initialize feeds and speeds on each toolpath so long as the initial speeds and feeds were set at the higher speeds to begin with .. but this is still a bit of a pain.

 

Anyhow just contacted my reseller to see if this is intended behavior or if there is any way around it.. and am waiting to hear back..

Link to comment
Share on other sites

Yeah I am leaning towards doing that.. since so far as I can tell its critical that to keep one file that maintains the original feeds and speeds as programmed.. so it looks like im going to have to add a variable to the post which contains max rpm and then use that rather than the max rpm in machine definition.

Link to comment
Share on other sites

I'm using X7 and I found what you want... Here is my short story, we have GIANT Vertical VF9 HAAS and feeds and speeds just like SKY ROCKET. Sometimes, we have to move to another small CNC equipment to run the job because out of compacity. We use a Matsuura Tiger which only allows 6000 RPM max, and feeds must be reduced to 40%. Therefore, this is how I wrote a reduction. Simple and easy.

 

---------------------------------------

in PNCOUTPUT will look something like this

 

pncoutput #Movement output

pcom_moveb

comment$

if coolant$ <> 0 & coolant$ <> sav_coolant,

[

pbld, n$, sm09, e$

sav_coolant = coolant$

]

if coolant$ = 1, sm09 = sm09_0

if coolant$ = 2, sm09 = sm09_1

if coolant$ = 3, sm09 = sm09_2

if cool_zmove = yes$ & (nextop$=1003 | (nextop$=1011 & t$<>abs(nexttool))), coolant$ = zero

pcan

if feed > 50, feed = feed * .4

if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning

if gcode$ = zero, prapidout

if gcode$ = one, plinout

if gcode$ > one & gcode$ < four, pcirout

if mr_rt_actv, #Restore absolute/incremental for G51/G68

[

absinc$ = sav_absinc

mr_rt_actv = zero

]

pcom_movea

 

 

-------------------------------------

 

ppeck$ #Canned Peck Drill Cycle

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,

prdrlout, *peck1$, [if haas, *peck2$, *peckclr$], *feed, strcantext, e$

pcom_movea

 

----------------------------------

 

pbore1$ #Canned Bore #1 Cycle

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,

prdrlout, [if dwell$, *dwell$], *feed, strcantext, e$

pcom_movea

 

pbore2$ #Canned Bore #2 Cycle

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,

prdrlout, *feed, strcantext, e$

pcom_movea

 

pmisc1$ #Canned Misc #1 Cycle

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,

prdrlout, shftdrl$, [if dwell$, *dwell$], *feed, strcantext, e$

pcom_movea

 

pmisc2$ #Canned Misc #2 Cycle (User Option)

pdrill$

 

pdrill_2$ #Canned Drill Cycle, additional points

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, dwell$,

feed, strcantext, e$

pcom_movea

 

ppeck_2$ #Canned Peck Drill Cycle

pdrlcommonb

if feed > 50, feed = feed * .4

pcan1, pbld, n$, pdrlxy, pzout, pcout, pindexdrl, prdrlout, feed, strcantext, e$

pcom_movea

Link to comment
Share on other sites

by the way, if you want to control the max RPM you can do something like this:

 

look for............... pspindle #Spindle speed calculations for RPM line and replace

 

 

pspindle #Spindle speed calculations for RPM

speed = abs(ss$)

#zero indicates spindle off (not a mistake)

if speed,

[

if speed > maxss$, speed = maxss$ replace with if speed > 6000, speed = 6000

]

spdir2 = fsg3(spdir$)

Link to comment
Share on other sites

I know it works because I tried it on the equipment already, any problems let me know. Happy to help, showing people what I know is also I can learn from you guys too.

 

PS: If you want to know horizontal post such as G10 work offset, tool length offset, cutter comp. offset all using G10 just ask. I'll do my best.

Link to comment
Share on other sites

I have my machine def speeds set at 100000 rpm. Then in my post(s);

 

pmachine

# "TEST", *smachinepath, e$

if smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU JE60S.mmd-5"

| smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU JE60S.MMD-5",

[

smachinename = "ENSHU JE60S"

machine = 60

work_vari = 7000

max_speed = 13000

min_speed = 40

maxfeedpm = 590.55

maxoffset = 48

]

if smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU JE80S.mmd-5"

| smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU JE80S.MMD-5",

[

smachinename = "ENSHU JE80S"

machine = 80

work_vari = 14000

max_speed = 15000

min_speed = 50

maxfeedpm = 3546

maxoffset = 300

]

if smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU GE480H.mmd-5"

| smachinepath = "E:\MCX5\CNC_MACHINES\ENSHU GE480H.MMD-5",

[

smachinename = "ENSHU GE480H"

machine = 480

work_vari = 14000

max_speed = 15000

min_speed = 50

maxfeedpm = 3546

maxoffset = 300

]

 

p_toolsetter_setup

 

pspindle #Spindle speed calculations for RPM

speed = abs(ss$)

feed_adjust = 1

if maxss$ = zero | maxss$ > max_speed, maxss$ = max_speed

#zero indicates spindle off (not a mistake)

if speed,

[

if speed > max_speed,

[

feed_adjust = maxss$ / speed

speed = maxss$

]

if speed < min_speed, speed = min_speed

]

spdir2 = fsg3(spdir$)

 

 

pfcalc_u_min #Feedrate unit/min

ipr_type = zero

feed = fr_pos$

feed = feed_adjust * feed

if feed > maxfeedpm, feed = maxfeedpm

prvfrdeg = feed

Link to comment
Share on other sites

I used a combination of the two you both mentioned..

 

For all G1,G2,G3 type moves I put it in pfcalc_u_min

 

I had actually missed the canned cycles until I saw it in here afterwards.. it probably wouldn't have been an issue since we would rarely drill at such high speeds but I added it just in case..

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