![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| 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? |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| number engraving macro | gravy | Parametric Programing | 2 | 02-22-2010 04:05 PM |
| Need Help!- Serialized Engraving | Mark and Poco | Okuma | 0 | 10-01-2009 07:53 AM |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| Fanuc control -Serialized Engraving | ZachB | Fadal | 3 | 01-17-2006 08:50 PM |
| Engraving Macro | MachineSMM | General CNC (Mill and Lathe) Control Software (NC) | 12 | 03-03-2005 05:32 AM |