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:

Someone please help me understand subroutines??


Recommended Posts

Greets to the group! I'll try to explain without sounding like a rant. I have a successful program on a Makino Horizontal. Now that its proven, I need to duplicate all the cuts to make 3-total parts on one face of the tombstone. Sub's seem to be a good way to do this. I think I want to have a looping scenario so that one cutter does its thing at offset P1 then repeats the same cuts at offset P2, P3 etc... Then do the same thing with all the remaining cutters.

 

If I could define the offsets as a variable then have the variable increase by 1 unit each time through the sub I could space the cutting out by the difference of the offset values in the control--right? Then at some point before the subpreogram re-wind, have a if/then statement that kicks out of the loop after the variable reaches some maximum value.

 

Then repeat the whole process for all the other cutters.

 

I've searched for sub-routine here but didn't get too far.

 

I'll keep looking around though.

 

Thanks alot for any input!!!

 

Dan

Link to comment
Share on other sites

You could just do a transform translate subprogram. We do this all the time. You can select a distance to offset it, or just have it do it by offsets (G54, G55, ect).

 

I think that this is much easier to do with MCAM than by altering subs on the machine.

 

JM2C

 

Glenn

Link to comment
Share on other sites

If you already have a set up with 3 parts, I'd just use M98 sub calls and run at G54, G55, and G56 (or G54.1 P1, P2 and P3). And if you want, you can set block skips to the last two offsets and only run one part (in case you move it to another machine)... even set for block '1' and '2'... then you can run just 1 part, 2 parts or all 3.

 

Do you have a Data Server on the machine? After you create subs, you can put all of the subs in the back then only have the 'main' program up front. Saves a lot of front memory for a lot of part programs.

Link to comment
Share on other sites

In the old days when computer memory was scarce

and machine memory was tiny, we used subs to limit the program length so the machine could run without tying up the pc and we could multi-surface a part. ( which sometimes took hours nad hours.) smile.gif

 

 

Just a word from an old-timer...

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