Disclaimer: CNC Concepts, Inc. accepts no responsibility for the use
or misuse of techniques shown in this web page. We simply publish information
we feel will be of interest to CNC users. In all cases, the reader is totally
responsible for considering the implications, good and bad, of implementing one
or more of the techniques we show.
A serial number engraving custom macro
Custom macro submitted by Steve Wood, Laconia, N.H.
This custom macro engraves three-digit serial
numbers which increment by one. The character set is 1/4 high numerals from
zero through nine. To get started store the left most number in variable #524.
the second number in variable #525 and the right most number in variable #526
to start. To start with serial number 147, for example, set #524 to 1, #525 to
4, and #525 to 7. The engraving tool must first be positioned 0.1 inch over the
center of the each numeral. The pitch is .200".
Editor's note: Thanks to Steve Wood for this excellent
application. I've been asked about this kind of macro several times. A few
notes: First, this macro is to be include in your main (cutting) program. You
could easily separate it, making it a macro program by itself by passing a few
variables - like X, Y, and Z position for the numerals, and maybe the depth of
the engraving tool. Second, Steve points out that you could easily make another
character set by rewriting programs O4000 through O4009. And third, this macro
does a three-digit serial number, if you have a larger number, and if you
understand the unique logic of Steve's macro, you can easily make a four or
five digit serial number.
G0G90G54X.5Y.75S6500M3 (<----POSITION HERE FOR 1ST NUMBER
(FIND FIRST DIGIT)
(FIND 2ND DIGIT)
N925 G0G90G54X.7 Y.75 (<----POSITION HERE FOR 2ND NUMBER)
(FIND 3RD DIGIT)
N950 G0G90G54X.9 Y.75 (<----POSITION HERE FOR 3RD NUMBER)