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:

Can a MasterCAM Macro do this?


Quinten78
 Share

Recommended Posts

Hello my name is Quinten and I have a question about macros in MasterCAM. I have many parts that need serial numbers, however it is a pain in the butt to move around the numbers and then tool path it. Is there any way of making a macro that would serialize these parts and number them in order so that it wouldn't take me hours in programing? Example: I have 200 parts all of witch need a serial number. First one would start out at 001 and continue up from there (001,002,003,004...). Would there be a way to make a macro that would do this all for me? I hope this makes since.

 

Thanks

Quinten

Link to comment
Share on other sites
Guest MTB Technical Services

That type of thing is best done on the machine control itself.

You could use an Manual Entry Operation to get the data for the post and then parse it as needed.

 

However, If you have a Fanuc controlled machine or one like a Mazak, Mitsubishi or Haas that will run Fanuc Macro-B code, you can try this.

The help file has an example for engraving serial numbers.

 

http://www.mtbtech.n...olled-Mill.aspx

 

0_0_0_0_250_303_csupload_59506196_large.jpg?u=635098494741508788

  • Like 1
Link to comment
Share on other sites

You cant use the Haas G47 engraving that comes on the machine.

Engraving (G47)

G47 ENGRAVING GROUP 00

E = Plunge rate (units/min)

F = Engraving feed rate (units/min)

I = Angle of rotation (-360. to +360.), default is 0.

J = Scaling factor in inches (minimum = 0.001 inches), default is 1.0 inch

P = l for Sequential Serial Number Engraving

= 0 for Literal String Engraving

R = Return plane

X = X start of engraving

Y = Y start of engraving

Z = Depth of cut

The text to engrave should be in the form of a comment on the same line as G47, with either a P1 or P0

before it. P1 selects Sequential Serial Number Engraving and P0 selects Literal String Engraving.

SEQUENTIAL SERIAL NUMBER ENGRAVING

This method is used to engrave numbers on a series of parts, with the number being incremented by one

each time. The '#' symbol is used to select the number of digits in the serial number. For example: G47

P1 (#### )

will limit the serial number to four digits.

The initial serial number can be either programmed or set manually. If it is programmed , for example:

G47 P1 (1234)

This code will set the initial serial number to "1234".

The initial serial number can also be set manually into a macro variable. The "MACROS" option does not

have to be enabled to do this. Macro variables are temporary storage locations for numbers. Macro

variable #599 is used to hold the initial serial number to be engraved. To set this variable, go to the

CURNT COMDS page and press the PAGE DOWN key until the "Macro Variables" page appears. Then type

in "599" and press the (DOWN ARROW). Now enter the desired initial serial number at the cursor and

press the WRITE key. For example, when macro variable #599 is set to "1234",

G47 P1 (####) will produce this: 1234

If the number in macro variable #599 has more characters than specified in the format string, only the

quantity specified will be printed. For example, if #599 is set to"12345" and only four places are specified

in the format string, only "2345" will be engraved.

Link to comment
Share on other sites

man it's been a long time since i've used G47 engrave cycle on the Haas, thanks for the reminder.

 

Tim, slick interface. haven't used it but it seems like you should be charging a couple bucks for it.

a product like that has needed to exist for a looong time. maybe there are but i don't know about them.

chook in mastercam?

Link to comment
Share on other sites
Guest MTB Technical Services

man it's been a long time since i've used G47 engrave cycle on the Haas, thanks for the reminder.

 

Tim, slick interface. haven't used it but it seems like you should be charging a couple bucks for it.

a product like that has needed to exist for a looong time. maybe there are but i don't know about them.

chook in mastercam?

 

I appreciate the kind words.

I'd like to think that I know a few things about UI design.

 

I did it for the very reason you described.

It's been a long time coming,

 

As far as charging for it, there just isn't that much demand.

If there was enough demand for a C-Hook I suppose I might do it.

Link to comment
Share on other sites
  • 2 months later...

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