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:

Fanuc Macro Help


kennebec
 Share

Recommended Posts

Hello Emastercam community

 

This subject has been discussed but I am not as familiar with macros and subs as alot of you.

I am trying to engrave progressive serial numbers on parts 0001 0002 0003 ect with a Fanuc 18iM control. I want leading the leading zeros

 

I found the following:

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

"X DIGIT SERIAL NUMBER MACRO

 

This macro is designed for to cut any number, up to 8 digits, on a flat surface. The

 

number of digits is only limited by the allowed variable length. The serial number will

 

be cut along the X axis, from the specified starting point then moving in the +X direction.

 

To call the macro use G65 in the following format:

 

G65 P5100 S__. C__. X__. Y__. Z__. D__. U__. H__. F__.

 

Where:

S 4 Digit serial number

C Number of digits for leading zeros

X X Position of first digit

Y Y Position of serial number

Z Start Z Position (Default 0.0”)

D Depth of serial number (Default 0.005”)

U Spacing of digits (Default 0.2”)

H Height of digits (Default 0.25”)

F Feedrate (Default previous specified)

All values must have a decimal point.

 

Make sure to call the correct tool BEFORE calling the macro program.

 

The machine need not be moved into position for the macro call. The macro moves X

 

and Y to position then down to a safe Z ½ inch above the surface. Position the machine at

 

a safe rapid height BEFORE calling the macro program.

 

Specify C to include leading zeros in the serial number. A serial number with number of

 

digits C will be output. If C is omitted the serial number will be cut as specified by S.

 

The X and Y start location is in the center of the first digit.

 

Any argument with a default value can be omitted from the macro call.

 

U is the center-to-center distance of the digits.

 

S can be specified any number from 0 to 9999. If less than 4 digits are specified, the

 

macro will add leading zeros.

 

To automatically increment the serial number in the program, use the following format.

 

#500 = #500 + 1.

G65 P5100 S#500 C X Y Z D U H F

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

am I headed in the right direction?

I would think I would have to program each number 0-9, and I have done that, each number on a level and all about my origin. I believe I need to add the subs O0500(0) thru O0509(9) to the main program?

will this G65 line call and serialize my subs?

 

Thanks everyone learning constantly from all of you

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