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:

Working With Sub Programs


Recommended Posts

I am working on getting my post to spit out all tools in a sub program, but I am stuck. I can't seem to get it to post out the NCI 1001 line after the sub program is called. It wants to hit it before hand. Any ideas?

 

O1 ( AM3010C )
T20
M6
S0 M5                                                   # this line
G54.1 P1 G0 X-.25 Y-.375 (NCI 1001) # this line
G43 H20 Z0. M98 P0                            #and the first part of this line should all be after the Sub
M9
G91 G30 Z0
G30 X0 Y0
G90
M99
 
O0 (SUBPROGRAM FOR T20 )
G0 X-.25 Y-.375
M99

 

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

 

psof$        # Start of file for non-zero tool number             1001
             subnumber = mi5$
             saved_mr1 = mr1$

             n$, *subnumber, "(SUBPROGRAM FOR", t$, ")",e$
             ptoolcomment
             n$, psg00, *xr$, *yr$,e$
             if Look_ahead = 1, pg8_on
             if Look_ahead = 3, pg5_on
             subout$=0
              "%",e$
             pprogno, "(", sprogname$,")",e$
             p_fix
             if macro, pmacro
             n$, t$, e$
             ptoolcomment
             n$, comment$,e$
             n$, "M6",e$
             pspindle
             count = 1
             n$, "G54.1", *fix, psg00, *xr$, *yr$,e$
             n$, ptllncomp,
             n$, psubcall
             subout$ = 1

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