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:

Programming canned cycle in lathe, n$ issue


jlw™
 Share

Recommended Posts

My parts are getting more and more complicated and requiring more and more turning.  In order to make life as easy as possible for the guys fingering the control I want to start using canned cycles more.  Problem is, even my generic posts screw up the block numbers.

I want to get my Postability lathe post going first.  All is good excepting my canned cycles.  I modified the post about 2 years ago to use the op manager number as the block number and only output at safe toolchanges.

Now, even when changing back to tseqno I get botched block numbers.

For example, let's say I have 5 ops posted.

N1 (milling, correct n#)

some code, x and y and some z

N2 (some more milling, correct n#)

some more x and y and a little z

N3 (canned turning cycle, correct n#)

G271 P4 Q5 (correct n# for start of shape and end of shape)

N4 G0 X10. Z1. (correct n# begin shape)

some x and z for shape

some more x and z for shape

N5 X10. Z-10. (correct n# end of shape)

N4 (next op after canned turning cycle, incorrect n#)

N5 (next op only incorrect from stackup of n#s)

 

I have tried several things in the prc_cc_end where the block numbers are coming from but nothing makes it maintain count.

 

Any ideas?

Link to comment
Share on other sites

I have played with my generic posts and learned a lot of things, but I never mess with my purchased posts.

I prefer to have them make all changes. This way, they don't have to work around your changes.

I would just send them a Zip2go and explain what you have already done and what you want done.

 

  • Like 2
Link to comment
Share on other sites

I'm not afraid to get into it.  I never get exactly what I want and I am well out of the "tuning" time frame.  I truly wish I had started with a generic for this machine then I wouldn't have to chase down the red herring.  Had I known 3 years ago what I know now I would have likely done so.  The original post didn't even have it in it to use the Mastercam op manager number for block numbers.  To me this just makes sense as you can jump right where you need to in the event you need to make a change to a program.  However, as I'm learning here, that is not always the best practice.  I'm about ready to completely redo the block numbering.  I can make it work by outputting N# on every line in the output part of the mach --> control def but I don't want that.  I only want N#s at safe restarts.  Trust me on that one :blink:.

  • Like 1
Link to comment
Share on other sites

Here is my suggestion for canned cycles like you want.

Use a multiplier like 1000 and keep your sequence numbers the way they are.

This keeps your operations in an order that makes sense, and your Canned start and finish lines have a relation to the operation you are using.

Have N3 generate P3000 Q3001

 

N1 (milling, correct n#)

some code, x and y and some z

N2 (some more milling, correct n#)

some more x and y and a little z

N3 (canned turning cycle, correct n#)

G271 P3000 Q3001 (correct n# for start of shape and end of shape)

N3000 G0 X10. Z1. (correct n# begin shape)

some x and z for shape

some more x and z for shape

N3001 X10. Z-10. (correct n# end of shape)

N4 (next op after canned turning cycle, incorrect n#)

N5 (next op only incorrect from stackup of n#s)

Link to comment
Share on other sites

That was my first thought too.  I'm thinking that once upon a time I had some wacky sequence numbers like that and any GOTO or searches in the control wouldn't find anything lower than a previous number.  So that If I did GOTO4 the control would alarm.  I think I will do a test of that to see if it will work or not.

Thanks for the suggestion, that's exactly what my first thought was.  I need to do a little testing.

Link to comment
Share on other sites
  • 2 weeks later...

Sequence numbers with canned cycles is incredible annoying to setup.

I agree with Orvie's suggestion to offset one of the values.

I have found that the easiest way to tackle this is to set the control definition to the format you would prefer for the canned cycles, then just create a new integer variable for the toolchange sequence numbers and add in custom logic to increment it to the desired value.

This means you are only using n$ in one place instead of two, and saves a while bunch of headaches.

Link to comment
Share on other sites

I should have chimed back in, I sorted this out.  I created a variable to store my current block num and the to increment it +1 for the start of shape and then +1 for the end of shape.  I was way over thinking this to start with.  Took me about 15min after I slept on it.

 

Thanks again!

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