What's new
What's new

MasterCAM cutoff canned cycle problem...

Solar71

Titanium
Joined
Mar 24, 2005
Location
Hermosa Beach California
Hey all...

Seems like i am never abble to create a canned cycle for cutoff cycles...

when i make a canned cut off cycle it never comes out canned... its always long hand...

so i have been trying to trick mastercam into giving me a canned GROOVE cycle, but using a cutoff tool instead...
I tell it to peck and retract and all that...
and i tell it the width of the groove is the same as the width of the groov tool... so it basicly pecks STRAIGHT DOWN!!!

Thats perfect...

Then i tell it to NOT do a finish pass...

But even though its a canned groove cycle... it still comes out long hand...

Is it possible... That if i do a canned groove cycle, but choose a cut off tool, instead of a groove tool... that maybe masterCAM knows what im trying to do , and stops me from doing it ?

I can just stand at the machine and type in a canned cut off cycle with a G74 ( i think ) and its not a big deal... But it would be nice to have mastercam more automated...

Can someone help me to get a canned cutoff cycle with G74 please!!!

Also i tried a drilling cycel... and told it to use G74 peck/chip breaker cycles... but it will only drill into the front of the tool, not from the top... I choose drill, but then i pick a cutof tool... hahaha

im trying to trick mastercam but its not letting me... any help appreciated...

thanks
 
Solar,

"Is it possible... That if i do a canned groove cycle, but choose a cut off tool, instead of a groove tool... that maybe masterCAM knows what im trying to do , and stops me from doing it ?"
No, it sounds as if you are just changing the grooving cycle to act like the parting tool cycle the machine or mastercam will only pick the tool you specify. Please remember that a canned cycle is only a macro when you see it on the machine screen it will look like you did it long hand. :eek:

"Also i tried a drilling cycel... and told it to use G74 peck/chip breaker cycles... but it will only drill into the front of the tool, not from the top... I choose drill, but then i pick a cutof tool... hahaha"
If you look at a example of the G74 cycle it is working with a locked set of variables in your case I believe it is W and Z with the pecking occurring on the Z axis usually the front of the part.
I am a mill person but a canned cycle is nothing more than a macro where you plug in a given set of variables as is a G74 nothing more than a macro.
If you look in most any programming manual there is usually a few examples of how to write your own macro for a given task. I use them all the time in 5 axis work.
EDIT: Mastercam should have a few examples of a macro too.

Scott
 
i dont know, but i dont think im ready for macros yet...

PS : i figured out im an idiot...
i was trying to get a G74 but what i really needed was a G75....

So i did it manual at the lathe...
G75 X-.0625 I.0625 F.004
for some reason i can change the I.0625 to whatever i want... and it works...
But the retract amount i can not set it seems...
I dont know what im doing wrong...
But the retract is always EXACTLY .08 wich it really too much...

strange...

anyway...

thank you very much...
once i get more experience i will look into creating my own macros...
sounds like i could really do something special with them...

 
You could do your parting with a macro - easily.
Here's an example of how you'd call it from the
main program (your code may vary some):

G65 O9991 I-0.0625 J0.004 K2000 Q0.125

So go to Z-0.0625, Feed at .004"/rev, max spindle speed of 2000 RPM, and peck every 0.125"

If you want to change the parting location or the feed or speed or peck, just change it in the macro call.

So now just write a #9991 program that takes those variables and moves the tool accordingly.
 
Your post processor probably doesnt support the G75 cutoff cycle. What is the name of the post your using?

And why not use the cutoff toolpath in mastercam? you can default most of the values in that dont change ie: tool, speeds, feeds, retracts etc.
 
to sakis...

in mastercam i can use the cut off cycle...
its easy...

but its always long hand...
so its not easy to chage on the fly, because out at the machine, its a pain in the ass to change 15 lines of code to get a smaller peck distance...

but with G75 its easy...

But i just cant seem to adjust G75's retract distance...

anyone else ?

to Damon...

what you are saying is way over my head at this time... i would just like to get the G75 to work properly... I will think about making my own subprograms and macros later...

thanks
 
Solar,
Listen to Damon if you look at his code string it shows that changing the peck distance is the Q variable. All you need do is specify the location and the macro call if it is is a Fanuc control it is a P word. You can also write several macro calls with a different call #'s for different materials and diameters. And yes you are ready you are already using them.
"What ya going to do Solar, Are you going to love it forever, Are you going to love it for the rest of your life." Sing this with a Tina Turner voice. :D
Once you master the macro you will find it is just like a subroutine in every other programming application. Annnnnd the applications are endless!
;)
Take the plunge. Ohhhh another play on the subject :D

Scott
 
i dont understand...
with a special G canned cycle...
how do you know, what
P does or Q , I , K , J , do...
If i do the macro... is there a place i can look up what the letter reprisent ?

I know that X and I and U are the same... ( i think ) just one is absolute and the other incramental... And so i guess Z and K and W are in the same relationship ?

But P and Q have always been start/end of canned cycles... for G70 and G71... How is it that you can use these Letters in such a different mannor ?

example...

G71 P100 Q102 U.02 W.02 D.06 F.010
Now
G04 P3000

Why are the P's used in suck a different mannor ?
and why can they be switched so easily ?
it would be nice if there were some RULES to this ?

if there are some rules to this stuff, can someone please throw up a link please ?

I have a screen in my controller, that says MACROS
and if i hit page down, there is another screen that says Imbeded subroutines or Imbeded Subprograms or something like that...
It would be nice to be abble to make my own canned cycle macros for my programs...
WOW!!!
That would open up a hole lot of possibilities...
But right now im a bit overloaded...

I am helping my coworker learn CNC lathe...
He is having a bit of a hard time...

And im making my own programs as well...
For my own machine... And im still struggling a bit with G75 parameters...

Also the CNc mill man... His wife is not doing very well... She is in the hospital, so he is leaving the country tommarow... For 2-3 weeks...
And now my boss wants me to start learning the cnc mill... Thats cool and all... But check this out... He is mot asking me to learn to make bold patterns or tap and chamfer or something like that to start with... NO NO ... His first project for me it a mold... WTF!!!
Yes you herd that right... i have never touched a cnc mill before and now without any schooling or books, i will be making complex 3d molds...

HOW WOnDERFULL!!!

And on top of that... I have 3 blueprints to finsh tommarow as well... 3 parts are leaving to go out to a customer tommarow and we still dont have a print ... We will be reverse engineering these and making them ourselves... And im the only one that can do it... Plus the manager on the chrome shop side just got a CRAZY virus on his PC... And now his PC is emailing EVERYONE!!!
And he cant get it to stop... HAHAHAH

And i do all this for 13.50$ per hour!!!

i wanna cry, and laugh at the same time !!!
 
Solar,
Use the help screen in Mastercam !

"BUY THE BOOK" ask your Boss to buy it. I would be willing to bet he will. Lets see you're 38 better make it the large print edition in a very few years you will be glad you did. :D
Oh yea, ask for a raise.

Unplug the chrome shop computer ;)
All in a days work.


"BUY THE BOOK"


Scott
 
Solar - you write the macro program, and in the macro you define what variable does what.

Here's an example of a macro for barfeeding on a lathe - Not exactly Fanuc, but it's handy. This is actually written for a hemroid t39 controller, Lord forbid anyone has one.

Here's how it looks in the main program:

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
G65 "BARFEED.CNC" I0616 J0.050 K2.000
</pre>[/QUOTE]G65 calls a macro, Barfeed.cnc is the name of the macro. (you can also use an O-word.) I J K are variables that are passed into the macro. In this case, I is the tool word for the stock stop (T06 = parting tool, offset 16=side of holder). J is the Z position the tool to catch the stock, and K is where to feed to in the Z axis.

Now here's the macro program. Read through it, I can't explain it any better than the comments.

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
; BARFEED.CNC I(TOOL WORD) J(Z START FEED) K(Z FINAL)
; 04MAY05 DFG
;
; Indexes turret to stock stop (I),
; Rapdis to existing part face (J),
; opens collet, feeds out (K)
;
; #4= Txxxx
; #5= Z value near spindle
; #6= Z value after feed
;
; #30= Z value for G28 home

M60 ;barfeed enable
#31=#4001 ;store G0 vs G1
#32=#4005 ;store G98 vs G99
#33=#4109 ;store F word
G28 ;turret to home position
T#4 ;index turret to stock stop
; and apply offset (I word)
G0 X0 ;move stop to spindle centerline
; while remaining at Zmax.
#30=#5042 ;store Zmax position
G0 Z[#5] ;approack stock (J word)
M11 ;open collet
G98 ;F=inches per minute
G1 F20 Z[#6] ;move Z to feed loc (K word)
G4 P2 ;wait for bar to catch up
M10 ;close collet
G4 P1 ;wait for collet to close
G0 Z[#30] ;clear turret to Zmax
G28 ;send turret home
;should be X motion, no Z motion.
G#31 ;restore FEEDRATE/RAPID G0/G1
G#32 ;restore IPR/IPM G98/G99
G#33 ;restore F word
M99 ; end subroutine
</pre>[/QUOTE]Edit to add : Anyone that needs it is welcome to this code. This is a safe / slow barfeed routine. I've got a much faster, deadlier one for when the part is proved out.

Edited again to add : Some gremlin changed one line of code above. The G#33 line should be F#33.

[ 07-08-2005, 04:32 PM: Message edited by: damonfg ]
 
If you can't read the code there ain't much I can do to help ya...

Just code all of it longhand, and keep redoing it all for every part. What else can I say??
 
G75 = a $2.50 value meal at taco bell.

G65 = walking out your back door, heading 200 yards into the woods, bagging a 12 point buck, and having some fresh steak (kebabs) over the grill.

-
G75 - you get what they give you.
G65 - have it your way. Exactly. Dead on what you want to do. As fast or slow as you want. Totally tailorable, and there's *lots* of power and flexability in there.

The key here is not understanding what numbers to key into a g75 command, it's about what's happening under the hood.


If you can't get g75 to peck a cutoff, then I'd just write a macro to do it. I do not think you understand how much you will learn and how much power you will harness. They are perfect for repetitive operations.

All you are doing is feeding the tool in at some feedrate F and spindle speed S. And you want to put some pecks in there too.

The really simple way to do that is to make a macro that simply advances the tool to peck depth, then retracts and makes another peck. It operates at the Z location and modal F and S words before you call it (another beauty of modals)

So in this example you get your parting tool into position and a little bit clear of the diameter.

You'd say:
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
G65 O9908 I.125
</pre>[/QUOTE]o9908 is the macro name, and I is the peck depth you want.


Here's the macro-

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">

;"PARTOFF.CNC
O9908
#30 = #5041 ;save starting X
#31 = #5041 ;working variable for peck retract
#31 = #4 ;save passed peck depth
#32 = [#4 - 0.050] ; clearance after a peck

IF [#5041>0] THEN #:LOOP ; If X > 0, peck again
M99 ; END and return to main program

#:LOOP
G1 X[#30-#31] ;feed in by one peck
G0 X[#30-#32] ;retract by clearance increment
#30 =[ #30 - #31 ] ; adjust for the peck
M30 ; exit loop</pre>[/QUOTE]Now read that, trace it out, understand it, and tell me what was in that 89 cent burrito.
 
i appreciate your help...

i am starting to understand some of what you wrote...

but some still escapes me...
i have never seen a language like that...
its not G-code, and its not exactly english either...hahaha

is there something i can read about creating macros ?

i have way way way too many questions to fit into this forum... and it would probably drive you guys nuts...

like why is it that you can name your file partoff.cnc ?
in my machine all programs are a series of 4 numbers... i have never seen a program with a prefix and test letters for a name...

Why do you put the # sign in front of each line ?
is that important... ?

when you write
[#30-#31] are you subtracting the result of 31 from 30 ? or is this 30 through 31 ?
Im not understanding all the symbols...

You say o9908 is the macro name...
but then you call it partoff.cnc, which one is it ?

When you say partoff.cnc is that just a name for me to remember what it is ? is that why there is a ";" in front ?

Are all text after a ";" just notes ?

what does #5041 reprisent ?
it means nothing to me...
is it a memory block ?

Lots of this stuff sounds powerfull...
But its clear that you are assuming i have some working knowledge of these symbols and codes...
I am only just starting to understand G-code...
And i have no working knowledge of what you typed... So its only making about 50% sence to me... I can see you are telling the program to peck a certain distance, then retract -.050 from that possition... Like an incramental move...
But too much is slipping by... I need more base understanding... Throwing out a program without a legend for me to see, is only going to be 50% usefull...

sorry...

:(

PS : all the "if" statements remind me of basic programing in school...

are there other words like that ?
like "and" or "goto"

that sort of stuff ?
if this is like basic programing it will be easy to learn... but right now im not really sure...
 
Solar,

All simple if/then stuff. IF...we hadn't tee'd off on PI the other day....THEN....he might have sent you his excel file. Actually, he's spot on with production programming. When I was last in a fast paced production shop I did very little programming on the cam systems. (mastercam,Gibbscam) They are terribly inefficient! I would only use them to get quick numbers for a tricky shape and the add those numbers to my program. I always kept a gutted program with prep codes, tool changes, etc. in the pc then all I had to do was modify a bit, add my cutting numbers and off you go. Two canned cycles on the lathe I couldn't have done without were g71 and g72. Talk about dialing speeds,feeds and depth of cut easily.I really believe that if you want a production program to scream you have to write it yourself. I never saw a cam generated program that couldn't have some time whittled off of it easily. Now that I do mostly prototype, 1's and 2'sies I use the cam exclusively. I don't care so much about runtime just getting it in the Machine so I can get back to programming. I have not dry run a part in about 4yrs but I'm very careful with the cam system and have not crashed---yet. Dig out some of those user or programmer manuals for your machine and learn the canned cycles in them. Most lathe programs can be written quicker than the time it takes to go park your butt in the computer room and fire up the Mastercam.

TJ
 
Solar Man,

Here's a little chant for you to say while your're standing at the machine. It will help with the not knowing whether to laugh or cry.

"I'm gonna buy the book-Then ask for a raise" :D
Repeat over and over to the cadence of your spindle.

TJ
 
Programming macros is only slightly more complicated than G-code. Macros are a series of variables and if/then/goto/equal/notequal statements. You tell it what each variable(#5 is equal to y1. for instance) is and what to do if the statements are equal or not.

IF[#5=Y1.] THEN GOTO Z5.
More or less it means:

if #5 is equal to y1. then z5. Which in plain english would be if your y axis is at +1"(actually +.5") from centerline of the spindle(depending on how things are set up) then z would move to +5" from your z zero point.

You would use this instead of programming
G0(or G1 and feedrate) y1.0
Z5.0

At least that's my understanding of it. That's probably not the best example since it's a simple move, but maybe it helps?

I ran a lathe in my programming class that didn't have a canned cycle for drilling, only a macro. The macro was simpler to program(insert the proper variables) than the canned cycle listed in that machine's programming manual, probably the reason it was bought without the canned cycle option.

I know some of the guys here have more CNC experience than I do, do please chime in and correct me if I'm wrong :D
 
I guess it depends on the shop. At one place I worked they got hot when we used variables because the operators couldn't understand them. On repeat jobs our operators would do the setups and management didn't like the the guys scratching their noggins over unfamiliar programming. Seems most shops run off the lowest common denominator. I never got busted for canned cycles or sub-routines though.

TJ
 








 
Back
Top