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:

moving my subs


s0l0seven
 Share

Recommended Posts

It's a tad complicated, but here are a few points to rough out the solution for you.

You would need to send the main NC code out to an external file using the 'subout' variable:

extprg = yes

subout = 3

Also every time subout = zero appears in the post, would need to be changed to subout = 3

You may also need to override the tendency of the post to return to subout = zero automatically after subs.

At the peof end of file postblock you would need to change back to subout = 0, then merge and clear your subs first, then the main file afterwards:

code:


n, "M30", e

subout = zero

mergesub

clearsub

mergeaux

clearaux

mergeext

clearext

"%", e


The Post manual has more info on the variables, and your dealer may offer post customization services.

Link to comment
Share on other sites

Dave is correct, it can be a little complicated if your goal is to change the format of the subprogram output instead of just moving them to the top of the program. For example an inline subroutine method used in the Fadal's would require much more modifications.

The predefined variable sub_level can be set to 2 which will cause the main program level to be written to the EXT file instead of the NC file so you don't need to set subout and extprg as Dave mentioned. However you still need to modify the PEOF postblock as he described to build the NC file back in thew correct order.

Jim Evans

CNC Software, Inc

Post Processing Services

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