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:

c-hook for engraving # in sequence?


HEAVY METAL
 Share

Recommended Posts

I've done it the easy way by making programs for "001", "002","003". Naming them O8001, O8002, etc. Then using a macro variable in the machine. Set it to "1" or whatever # you want to start with manually.

 

In your main part program have

M98 P[8000+ #100]

#100 = #100 + 1 (increment for next call)

 

Not bad if you don't have too many parts to do (our numbers start over each week so we only use about 40 or so)

 

Of course I have a seperate workoffset that I use for the numbering so I can use it on different parts and place it where it needs to be.

 

I'm working on one now that will be cool if I ever have a chance to finish it. It will use 6 macro variables for the counting logic. That's the tricky part. The key here is to understand how addition works. The "carry values" are important. If the ones column is 9 + 1 you need to add a "1" to the tens column.

 

Will use 10 basic programs that are called as subs (0-9).

 

basically

#101 = 0

#102 = 0

#103 = 1

Will engrave "001"

 

The other three variables will be "carry digits" that are computed values and need no user input.

 

Basic logic is this:

 

increment #103 in the macro each time. When #103 is > 9 set a carry digit (#104 or whatever) to "1" and #103 back to "0". Other wise just increment #103 and set #104 = 0 (carry not needed)

 

So #102 always = #102 + #104 (ones carry digit either a 1 or 0). When #102 > 9, set it back to 0. Set #106=1 (tens carry digit).

 

#101 = #101 + #106 (tens carry digit), etc.

 

Sorry about the flow of thought writing here.

Link to comment
Share on other sites

I really like rekd's idea. Like he said maybe additional work to set it up, but in the long run looks like the best. But I have a couple of questions regarding this method. First, is the G47 the option engrave in MC? and if he's using custom drill cycles, is he picking point GEO or lines with points.

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