Fadal User Manual
Section 6: Fixed Subroutines
Definition Fixed Subroutines are dedicated cycles, standard in the memory of the control.
They are called by the use of an L word (L9101 - L9901) and will use
parameters (R0-R4, Z, & F). Fixed subroutines can be used during programs
run from memory or DNC operations. Subroutine calls are not allowed in MDI.
L9101 Probe See the Probe section for L9101 applications.
Functions
Engraving
L9201 Engraving Engraving functions are invoked by using the L9201 code. The L9201 function
Functions is capable of engraving either a constant text/number string or a serialized text/
number string. All lettering is uppercase.
Parameters 1) A tool must have been specified by an H or D word.
2) The Z word defines the final depth of cut for the cycle. The maximum Z
depth from R0 plane to final is 2.5 inches.
3) The R0 word is used to define the clearance plane for the tool to move
above the part. The tool retracts to this plane when moving between
characters, changing position to continue the same character, or after the
last character is engraved.
4) R1 defines mode selection of four options:
a. A value of 0 for standard Gothic font (R1+0.).
b. A value of 1 for stencil type Gothic font (R1+1.).
c. A value of 2 for serialization standard font (R1+2.).
d. A value of 3 for serialization stencil font (R1+3.).
5) R2 represents the height of characters to be engraved minus the tool
diameter. The maximum character height is 2.5 inches.
6) R3 represents the angle at which the characters are to be engraved.(see
figure
April 2003 Section 6: Fixed Subroutines 111
Fadal User Manual
7) R4 is the serialization increment selector (1-9). Enter the R4 value for the
increment amount. R4+1. increments the number by one for each part. R1
must be R1+2 or R1+3 to allow R4 to function.
8) F is the feed rate.
9) The comment or words typed after the ( (left parenthesis) will be engraved.
Restrictions 1) The maximum number of characters (including spaces) that can be
engraved in each use of the L9201 code is 63 minus the number of
characters used to code the first part of the L9201 line itself.
2) When serializing, the last part of the text/number string must be the
number to increment.
Engraving a The procedure to engrave the word “ENGRAVE” .125 inch high, using a .015
Constant String inch diameter engraving tool, is shown below:
X0
90ß
Y0 45ß
.625
ENGRAVE
180ß 0ß
270ß -45ß
.375
Figure 6-1 Engraving a Constant String
1) Position the X and Y to the start position (see Computing Start Position on
page 6-6).
Note: This is true for engraving at an angle of zero degrees (see figure above).
When engraving on a non-zero angle the X and Y axis must be shifted
properly for the angle programmed.
2) Position the Z axis to the Initial Plane.
3) Set up the engraving cycle.
112 Section 6: Fixed Subroutines April 2003
Fadal User Manual
EXAMPLE: N1 O1 (SAMPLE ENGRAVING PROGRAM
N2 M6 T1
N3 (TOOL #1 ENGRAVING TOOL .015 CENTER DRILL
N4 G0 G90 S10000 M3 E1 X.375 Y-.6175
N5 H1 D1 M8 Z.05 (DIAMETER .015 IN OFFSET PAGE
N6 L9201 R0+.05 R1+0 R2+.125 R3+0 Z-.005 F40. (ENGRAVE
N7 M5 M9
N8 G90 G0 H0 Z0
N9 E0 X0 Y0
N10 M2
Engraving a Serialization is used to engrave numbers on a series of parts while changing
Serialized String the number on each part. The R1 value must be either a 2 or 3 to identify the
serialized engraving style. The R4 value must be used to identify the increment
amount. This amount is in whole numbers only (to increment decimal
numbers, the decimal point must be engraved as a separate character). The
numbers to be serialized MUST be at the end of the engraving characters.
When serialization is coded, the machine changes the program code to reflect
the next number to be engraved. The program code is changed after the
control processes the engraving line. To reset the number, the operator must
manually change the program code.
Note: When the same number is to be engraved on each part, DO NOT use
serialized engraving.
EXAMPLE: N1 O1 (SAMPLE ENGRAVING PROGRAM
N2 M6 T1
N3 (TOOL #1 ENGRAVING TOOL
N4 G0 G90 S10000 M3 E1 X.375 Y-.6175
N5 H1 D1 M8 Z.05
N6 L9201 R0+.05 R1+2. R2+.125 R3+0 R4+1. Z-.005 F40. (ENGRAVE 1
N7 M5 M9
N8 G90 G0 H0 Z0
N9 E0 X0 Y0
N10 M2
Serialization Range Serialized engraving uses the number of digits at the end of the initial
engraving string to set the range of serialization. For instance, if the end of the
string is 5 digits (00001), the maximum number engraved will be 99999, and
the number engraved after 99999 will be 00000.
April 2003 Section 6: Fixed Subroutines 113
Fadal User Manual
The preceding example engraves ENGRAVE 1 on the first part and ENGRAVE 2
on the second and so on. This example will engrave the numbers 1, 2, 3, 4, 5,
6, 7, 8, 9, and 0. After the 0 the number 1 is engraved again. Further, the
maximum number of digits that could be coded in this example is five (00000
through 99999), because 58 characters on the L9201 line are used by
program code, including the spaces, right parenthesis, and constant portion of
the engraving text.
EXAMPLE: ENGRAVE 01 serializes the numbers 01 through 99, then 00, and then restarts
at 01.
ENGRAVE 0001 serializes the numbers 0001 through 9999, then 0000, and
then restarts at 0001.
Spacing, Positioning, The L9201 Fixed Subroutine uses the Letter Box (the rectangular area around
& Tool Path each character) to calculate the tool path for the engraving, beginning at the X,
Calculations Y position specified in the program.
WIDTH
1/2 WIDTH
PROGRAM HEIGHT
START
START
SPACING
CL
END
SPACING
Figure 6-2 Letter Box
Computing Actual The L9201 Fixed Subroutine calculates the actual height of the tool path as
Letter Height from follows:
the R2 Variable
Actual height = (desired letter height) - (tool diameter)
Computing Start The L9201 Fixed Subroutine calculates the start spacing for each character as
Spacing follows:
Start spacing = (actual height) * (start factor)
114 Section 6: Fixed Subroutines April 2003
Fadal User Manual
Computing End The L9201 Fixed Subroutine calculates the end spacing for each character as
Spacing follows:
End spacing = (actual height) * (end factor)
Computing Start X: The L9201 Fixed Subroutine will move to the X position specified in the
Position program, and then move in X the amount calculated for the start spacing of the
first character, before beginning the engraving cut.
Y: The program must specify a starting Y position that takes into account the
tool diameter, so that the tool is initially positioned one-half the tool diameter
above the desired baseline of the engraving.
X and Y should be specified together before each L9201 line.
Computing Occasionally, it is necessary to calculate the length of the engraving. The
Engraving Length procedure for calculating the length is as follows:
1) Establish a desired height for the engraving.
2) Choose the tool diameter. A recommended value is a diameter equal to .14
times the desired height. Remember to place this diameter in the offset
page.
3) Calculate the width factor for the engraving, using the Letter Width Table to
sum the width for each character or space.
4) Calculate the total engraving length using the formula:
Engraving length = (actual height) * (total width factor)
EXAMPLE: Calculate the length of the word “ENGRAVE” to be engraved at a height of .125
inches with a tool diameter of .015 inches.
1) Tool diameter = .015 inches
2) Actual height = (desired letter height) - (tool diameter) = .125 - .015 inches
= .110 inches
3) Total width factor = the sum of the Letter Width Table’s width factors for
each character or space.
E(.8853)+N(.9573)+G(.9588)+R(.9749)+A(1.0506)+V(1.0147)+E(.885
3)=6.7269
4) The actual engraving length is now given by:
April 2003 Section 6: Fixed Subroutines 115
Fadal User Manual
Engraving length = (actual height) * (width factor)
or, in this example, engraving length = (.110) * (6.7269) = .73996
Note: The tool diameter must be entered in the offset page, and an H word
and/or D word must be used in the program prior to calling the L9201.
Letter Width Factor The letter width is based on the box space for each letter. The Start and End
Values factors are used to calculate the distance from the edge of the letter box to the
start and end points of the letter.
Table 1: Letter Width Factor Table
Character Width Start End
A 1.0506 .2279 .2279
B .9455 .2279 .1284
C .9471 .1837 .2677
D .9441 .2279 .1927
E .8853 .2279 .2280
F .9118 .2279 .2294
G .9588 .2153 .2282
H .9706 .2279 .2353
I .4559 .2279 .2280
J .95 .2279 .2280
K 1.0249 .2279 .2278
L .8941 .2279 .2280
M 1.0824 .2279 .2280
N .9573 .2279 .2279
O .9647 .1779 .1779
P .9485 .2279 .2279
Q .9647 .1779 .1779
R .9749 .2279 .2278
S .9853 .2279 .2280
T .9485 .2279 .2279
U 1.0000 .2279 .2280
V 1.0147 .2279 .2280
W 1.2059 .2279 .2279
X .9559 .2279 .2280
Y 1.0441 .2279 .2280
Z .9441 .2279 .2280
116 Section 6: Fixed Subroutines April 2003
Fadal User Manual
The letter width is based on the box space for each letter. The Start and End
factors are used to calculate the distance from the edge of the letter box to the
start and end points of the letter.
Table 2: Letter Width Factor Table
Character Width Start End
\ .9559 .2279 .2280
! .7353 .3676 .3677
# 1.0441 .1926 .1927
$ .9559 .2276 .2280
% .8676 .2279 .2280
‘ .7353 .3676 .3677
& .9853 .2345 .1453
( .5855 .2279 .2279
) .5855 .2279 .2279
* .9559 .2279 .2280
1.1029 .2279 .2280
, .7353 .2941 .2960
- 1.1029 .2279 .2280
. .7353 .3676 .3677
/ .9559 .2279 .2280
0 .9647 .1779 .1779
1 .6059 .2279 .2280
2 .8926 .2279 .2271
3 .9632 .2279 .2281
4 1.0779 .2279 .2279
5 .9485 .2279 .2089
6 .9118 .2153 .2267
7 .9691 .2279 .2279
8 .9706 .2271 .2282
9 .9118 .2259 .2123
: .7353 .3676 .3677
; .7353 .2941 .2957
“ .7704 .2274 .2274
= 1.1029 .2279 .2280
? .9853 .2279 .2280
Space .8823
April 2003 Section 6: Fixed Subroutines 117
Fadal User Manual
Bolt Circle
L93NN Bolt Circle 1) R0 represents the I definition of a circle. This is the X direction and
distance from the starting position to the center.
2) R1 represents the J definition of a circle. This is the Y direction and
distance from the starting position to the center.
3) R2 represents the angular step between holes. A positive angular step
will move CCW around the bolt circle, while a negative angular step will
move CW around the bolt circle.
4) NN is the number of holes to be drilled. For example, L9304 is for 4 holes.
1ST HOLE DRILLED
STARTING POSITION
(X0,Y0)
Figure 6-3 1st Hole Drilled
The drawing above is a 3.0" diameter, 8 hole, evenly spaced bolt circle. The
procedure is as follows:
1) Position the X,Y axes to the starting position (the last hole of the bolt circle
to be drilled) and the Z axis to the I plane.
2) Select desired Fixed Cycle.
3) Start Bolt Circle subroutine.
EXAMPLE: (Format 1):
N1 O1 (BOLT HOLE EXAMPLE
N2 G0 G90 S2000 M3 X0 Y1.5 Position to starting position
N3 H1 M7 Z.1
N4 G81 G99 R0+.1 Z-1.0 F10. Set up Fixed Cycle
N5 L9308 R0+0 R1-1.5 R2-45. Call Bolt Circle Subroutine
N6 M5 M9
N7 G80
118 Section 6: Fixed Subroutines April 2003
Fadal User Manual
Mill Boring
L94NN Mill Boring 1) A tool must have been specified by an H or D word and the tool diameter
Cycle MUST be in the tool table.
Counterclockwise
2) R0 represents the feed rate.
3) R1 represents the diameter of hole to be bored.
4) NN represents the number of repetitions desired.
START
Figure 6-4 Boring Cycle Counter Clockwise
The drawing above is a 1.5 diameter hole to be mill bored. The procedure is as
follows:
1) Position the X,Y axes to the center.
2) Position the Z axis to finished depth.
3) Start Mill Boring Cycle.
EXAMPLE: N1 O1 (MILL BORING CCW EXAMPLE
N2 M6 T1
N3 G0 G90 S2000 M3 X1.0 Y-1.0
N4 H1 D1 M7 Z.1
N5 G1 F10. Z-1.
N6 L9401 R0+10. R1+1.5
N7 M5 M9
N8 G0 H0 G90 Z0
April 2003 Section 6: Fixed Subroutines 119
Fadal User Manual
L95NN Mill Boring 1) A tool must have been specified by an H or D word and the tool diameter
Cycle Clockwise MUST be in the tool table.
2) R0 represents the feed rate.
3) R1 represents the diameter of hole to be bored.
4) NN represents the number of repetitions desired.
START
Figure 6-5 Hole Diameter
The drawing above is a 1.5 diameter hole to be mill bored. The procedure is as
follows:
1) Position the X,Y axes to the center.
2) Position the Z axis to finished depth, selecting the proper H word or D word
to specify the diameter the tool is using.
3) Start Mill Boring Cycle.
EXAMPLE: N1 O1 (MILL BORING CW EXAMPLE
N2 M6 T1
N3 G0 G90 S2000 M3 X1.0 Y-1.0
N4 H1 D1 M7 Z.1
N5 G1 F10. Z-1.
N6 L9501 R0+10. R1+1.5
N7 M5 M9
N8 G0 G49 G90 Z0
120 Section 6: Fixed Subroutines April 2003
Fadal User Manual
Rectangular Pocket
Clean-out
L9601 Rectangular 1) A tool must have been specified by an H or D word and the tool diameter
Pocket Clean-out MUST be in the tool table.
Counterclockwise
2) R0 represents the feed rate.
3) R1 represents the radius on the corner of the tool.
Note: This can be used to regulate the step over distance. The larger this
number, the less the amount of step over.
4) R2 represents the overall X dimension.
5) R3 represents the overall Y dimension.
START
Figure 6-6 Counterclockwise Rectangular Pocket Clean-Out
The tool path drawing above shows how a 3.25 by 1.75 rectangular pocket
would be cleaned out with a .25" diameter tool. The procedure is as follows:
1) Position the X,Y axes to the center of the pocket.
2) Position the Z axis to finished depth, selecting the proper H or D word to
specify the diameter the tool is using.
3) Start Rectangular Pocket Subroutine.
April 2003 Section 6: Fixed Subroutines 121
Fadal User Manual
EXAMPLE: N1 O1 (RECT CLEANOUT CCW EXAMPLE
N2 M6 T1
N3 G0 G90 S2000 M3 X1.0 Y1.0
N4 H1 D1 M7 Z.1
N5 G1 F10. Z-1.
N6 L9601 R0+10. R1+.01 R2+3.25 R3+1.75
N7 M5 M9
N6 G0 G49 G90 Z0
L9701 Rectangular 1) A tool must have been specified by an H or D word and the tool diameter
Pocket Clean-out MUST be in the tool table.
Clockwise
2) R0 represents the feed rate.
3) R1 represents the radius on the corner of the tool.
Note: This can be used to regulate the step over distance. The larger this
number, the less the amount of step over.
4) R2 represents the overall X dimension.
5) R3 represents the overall Y dimension.
START
Figure 6-7 Clockwise Rectangular Pocket Clean-Out
The tool path drawing above shows how a 3.25 by 1.75 rectangular pocket
would be cleaned out with a .25" diameter tool. The procedure is as follows:
1) Position the X,Y axes to the center of the pocket.
2) Position the Z axis to finished depth, selecting the proper H or D word to
specify the diameter the tool is using.
122 Section 6: Fixed Subroutines April 2003
Fadal User Manual
3) Start Rectangular Pocket Subroutine.
EXAMPLE: N1O1 (RECT CLEANOUT CW EXAMPLE
N2 M6 T1
N3 G0 G90 S2000 M3 X1.0 Y1.0
N4 H1 D1 M7 Z .1
N5 G1 F10. Z-1.
N6 L9701 R0+10. R1+.01 R2+3.25 R3+1.75
N7 M5 M9
N8 G0 G49 G90 Z0
April 2003 Section 6: Fixed Subroutines 123
Fadal User Manual
Circular Pocket
Clean-out
L9801 Circular 1) A tool must have been specified by an H or D word and the tool diameter
Pocket Clean-out MUST be in the tool table.
Counterclockwise
2) R0 represents the feed rate.
3) R1 represents radius on the corner of the tool.
Note: This can be used to regulate the step over distance. The larger this
number, the less the amount of step over.
4) R2 represents diameter of the pocket.
START/END
Figure 6-8 Counterclockwise Circular Pocket Clean-Out
The tool path drawing above shows how a 1.75 diameter circular pocket would
be cleaned out by a .25" diameter tool. The procedure is as follows:
1) Position the X,Y axes to the center.
2) Position the Z axis to finished depth, selecting the proper H or D word to
specify the diameter the tool is using.
3) Start Pocket Subroutine.
EXAMPLE: N1 O1 (CIRC CLEANOUT CCW EXAMPLE
N2 M6 T1
N3 G0 G90 S2000 M3 X1.0 Y-1.0
N4 H1 D1 M7 Z.1
N5 G1 F10. Z-1.
124 Section 6: Fixed Subroutines April 2003
Fadal User Manual
N6 L9801 R0+10. R1+.01 R2+1.75
N7 M5 M9
N8 G0 G49 G90 Z0
L9901 Circular 1) A tool must have been specified by an H or D word and the tool diameter
Pocket Clean-out MUST be in the tool table.
Clockwise
2) R0 represents the feed rate.
3) R1 represents radius on the corner of the tool.
Note: This can be used to regulate the step over distance. The larger this
number, the less the amount of step over.
4) R2 represents the diameter of the pocket.
START/END
Figure 6-9 Clockwise Circular Pocket Clean-Out
The tool path drawing above shows how a 1.75 diameter circular pocket would
be cleaned out by a .25" diameter tool. The procedure is as follows:
1) Position the X,Y axes to the center.
2) Position the Z axis to finished depth, selecting the proper H or D word to
specify the diameter the tool is using.
3) Start Pocket Subroutine.
EXAMPLE: N1 O1 (CIRC CLEANOUT CW EXAMPLE
N2 M6 T1
April 2003 Section 6: Fixed Subroutines 125
Fadal User Manual
N3 G0 G90 S2000 M3 X1.0 Y-1.0
N4 H1 D1 M7 Z.1
N5 G1 F10. Z-1.
N6 L9901 R0+10. R1+.01 R2+1.75
N7 M5 M9
N9 G0 G49 G90 Z0
126 Section 6: Fixed Subroutines April 2003