You are on page 1of 45

ALhp Programming Manual

W.A. Whitney 647







































Information in this documentation is subject to change without notice. Reproduction or transmission of any part of this documentation in
any form or by any means without the express written permission of Altronics Service, LLC is strictly prohibited.

Altronics Service has taken best efforts to ensure the accuracy and integrity of the information contained in this documentation. Altronics
Service makes no representation of guarantee, express or implied, with regard to the completeness or accuracy of the information
contained in this documentation, and cannot accept any legal responsibility or liability for any errors or omissions that may be made.

2008 Altronics Service, LLC. All rights reserved.

AL and ALhp are either registered trademarks or trademarks of Altronics Service, LLC

Microsoft, Windows, Windows XP, Windows CE are either registered trademarks or trademarks of Microsoft Corporation in the United
States and/or other countries.

All other product names are either registered trademarks or trademarks of their respective owners.


Intellectual Property. All Intellectual Property, as defined below, and relating to the AL or ALhp, including but not limited to, accessories,
parts, hardware, and software (the System), is proprietary to Altronics Service, LLC. or its suppliers under federal laws, state laws, and/or
international treaty provisions. You may not infringe or otherwise violate the Intellectual Property rights owned by Altronics Service or its
suppliers. By using the System or any part thereof, you agree that you will not (and will not attempt to) modify, prepare derivative works of,
reverse engineer, decompile, disassemble, or otherwise attempt to create source code from the software which is part of the System. No
title to, or ownership, or any other right in or to the Intellectual Property is transferred to you. All rights to the Intellectual Property shall
remain with Altronics Service and its suppliers. Intellectual Property, as used herein, includes, but is not limited to, inventions (patentable
or unpatentable), patents, trade secrets, copyrights, software, computer programs, and related documentation and other works of
authorship.

The furnishing or distribution of this documentation does not grant any license to these patents, trademarks, copyrights, and/or other
intellectual property rights.









CNC Programming Manual



1. PREPARATORY (G) CODES OVERVIEW

Code Function Type Page#

MOTION TYPE GROUP
G00 Rapid Positioning MODAL 1
G01 Linear Interpolation 2
G02 Circular Interpolation CW 4
G03 Circular Interpolation CCW 4
G21 Linear Interpolation (in-zone) 2
G22 Circular Interpolation CW (in-zone) 4
G23 Circular Interpolation CCW (in-zone) 4

DWELL
G04 Dwell (Time = F Word) NON-MODAL 8

CUTTER COMPENSATION GROUP
G40 Cancel Cutter Compensation MODAL 9
G41 Cutter Compensation Left 9
G42 Cutter Compensation Right 9

WORK COORDINATES GROUP
G54 Punch Offset MODAL 10
G55 Torch Offset 10
G56 G59 Other Attachment Offsets 10

CANNED CYCLES GROUP
G61 Linear Punch Pattern at an Angle NON-MODAL 12
G62 CW/CCW Punched Arc 13
G64 Bolt Hole Circle Pattern 15
G65 Rectangular Cutout 17
G67 Square/Rectangular Grid Pattern 19

PROGRAM DIMENSION GROUP
G70 Imperial Units (Inch) MODAL 21
G71 Metric Units (Millimeter) 21
CNC Programming Manual




Code Function Type Page#

PROGRAM MODE GROUP
G90 Absolute Mode MODAL 22
G91 Incremental Mode 22

COORDINATE PRESET GROUP
G92 Coordinate Preset NON-MODAL 23
G99 Cancel Coordinate Preset 23
CNC Programming Manual



2. MISCELLANEOUS (M) CODES OVERVIEW

The M Codes have been classified into groups for clarification. It is good programming
practice not to program members of the same group in the same NC block.

Code Function Page#

PROGRAM CONTROL GROUP
M00 Program Stop 25
M01 Optional Stop 25
M02 Program End 25
M30 Program End & Rewind 25

TOOL CHANGE GROUP
M06 Tool Change 26

SAFE ZONE GROUP
M10 Activate Clamp Safe Zones 27
M11 Cancel Clamp Safe Zones 27

TORCH CONTROL GROUP
M17 Torch Ignite 29
M18 Torch Extinguish 29

RAM CONTROL GROUP
M41 Ram Down position is by pressure switch 30
M42 Ram Down position is by ram down switch 30
M54 Ram Up position is by timer 30
M55 Ram Up position is standard tool up switch 30
M56 Ram Up position is tool change switch 30

REPOSITION GROUP
M51 Automatic incremental reposition 31
M71 Reposition work clamps without preset 32


CNC Programming Manual




Code Function Page#

PUNCH CONTROL GROUP
M75 Punch Enable 34
M85 Punch Disable 34
M20 Single Block No Punch 34

MATERIAL CONTROL GROUP
M87 Load Position 35
M97 Material Unload 35

SUB-PROGRAM GROUP
M98 Sub-program Call 36
M99 Sub-program End or Program Jump 36

OTHER CODES

GOTO Program jump 39
A Angle
B Angle between holes around circle
D Offset to account for the cutter diameter
F Programmed feedrate
P Number of punches
T Tool number (used with M06)
R Radius
CNC Programming Manual



Page 1
3. PREPARATORY (G) CODES DETAIL

3.1 MOTION TYPE GROUP (G00 G01 G02 G03 G21 G22 G23)

3.1.1 G00 PUNCH BLOCKS

Description:

Punch blocks define the location to be punched and command the axes to make a traverse
move to the punch location. On completion of the move the machine will execute a punch
cycle.

Format: N__ G00 X__ Y__

Where:

N = Optional sequence number

G00 = Punch move command

X/Y = Endpoint of move (location of punch)

Rules:

1. Punch moves execute at the traverse rate, which is the maximum rate of each axis.
Both axis will start moving towards the specified location until one reaches its end
point. The other axis then continues at maximum speed until it also reaches its end
point. As a result traverse moves typically give a dogleg style motion, instead of a
linear motion. Note, the maximum traverse rate may be adjusted via the RAPID
OVERRIDE dial.

2. A punch block may address one or both contouring axes.

3. When the axes reach the anticipation zone, a ram cycle will be commanded. This is
timed such that the tool only makes contact with the workpiece when it is stationary.

4. A G00 block does not require a feedrate word. A previously programmed feedrate
remains unchanged and is active in the next profiling move.

5. G00 is modal and cancels other G codes in its group (G01, G02, G03, etc.).



CNC Programming Manual



Page 2
Example:

N10 G00 X40 Y50 (Absolute Programming)

N10 G00 U30 V40 (Incremental Programming)




3.1.2 G01/G21 LINEAR CUTTING BLOCKS

Description:

In a linear cutting block, the tool/torch moves in a straight line to the commanded position at
the feedrate programmed in the active F word.

Format: N__ G01/G21 X__ Y__

Where:

N = Optional sequence number

G01 = Linear interpolation with block transfer at standard in-position
band (corner rounding may occur).

CNC Programming Manual



Page 3
G21 = Linear interpolation with block transfer at zero in-position band
(corner rounding does not occur).

X/Y = Endpoint of path.

Rules:

1. Any number of programmable axes may be addressed in the contouring block.

2. G01 and G21 are modal and cancel other G words in their group (G00, G02, G03,
etc.).

3. Linear interpolation blocks are executed at the programmed feedrate. An error is
generated if no feedrate has been programmed.


Example 1:

N20 G01 X10 Y40 (Corner rounding may occur)
N30 X40







Example 2:
CNC Programming Manual



Page 4

N20 G21 X10 Y40 (No corner rounding occurs)
N30 X40




3.1.3 G02/G03, G22/G23 CIRCULAR CUTTING BLOCKS

Description:

In a circular cutting block, the tool/torch moves on a circular path to the commanded
position at the feedrate programmed in the active F word.


Format: N__ G02/G03/G22/G23 X__ Y__ I__ J__ R__

Where:

N = Optional sequence number.

G02/G03 = Clockwise circular move with block transfer at standard in-
position band (corner rounding may occur at completion of arc).

G22/G23 = Counter-clockwise circular move with block transfer at zero
in-position band (corner rounding does not occur at completion of arc).

X/Y = Endpoint of path (absolute or incremental).

CNC Programming Manual



Page 5
I/J = Optional arc center offsets, from the start point of the arc.

R = Optional arc radius.

Rules:

1. Arc direction is as defined in EIA standard RS-267.

2. The starting point of the arc is determined by the end points of the previous move.

3. The end point of the arc is specified by the programmed end point coordinates
(absolute), or the distance between starting and end points (incremental).

4. Circular interpolation arc center offsets are signed incremental values that specify the
distance from the start of the arc to the center of the arc. I is programmed for the
incremental length parallel to the X axis. J is programmed for the incremental length
parallel to the Y axis.

5. If an arc center offset is zero, it need not be programmed. Both offsets cannot be
zero.

6. If arc center offsets are used, they must be signed to determine the location of the
center of the arc.

7. Radius programming is mutually exclusive with arc center offset programming; both
cannot be programmed in the same block.

8. If Radius programming is used, a negative radius must be used to specify an arc of
more than 180 degrees.

9. If a full circle is to be programmed, Radius programming cannot be used. Arc center
offsets I/J must be used.

10. The calculated end point based on the programmed I and J must be on the arc
(within an allowable tolerance) or an error message is displayed. If an error exists
within the allowable tolerance, in some cases the resulting tool path may not be
acceptable. To avoid this, the use of Radius programming is recommended for
manually generated programs.

11. G02, G03, G22, G23 are modal and cancel other G words in their group (G00, G01,
G21).

12. It is possible to invert the direction of rotation for the circular cutting blocks via the
Setup screen (F1/F7). This may be required depending on the direction of the axes
on the original CNC controller or any CAD/CAM software used.
Example 1: N20 G03 X30 I10
CNC Programming Manual



Page 6
N30 G02 X50 I10



Example 2: N20 G03 V-20 J-10
N30 G02 Y10 R10




Example 3: N20 G03 X25 R7.5
CNC Programming Manual



Page 7
N30 G02 U20 R-14.142
N40 G03 U15 R7.5



CNC Programming Manual



Page 8
3.2 DWELL (G04)

Description:

The program block is suspended until the dwell expires, allowing machine operations to
complete.

Format: N__ G04 F__.__

Where:

N = Optional block sequence number.

G04 = Dwell G code.

F = Dwell time (in seconds).

Example:

N100 G04 F2 A 2 second dwell.

CNC Programming Manual



Page 9
3.3 CUTTER COMPENSATION (G40/G41/G42)

Description:

When cutter-radius compensation is in effect, the path the center of the cutter follows is
offset from the programmed path. This offset is used to compensate for the difference
between the programmed cutter path and the actual cutter path.


Format: N__ G40/G41/G42 D__

Where:

N = Optional block sequence number.

G40 = Cancels all active cutter compensation.

G41 = Moves the cutter to the left side of the programmed path.

G42 = Moves the cutter to the right side of the programmed path.

D = Offset number to use in the Radius Offset table.

Rules:

1. The cutter compensation amount is defined in the Radius Offset table (F7/F3).

2. Offset values can be either positive or negative.

3. G41/G42 offsets are modal so are applied to all moves until a new G41/G42
command is programmed, or cancelled by a G40.


Example:

N20 G41 D01

The following programmed moves are offset to the left by the distance specified in
position 1 of the Radius Offset table.
CNC Programming Manual



Page 10
WORK COORDINATE GROUP (G54 G55 G56 G57 G58 G59)

Description:

The work coordinate offsets are used to compensate for the different physical positions of
the various machine attachments relative to the ram. A work coordinate offset may exist for
each axis. The operator-entered values of these offsets are incrementally added to the
respective X and Y program position registers allowing program positional data for each
attachment to be relative to the workpiece reference zero.

These offsets allow you to use drawing dimensions without adding or subtracting the
differences between those and the actual dimensions that result from the fixtures being
used on the machine.

Format: N__ G54/G55/G56/G57/G58/G59 X__ Y__

Where:

N = Optional block sequence number.

G54/G55/G56/G57/G58/G59 = Work coordinate offset to be activated.

X/Y = Optional axis coordinates for move after offset activation.

Rules:

1. G codes 54 through 59 are modal commands and are mutually exclusive.

2. The offset values for each of the work coordinates are user defined in the Work
Coordinate Offset screen (F7/F2).

3. The required sign of the value (+/-) is determined by the direction of the ram relative
to the attachment.

4. Work coordinate offsets may be cancelled by M02, M30 and Clear and also by a
machine referencing operation.

5. No axis motion results when the offsets are activated/cancelled without a
programmed move. An axis move must be commanded before the actual axis
position is affected by the offset activation/cancellation.

6. Activating a coordinate offset of 0,0 will have the effect of cancelling an existing
offset. Typically G54 is left at 0,0 to use to activate the ram offset.

Example 1:
CNC Programming Manual



Page 11

N20 G54 X__ Y__

Offsets removed from program position registers; commanded motion executes with
respect to machine zero.

Example 2:

N20 G55

Torch Offsets applied, program position registers updated; no motion occurs.

N30 G90 X__ Y__

X and Y motion executed with respect to workpiece zero, not machine zero.


CNC Programming Manual



Page 12
CANNED CYCLE GROUP (G61 G62 G64 G65 G67)

G61 LINEAR PUNCH PATTERN

Description:

A linear punch pattern consists of a row of punch centers, which can lie at any angle from
360 to +360 degrees relative to the horizontal axis. The machine traverses to all the defined
punch centers in order.

Format: N__ G61 X__ Y__ I__ A__ P__

Where:

N = Optional block sequence number.

G61 = Linear pattern G code.

X/Y = Start point of pattern.

I = Incremental distance between punches.

A = Angle of line of punches relative to the horizontal axis. If not
programmed, angle defaults to zero degrees.

P = Total number of punches in row.

Rules:

1. G61 is a non-modal command.

CNC Programming Manual



Page 13
Example:

N100 G61 X2 Y2 I2.2 A45 P4




G62 CW/CCW CIRCULAR PUNCH PATTERN

Description:

A circular punch pattern consists of a circular arc of punch centers. The machine traverses
to all defined punch centers in order, in a clockwise or counterclockwise direction.

Format: N__ G62 X__ Y__ A__ B__ R__ P__

Where:

N = Optional block sequence number.

X/Y = Axis dimensions of the arc center.

A = Angle of first punch center on the arc relative to the horizontal axis.
If not programmed, the angle defaults to zero degrees.

B = Signed incremental angle between punch centers on the arc. If the
angle is positive, the arc is punched in a counterclockwise
direction. If the angle is negative, the arc is punched in a clockwise
direction.

R = Radius of arc.

P = Total number of punch centers on arc.
CNC Programming Manual



Page 14

Rules:

1. G62 is a non-modal command.


Example:

N25 G62 X3 Y2 A15 B10 R5 P6




CNC Programming Manual



Page 15
G64 CIRCULAR PUNCH PATTERN (BOLT HOLE CIRCLE)

Description:

A circular punch pattern consists of a set of equally spaced punch centers positioned
around a circle of given center and radius. The machine traverses to all the defined punch
centers in order.

Format: N__ G64 X__ Y__ R__ A__ P__

Where:

N = Optional block sequence number.

G64 = Circular punch pattern G code.

X/Y = Axis dimensions of the center point of the circle.

R = Radius of the circle (must be positive).

A = Angle of the first punch center relative to the horizontal axis. If not
programmed, the angle defaults to zero degrees.

P = Total number of punch centers in the pattern.

Rules:

1. G64 is a non-modal command.


CNC Programming Manual



Page 16

Example:

N30 G64 X5 Y4 R5 A30 P6






CNC Programming Manual



Page 17
G65 RECTANGULAR CUTOUT

Description:

The G65 rectangular cutout command uses a square or rectangular tool to punch out a
square/rectangle of specified dimensions, with tool compensation on the inside of the
programmed cutout.

Format: N__ G65 X__ Y__ I__ J__ B__ C__ A__

Where:

N = Optional block sequence number.

X/Y = Axis dimensions of the start point of the cutout.

I = Length of side 1 of the programmed cutout in the X direction. If I is
negative, the direction will be reversed.

J = Length of side 2 of the programmed cutout in the Y direction. If J is
positive, the tool path turns left from side 1 to side 2, and if
negative, the tool path turns right as viewed in the direction of the
motion producing side 1.

B = Square/rectangular tool dimension parallel to side 1 of the
programmed cutout.

C = Square/rectangular tool dimension parallel to side 2 of the
programmed cutout. If the tool is a square tool, it is not necessary
to program C.

A = Angle of the cutout relative to the horizontal axis. If not
programmed, the angle defaults to zero.

Rules:

1. G65 is a non-modal command.

2. If the programmed cutout is not parallel to the horizontal axis, the tool used must
be oriented at the same angle as the cutout.

3. The cutout must be larger than the tool used.
CNC Programming Manual



Page 18
Example:

N100 G65 X4 Y3 I6 J4 B1 C0.5

CNC Programming Manual



Page 19
G67 GRID PATTERN

Description:

A grid pattern consists of rows and columns of punch centers, where the rows are parallel to
the horizontal axis. The machine traverses to all the defined punch centers in order.

Format: N__ G67 X__ Y__ I__ J__ P__ Q__ D__

Where:

N = Optional block sequence number.

G67 = Grid pattern G code.

X/Y = Axis coordinates of the start point of the grid.

I = Signed distance between punch centers along a row.

J = Signed distance between punch centers in a column.

P = Number of punch centers in a row (number of
columns).

Q = Number of punch centers in a column (number of rows).

D = Punch order. If D is not programmed the grid will be punched by
rows. If D is programmed the grid will be punched by columns.

Rules:

1. G67 is a non-modal command.

CNC Programming Manual



Page 20
Example1:

N100 G67 X4 Y4 I1.5 J1 P6 Q5



Example2:

N100 G67 X4 Y4 I1.5 J1 P6 Q5 D1


CNC Programming Manual



Page 21
PROGRAM DIMENSION GROUP (G70 G71)

Description:

Before the Control can accept and use dimensional input data the units of the input data
must be established.

Format: N__ G70/G71

Where:

N = Optional block sequence number.

G70 = Dimensional programming unit is INCH.

G71 = Dimensional programming unit is MILLIMETER.

Rules:

1. Before any block containing a feedrate or axis move, G70 or G71 must be
programmed to establish inch or metric data input. If this is not done, the Control will
assume the default condition selected by the configurator.

Example:

N20 G70 Establishes the INCH as the dimensional programming unit.



CNC Programming Manual



Page 22
PROGRAM MODE GROUP (G90 G91)

Description:

Before the Control can execute programmed moves it needs to know whether the
dimensional data programmed is to be interpreted as absolute or incremental coordinates.

Format: N__ G90/G91

Where:

N = Optional block sequence number.

G90 = Absolute coordinates programming mode.

G91 = Incremental departure mode.

Rules:

1. Before any block containing an axis move, G90 or G91 must be programmed to
establish absolute or incremental programming mode. If this is not done, the Control
will assume the default condition selected by the configurator.

2. All X/Y axis programmed moves will be absolute or incremental dependant on the
mode established by G90/G91.

3. Incremental departures in X/Y axes can be executed when absolute mode (G90) is
active by programming U/V instead of X/Y.

4. Absolute and Incremental programming can be mixed within a block by programming
either X or U and Y or V.

5. Do not program X and U or Y and V in the same block.


Example:

N20 G90 Establishes the Absolute programming mode for all axis moves that
follow.


CNC Programming Manual



Page 23
COORDINATE PRESET GROUP (G92 G99)

Description:

The program position preset feature is used to preset the current axis position to a specific
coordinate location with respect to part program zero. This is usually done at the beginning
of program execution if part program zero does not coincide with machine zero. It is
particularly useful if part program zero lies outside the range of travel of the machine axes.

Format: N__ G92/G99 X/Y

Where:

N = Optional block sequence number.

G92 = Register preset G code.

G99 = Cancel register preset G code

X/Y = X and/or Y Axis dimension

Rules:

1. A G92 command programmed together with the axis dimensions (representing the
coordinates of the current tool position with respect to part program zero) presets the
current program position without movement.

2. G92 is non-modal.

3. G92 block should contain only preset data for axes and no other data.

4. A G99 command will remove all current G92 program position presets. If there are no
other offsets active, the axes program positions will be set to their current machine
positions.

5. The G92 command is independent of all other offsets. It may be used in conjunction
with other offsets and may be programmed either before or after other offsets are
added or removed.

6. G92 position preset is also cancelled by:

a. M02/M30 End of program
b. Clear operation
c. Reference operation

CNC Programming Manual



Page 24
Example:

Program
X Axis Pos Register
at end of block
X Axis Machine Pos
X Axis Programming
Limits
N20 X20 Y30 M20
N30 G92 X10 Y15
30.000
20.000
30.000
20.000
-3.000 60.000
-3.000 60.000


Block N20 moves the axes to X20 and Y30. M20 inhibits the punch cycle. The machine
position displays X20 Y30 at completion of this block.

Block N30 presets the current program position to be X10 and Y15 with respect to the
workpiece zero. No movement occurs. The machine position displays X10 Y15 at
completion of this block.


CNC Programming Manual



Page 25
4. MISCELLANEOUS (M) CODES DETAIL
4.1 PROGRAM CONTROL GROUP (M00 M01 M02 M30)

This grouping of M codes is used to control the execution of the active part program. They
can be further sub-classified into:

Program Stop Codes (M00 / M01)
Program End Codes (M02 / M30)

Note, all of these codes inhibit any punching in the block which it appears.

4.1.1 PROGRAM STOP CODES

M00 - Unconditional Stop
M01 - Optional Stop

M00

When a block containing an M00 is executed and all motion in the block is complete, the
CYCLE START pushbutton lamp on the AL controller will go out and the PROGRAM STOP
lamp on the machine hood will come on. After the operator has completed necessary
manual operations, (remove part, etc), depression of the CYCLE START pushbutton will
restart the part program in the block following the stop (M00) code.

M01

The function of an M01 is identical to an M00 except that the stop is only honored if the
OPTION STOP function on the AL machine front panel is activated (illuminated).

4.1.2 PROGRAM END CODES

M02 - Program End
M30 - Program End and Rewind


M02 & M30 (identical on this version of CNC)

The M02 must only appear once in a part program and that should be in the last physical
block. It signifies the end of the part program and causes many of the modal function
(Radius Compensation, Work Coordinate, etc) to be canceled. The CYCLE START
pushbutton lamp on the AL controller will go out and the PROGRAM END lamp on the
machine hood will illuminate.

CNC Programming Manual



Page 26
4.2 TOOL CHANGE GROUP (M06)

In a single station punch, like the Whitney 647, the function of a tool change request code
(M06) is to lower CYCLE START, raise the RAM to the tool change position and light the
TOOL CHANGE lamp on the machine hood, to inform the operator that the punch/die
(possibly stripper) needs to be changed to a new size. If motion is programmed in the same
block as M06, the motion will complete before the M06 becomes active.

An optional tool number (T) may be specified that indicates the required safe zone size
when clamp safe zones are used. See Safe Zone Group (M10 M11) for more detail.

The general format of this call is:

N__ M06 T__

where:

N__ = Optional block Sequence Number

M06 = Tool change M code

T__ = Optional tool number

Example1:

N120 X-3 Y10 M06 T2

CNC Programming Manual



Page 27
4.3 SAFE ZONE GROUP (M10 M11)

The function of the Safe Zone control group is to activate or deactivate the individual safe
zones around the material clamp assemblies. When the zones are active, the material
clamps will be prevented from entering areas under the RAM/STRIPPER and TORCH
assemblies, in order to protect the clamps in the event of operator or programmer error.

Safe zones may be applied to a minimum of one and up to a maximum of four clamps. The
size of the zone applied is the same for each clamp but is selectable to cater up to three
different stripper sizes (small, medium and large). The safe zone dimensions for the three
stripper sizes and torch may be edited via the Work Clamp Safe Zone screen (F9/F7/F6).

In order to activate the safe zones, the appropriate M code MUST be programmed.

The format for zone activation is:


N__ CL1=__ CL2=__
N__ M10

where:

N__ = Optional block sequence number
M10 = Zone activation M code
CL1 = X axis centerline dimension of clamp #1, which is the clamp closest to X=0
CL2 = X axis centerline dimension of clamp #2

The M10 activation code establishes a safe zone of pre-determined size for the ram &
stripper around each of the programmed clamp centerlines. The safe zones for the torch are
established when the torch offset G code (G55) is programmed.

If a program contains tool changes where the size of the stripper varies, and the clamp
centerlines have already been established, to activate new safe zones, it is only necessary
to program a block containing M06 T__, where T__ is a tool number which points to the
required safe zone size in the Tool Data table (F7/F4). If a T word is not programmed
anywhere in the program, the tool number defaults to 1. Centerline dimensions, once
programmed, are retained until the power to the control is shut off or new values set.
The safe zones will be active relative to the RAM /STRIPPER if G54 is programmed and
relative to the TORCH if G55 is programmed.

The format for zone deactivation is:

N__ M11


CNC Programming Manual



Page 28
where:

N__ = Optional block sequence number
M11 = Zone deactivation M code

Extreme caution should be exercised when moving axes before an M10 has been
programmed and after an M11 has been programmed, since machine damage can occur if
a program has been incorrectly written or insufficient care is taken when manually jogging
the axes.

When safe zones are active, programmed moves that would terminate inside a safe zone
are inhibited and the cycle is suspended. A message Programmed end point is in clamp
safe zone is displayed on the screen.

If machine motion, either manual or programmed, results in a safe zone violation, a
feedhold will be applied and a message Real time clamp interference detected will be
displayed. If this situation occurs, and the move is a programmed move, the cycle must be
aborted by pressing the CLEAR button. If the machine has come to rest within a safe zone
then the ZONE INHIBIT pushbutton can be depressed to deactivate the safe zones and
manually jog the machine clear. Once the ZONE INHIBIT is removed again, the safe zone
will be re-activated again. It is recommended that the ZONE INHIBIT always be removed
before execution of a program.

If programmed machine motion that is linear causes a safe zone violation then you must
edit the program to either use a different motion type or a different path. If the programmed
machine motion is rapid (G00) then Zone Avoidance can be set active (via screen F9/F7) to
automatically take rapid moves around safe zones. It should be noted that Zone Avoidance
does not work with canned cycles (G61->G67), although the safe zones are still in effect.

Example Program:

N10 CL1=15, CL2=40
N15 M10 (establishes safe zone defined by T1 (default) around X15 and X40)
N20 G00 G90 G40 X-3 Y10 M87 (load material)
N25 -> N65 (program blocks containing punch cycles)
N70 G55 (shifts zone to provide protection from torch head)
N75 X20 (move to position over pilot hole)
N80 M17 (torch on)
N85 -> N100 (program blocks containing torch cycles)
N105 M18 (torch off)
N110 G54 (shifts zone back to provide protection from the punch/stripper)
N115 M06 T4 (tool change establishes zone defined by T4 around X15 and X40)
N120 N140 (more punching using different size punch)
N145 M30

CNC Programming Manual



Page 29
4.4 TORCH CONTROL GROUP (M17 M18)

This group of M codes is used to either ignite or extinguish the plasma arc torch.

4.4.1 TORCH IGNITE - M17

This is a pre-motion M code that will lower the torch, turn on the filter system and signal for
torch ignite. When the torch pack signals that the arc has been established, the counter-
balance is energized and programmed motion is allowed.

4.4.2 TORCH EXTINGUISH - M18

This is a post-motion M code such that after all programmed motion in the block has
completed, the torch ignite and counter-balance signals are turned off and the torch is
raised. After a configurable time delay the next NC program block is executed. The filter
then continues to run for a configurable time before the shaker is also energized.

A typical torch program takes the form of:

N001 G90 G40 G00 X-3 Y6 M87
N002 G54 M42 D01
N003 X19 Y15.5 M75
N004 G55
N005 G00 G42 X19 M85
N006 G01 F150
N007 G03 G41 X1 Y0 I.5 M17
N008 G02 X0 Y0 I2 J0
N009 G01 X-.5 Y-.5
N010 M18
N011 G54 G40
N012 G00 X-3 Y6.5
N013 M30

Notes:

1. Ram (punch) cycles are inhibited when M17 is active.

2. Torch related user configurable time delays accessed via screen F9/F7/F5.

CNC Programming Manual



Page 30
4.5 RAM CONTROL GROUP (M41 M42 M54 M55 M56)

This group of M Codes controls how the CNC determines the top and bottom limits of the
stroke of the hydraulic punching ram.

4.5.1 RAM UP LIMIT

Two machine mounted limit switches are used standard Ram Up limit switch and Tool
Change Position limit switch. The standard Ram Up limit switch is used to detect when the
ram has retracted a fixed minimum distance from the bottom of the stroke and is used for
the majority of materials.

The Tool Change Position is used for thick materials or when an application requires that
the ram retract fully to the Tool Change Position before switching off.

An intermediate position for Ram Up is available. The standard Ram Up limit switch is used
to detect when the ram has retracted a known distance. The ram can then continue to raise
and be stopped after a preset time delay. This allows the ram to retract to a position
between the standard Ram Up switch and the Tool Change position limit switch. The preset
time is established in the Machine Delays screen (F9/F7/F5).

Three modal and self-canceling M codes are used to determine the ram up position:

M54 Selects the Timed Up position.
M55 Selects Standard Ram Up (Default)
M56 Selects Tool Change Position

4.5.2 RAM DOWN LIMIT

Two machine-mounted sensors are used to determine when the ram has reached the
bottom of its stroke and needs to be reversed. One is a limit switch, which is adjusted to
detect when the punch has penetrated the material and entered the die assembly. The
second is an adjustable pressure sensor, which detects a pressure build up in the hydraulic
system when the tool contacts the material. This switch is normally used for louvering or
marking operations.

Two modal and self-canceling M codes are used to determine the Ram Down position:

M41 Selects the pressure switch.
M42 Selects the limit switch. (Default)

CNC Programming Manual



Page 31
4.6 REPOSITION GROUP (M51 M71)

These cycles call for the repositioning or relocating of the workclamps on the material. The
function is used when working on material longer than the working range of the X axis
and/or when work must take place within the safe zone area around the work clamps. The
reposition cycle has three phases.

1. Pre-Motion: The overhead material reposition clamps are lowered, clamping the material
to the table. After a configurable time delay the workclamps are opened.

2. Motion: The X axis is moved to the commanded re-grip position.

3. Post-Motion: The workclamps are closed and the reposition clamps are raised.

Two reposition functions exist. Physically the same results occur, however one keeps the X
axis position relative to the machine coordinate system and one will preset the X axis
position so that the position stays relative to the work piece coordinate system. Each
function is detailed below.

4.6.1 AUTOMATIC INCREMENTAL REPOSITION M51

If the CNC part program contains position data that is relative to a fixed coordinate system
on the work piece then reposition cycles should use the M51 function. Following the
reposition cycle the X axis position register is preset so that it contains the same value as at
the start of the reposition.


The general format of this call is:

N__ M51 X__

where:

N__ = Block Sequence Number

M51 = Automatic incremental reposition M code

X__ = Desired incremental reposition distance for the X axis

Example:

Program
X Axis Pos Register
at end of block
X Axis Machine Pos
X Axis Programming
Limits
CNC Programming Manual



Page 32
N10 G90 X50 Y20
N20 M51 X-40
N30 X80 M75
50.000
50.000
80.000
50.000
10.000
40.000
-3.000 60.000
37.000 100.000
37.000 100.000

where:

Block 10: Positions the machine to a safe area of the machine envelope where the
work clamps will not hit the reposition clamps during the reposition cycle.

Block 20: Commands the X axis to reposition an incremental distance of -40 inches,
resulting in a re-grip of the part at machine position X=10. The X axis position register
remains unchanged at X=50.

Block 30: Positions the material so that a punch occurs at X=80 with respect to the
work piece coordinate system.

4.6.2 STANDARD REPOSITION WORKCLAMPS M71

If the CNC part program contains position data that is relative to the machine coordinate
system then reposition cycles should use the M71 function. Following the reposition cycle
the X axis position register remains coincident with the machine position register.

The general format of this call is:

N__ M71 X/U__

where:

N__ = Block Sequence Number

M71 = Reposition M code

X/U__ = Desired X dimension for re-grip where X specifies an absolute position and
U specifies an incremental position.

Example1:

Program
X Axis Pos Register
at end of block
X Axis Machine Pos
X Axis Programming
Limits
N10 G90 X30 Y20
N20 M71 X20
30.000
20.000
30.000
20.000
-3.000 60.000
-3.000 60.000



CNC Programming Manual



Page 33
where:

Block 10: Positions the machine into a safe area of the machine envelope where the
work clamps will not hit the reposition clamps during the cycle.

Block 20: Commands the X axis to reposition to the absolute position of X=20 before
re-gripping the part. Note, in this example N20 M71 U-10 would give the same result.

Example2:

Program
X Axis Pos Register
at end of block
X Axis Machine Pos
X Axis Programming
Limits
N10 G90 X30 Y20
N20 M71 U20
30.000
50.000
30.000
50.000
-3.000 60.000
-3.000 60.000

where:

Block 10: Same as Example1.

Block 20: Commands the X axis to reposition an incremental distance of +20 inches,
resulting in a re-grip of the part at X=50.

Notes:

1. The M51 or M71 cycle will not cause a punch cycle.

2. It is the programmers responsibility to:

a. Insure that the machine is pre-positioned such that the reposition cycle will not
cause any machine damage.
b. Consider the effects of the reposition cycle on the work coordinates being
used.

3. No Y axis motion can be programmed in a block containing an M71.

CNC Programming Manual



Page 34
4.7 PUNCH CONTROL GROUP (M75 M85 M20)

This group of M codes determines whether a punch cycle occurs at the end of any
programmed traverse motion block. They include:

M75 - Punch Enable
M85 - Punch Disable
M20 Single Block No Punch

The M75/M85 codes are modal and self-canceling. Once programmed, an M75 will allow a
punch cycle to occur at the end of every NC programmed traverse motion block (unless an
M20 code was present). An M85 will disable ALL punching until an M75 occurs.

When an M75 is active, the punch cycle can be inhibited for a single block (such as a
reposition safe zone move or torch pilot hole position), by programming a single block
effective M20 code.


CNC Programming Manual



Page 35
4.8 MATERIAL CONTROL GROUP (M87 M97)

4.8.1 LOAD POSITION (M87)

This code will allow the axes to move to the programmed position (normally X-3 Y__), lower
cycle start, and turn on the PART CHANGE lamp on the machine hood panel. The ram is
raised to the tool change position and the punch cycle is inhibited.

The M87 is canceled by pressing the CYCLE START pushbutton.

4.8.2 MATERIAL CLAMP RELEASE (M97)

This code will allow the axes to move to the programmed position, lower cycle start and
open the material work clamps. The ram is raised to the tool change position and the punch
cycle is inhibited.

The M97 is canceled by pressing the CYCLE START pushbutton.


CNC Programming Manual



Page 36
4.9 SUB-PROGRAM GROUP (M98 M99)

You can use two types of subprograms in the AL CNC controller:

Internal subprograms (sometimes called pattern repeats)
External subprograms

An internal subprogram is a section of the CNC part program that uses it. It must be defined
at the beginning of a part program and is only callable from within that part program in
which it is defined. Internal subprograms can be nested.

An external subprogram can be any part program that resides on the AL CNC controller. It
will have its own program name and can be called by any other part program.

4.9.1 INTERNAL SUBPROGRAMS

Internal subprograms are groups of program blocks that are defined and called by the below
commands:

DFS, __ = Define subprogram start, this block signifies the start of the subprogram
blocks and assigns a numerical name to use when calling the subprogram
from the main part program.

DFE = Define subprogram end, this block signifies the end of the subprogram.

N__ M98P__(L__) = Subprogram call, where:

N__ = Block Sequence Number.

M98 = M Code for subprogram call.

P__ = Numerical name of internal subprogram to be called.

L__ = Optional repeat count. If L is not programmed a repeat count of 1 is
assumed. If L = 0 the subprogram is not called.

Example:

N10 G00 G90 G40 G70 M75
N20 DFS,1234 (start of subprogram definition)
N30 G91
N40 X-5 Y-2
N50 X5
N60 Y2
N70 X4
CNC Programming Manual



Page 37
N80 G04 F1
N90 G90
N100 DFE (end of subprogram definition)
N110 X50 Y20
N120 M98 P1234 L3 (call subprogram and execute 3 times)
N130 X0 Y0
N140 M30

Notes:

1. All internal subprograms must be defined at the start of the main program.
2. When a subprogram is executed control is returned to the main program at the
block following the M98 subprogram call.
3. Changes to modal data within a subprogram remains in effect when control
returns to the main program.
4. Internal subprograms can be nested so that one subprogram can call another.


4.9.2 EXTERNAL SUBPROGRAMS

External subprograms are separately defined programs that can be called by another
program using the command:

N__ M98O__(L__)

where:

N__ = Block Sequence Number.

M98 = M Code for subprogram call.

O__ = Name of external subprogram to be called. If alphanumeric program name is
used then quotation marks must be used.

L__ = Optional repeat count. If L is not programmed a repeat count of 1 is assumed.
If L = 0 the subprogram is not called.

The M99 return call is used to pass control back to the calling program. This is normally the
last block in the sub-program and has the format of:

N__ M99




Example:
CNC Programming Manual



Page 38

Main program:
N20 X30 Y20
N30 M98 O321 L2 (call external subprogram O321 and execute twice)
N40 M98 O"SUB1" (call external subprogram OSUB1 and execute once)
N50 M30

Subprogram O321:
N220 G91
N230 X-15 Y-15
N240 X-15 Y-15
N250 X15 Y15
N260 G90
N270 M99

Subprogram OSUB1:
N320 G91
N330 X-15 Y-15
N340 X15 Y15
N350 G90
N360 M99

Notes:

1. When a subprogram is executed control is returned to the main program at the
block following the M98 subprogram call.
2. External subprograms must exist in the same program folder directory as the
main program and always start with an O.
3. External subprograms should not contain M02 or M30, only the M99 return call.
4. An external subprogram cannot contain any internal subprograms, however it can
call internal subprograms defined in the main program.
5. Changes to modal data within a subprogram remains in effect when control
returns to the main program.
6. External subprograms can be nested so that one subprogram can call another.


CNC Programming Manual



Page 39
4.10 GOTO BLOCK

The GOTO command has the format:

N__GOTONxx

Where:

N__ = the program block number
xx = the desired block number to transfer control to


Example Program:

N001.....
N002.....
N003.
N004.....
N005.....
N006GOTON002
N007.....

In this example execution continues sequentially until block N006 is read, then execution
transfers back to block N002 and resumes sequential execution of blocks.

You might also like