Professional Documents
Culture Documents
Part Programming Using Fixed or Canned Cycles
Part Programming Using Fixed or Canned Cycles
Part Programming Using Fixed or Canned Cycles
cycles
To illustrate the use of these cycles we first consider
the action of drilling hole under program control. The
sequence for such operation is:
• Move spindle to gauge the height, turn spindle on.
• Move, in rapid, to the centre coordinate of the hole.
• Feed to required depth.
• Rapid out to gauge height ready for next move.
Part programming using fixed or canned
cycles (Contd.)
A part program segment for achieving this might be as follows.
Assume a hole to be drilled at coordinate position X100 Y100.
Gauge height to be at Z-50.
Required depth 5mm.
N050 G00 Z-50 M03 ..spindle to gauge height, rapid traverse, spindle on
N055 X100 Y100 ..rapid to hole coordinate position
N060 G01 Z-55 M08 ..feed to depth, coolant ON
N065 G00 Z-50 ..rapid out to gauge height
When programmed using a fixed drill cycle G81:
N050 G00 Z-50 M03 ..spindle to gauge ht., rapid, spindle on
N055 G81 X100 Y100 Z-55 M08 ..move to co-ordinate position,
drill to depth retract to gauge ht., rapid
Loops
In order to repeat a section of the part program a number of times it is
necessary to specify three pieces of information
The START of the loop.
The END of the loop.
The Number of REPEATS of the loop.
All three pieces of information are provided in a single block of
information like so
=N1ɸɸ/3
The = character marks the START of the loop
The N1ɸɸ denotes the block number where the loop is to END
/3 specifies the NUMBER of REPEATS(in this case 3).
Example 1
Drill six holes along a line at Y100, each at a spacing of30mm from
each other, starting from X100. Use G81.
N030 G00 X70 Y70 M03 …move, rapid, to X70 Y70, spindle on
N035 Z-50 M08 …spindle down to gauge ht. , coolant on
N040 G91 Y30 …set incremental co-ordinates, move Y30
=N050/6…repeat up to N050 six times
N050 G81 X30 Z-5 F400 …move along X30, drill Z-5 deep, retract
N055 G80 …cancel fixed cycle
N065 G90 Z0 M09 …retract spindle, absolute, coolant off
Subroutines or sub-program (Contd.)
To mill a square profile of 50mm*50mm, at a depth of 3mm, at various positions in
a flat plate component. Gauge height is at Z-50, which 2mm above the surface of
the component. A subroutine might be defined as follows.
#1 ..start of the subroutine number
N100 G01 Z-55 F400 ..feed to the required depth, absolute
N105 G91 X50 …set incremental, traverse 50mm in X+
N110 Y50 .. traverse 50mm in Y+
N115 X-50 .. traverse 50mm in X-
N120 Y-50 .. traverse 50mm in Y-, back to start position
N125 G90 ..set absolute
N130 G00 Z-50 ..retract spindle to gauge ht., rapid
$ ..end of subroutine definition.
Macros
Macro is defined in exactly the same way as the subroutine
In addition it is necessary to specify:
The PARAMETERS that may change, from call to call.
A means of PASSING true values into these parameters.
#1 ..start of macro number 1.
N100 G01 Z-55 F400..feed to required depth, absolute.
N105 G91 X* ..set incremental, traverse X+ value to be supplied
N110 Y* .. traverse Y+ value to be supplied
N115 X* … traverse X- value to be supplied
N120 Y* .. traverse Y- value to be supplied, back to start
N125 G91 ..set absolute
N130 G00 Z-50 ..retract spindle to gauge ht., rapid
$ ..end of macro definition