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:

Adding subroutines after subroutines


Recommended Posts

 Not quite sure what your getting at but there may be a simplier solution. Appears you are planning on calling these routines to set your tools.

Can you just put the routines into a seperate program in the memory where as this tool setting program will have the N number repersenting the tool number.

 

 Can you show an example of a laser routine maybe that will help.

Link to comment
Share on other sites

Thanks for the replies to my post.

 

Here is a very rough example of what I am looking for:

 

O1234 (main prog #)

 

N1 (comment)

T1 M6

 

M98 P1234  Q101  (subroutine call)

 

M1

 

N2

T2M6

 

(tool motion)

 

M1

 

M30

 

N101 (subroutine)

(tool motion)

M99

 

N10001 (tool laser routine for T1)

T1 M6

S3000M3

(call tool laser macro here)

M1

 

N10002

T2M6

S3000M3

(call tool macro here)

M1

 

There is a tool motion subroutine in T1 but not T2. The tool laser macro is needed for both tools and has to be after any tool motion subroutines or after the M30

if there are no tool motion subroutines. In most posts, there is mergeaux after mergesub, so is this a method to output the laser rouitines or is there another method? 

I have no experience with "aux" files and I would be interested in learning about and using them.

Thanks again.

Link to comment
Share on other sites

If you are using subout you might need to use auxprg. Save a copy of your post and in the following in the appropriate section in the post.  

 

Example from made from generic post hope this helps.

 

Format new N number 

fmt  "N" 21 nn          #Sequence number at tool change

 

Edit in the following in (start of file after m6,  tool change section of post after m6, and end of file after m30)

 

psof$ #Start of file for non-zero tool number

 

      auxprg$ = 1
      subout$ = 2
      nn = t$ + 1000
      *smspc, e$
      pbld, *nn, "(LASER ROUTINE", *t$, ")", e$ 
      *t$, sm06, e$
      "G65P1234(LASER MACRO)", e$
      pbld, *sm01, e$
      *smspc, e$
      subout$ = 0

 

ptlchg$ #Tool change

 

     subout$ = 2

     nn = t$ + 1000   

     pbld, *nn, "(LASER ROUTINE", *t$, ")", e$

    *t$, sm06, e$
     "G65P1234(LASER MACRO)", e$
     pbld, *sm01, e$
     *smspc, e$
     subout$ = 0
 
 
peof$ #End of file for non-zero tool
        mergeaux$     #Merge non-transform subs
        clearaux$
  • Like 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...