You are on page 1of 112

M3 Programming

5-69
5.5.6 T codes and arguments for each machining pattern

Machining
pattern
Specified axis
control group and tool
T code Argument
4 digits 2 digits Q1 H X Z Y A W K3 E


Alternate
machining
(G610)
$1 Tool on gang tool
post
G611 \ \ \ \ \ \ \ – – \ \
G612 \ – – – \ – – \ – – –
Tool on turret tool
post
G611 \ – – – \ – – \ – – –
G612 \ \ – – \ – \ – – – \
$3 Tool on back 3-spindle tool
post
\ \ \ – \ \ – – \ – \
Back spindle \ – – – – – – – – – –


Two-saddle
machining
(G620)
$1 Tool on gang tool
post
G621 \ \ \ \ \ \ \ – – – \
G622 \ \ \ \ \ \ \ – – – –
$2 Tool on turret tool
post
G621 \ \ – – \ – – – – – –
G622 \ \ – – \ – \ – – – \
$3 Tool on back 3-spindle tool
post
\ \ \ – \ \ – – \ – \
Back spindle \ – – – – – – – – – –


Front/back
parallel
machining
(G630)
$1 Tool on gang tool post \ \ \ \ \ \ \ – – – \
$2 Tool on turret tool
post
G632 \ \ – – \ – \ – – – \
$3 Tool on turret tool
post
G633 \ – – – \ – – – – – –
Tool on back
3-spindle tool post
G633 \ \ \ – \ \ – – \ – \
Back spindle G633 \ – – – – – – – – – –
Front/back
parallel
machining
(G635)
$1 Tool on gang tool post \ \ \ \ \ \ \ – – – \
$2 Tool on turret tool
post
G637 \ \ – – \ – \ – – – \
Tool on back
3-spindle tool post
G638 \ \ \ – \ \ – – \ – \
Back spindle G638 \ – – – – – – – – – –
Tool on turret tool
post
G638 \ – – – \ – – – – – –
Simultaneous
3-lines
machining
(G640)
$1 Tool on gang tool post

\ \ \ \ \ \ \ – – – \
$2 Tool on turret tool post

\ \ – – \ – \ – – – –
Pick-off (G650) $1, $2 Depending on the previous machining pattern
$3 Back spindle

\ – – – – – – – – – –
\: Specification permitted –: Specification not permitted

Notes

- You can specify only the T codes and arguments shown in the above table.
- For the machining patterns, see <Section 5.7 Special G Codes 1 and 2>.

Field Code Changed
M3 Programming
5-70
5.6 G Functions (G Codes)

A G function is expressed with G followed by a 2-digit number. It is also called a preparation function.
G functions are provided for the NC unit to control axes (X1, Z1, Y1, X2, Z2, X3, and Z3).

Command format

G

Examples: G00 Rapid feed positioning
G01 Linear interpolation

5.6.1 G code list

Once the G functions of groups A, D, F, and H in the table below are specified, they are enabled until
another G function of the same group is specified. They are called modal G codes. The G functions of
group C are enabled only when specified.

G code list

G code Function Group
*G00 Rapid feed positioning A
G01 Linear interpolation A
G02 Circular interpolation (clockwise) A
G03 Circular interpolation (counterclockwise) A
G04 Dwell C
G28 Reference point return C
G32 Single Point thread cutting A
G35 Arc threading (clockwise) (optional) A
T36 Arc threading (counterclockwise) (optional) A
*G40 Tool nose radius compensation cancel J
G41 Tool nose radius compensation left ON J
G42 Tool nose radius compensation right ON J
*G43 Back spindle feed per rotation OFF K
G44 Back spindle feed per rotation ON K
G50 Coordinate system setting/Main spindle speed clamp
setting
C
G76 Multiple repetitive threading cycle H
G79 Face drilling cycle (optional) H
G80 Face synchronized cross tapping mode OFF (optional) H
G84 Face cross tapping mode ON (optional) H
G88 Synchronized cross tapping mode ON (optional) H
G90 Longitudinal turning canned cycle H
G92 Thread cutting canned cycle H
G96 Constant surface speed control ON F
*G97 Constant surface speed control OFF F
G98 Millimeters per minute feed D
*G99 Millimeters per revolution feed D
M3 Programming
5-71
Notes

- You can specify G codes of different groups together in the same block.
- You cannot specify a G code and T together in the same block.
- You cannot execute a 3-digit G code in the MDI mode.
- Single block operation is disabled while G32, G35, G36, G76, G79, G84, G88, G90, or G92 is enabled.
If any of the G codes is called during single block operation, the operation continues until the G code is
canceled. If the axis control group $1, $2, or $3 enters such a state, all the other axis control groups
operate continuously.
- The asterisk * prefixed to G codes indicate the specification in the power-on state.

M3 Programming
5-72
5.6.2 Back spindle feed control (G43, G44)

The feed per rotation command can be specified for the back spindle.

Command format

G43 Back spindle feed per rotation OFF
G44 Back spindle feed per rotation ON

The feed rate of feed per rotation is generally determined by the main spindle speed. When the G44 is
specified for machining a workpiece at the back spindle, feed per rotation is performed at the back spindle
speed in the specified axis control group.
In general, you do not have to specify G43 and G44. When a machining pattern is switched, the
machining pattern command automatically acts as the back spindle control command.
The following table shows back spindle control for each machining pattern:

Machining pattern $1 $2 $3
Machining pattern cancel (G600) OFF OFF ON
Alternate machining (G610) OFF OFF ON
Two-saddle machining (G620) OFF OFF ON
Front/back parallel machining (G630) OFF ON ON
Front/back parallel machining (G635) OFF ON ON
Simultaneous 3-lines machining
(G640)
OFF OFF ON
Pick-off (G650)
Depending on the
previous machining
pattern
Depending on the
previous machining
pattern
Depending on the
previous machining
pattern

M3 Programming
5-73
5.7 Special G Codes 1 and 2

The commands of G codes 1 and 2 are specific to this machine. They enable machining that extends
over multiple axis control groups.
You can simplify programs (e.g., decrease of operating time) and improve productivity by using the
commands effectively.

Command format

G

5.7.1 List of special G codes 1

G code Function
G231 Pick-off cancel
G600 Machining pattern cancel
G610 Alternate machining
G611 Alternate machining –Gang tool post select
G612 Alternate machining –Turret select
G620 Two-saddle machining
G621 Two-saddle machining – C axis at $1 side enabled
G622 Two-saddle machining – C axis at $2 side enabled
G630 Front/back parallel machining
G632 Front/back parallel machining - Back turret select
G633 Front/back parallel machining - Back 3-SP. select
G635 Front/back parallel machining
G637 Front/back parallel machining – Back turret select
G638 Front/back parallel machining – Back 3-SP.select
G640 Simultaneous 3-lines machining
G650 Pick-off, Center-support
G999 Last program execution

Axis control groups

Specify the G commands except G611, G612, G621, G622, G632, G633, G635 and G638 for all axis
control groups $1, $2, and $3.
The program automatically enters $1, $2, and $3 in the queuing state in order to synchronize them with
each other, and then it proceeds to the next operation.

Notes

- You cannot use special G codes 1 with M, S, or T codes in the same block.
- You cannot execute special G codes 1 in the MDI mode.

M3 Programming
5-74
5.7.2 List of special G codes 2

G code Function
G113 Spindle synchronization control cancel
G114.1 Spindle synchronization control (optional)
G114.2 Spindle synchronization control for polygon machining (optional)
G114.3 Spindle synchronization control for hobbing (optional)
G126 Superimposition of an arbitrary pair of axes
G140 Arbitrary axis change
G201 Front product separation [$1 only]
G500 Coordinate system shift OFF
G501 Coordinate system shift ON
G813 Spindle synchronization control cancel
G814 Spindle synchronization control (optional)
G899 Non-conform material phase adjustment [$1 only]

Axis control groups

Specify the G commands for only axis control group $1, $2, or $3 that needs them.

Notes

- You cannot use special G codes 2 with M, S, or T codes in the same block.
- You cannot execute G201 in the MDI mode.
- G113 and G813 have the same function.

M3 Programming
5-75
5.7.3 Last program execution (G999)

This command must be specified in the last portion (end process) of each axis control group ($1, $2, $3)
program that includes the last program.
In general, the last program is executed to perform back machining for workpieces with which front
machining is completed. The back machining is performed in the last cycle while the machine is in the
stopped state (e.g., 1-cycle stop or product counting by the counter).
Specify the G999 command for each axis control group to automatically enter the axis control groups in
the queuing state. The last program between G999 and N999 is executed in the 1-cycle or 1-block
operation mode.
Be sure to specify the N999 command at the end of the last program contents of each axis control group.
To finish program creation, specify three commands following N999 at the end of the end process. The
commands must be specified in the sequence of M02, M99 and then %.

Command format

G999 Last program execution

Axis control groups

Specify this command for all the axis control groups $1, $2, and $3.

Program sample

$1 $2 $3
G610 G610 G610

M56
G999 ............................ Last program G999 ............................ Last program G999 ............................ Last program
: : :
: Contents of the last program : Contents of the last program : Contents of the last program
: : :
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

Notes

- Cancel the coordinate system shift command and compensation command before executing the G999
command.
- Specify the machining pattern command to execute the last program after the G999 command.
- See <Section 7.5.2 Last part function>.

M3 Programming
5-76
5.7.4 Non-conform material phase adjustment (G899)

A phase shift occurs between the spindle and guide bushing and between the main spindle and back
spindle when machining non-conform materials (hexagonal material, etc). Use this command to store
the values of phase shifts in the memory of the NC unit.
Be sure to specify this command when mounting the non-conform material chuck and guide bushing.
The command is for adjustment and is not written in the program. It is used for the MDI operation.

Command format

G899 R1 K1 C1

Axis control groups

Specify this command for $1. You can execute the command in only the MDI mode.

Argument

- R1: Specify this argument to store the values of phase shifts (back spindle included) in the memory of
the NC unit. The back spindle rotates when the G899 command is executed.
- K1: This argument does not execute the back chuck to close.
- C1: Specify this argument to phase the front C axis (C1 axis) and the back C axis (C2 axis) with each
other. The position of the front C1 axis at 0
o
matches the position of the back C axis at 0
o
after
pick-off operation. The C1 argument must be specified with the R1 argument.

Procedure

Adjusting the phase between the main spindle and guide bushing

1. Put a material (non-conform material) through the main spindle and guide bushing.
2. Execute G899 in the MDI mode. The main spindle chucks the material and adjusts the phase.

Adjusting the phase between the main spindle and back spindle
(Phase adjustment between the front C axis and the back C axis)

1. Put a material (non-conform material) through the main spindle, guide bushing, and back spindle.
2. Execute G899R1(C1) in the MDI mode. The main and back spindles chuck the material and adjust
the phase.

M3 Programming
5-77
Notes

- Specify the R1 argument whenever using the K1 argument. They must be specified in the format of
G899 R1 K1.
- In a material exchange program, specify the M26 (G/B phase adjustment) command before the
command to insert a material into the guide bushing.
- Specify the G814 R0, G114.1 H1 D0-2 R0 (spindle synchronization control) command before the
command to chuck the material with the main and back spindles. This will cause the phase difference
stored by G899 to be automatically added.

M3 Programming
5-78
5.7.5 Spindle synchronization control (G114.1, G814, G113, and G813) — optional

These commands control the speed and phase of a spindle in synchronous with another spindle.
Use a spindle synchronization control command when you need to synchronize two spindles with each
other. For example, use the command in the following cases: the back spindle re-chucks the workpiece
that is now chucked by the main spindle, a workpiece is machined chucked by both the main spindle and
the back spindle, and a polygonal workpiece is re-chucked by adjusting the phases of the two spindles.
The G814 command defines the main spindle (S1) as the reference spindle and the back spindle (S2) as
the synchronized spindle, and synchronizes the two spindles with each other.
The G114.1 command specifies a reference spindle and synchronized spindle, and synchronizes the two
spindles with each other.
The G113 and G813 command cancels the synchronization of two spindles that was specified by a spindle
synchronization command.

Command format

G814 R Spindle synchronization
G114.1 H1 D–2 R Spindle synchronization
G813 Spindle synchronization cancel
G113 Spindle synchronization cancel

Argument

- H±: Specify the reference spindle and the direction in which the spindle rotates. When (+)1 is
specified, the main spindle rotates forward.
- D±: Specify the spindle to be synchronized and the direction in which the spindle rotates. When
– 2 is specified, the back spindle rotates backward.
- R : Specify the amount (angle) of the phase shift between synchronous spindles. The value of
R argument is added to the value that is stored by the non-conform material shift adjustment
command (G899). The R argument is valid for a clockwise shift viewed from the main
spindle. If the R argument is not specified, the value that is stored by the non-conform
material shift adjustment command (G899) is used.
Setting range: 0 to 359.999°

Notes

No phase adjustment is made if the R argument is omitted for G114.1 H1 D-2.

M3 Programming
5-79
5.7.6 Front product separation (G201)

Use this command to collect a workpiece chucked by the main spindle.
The workpiece is collected by the workpiece receiver mounted on the turret tool post, and then it is
transferred into the product receiver box.

CAUTION

For M2032 model, be sure to specify the C1 argument in the G201 command. If the C1
argument is not specified, the system does not collect workpieces.

Command format

G201 X F A T H U C1 Z R1 Front product separation

Axis control groups

Specify this command for $1.

Argument

- X : Specify the X1 axis work coordinate as the end position in the cut-off process.

- F : Specify the X1 axis feed rate in the cut-off process.

- A : Specify the X1 axis position for end-position queuing. When the X1 axis reaches the work
coordinate specified by the A argument during cut-off machining, positioning of the
workpiece receiver of the turret tool post is completed (X2 axis product collection position).
The end-position queuing is not performed unless the A argument is specified.

- T : Specify the tool number for turning the workpiece receiver. The tool number of the tool
opposite to (180
o
apart) the tool with the workpiece receiver mounted must be specified.

- H : Specify a low speed at which the turret tool post turns. If the H argument is not specified,
the turret tool post turns at the default speed 4320 (rotation every 5 seconds).
To rotate it every 60 seconds: Specify H360 = (60 ÷ 60 seconds) × 360.
To rotate it every 5 seconds: Specify H4320 = (60 ÷ 5 seconds) × 360.

- U : Specify dwell time after the workpiece receiver is positioned.
If the U argument is not specified or "0" is specified, the turret tool post (X2 axis) starts
moving backward after the X1 axis reaches to the position specified by the X argument.

M3 Programming
5-80
- C1: Set the position of Z2 axis to retract point (Z2-axis machine coordinate: 4.0 mm) when
workpiece is to be collected in product chute. For M2032 model, be sure to specify the C1
argument. This argument is disabled in the machine of M1216 model.
When this argument is not specified, the Z2 axis is positioned at the forward end position.

- Z : Specify the position of Z2 axis in relative to the current position when workpiece is to be
collected in product chute. When this argument is not specified, the Z2 axis is positioned at
the forward end position. The direction of Z argument (signs) is determined as minus (-) to
the left side and plus (+) to the right side when viewed from the front of the machine.
When both Z and C1 arguments are specified at the same time, Z argument precedes C1
argument.
Note: Specifying the range between Z2=0.0 and Z2=4.0 of machine coordinates will
cause an alarm because the turret cannot rotate within this range.

- R1: Specify this argument to collect the workpiece, which is cut off on the front side, into the
workpiece receiver without pick-off operation. Use the R1 argument in the following
conditions: the setting switch $2$3 or $3 cycle start is disabled in the Set SW screen, the
back machining specified in the program is canceled, and only front machining is performed.
The R1 argument is useful when the diameter of the workpiece to be chucked by the back
spindle is not corrected or when you want to see only front machining. Do not specify the
R1 argument during ordinary program operation with "$1 $2 $3 cycle start enabled".
Specify the R1 argument in the G650 mode.
M3 Programming
5-81
Program sample

Ordinary product collection
$1 $2 $3
:
:
G610 G610 G610
(G611)
T0100
T2000
G00 X21.0 Z25.0
G201 X-3.0 F0.03
A1.0 T2500 U1.0 C1
· · · · · · · · · · · · · · · · · · · · · · Production collection

:
:

Product collection with the $2 or $3 program stopped ($2 or $3 cycle start disabled)
$1 $2 $3
: : :
G610 G610 G610
: :
T2000 · · · Selection of workpiece separator :
G630 G630 G630
: G632 G632
: :
: T2000
: G00 X20.0 Z-10.0
: M16
: M72
: M10
: G04 U1.0
M3 S1=3400 M11
T0100 M73
G00 X21.0 Z50.0 M33 T2500
M24 S2=3400
G650 G650 G650
G00 Z-2.0
G98 G01 Z35.0 F5000
M15
!3L1 !1L1
M73
:
G201 X-3.0 F0.03 A1.0 T2500 R1 U1.0
C1

· · · · · · · · · · · · · · · · · · · · · · · · Production collection
:

M3 Programming
5-82
Operation sample


(1) The workpiece receiver
is selected.
(2) When the X1 axis reaches
the work coordinate
specified by the A argument
during cut-off machining, the
workpiece receiver has
moved to the product
collection position.
Cut-off
machining
(4) The workpiece receiver
moves to the return
position of the tool on the
turret tool post.
(5) The workpiece
receiver turns toward
the product receiver
box.

(3) Cut-off



Comment [ER1]: word
M3 Programming
5-83
Notes

- You cannot use the G201 command for arc cut-off machining. To perform arc cut-off machining, use
the M32 and M33 commands. See <Section 5.11.4 Positioning of the workpiece receiver for
front/back products (M32)> or <Section 5.11.5 Front and back product separation (M33)>.
- You can also use the command explained in <Section 5.11.5 Front and back product separation
(M33)> to collect cut-off workpieces with the workpiece receiver mounted on the turret tool post.
- To collect workpieces chucked by the back spindle, see <Section 5.11.5 Front and back product
separation (M33)> or <Section 5.11.6 Sequential operation of the workpiece unloading device (M34)
— optionalSequential operation of the workpiece unloading device (M34) — optionalSequential
operation of the workpiece unloading device (M34) — optionalSequential operation of the workpiece
unloading device (M34) — optionalSequential operation of the workpiece unloading device (M34) —
optional>.
- You can specify the G201 R1 argument in the G650 mode. An alarm is issued if the argument is
specified in a different mode.
- Be sure to delete the command G201 with R1 argument of $1 from the program after workpieces were
collected by $1 with the G201 R1 argument specified. An alarm is issued if the continuous automatic
operation is performed while the command G201 with R1 argument is still specified under three axis
control groups cycle start are enabled.
- If the override is changed or operation is performed with the handle in program check mode when the
G201 command is executed, the end position specified by the A argument may not match the operation.
- Arguments C1 or Z is specified in G201, the Z2 axis returns to the forward end position after products
are collected.

M3 Programming
5-84
5.7.7 Pick-off cancel (G231)

During cut-off machining, this command cancels the pick-off mode specified by the G650 pick-off
command. Use the G231 command to move the turret tool post (Z2 axis) and the back headstock (Z3
axis) to the fixed points for the next process (machining pattern) when the X1 (X2) axis in the cut-off
process is at an arbitrary position.

Command format

G231 X F A W(1,2,3) I Pick-off cancel

Axis control groups

Specify this command for $1.

Argument

- X : Specify the X1 (X2) axis work coordinate as the end position in the cut-off process.
- F : Specify the X1 (X2) axis feed rate in the cut-off process.
- A : Specify the X1 axis position for start-position queuing. When the X1 axis reaches the work
coordinate specified by the A argument during cut-off machining, the turret tool post (Z2
axis) and the back headstock (Z3 axis) start moving. If the cut-off machining is performed
with a tool on the turret tool post in the G612 mode of the G610 mode, the X2 axis is
specified for start-position queuing.
- W1: Specify this argument to move the Z2 and Z3 axes to the fixed points of the G610 mode.
The turret tool post (Z2 axis) moves to the forward end position at the rapid feed rate. The
back headstock (Z3 axis) moves to the backward end position at the rapid feed rate. The
turret tool post does not move in the G612 mode of the G610 mode or unless the X2 axis is
at the return position of the turret tool post.
- W2: Specify this argument to move the Z2 and Z3 axes to the fixed points of the G632 and G637
mode. The turret tool post (Z2 axis) moves to the end face of the workpiece on the back
side at the rapid feed rate. The back headstock (Z3 axis) moves to the zero point for back
machining at the rapid feed rate. The turret tool post does not move in the G612 mode of
the G610 mode or unless the X2 axis is at the return position of the turret tool post.
- W3: Specify this argument to move the Z3 axis to the fixed point in the G633 and G638 mode.
The back headstock (Z3 axis) moves to the backward end position at the rapid feed rate.
- I The I argument is valid only when the W argument is 2 (fixed point in the G632 and G637
mode). Specify the amount of shift from the zero point for back machining with the Z3 axis.
(Specify the I argument when the Z2 axis stroke is too short for drilling with a tool on the
turret tool post for back machining. The Z2 and Z3 axes shift the distance specified by the I
argument.)

M3 Programming
5-85
Program sample

When switching to the G610 mode after pick-off operation:
$1 $2 $3
G610 G610 G610
: :
G99 M03 S1=1500 :
T0100 :
G00 X13.0 Z85.0 T01 T4000
G650 ............................................. Pick-off G650 ......................... Pick-off G650 ......................... Pick-off
G00 Z–2.0
M24 S2=1500
G98 G01 Z50.0 F1000
M15
!3L1 !1L1
G231 X–3.0 F0.03 A–1.0
W1 ...................................... Pick-off cancel
(When the X1 axis reaches the work
coordinate – 1.0, the turret tool post moves
to the forward end position, and the back
headstock moves to the backward end
position.)

(G610) (G610) (G610)
: : :

When switching to the G630 (G632) mode after pick-off operation:
$1 $2 $3
G630 G630 G630
: G632 G632 I30.0
G99 M03 S1=1500 :
T0100 :
G00 X13.0 Z85.0 T4000
G650 ............................................. Pick-off G650 ......................... Pick-off G650 ......................... Pick-off
M33 T2500 G00 Z–2.0
M24 S2=1500
G98 G01 Z50.0 F1000
M15
!3L1 !1L1
G231 X–3.0 F0.03 A–1.0 W2 I30.0
........................................... Pick-off cancel
(When the X1 axis reaches the work
coordinate –1.0, the turret tool post moves
to the end face of the workpiece on the back
side, and the back headstock moves to the
zero point for back machining.)

(G630) (G630) (G630)
: (G632) (G632 I30.0)
: :

M3 Programming
5-86
Notes

- The superimposition of the Z1 and Z3 axes is canceled when the G231 command is executed.
- To maintain the superimposition of the Z1 and Z2 axes, execute the G231 command after executing the
G650 command in the G620 mode.
- The turret tool post (Z2 axis) does not move in the following cases:
÷ The G650 has been executed in the G612 (turret select) mode of the G610 modes.
÷ The X2 axis is not at the return position of the turret tool post.
- The turret tool post (Z2 axis) does not move if the G231 command is executed during front and back
product separation (M33) by the workpiece receiver mounted on the turret tool post or during selection
of a tool on the turret tool post, for $2 in the G650 mode.
- When a value greater than 0 is specified for the A argument, an alarm is issued if 0 is specified for the
"Tubing Bar Stock I.D." in the machining data.
- The G231 command does not have an argument for return to the fixed point in the G620 mode.
Specify the W3 argument to move the Z3 axis backward.
- The G231 does not permit arc cut-off machining.

M3 Programming
5-87
5.8 M Functions (M Codes)

5.8.1 M code list

M code Function Remarks
M00 Program Stop Automatic operation is stopped.
M01 Optional Stop Automatic operation is stopped when the switch is turned
ON.
M02* Cycle Stop 1-cycle stop point
M03 Main Spindle Forward Rotation The main spindle starts rotating forward.
M04 Main Spindle Reverse Rotation The main spindle starts rotating backward.
M05 Main Spindle Stop The main spindle stops rotating.
M06* Main Spindle Chuck Close The main spindle chuck closes.
M07* Main Spindle Chuck Open The main spindle chuck opens.
M08 Enable Bar Stock Exchange Program The workpiece replacement program starts.
M09 Bar Stock Exchange Program Complete The workpiece replacement program terminates.
M10* Knock-Out Advance The knock-out axis of the back spindle moves forward.
M11* Knock-Out Retract The knock-out axis of the back spindle moves backward.
M15* Back Spindle Chuck Close The back spindle chuck closes.
M16* Back Spindle Chuck Open The back spindle chuck opens.
M18* Enable Main Spindle C-Axis Sequential operation of spindle C axis ON
(optional to M1216)
M20 Main Spindle Index and C-Axis Release The main spindle hold Off
M23 Back Spindle Forward Rotation The back spindle starts rotating forward.
M24 Back Spindle Reverse Rotation The back spindle starts rotating backward.
M25 Back Spindle Stop The back spindle stops rotating.
M26 Execute Guide Bushing Phasing The phases of the spindle and guide bushing are aligned.
M28* Main Spindle Index Sequential operation of main spindle indexing
M31 Workpiece Conveyor On The workpiece conveyor is turned ON. (Optional)
M32* Front and Back Basket Positioning The workpiece separator is positioned to collect products
from the main/back spindle. (Turret)
M33* Front and Back Product Separation
(Turret)
Products are collected from the main/back spindle. (Turret)
M34* Sequential operation for unloading
workpieces
Sequential operation for unloading workpieces (Optional)
M35* Product Unloading Movement Command The workpiece unloading device is moved to unload
products from the machine.
M36 Rotary Guide Bushing Torque Lower Limit
L Selection
The guide bushing torque is set to 0%.
M37 Rotary Guide Bushing Torque Limit Off The guide bushing torque is set to 100%.
M38 Bar Loader Torque Off, Synchronization
Control On
Synchronization of the Z1 axis and bar loader ON (optional)
M39 Bar Loader Torque On, Synchronization
Control Off
Synchronization of the Z1 axis and bar loader OFF
(optional)
M40* Turret Advance (Z2 axis) The turret tool post moves to the main spindle side.
M41* Turret Retract (Z2 axis) The turret tool post moves to the back spindle side.
M46 Bar Loader Torque 0
M48 Enable Back Spindle C-Axis Sequential operation of back spindle C axis ON (optional)
M50 Back Spindle Pick-Off Failure Detection Rotate the spindle at a low speed after cut-off machining,
and enter M50.
M51* Tool Breakage Detection On A cut-off tool break is detected. (Optional)
M52 Coolant On Coolant starts discharging.
M53 Coolant Off Coolant stops discharging.
M54 Bar Loader Torque Off The bar loader feed is stopped. (Optional)
M55* Bar Loader Start Workpiece replacement is started. (Optional)

M3 Programming
5-88
M code Function Remarks
M56 Products Count Products are counted.
M57 Cycle Stop (Sub Program) 1-cycle stop point (for subprograms)
M61 to
M69
External M Code Use the codes to add optional functions.
M72 Back Spindle Air Blow On The back spindle air blower is turned ON.
M73 Back Spindle Air Blow Off The back spindle air blower is turned OFF.
M75 Back Spindle Torque Upper Limit H
Selection
The back spindle torque is set to 50%.
M76* Back 3-spindle tool post interference check
disabled
The function to check for interference with a tool (T41) on
the back 3-spindle tool post is disabled.
M77 Waiting for Completion of Spindle
Synchronization
The queuing state is placed until the main and back spindles
are synchronized.
M78 Back Spindle Indexing Sequential operation of back spindle indexing (optional)
M79 Back Spindle Indexing Cancel. Back
Spindle C-Axis Cancel
Back spindle hold OFF (optional)
M80 Gang Tool Spindle Forward Rotation The tool spindle of the gang tool post starts rotating forward.
M81 Gang Tool Spindle Reverse Rotation The tool spindle of the gang tool post starts rotating
backward.
M82 Gang Tool Spindle Stop The tool spindle of the gang tool post stops rotating.
M83 Turret Tool Spindle Forward Rotation The tool spindle of the turret tool post starts rotating forward.
M84 Turret Tool Spindle Reverse Rotation The tool spindle of the turret tool post starts rotating
backward.
M85 Turret Tool Spindle Stop The tool spindle of the turret tool post stops rotating.
M86 Cutting start interlock ON The cutting start interlock is enabled.
M87 Cutting start interlock OFF The cutting start interlock is disabled.
M88* Interference Check Disabled The interference check function is disabled.
M89* Interference Check Enabled The interference check function is enabled.
M92 Error Detect On Error detection ON (Use M92 when edge precision is
required.)
M93 Error Detect Off Error detection OFF
M94 Back Spindle Speed Fluctuation Detection
On
The back spindle speed change detection function is enabled.
M95 Back Spindle Speed Fluctuation Detection
Off
The back spindle speed change detection function is
disabled.
M96 Main Spindle Speed Fluctuation Detection
On
The main spindle speed change detection function is
enabled.
M97 Main Spindle Speed Fluctuation Detection
Off
The main spindle speed change detection function is
disabled.
M98 Sub Program Subprograms are called.
M99 Return to Main Program Be sure to specify M99 at the end of the main program and
subprograms.
M100 Grip Bar Stock The bar loader clamps the workpiece. (optional)
M101 Release Bar Stock The bar loader releases the workpiece. (optional)
M102 Release Bar Stock Quickly The bar loader releases the workpiece quickly. (optional)
M103 Release Bar Stock, Slide Channel Forward The bar loader releases the workpiece, and the rail moves
forward. (optional)
M104 Slide Channel Forward The bar loader rail moves forward. (optional)
M105 Slide Channel Back The bar loader rail moves backward. (optional)
M106 Stabilizer Close The bar loader support closes. (optional)
M107 Stabilizer Open The bar loader support opens. (optional)
M108 Master Measure Start Automatic measurement (optional)
M109 Work Measure Start Automatic measurement (optional)

M3 Programming
5-89
M code Function Remarks
M110 Work hand air blow ON (optional)
M111 Work hand air blow OFF (optional)
M112 Input G/B Phase Data In general, the phase is automatically controlled by G999.
M113 Sequential operation for long workpiece
device
Performs sequential operation for long workpiece device.
(Optional in M12 and M16)
M114 Automatic Measure Sensor Centering Automatic measurement (optional)
M115 Centering is Completed Automatic measurement (optional)
M116 Work Hand Close U33J (optional)
M117 Work Hand Open U33J (optional)
M118 Measuring Jaw Close Automatic measurement (optional)
M119 Measuring Jaw Open Automatic measurement (optional)
M120 Back Spindle Phase Memory In general, the phase is automatically controlled by G999.
M123 Back Spindle Torque Lower Limit L
Selection
The back spindle torque is set to 25%.
M124 Back Spindle Torque Limit Off The back spindle torque is set to 100%.
M125 NC Reset & Rewind Used in macro (not used in ordinary operation)
M126 Non-Conditional Optional Stop Used in macro (not used in ordinary operation)
M127 Request for Recalculation Used in macro (not used in ordinary operation)
M128 Back Tool Spindle Forward Rotation The spindle of the back tools starts rotating forward.
(optional)
M129 Back Tool Spindle Reverse Rotation The spindle of the back tools starts rotating backward.
(optional)
M130 Back Tool Spindle Stop The spindle of the back tools stops rotating. (optional)
M136 Additional coolant pump ON (optional)
M137 Additional coolant pump OFF (optional)
M138 Additional coolant valve ON (optional)
M139 Additional coolant valve OFF (optional)
M142 Main spindle C axis holdup ON
M143 Main spindle C axis holdup OFF
M144 Back spindle C axis holdup ON
M145 Back spindle C axis holdup OFF
M147* Turret tool post retraction (X2 axis) The turret tool post moves to the return position.
M151* Gang tool post retraction (X1 axis) The gang tool post moves to the return position.
M154 R.G.B. belt breakage detection Belt breakage of the rotary guide bushing is detected.
(optional)
M155* Sequential operation of bar stock exchange Materials are changed sequentially.
M160 S1 cutting start interlock ON
M161 S1 cutting start interlock OFF
M162 S2 cutting start interlock ON
M163 S2 cutting start interlock OFF
M164 S3 cutting start interlock ON
M165 S3 cutting start interlock OFF
M166 S4 cutting start interlock ON
M167 S4 cutting start interlock OFF
M168 S6 cutting start interlock ON
M169 S6 cutting start interlock OFF
M171* Back spindle moves backward. The back headstock moves to the return position.
Notes

- The M codes marked an asterisk (*) used macros.
- Specify these macro M codes alone. Do not specify these codes along with any other code in the same
block.
- The above M codes include options. For the options, see <Chapter 3 Device Specifications>.

M3 Programming
5-90
5.8.2 Cutting start interlock enabled/disabled (M86, M87, and M160-M169)

The cutting start interlocks are automatically turned ON/OFF when the machining pattern is changed. In
general, you do not have to turn ON/OFF the cutting start interlocks by using the M codes.

Command format

M86 Cutting start interlock enabled
(The cutting start interlock of a specified axis control group is set back to original.)
M87 Cutting start interlock disabled
(All the cutting start interlocks of a specified axis control group are disabled.)
M160 S1 cutting start interlock enabled (Main spindle)
M161 S1 cutting start interlock disabled (Main spindle)
M162 S2 cutting start interlock enabled (Back spindle)
M163 S2 cutting start interlock disabled (Back spindle)
M164 S3 cutting start interlock enabled (Tool spindle of gang tool spindle)
M165 S3 cutting start interlock disabled (Tool spindle of gang tool spindle)
M166 S4 cutting start interlock enabled (Tool spindle of turret tool spindle)
M167 S4 cutting start interlock disabled (Tool spindle of turret tool spindle)
M168 S6 cutting start interlock enabled (Tool spindle of back 3-spindle tool post)
M169 S6 cutting start interlock disabled (Tool spindle of back 3-spindle tool post)

Relationship between the machining patterns and cutting start interlocks:
Machining pattern S1 S2 S3 S4 S6
$1 $2 $3 $1 $2 $3 $1 $2 $3 $1 $2 $3 $1 $2 $3
Machining pattern cancel (G600) \ – – – – \ \ – – – – – – – \
Alternate machining (G610) \ – – – – \ \ – – – – – – – \
Two-saddle machining (G620) \ \ – – – \ \ – – – \ – – – \
Front/back parallel
machining (G630)
G632 \ – – – \ – \ – – – \ – – – –
G633 \ – – – – \ \ – – – – – – – \
Front /back parallel
machining (G635)
G637 \ – – – \ – \ – – – \ – – – –
G638 \ – – – \ – \ – – – – – – – \
Simultaneous 3-lines machining
(G640)
\ \ – – – \ \ – – – \ \ – – \
Pick-off, center support (G650) Depending on the previous machining pattern
\: Cutting start interlock enabled


Note

S6 (tool spindle of the back 3-spindle tool post) is optional.

M3 Programming
5-91
5.8.3 Gang tool post retraction (M151)

The M151 command moves the gang tool post (X1 axis) to the return position.

Command format

M151

Axis control groups

$1, $2, $3

Program sample

$1
G600
T0200
:
M151 ...................................... The gang tool post retraction
:

Note

The gang tool post X1 axis cannot be specified after the M151 command is executed. To specify the X1
axis again, specify the machining pattern.

M3 Programming
5-92
5.8.4 Turret tool post retraction (M147)

The M147 command moves the turret tool post (X2 axis) to the return position.

Command format

M147

Axis control groups

$1, $2, $3

Program sample

$1
G630
G632
T2100
:
M147 ....................................... The turret tool post retracts.
:

Note

The turret tool post X2 axis cannot be specified after the M147 command is executed. To specify the X2
axis again, specify the machining pattern.


M3 Programming
5-93
5.8.5 Back headstock retraction (M171)

The M171 command moves the back headstock (Z3 axis) to the return position.

Command format

M171

Axis control groups

$1, $2, $3

Program sample

$1
:
T4100
G00 Z-1.0 0 T01
G01 Z3.0 F
M171 ...................................................... The back headstock retracts.
:

Note

The back headstock Z3 axis cannot be specified after the M171 command is executed. To specify the Z3
axis again, specify the machining pattern.

M3 Programming
5-94
5.8.6 The turret tool post advance and retract (M40 and M41)

When the command to move the turret tool post forward (M40) is specified, the turret tool post moves its
return position (X2), and then it moves to the front machining reference point (Z2).
When the command to move the turret tool post backward (M41) is specified, the turret tool post moves
its return position (X2), and then it moves to the position 5.0 mm away from the end face of the
workpiece on the back side ("Back Spindle Chuck POS" + value specified by the I argument).
The following are examples of using the M41 and M40 commands:
In case of the next machining pattern of G610 is G630, if machining with a gang tool still continues at
completion of machining with a tool on the turret tool post of $1, execute the M41 command to move the
turret tool post toward the back spindle in advance. Conversely, in case of the next machining pattern of
G630 is G610 (G620, G640) if machining with a tool on the gang tool post still continues at completion
of machining with a tool on the turret tool post of $2, execute the M40 command to move the turret tool
post toward the main spindle in advance.

Command format

M40 Z Turret advance (Z2)
M41 I Turret retract (Z2)

Axis control groups

The following table shows the machining patterns and axis control groups with which the M40 and M41
commands are enabled:

Machining pattern $1 $2 $3
Machining pattern cancel (G600) – – –
Alternate machining (G610)
G611
M40 Z
M41 I
- -
G612
M40 Z
M41 I
- -
Two-saddle machining (G620) - - -
Front/back parallel machining (G630)
G632 – M40 Z -
G633 - - M40 Z
Front/back parallel machining (G635)
G637 - M40 Z -
G638 - M40 Z -
Simultaneous 3-lines machining (G640) - - -
Pick-off (G650) - - -

Argument

- Z : Specify this argument to change the point to which the turret tool post (Z2 axis) moves. For
example, when Z-5.0 is specified, the turret tool post (Z2 axis) moves to the position 5.0 mm
away from the forward end position. If the argument is not specified, the turret tool post
(Z2 axis) moves to the forward end position (the position opposite to the gang tool post).
- I : Specify the amount of shift from the zero point of the work coordinate system of the Z3 axis.
This I argument is equivalent to the G632, G637 I argument.
M3 Programming
5-95
Operation sample

(2)
(1)

(3)
T21 T25
Turret Turret


(1) The M41 command is executed in the G612 mode, and the turret tool post moves its return position.
The turret tool post moves in only the direction of the X2 axis.
(2) The Z2 axis moves to "Back Spindle Chuck pos." specified in the machining data.
(3) The tool pre-selected in the G611 mode is called.

Comment [ER2]: word
M3 Programming
5-96
Program sample

$1 $2 $3
G610 G610 G610
T2100 T4100
: :
G612 T4000
T0200
:
M41 ................................................... Turret retract
(When machining with the tool on the
turret tool post is completed, the turret tool
post is moved backward to get ready for
machining in the G630 mode.

This command is valid when machining
with a gang tool is performed at the end in
the G610 mode.)

G611
T2500 .............................. Pre-selection of the tool
(The tool to be used in the G630 mode is
pre-selected.)

:
G630 G630 G630
: G632 G632
: :
: M40 ................................ Turret advance
:
:
:
:
(When machining with the tool
on the turret tool post is
completed, the turret tool post is
moved forward to get ready for
machining in the G610
mode.  This command is valid
when machining on the $1 side
takes more time than the
machining with the tool on the
turret tool post.)

G610 G610 G610
: :

Notes

- You can execute the M40 command with only the machining pattern G630, and the M41 command
with only the machining pattern G610.
- If you have specified the I argument in the M41 command, specify the I argument in the G632
command as well.

M3 Programming
5-97
5.8.7 R.G.B. belt breakage detection (M154) — optional

This command detects belt breakage of the rotary guide bushing, and places the machine in 1-cycle stop
state.

Command format

M154

Axis control groups

$1, $2, $3

Program sample

$1 $2 $3
:
T0100
G00 X33.0 Z30.0 T01
G650 G650 G650
G00 Z-1.0
G98 G01 Z10.0 F3000
M154 ............... R.G.B. belt breakage detection
G4 U0.5
M15
!3L1 !1L1
G99 G1 X-4.0 F0.03
M5
M7
G00 X-4.0 Z0 T00
:

Note

Execute the M154 command in the state in which the spindle speed is constant. Execution of M154
during acceleration/deceleration or constant surface speed control may cause the machine to malfunction.

M3 Programming
5-98
5.8.8 Sequential operation for bar stock replacement (M155)

If the machine is equipped with an automatic magazine bar loader, you can use the M155 command to
remove a bar remnant and supply bars.

Command format

M155 U A X Z K1 W F S R1 M1 T B

Axis control groups

$1

Arguments

- U : Specify the positioning point for deburring a bar remnant. The default is Tool Positioning
Point in the machining data.
- A : Specify the feed rate at which the axis moves to the positioning point for deburring the bar
remnant. The default is F0.1.
- X : Specify the distance by which the X axis moves for deburring the bar remnant. Deburring
is not performed unless the X argument is specified.
- Z : Specify the distance by which the Z axis moves for deburring the bar remnant. Deburring is
not performed unless the Z argument is specified.
- K1: Specify this argument not to stop coolant before drawing the bar remnant. The coolant
stops if the K1 argument is not specified.
- W : Specify the distance by which the Z axis moves when drawing the bar remnant and when
supplying bars. The default is 30 mm.
- F : Specify the feed rate at which the Z axis moves when drawing the bar remnant and when
supplying bars. The default is F0.5.
- S : Specify the speed at which the main spindle rotates when drawing the bar remnant and when
supplying bars. The default is 1000 min
–1
.
- R1: Specify this argument not to stop the main spindle after drawing the bar remnant. The main
spindle stops if the R1 argument is not specified.
- M1: When using non-conform materials, specify this argument to adjust the guide bushing phase
before workpiece insertion. The guide bushing phase is not adjusted unless the M1
argument is specified.
- T : Specify the dwell time from when the chuck closes after workpiece replacement. The
default is 2 seconds.
- B : Specify the dwell time between the coolant oil ON and the cut-off machining . The default
is 0 second.

M3 Programming
5-99
Operation sample

(1) The tool moves to the position determined by (Bar Stock O.D. in the machining data + value
specified by the U argument) at the feed rate specified by the A argument.
(2) The Z axis advances the distance specified by the Z argument.
(3) The machine executes the chamfering function for the bar remnant at the Cut-Off Feed in the
machining data, depending on the values of the X and Z arguments.
(4) The coolant is turned OFF. It is not turned OFF if the K1 argument is specified.
(5) The main spindle rotates at the speed specified by the S argument.
(6) The tool moves to the position determined by (Bar Stock O.D. in the machining data + value
specified by the U argument). At the same time, the bar remnant is drawn by the amount specified
by the W argument, from the guide bushing at the feed rate specified by the F argument.
(7) The main spindle stops. It does not stop if the R1 argument is specified.
(8) The feed torque of the automatic magazine bar loader is turned off.
(9) The main spindle chuck opens.
(10) Material replacement is carried out.
(11) The main spindle chuck closes.
(12) Dwell time specified by the T argument
(13) The main spindle rotates at the speed specified by the S argument.
(14) If the M1 argument is specified, the guide bushing phase is adjusted.
(15) A material is inserted by the amount specified by the W argument, at the feed rate specified by the F
argument.
(16) The coolant is turned ON.
(17) The main spindle rotates at the Cut-Off Speed in the machining data.
(18) The machine performs cut-off machining until reaching the Cut-Off End (DIA) (in the machining
data) at the Cut-Off Feed in the machining data.

M3 Programming
5-100
Overview of deburring (chamfering) of a bar remnant


The tool moves to the
position determined by
(Bar Stock O.D. in the
machining data + value
specified by the U
argument).
The Z axis advances the
distance specified by the Z
argument.
The machine executes the
chamfering function for the
bar remnant, depending on
the values of the X and Z
arguments.
The tool moves to the position determined
by (Bar Stock O.D. in the machining data
+ value specified by the U argument). At
the same time, the bar remnant is drawn
by the amount specified by the W
argument.
Example:
The following table shows the values of the X argument
(distance by which the X axis moves for deburring) and Z
argument (distance by which the Z axis moves for deburring) if
C0.5 is to be set for the deburring (chamfering) of the bar
remnant:
* Specify 1.0 for the U argument (positioning point for
deburring) in this case.

Width Hight X argument Z argument
2.0mm 0.728mm 3.4 1.7
3.0mm 1.092mm 4.2 2.1

Width
Hight
20°


Comment [ER3]: word
M3 Programming
5-101
Program sample

$1 $2 $3
:
T0100
G00 X33.0 Z30.0 T01
G650 G650 G650
G00 Z–1.0
G98 G01 Z10.0 F3000
G4 U0.5
M15
!3L1 !1L1
G99 G1 X–4.0 F0.03
M8
M8
/M155 X3.4 Z1.7 ....... Sequential operation of bar
stock exchange

M9
M5
M7
G00 X–4.0 Z0 T00
:

M3 Programming
5-102
5.9 Exclamation (!) Symbol (Queuing Command)

To synchronize multiple axis control groups with each other, specify this function to place an axis control
group's program in the queuing state while the operation of another axis control group's program is in
progress.

Command format

! ! L Multi-axis control group program queuing

Argument

- ! : Specify the axis control group number (1 to 3) of an axis control group which enters the
queuing state while the operation of another axis control group is in progress.
- L : Queuing ID number (0 to 8999)

Program sample

Multi-axis control group program queuing pattern

$1 $2 $3
: : :
: !1L1 :
!2L1 : :
: : :
: !3L2 !2L2
: : :
: : :
: !1!3L3 !1!2L3
!2!3L3 : :
: : :
: : :
: : :
!2!3L4 !1!3L4 !1!2L4
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %
M3 Programming
5-103
Note

- If a wrong queuing ID number is specified, the operation is unable to proceed because the program
remains in the queuing state.
- To queue all the three axis control groups, specify two queuing codes for the two other axis control
groups.
If the same ID number is used, either of the two other axis controls is specified with one queuing code
and the other is specified with two queuing codes. As a result, an axis control group does not queue.
In this case, the execution sequence is not simultaneous.

Program sample

a. Correct queuing pattern
$1 $2 $3
: : :
: : :
!2!3L11 : Queuing with $3 :
: !1!3L11 :
: Queuing with $2 : :
: !1!2L11
Queuing with $3


b. Pattern in which either of the two other axis controls is specified with one queuing code and
the other is specified with two queuing codes
$1 $2 $3
: : :
: : :
!2!3L11 : Do not queuing :
: !1L11 :
: Queuing with $2 : :
: !1L11
Queuing with $3


Queuing codes !2!3 are specified for $1 in the program sample of b. Thus, $1 queues with $2 and $3.
However, only !1 is specified for $2 and $3, so $2 and $3 do not queue. If $2 or $3 queues with $1, the
next block is executed.
As a result, the passing time of L11 is different between $2 and $3 according to the contents described
before ID number L11 in the program, and the execution sequence is not simultaneous either.
This specification may be useful for shortening operation time. However, if the contents described after
L11 in the program or the cutting conditions are changed, interference may occur. Therefore, the
specification is not recommended.


M3 Programming
5-104
5.10 Secondary Machining Programs

5.10.1 Positional relation between spindles for secondary machining

Turret tool post

The following figure shows the spindle positions of the turret tool post for secondary machining when
viewed from the end face of the material:





Gang tool post

Tools for secondary machining are mounted on the spindle GSC607 or GSE507. The tools indicated in
parentheses ( ) are used for M20 or M32.



Note

Use the synchronous tapping function or floating chuck to perform tapping with a gang tool.

Tool mounted on the outer diameter drilling
spindle KSC106, KSC206, or KSC303
(KSC110, 310, 910)
Tool mounted on the milling spindle KSM106 or
KSM406 206 (KSM110, 406)
Tool mounted on the end face
drilling spindle GSE507 (GSE607)
Tool mounted on the outer diameter
tapping spindle KST406 (KST110)
Tool mounted on the slitting spindle
KSS345 or KSS450 (KSS660, 663, 260,
263)
Tool mounted on the end face drilling
spindle KSE106 or KSE403 (KSE110,
210, 310)
Tool mounted on the outer diameter
drilling spindle GSC607 (GSC510, 507)
Comment [ER4]: m2pro5115a.wmf
Comment [ER5]: m2pro5115b.wmf
M3 Programming
5-105
5.10.2 Transition between turning and secondary machining

Transition from turning to secondary machining

To switch from turning to secondary machining, specify the commands in the format shown below.

Program sample

- Main spindle indexing
M05 G98 M8 S=
M28 S0 (or T0600 E0)

- Main spindle C axis indexing
M05 G98 M8 S=
M18 C0 (or T0600 E0)

Functions of the words:

M05 .......... Main spindle stop
G98 .......... Millimeters per minute feed (mm/min)
M8 .......... Rotate the tool spindle

Gang tool post Turret tool post Back 3-spindle tool
post
Tool spindle forward rotation M80 M83 M128
Tool spindle reverse rotation M81 M84 M129
Tool spindle stop M82 M85 M130

S= .......... Speed command

S3 Tool spindle of the gang tool post
S4 Tool spindle of the turret tool post
S6 Tool spindle of the back 3-spindle tool post

M28 S0 .......... Return to zero point for main spindle indexing

When performing secondary machining consecutively, you do not have to enter the above commands for
each secondary machining. Once the commands are entered at the beginning, they are enabled until the
overall secondary machining is completed.

Notes

- The command "return to zero point for main spindle indexing" is used to maintain the same indexing
position of a workpiece during secondary machining.
If a workpiece is machined in the sequence of turning, secondary machining, turning, and then
secondary machining, this command enables the workpiece to always stop at the same position (the
angle of rotation).
- S6 (tool spindle of the back 3-spindle tool post) is optional.

M3 Programming
5-106
Transition from secondary machining to turning

To switch from secondary machining to turning, specify the commands in the format shown below.

Program sample

- Main spindle indexing
M8
M20
M03 S1= G99

- Main spindle C axis indexing
M8
M20
M03 S1= G99

Functions of the words:

M8 .......... Stop the tool spindle (M82 or M85)
M20 .......... Main spindle index and C-axis release
G99 .......... Millimeters per revolution feed (mm/rev)
S1= .......... Main spindle rotation
M03 .......... Main spindle forward rotation

M3 Programming
5-107
5.10.3 Coordinate system shift (G500 and G501)

The shift amount specific to each spindle for secondary machining is initially set. Consequently, when a
tool is set at the reference position, the program zero point does not match the tool reference point. To
match them each other, use the coordinate system shift programs (G500 and G501).

U
W


Rotary tool on the turret tool post

2
0
20.0



Rotary tool on the gang tool post

10


Program zero point X0, Z0
Program zero point X0, Z0
Shift program G501
B021 executed
Shift program G501
A011 executed
Program zero point X0, Z0 Comment [ER6]: m2pro-j.wmf
Comment [ER7]: m2pro-h.wmf
Comment [ER8]: m2pro-i.wmf
M3 Programming
5-108
Command format

G500 A(B) A Coordinate system shift OFF
G501 A(B) A Coordinate system shift ON

Argument

- A: For the tool spindle of the gang tool post, specify the corresponding value shown in the table
below.
- B: For the tool spindle of the turret tool post, specify the corresponding value shown in the table
below.
- : Specify the spindle number.
- A: Specify the direction in which the tool spindle rotates. 1: Forward, 0: Backward

M3 Programming
5-109
M12, M16
Tool post Shift program Tool spindle Function
Shift amount
U W
Gang
G500A011 GSC607
Outer diameter milling spindle
Shift OFF
0.0 –10.0
G501A011 Shift ON
Turret
G500B011 MSC106
Outer diameter drilling spindle
Shift OFF
0.0 –20.0
G501B011 Shift ON
G500B021 MSC206, 303, MST406
Outer diameter tapping spindle
Shift OFF
–40.0 –20.0
G501B021 Shift ON
G500B031 MSE106, 403
End face drilling spindle
Shift OFF
20.0 0.0
G501B031 Shift ON
G500B041 MST306
End face tapping spindle
Shift OFF
16.0 0.0
G501B041 Shift ON
G500B051 MSM106
Milling spindle
Shift OFF
20.0 –20.0
G501B051 Shift ON
B500B060 MSM206
Milling spindle
Shift OFF
14.0 –20.0
G501B060 Shift ON
G500B071 MSS345 (center)
Slitting spindle
Shift OFF
5.0 0.0
G501B071 Shift ON
G500B081 MSS345 (tool nose)
Slitting spindle
Shift OFF
–40.0 –22.5
G501B081 Shift ON
G500B121 MSS450 (center)
Slitting spindle
Shift OFF
10.0 0.0
G501B121 Shift ON
G500B131 MSS450 (tool nose)
Slitting spindle
Shift OFF
–40.0 –25.0
G501B131 Shift ON
G500B141 MSF150, 250 (center)
Side cutter spindle
Shift OFF
10.0 –5.0
G501B141 Shift ON
G500B151 MSH132
Hobbing spindle
Shift OFF
–22.0 –20.0
G501B151 Shift ON
G500B160 MSP160
Polygonal spindle
Shift OFF
–40.0 0.0
G501B160 Shift ON

M3 Programming
5-110
M20, M32
Tool post Shift program Tool spindle Function
Shift amount
U W
Gang
G500A011 GSC507, 510
Outer diameter milling spindle
Shift OFF
0.0 –15.0
G501A011 Shift ON
Turret
G500B011 KSC110, 310, 910
Outer diameter drilling spindle
Shift OFF
–30.0 –25.0
G501B011 Shift ON
G500B011 KST110
Outer diameter tapping spindle
Shift OFF
–30.0 –25.0
G501B011 Shift ON
G500B020 KSE310
End face drilling spindle
Shift OFF
50.0 0.0
G501B020 Shift ON
G500B021 KSE110, 210
End face drilling spindle
Shift OFF
50.0 0.0
G501B021 Shift ON
G500B021 KST510, 610
End face tapping spindle
Shift OFF
50.0 0.0
G501B021 Shift ON
G500B030 KSM110
Milling spindle
Shift OFF
50.0 –25.0
G501B030 Shift ON
G500B090 KSM406
Milling spindle
Shift OFF
40.0 –25.0
G501B090 Shift ON
G500B041 KSS260 (center)
Slitting spindle
Shift OFF
40.0 0.0
G501B041 Shift ON
G500B051 KSS260 (tool nose)
Slitting spindle
Shift OFF
–20.0 –30.0
G501B051 Shift ON
G500B041 KSS263 (center)
Slitting spindle
Shift OFF
40.0 0.0
G501B041 Shift ON
G500B101 KSS263 (tool nose)
Slitting spindle
Shift OFF
–23.0 –31.5
G501B101 Shift ON
G500B120 KSS660 (center)
Slitting spindle
Shift OFF
44.0 0.0
G501B120 Shift ON
G500B130 KSS660 (tool nose)
Slitting spindle
Shift OFF
–16.0 –30.0
G501B130 Shift ON
G500B120 KSS663 (center)
Slitting spindle
Shift OFF
44.0 0.0
G501B120 Shift ON
G500B180 KSS663 (tool nose)
Slitting spindle
Shift OFF
–19.0 –31.5
G501B180 Shift ON
G500B081 KSF160, 163
Side cutter spindle
Shift OFF
–30.0 –7.0
G501B081 Shift ON
G500B161 KSH132
Hobbing spindle
Shift OFF
8.0 –25.0
G501B161 Shift ON
G500B170 KSP380
Polygonal spindle
Shift OFF
–30.0 0.0
G501B170 Shift ON

M3 Programming
5-111
Main shift programs and program points (M12, M16)

- Outer diameter drilling spindles (MSC106, MSC206, MSC303, and MST406) and outer diameter
tapping spindle (MST406)

20
With MSC206 (B021)
Turret
2
0
8
0
6
0
20


- Milling spindles (MSM106 and MSM206)

With MSM106 (B051)
Turret
1
0
5
0
6
0
20
20


- End face drilling spindles (MSE106 and MSE403) and end face tapping spindle (MST306)

With MSE106 (B031)
Turret
1
0
6
0
5
0


- Slitting spindle (MSS345)

With MSS345 (B071)
Turret
| 45
22.5
2
0
5
7
.
5
6
0
2
.
5
With MSS345 (B081)


Comment [ER9]: word
Comment [ER10]: word
Comment [ER11]: word
Comment [ER12]: word
M3 Programming
5-112
Main shift programs and program points (M20, M32)

- Outer diameter drilling spindles (KSC110, KSC310, and KSC910) and outer diameter tapping
spindle (KST110)

25
With KSC110 (B011)
Turret
1
5
1
1
0
9
5
25


- Milling spindles (KSM110 and KSM406)

With KSM110 (B030)
Turret
2
5
7
0
9
5
25
25


- End face drilling spindles (KSE110 and KSE310) and end face tapping spindle (KST510)

With KSE110 (B021)
Turret
2
5
9
5
7
0


- Slitting spindle (KSS660, KSS663, KSS260, and KSS263)

With KSS260 (B041)
Turret
| 60
22.5
7
5
9
5
With KSS260 (B051)
2
0

Comment [ER13]: word
Comment [ER14]: word
Comment [ER15]: word
Comment [ER16]: word
M3 Programming
5-113
Program sample

$1 $2 $3
G610 G610 G610
(G611)
:
:
M05 G98 M83 S4=460
G612
T2100 E0
G501 B031 ........... Coordinate system shift
ON

G00 X8.0 T21
G01 Z4.5 F132
G00 Z-0.5 T00
G500 B031 ........... Coordinate system shift
OFF

:
:

M3 Programming
5-114
5.10.4 Back spindle indexing (M78 and M79) — optional

The back spindle can be indexed at 1-degree intervals. It is indexed in the direction in which the spindle
rotates forward.

Command format

M78 S Back spindle indexing
M79 Back spindle indexing cancel

Axis control groups

With the machining patterns G610, G620, and G633 in G630, specify the command for $3.
With the other machining patterns, specify the command for $2.

Argument

- S : Specify the indexing angle. The value must be specified in the range 0 to 359 with an
absolute command.

Program sample

M25 .......... Back spindle stops.
G04 U0.5 .......... Dwell
M78 S0 .......... Back spindle indexing
Machining program
M79 .......... Back spindle indexing cancel
G04 U0.5 .......... Dwell
M23 S2= .......... Back spindle rotates forward.

Notes

- If the back spindle is rotating, stop the back spindle to index it with the M78 S0 command.
- To return to the turning process, execute the M79 command to cancel back spindle indexing, then
execute the M23 S2= command to rotate the back spindle.

M3 Programming
5-115
5.10.5 Back spindle C axis indexing (M48) — optional

The back spindle C axis can indexed at 0.001-degree intervals.
The back spindle C axis is turned ON when this command is executed. Zero point C0 is indexed, and
then the coordinate system is set with the position as C0.
Use a plus (+) sign to express indexing in the direction in which the back spindle rotates forward, and
define the indexing as "forward indexing". Use a minus (–) sign to express indexing in the direction in
which the back spindle rotates backward, and define the indexing as "backward indexing". When
viewed from the end face of the material, the counterclockwise rotation indicates "forward indexing" and
the clockwise rotation indicates "backward indexing".
A plus (+) sign is omitted.

Command format

M48 C Enable back spindle C-axis

Axis control groups

For the machining patterns G610, G620, and G633 in G630, specify the M48 command for $3.
For the other machining patterns, specify the command for $2.

Argument

- C : Specify an indexing angle in the range –99999.999 to 99999.999°.

Note

- When the M48 C command is specified, ordinary C-axis commands are enabled.
Example:
G50 C (H ) H is an incremental command.
G00 C (H )
G01 C (H ) F

M3 Programming
5-116
5.10.6 Circular interpolation in a secondary machining process

The circular interpolation feed is enabled on the following three planes in the secondary machining
process:

X-Y plane: G17
Z-X plane: G18 .......... Plane mode selected for ordinary turning process
Y-Z plane: G19

Generally, the Z-X plane (G18) is selected at power-on or reset. This plane is used for circular
interpolation (G02 or G03) in the turning process. To use the circular interpolation on a different plane
in the secondary machining process, execute the plane selection command G17 or G19.
Be sure to reselect the Z-X plane (G18) to return to the turning process.

G03
G02
G02
G02
G03
G03
X-Y plane
+Z
(direction to the
center of spindle)
+Y (direction to right angle of the centers of the spindle and tool spindle)
Y-Z plane
X-Z plane
+X (direction to the center of tool spindle)


X
Y
G02
G03

X
Z
G02
G03

Y
Z
G03
G02

G17 (X-Y) plane G18 (Z-X) plane G19 (Y-Z) plane

Comment [ER17]: word
Comment [ER18]: word
Comment [ER19]: word
Comment [ER20]: word
M3 Programming
5-117
Command format

G17
G18
G19

Axis control groups

Specify the commands for axis control groups in which circular interpolation is used.

M3 Programming
5-118
5.10.7 Program sample including secondary machining processes

The following is a program sample in which machining is carried out in the sequence of outer diameter
machining (turning), outer diameter drilling (secondary machining), slitting (secondary machining), and
then cut-off machining (turning).

Program sample

$1 $2 $3
G50 Z0
G610 G610 G610
(G611)...................................................... Gang tool post select
G99 M06
G00 X21.0 Z–0.5
M03 S1=
G612 ....................................................................... Turret select
T0
T2
N01 ................................................... Outer diameter machining
G00 X Z
:

N02 G611 ................................................. Gang tool post select

T2
G00 X Z
:
N03 G612 .............................................................. Turret select
T0
G00 X Z
M05 G98 M83 S4=
M28 S0
....... Command to switch to
secondary machining
process

G501 B011 ..................... Command to specify shift ON for
outer diameter drilling spindle

:
G500 B011 ..................... Command to specify shift OFF for
outer diameter drilling spindle

T2
N04
G501 B011
:
G500 B011
M85
M20
M03 S1= G99
......... Command to switch to
turning process

N05 G611 ....... Selection of a gang tool, and cut-off machining
T2
G00 X Z

M3 Programming
5-119
$1 $2 $3
:
M05
M07
G00 X–3.0 Z0 T00
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

M3 Programming
5-120
5.10.8 Program sample including main spindle indexing

Program sample

$1 $2 $3
G50 Z0
G610 ............................................ Alternate machining G610 .........Alternate machining G610 ... Alternate machining
(G611)
M06
G00 X Z–0.5
M03 S1 = G99
G612
T
:
G611
G00 X Z
T
:
G612
M05 G98
M83 S4=
M28 S0
......... Spindle indexing for
switching to secondary
machining process, and
determination of zero
point (0°)


2-face width end milling
G501 B051
G00 X Z
G01 X F
M28 S180.0 ...... Positioning at 180° from zero point
G01 X F
M28 S90.0 ........... Positioning at 90° from zero point
G500 B051

M80 S3=
T 00 X

Key grooving
G611
G501 A011
G00 X Z
G01 Z F100
G01 X F
G500 A011

M3 Programming
5-121

$1 $2 $3

M82 M85
M20
M03 S1= G99
...............Command to
switch to
turning
process

G611
T 00
:
M05
M07
G00 X–3.0 Z0 T00
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

M3 Programming
5-122
5.11 Back Machining Programs

5.11.1 Back machining process

This section explains workpiece pick-off by the back spindle, machining with tools on the back 3-spindle
tool post, and machining with tools on the turret tool post.

Program sample

$1 $2 $3

Preparation process

Inner diameter machining
with tools on the gang tool
post and turret tool post
(Alternate machining command)
Front/back parallel machining
Drilling with tool on
the back 3-spindle
tool post

Outer diameter machining
with tools on the gang tool
post and turret tool post
(Alternate machining command)


Outer diameter
machining with tool
on the gang tool
post
Front/back parallel
machining
Back drilling with tool
on the turret tool post

Outer diameter machining
in back machining with
tool on the turret tool post

Production
collection
Production
collection

Cut-off process Pick-off

End process End process End process


Notes

- When the program completes, the machine stops with the workpiece chucked to the back spindle.
- The program runs two cycles to complete the machining of a workpiece.
- To complete the machining of a workpiece in a cycle, include the back machining program in the last
program execution (G999). The machine performs the back machining after the cut-off process to
complete the workpiece in a cycle. Select the menu key [Last PRT] to execute the last program.

M3 Programming
5-123
5.11.2 Pick-off and end process

The back spindle picks off workpieces in the cut-off process.
Then, the back spindle moves to the return position, and the end process starts.



Cut-off tool
X1 axis
Guide bushing
The main spindle is
rotating forward.
Z1 axis
Back spindle
Z3 axis
The back spindle is
rotating backward.
(Workpiece-c
hucked
length)
1
(Work-
piece
protrusion
length)
2
(Workpiece length) 
(Cut-off length) L
(Cut-off
tool width)
a
3 (Amount of tool shift)
Work zero
point
Shifted
tool point
Standard
tool point
Comment [ER21]: m2pro-084.wmf
M3 Programming
5-124
Program sample

$1 $2 $3
G610 G610 G610
: :
: :
G99 M03 S1=1500 :
(1
)
T0100 :
(2
)
G00 Z85.0 T4000 ............................ Back spindle
(3
)
G650 ..................................... Pick-off G650 ...................... Pick-off G650 ..................................... Pick-off
(4) G00 Z–2.0 ....... Positioning at Z–2.0
(5) M24 S2=1500
(6) G98 G01 Z50.0 F1000
G04 U0.5
(7) M15.................... The back spindle
chuck closes.
(8
)
!3L1 (8) !1L1
G00 X17.0
(9
)
G01 X–1.0 F0.03 ....... Cut-off
machining

G610 G610 (10) G610
(11) X–3.0 : :
: : :
:

1. The cut-off tool is selected.

2. The tool moves to the position specified for cut-off machining in the longitudinal direction. (Z1 axis)

3. The pick-off command (G650) is executed. (Command for the superimposition of the end face of the
workpiece (zero point) and the end face of the back spindle)

4. The back spindle moves to a position close to the end face of the workpiece.

5. The back spindle rotates in the same direction and at the same speed as for the main spindle.

6. The feed per minute command is executed to move the back spindle to the workpiece chuck position.
(Z3 axis)

7. The back spindle chuck closes.

8. The queuing state is placed.

9. Cut-off machining starts.

10. The back spindle moves to the return position.

M3 Programming
5-125
11. The end process starts.
M3 Programming
5-126
Notes

- Specify the machining pattern command G650 for all the axis control groups. This machining pattern
automatically enters the queuing state. Cancel the coordinate system shift command and
compensation command before executing the machining pattern command.
- Execute the pick-off command (G650) after alternate machining (G610), two-saddle machining (G620),
and front/back parallel machining (G630, G635). At this time, the machining patterns of $1 and $2
are held. Since the Z3 axis moves superimposed on the Z1 axis in the G650 mode, executing the axis
move command for $3 moves the Z3 axis to the position determined by the Z1 axis workpiece
coordinates.
- Position the Z1 axis at cut-off position before specifying the G650 command.
- To cut off a workpiece chucked by the both spindles, execute the M24 command (backward rotation)
for the back spindle if the M03 command (forward rotation) has been executed for the main spindle.
Conversely, execute the M23 command (forward rotation) for the back spindle if the M04 command
(backward rotation) has been executed for the main spindle.

M3 Programming
5-127
5.11.3 Back machining tools

Back machining tools are used for two types of back machining. Tools mounted on the turret tool post
are for the back machining of the G630 machining pattern, and tools on the back 3-spindle tool post are
for the back machining of the G610 machining pattern.

With G610 back machining:

Program sample

Specify the back machining process for $3:
$1 $2 $3
G610 .................. Alternate machining G610................... Alternate machining G610 .................. Alternate machining
(G611).............. Gang tool post select T4100
T2100 ........... Pre-selection of the tool G00 Z–0.5
: G01 Z3.0 F0.1 T41
: G00 Z–0.5 T00
G612 ............................... Turret select :
T0200 ........... Pre-selection of the tool :
G00 X–30.0 Z–0.5 T4000 ........................... Back spindle
G01 Z5.6 F0.1 T21
G00 Z–0.5 T00
G611 .................. Gang tool post select
T2500 X17.0 ........... Pre-selection of
the tool
G00 X9.0 Z–0.5 T02
G01 X12.0 Z1.0 F0.08
Z17.8
X15.2
X17.0 Z18.7
:
:

M3 Programming
5-128
With G630 back machining:

Program sample

Specify the back machining process for $2:
$1 $2 $3
: : :
G630 ............ Front/back parallel
machining
G630............ Front/back parallel
machining
G630 ...... Front/back s parallel
machining
T0200 G632....................... Back turret select G632 ....................... Back turret select
G00 X12.0 Z–0.5 T02 T2100
G01 Z15.0 F0.1 G00 X9.0 Z–0.5 T21
: G01 X12.0 Z1.0 F0.03
: Z30.0
:
G633................. Back 3-spindle select G633 ................. Back 3-spindle select
T4100
:

Specify the back machining process for $3:
$1 $2 $3
: : :
G630 ........Front/back parallel
machining
G630........... Front/back parallel
machining
G630 .......... Front/back parallel
machining
T0200 G633................. Back 3-spindle select G633 ................. Back 3-spindle select
G00 X12.0 Z–0.5 T02 T2100 ........... Pre-selection of the tool
G01 Z15.0 F0.1 T4100
: G00 Z–0.5
: G01 Z3.0 F0.1 T41
G00 Z–0.5 T00
:
G632....................... Back turret select G632 ....................... Back turret select
G00 X9.0 Z–0.5 T21
:

M3 Programming
5-129
Notes

- Specify the machining pattern commands G610 and G630 for all the axis control groups. These
machining patterns automatically enter the queuing state. Cancel the coordinate system shift
command and compensation command before executing the machining pattern commands.
- Each axis control group should hold the feed per rotation command and feed per minute command as
modal functions.
- Specify the main spindle speed command for $1. Specify the back spindle speed command for $2 or
$3.
- You can create a $1 program similar to a 2-axis lathe program assuming the end face of the workpiece
on the front side to be the reference point.
- Likewise, you can create $2 and $3 programs similar to a 2-axis lathe program assuming the end face of
the workpiece on the back side to be the reference point.
- G630 is a modal G code that is enabled until another machining pattern command is executed.
- Be sure to execute the G632 or G633 command for both $2 and $3 after executing the G630 command.
With the G632 command, specify the back machining program for $2. With the G633 command,
specify the back machining program for $3.
- Tool bit wear offset numbers T41 to T80 are optional.

M3 Programming
5-130
5.11.4 Positioning of the workpiece receiver for front/back products (M32)

Use this command to move the workpiece receiver mounted on the turret to the product collection
position.

Command format

M32 X A Z U Front and back basket positioning

Axis control groups

Specify this command for $1 or $2.

Argument

- X : Specify the X2 axis work coordinate as the position of the workpiece receiver mounted on
the turret tool post. If the X argument is not specified, the workpiece receiver is moved to
the default workpiece receiver position at the rapid feed rate.

- A : Specify the X1 axis position for end-position queuing. When the X1 axis reaches the
specified work coordinate during cut-off machining, positioning of the workpiece receiver of
the turret tool post is completed (X2 axis product collection position). The end-position
queuing is not performed unless the A argument is specified. When workpieces are
collected from the back spindle (the specification for $2), the A argument is invalid because
cut-off machining is not performed.

- Z : Specify the Z2 axis work coordinate as the position of the workpiece receiver mounted on
the turret tool post. The axis does not move unless the Z argument is specified. The Z
argument is valid only with $2.

- U : Specify dwell time after positioning of the workpiece receiver. If no U argument is
specified, the dwell time will be 0 second. The U argument is valid only with $1.

Notes

- Select the tool with the workpiece receiver mounted before executing the M32 command. An alarm is
issued if the "11 Work Receiver No." specified in the machining data is not selected as the tool number
when the M32 command is executed.
- If the override is changed or operation is performed with the handle in program check mode when the
M32 command is executed, the end position specified by the A argument may not match the operation.

M3 Programming
5-131
5.11.5 Front and back product separation (M33)

Use this command to transfer workpiece from the workpiece receiver (mounted on the turret tool post)
into the product receiver box.

CAUTION

For M2032 model, be sure to specify the C1 argument in the M33 command. If the C1
argument is not specified, the system does not collect workpieces.

Command format
M33 T H U1 C1 Z

Axis control groups
Specify this command for $1 or $2.

Argument
- T : Specify the tool number for turning the workpiece receiver. The tool number of the tool
opposite to (180° apart) the tool with the workpiece receiver mounted must be specified

- H : Specify a low speed at which the turret tool post turns. If the H argument is not specified,
the turret tool post turns at the default speed 4320 (rotation every 5 seconds).
To rotate it every 60 seconds: Specify H360 = (60 ÷ 60 seconds) × 360.
To rotate it every 5 seconds: Specify H4320 = (60 ÷ 5 seconds) × 360.

Modify this argument as follows.
- U1: Specify this argument to collect the products in product chute to the product receiver box
using the time period that the back spindle can not receive the workpiece chucked by the
main spindle during pick-off operation. The workpiece in product chute is not collected
immediately and moves to the turret retract point. The turret rotates and collects the
workpiece while the back spindle is in pick-off operation. This is effective for shortening of
cycle time. This argument can be specified in $2 only.

- C1: Set the position of Z2 axis to retract point (Z2-axis machine coordinate: 4.0 mm) when
workpiece is to be collected in product chute. Be sure to specify this argument for M2032
model. This argument is disabled in the machine of M1216 model. When this argument is
not specified, the Z2 axis is positioned at the forward end position.

- Z : Specify the position of Z2 axis in relative to the current position when workpiece is to be
collected in product chute. When this argument is not specified, the Z2 axis is positioned at
the forward end position. In G732 mode (collection from the back spindle side), the
direction of Z argument (signs) is determined as plus (+) to the left side and minus (-) to the
right side when viewed from the front of the machine. When both Z and C1 arguments are
specified at the same time, Z argument precedes C1 argument.

Note: Specifying the range between Z2=0.0 and Z2=4.0 of machine coordinates will
cause an alarm because the turret cannot rotate within this range.
M3 Programming
5-132
Operation sample

When collecting workpiece from the back spindle:
T20
T20
T20
T25 (2)
(3)
(1)
Workpiece
receiver
Turret
Turret
Turret
Turret


(1) The turret is unclamp while the turret tool post is moving to its return position.
(2) The turret tool post moves to the forward end position on the front side. (When neither argument C1
nor Z is specified)
When argument C1 or Z is specified, the Z2 axis moves from the current position as shown below.
Example:
C1 argument: Moves to the retract point (Z2=4.0 mm)
Z argument Z15.0: Moves to the left for 15.0 mm.
Z argument Z-15.0: Moves to the right for 15.0 mm.
(3) The turret tool post turns (selection of the tool opposite to the workpiece receiver), and the workpiece
is transferred from the workpiece receiver into the product receiver box.

Comment [ER22]: word
M3 Programming
5-133
Program sample

When collecting workpiece from the front side:
$1 $2 $3
G610 G610 G610
(G611)
M33 T2500 C1 ................ Collection of workpieces into the
product receiver box
*If C1 argument is specified, the Z2 axis moves to the return
position and collects the products into the workpiece receiver
box. After that, the Z2 axis returns to the forward end
position.

(This operation is done in parallel
with machining with T0200.)

T0200
G01 X13.0 Z-0.5
:
T2000 ................................. Selection of a workpiece receiver
:
T0100
G00 X13.0 Z25.0
M32 A1.0 U1.0 ......... Positioning of the workpiece receiver
mounted on the turret tool post, and
collection of workpieces into the
workpiece receiver

G01 X-3.0 F0.03
:

When collecting workpiece from the back side 1:
(when machining with the main spindle takes more time than machining with the back spindle)
$1 $2 $3
G630 G630 G630
: G632 G632
: :
: T2000
: M32 Z–10.0 ................. Positioning of the workpiece receiver
mounted on the turret tool post

: M16
: M72
: M10
: G04 U1.0
: M11
: M73
: M33 T2500 C1 ............. After the workpiece receiver collects the
workpiece, the turret tool post moves
toward the front side to collect the
workpiece from it.

: :
G650 G650 G650
: : :
M3 Programming
5-134
When collecting workpiece from the back side 2:
(when machining with the back spindle takes more time than machining with the main spindle)
$1 $2 $3
G630 G630 G630
: G632 G632
: :
: T2000
: M32 Z-10.0 .............. Positioning of the workpiece receiver
mounted on the turret tool post

: M16
: M72
: M10
: G04 U1.0
: M11
: M73
(M33 U1)................... The workpiece receiver moves to the return
position of the tool on the turret tool post.

G650
:
G650
M33 T2500 C1 .......... The turret tool post moves toward the front
side to transfer the workpiece into the
product receiver box, while pick-off
operation is in progress.
G650
:
: :
: : :

Notes

- Select the tool with the workpiece separator mounted before executing the M33 command. An alarm
is issued if the "11 Work Receiver No." specified in the machining data is not selected as the tool
number.
- To collect cut-off workpiece with the workpiece receiver mounted in the turret tool post, specify the
M33 command for $1 in the G611 mode in the G610 modes. To collect workpiece chucked by the
back spindle, specify the M33 command for $2 in the G632 mode or for $2 after the G650 command is
executed in the G632 mode.
- You can use the G02 command to collect workpiece from the main spindle. However, cut-off tip may
remain on the workpiece in this case.
- To collect cut-off workpiece with the workpiece receiver mounted on the turret tool post, you can also
use the command explained in <Section 5.7.6 Front product separation (G201)>.
- Arguments C1 or Z is specified in workpiece separation at front side, the Z2 axis returns to the forward
end position after products are collected.

M3 Programming
5-135
5.11.6 Sequential operation of the workpiece unloading device (M34) — optional

Use this command for the workpiece unloading device to perform sequential operation to collect the
workpiece chucked by the back spindle. Two collection methods are available: using the hand (U35J)
or the basket (U351J). Machine operation is different between the two methods.

Operation sample

Workpiece collection with the hand (U35J)


M3 Programming
5-136
Workpiece collection with the basket (U351J)



M3 Programming
5-137
Command format

M34 H1 A B D Z F T R1 W C1, 2

Axis control groups

$1, $2, and $3
Generally, specify this command for $2 of the machining pattern G632 and G637, and $3 of the
machining patterns G610, G620, and G633.

Argument

Hand-specific arguments
- H1: If this argument is specified, operation with the hand is enabled. If it is not specified,
operation with the basket is enabled. If the H1 argument is specified, an alarm is issued
unless a check mark is put to Work Unloader B (Hand) on the Machine Structure screen. If
the H1 argument is not specified, an alarm is issued unless a check mark is put to Work
Unloader A (Basket) on the Machine Structure screen.
- A : Specify the position where the hand (A4 axis) holds the workpiece. The A argument must
be specified with a negative value with the end face of the workpiece as reference. For
example, if A–20 is specified, the end face of the left claw of the hand chuck is at the
position 20 mm away from the end face of the workpiece on the back side. An alarm is
issued unless the A argument is specified.
- B : Specify the amount of workpiece extraction after the hand (A4 axis) holds the workpiece.
The B argument must be specified with a positive value as the extraction from the current
hold position. For example, if B10.0 is specified, the workpiece is extracted 10 mm from
the current hold position. If the B argument is not specified, the hand moves to the queuing
position and extracts the workpiece.

Basket-specific argument
- Z : Specify the position where the back spindle (Z3 axis) transfers the workpiece into the basket.
The position of the end face of the back spindle cap nut must be specified with a negative
value with the end face of the basket as reference. For example, if Z–2.0 is specified, the
back spindle is positioned 2 mm before the end face of the basket. If the Z argument is not
specified, the end face of the back spindle cap nut is positioned 5.0 mm away from the end
face of the basket.

M3 Programming
5-138
Arguments common to the hand and basket
- D : Specify the position where workpieces are unloaded from the hand or basket (A4 axis)
outside the machine. The distance from the leftmost position must be specified with a
positive value. If the D argument is not specified, the hand or basket moves to the leftmost
position and unloads the workpieces.
- F : Specify the feed rate (per minute) at which the basket or hand moves to the middle position.
If the F argument is not specified, the rapid feed rate is assumed.
- T : Specify dwell time after workpieces are unloaded (after the hand or basket opens). If the T
argument is not specified, 0.5 second is assumed.
- R1: Specifying this argument moves the hand or basket to the workpiece unloading position
outside the machine, and the operation terminates with the workpiece chucked. (Use this
argument when workpieces are to be transferred to/from another device. The hand/basket
neither opens nor returns to the queuing position.) Program commands following the M34
command are not executed until the hand or basket has moved to the workpiece unloading
position.

Knock-out-related argument specified in the M34 command
- W : Specify the forward position of the product knock-out device during M34 execution. If the
W argument is not specified, the forward position in normal operation is assumed.

M3 Programming
5-139
Hand stroke-related coordinates

Example: The following shows the coordinate values if 30.0 mm is specified for the back spindle chuck
position in the machining data:

M12 M16 M20 M32
a 0.0 0.0 0.0 0.0
b – 1244.0 – 1244.0 – 1315.0 – 1315.0
c 45.0 45.0 70.0 70.0
d – 1199.0 – 1199.0 – 1245.0 – 1245.0
e 1244.0 1244.0 1315.0 1315.0
f 0.0 0.0 0.0 0.0
g 1334.0 1334.0 1505.0 1505.0
h 90.0 90.0 190.0 190.0
i 390.0 390.0 476.0 476.0

Basket stroke-related coordinates

Example: The following shows the coordinate values if 30.0 mm is specified for the back spindle chuck
position in the machining data:

M12 M16 M20 M32
a 0.0 0.0 0.0 0.0
b – 1244.0 – 1244.0 – 1315.0 – 1315.0
c 45.0 45.0 70.0 70.0
d – 1199.0 – 1199.0 – 1245.0 – 1245.0
e 1334.0 1334.0 1505.0 1505.0
f 90.0 90.0 190.0 190.0
g 390.0 390.0 476.0 476.0
h 55.0 55.0 145.0 145.0
M3 Programming
5-140
Program sample

When collecting a workpiece with the machining pattern G610 (hand):
$1 $2 $3
G610 G610 G610
(G611) T4100
T2100 G00 Z–0.5
: G01 Z3.0 F0.1 T41
: G00 Z–0.5 T00
G612 :
: :
: M25
G611 M34 H1 A–5.0 B20.0 .... The hand holds the workpiece at
the position 5.0 mm from the end
face of the workpiece, and extracts
it 20.0 mm.
:
:
G650 G650 G650
: :
: :

When collecting a workpiece with the machining pattern G730 (basket):
$1 $2 $3
: : :
: : :
G630 G630 G630
: G632 G632
: T2100
:
:
M25
M34
G650 G650 G650
: :
: :

M3 Programming
5-141
When collecting more than one workpiece by the basket with multiple work machining
specified:
$1 $2 $3
G610 G610 W1 G610
(G611) T4300
T2100 G00 Z–0.5
: G01 Z3.0 F0.1 T43
G612 G00 Z–0.5 T00
: :
: :
G611 M25
IF [500 EQ 2] G0T0 100 Multiple work machining is
executed every 3 workpieces.
#500=#500+1
G00 Z(–115.0)
X(86.0)
Z(25.0) ................................. The value in parentheses varies
depending on the selected tool
number and the value specified
for the back spindle chuck
position in the machining data.
M16
G4 U0.2
M72
M10
G4 U0.2
M11
M73
T4000
G0T0 200
N100 #500=0
M34
N200
G650 G650 G650
: :
: :


M3 Programming
5-142
Notes

- Executing a command T4100 to T4300 immediately after the M34 command causes interference
between the back headstock and the hand or basket that is in workpiece unloading operation. To
avoid the interference, specify the R1 argument in the M34 command or create a program using
individual M codes (see <Section 5.11.8 List of M codes for the workpiece unloading device>)
without performing sequential operation by M34.
- If the hand is used to collect workpieces, Interference Check may need to be set to OFF/ON
(M88/M89). Be sure to take interference prevention measures.
- Be sure to stop (M25) the back spindle before executing the M34 command.
- Sequential operation by the M34 command includes opening/closing the back spindle chuck, moving
the product knock-out device forward/backward, and turning the air blower ON/OFF.
- The user macro is necessary for collecting more than one workpiece by the basket when multiple work
machining is specified. When collecting a workpiece chucked by the back spindle chuck into the
basket, note that the work coordinates of X3 and Z3 axes vary depending on the selected tool number
and the value specified for the back spindle chuck position in the machining data. The above program
sample shows workpiece collection after T4300 selection with multiple work machining specified for
every 3 workpieces.
- If machining is performed with T4300 while the basket is at the queuing position, it is not permitted to
put the tip of the tool into the cap nut of the back spindle.

M3 Programming
5-143
5.11.7 Movement of the workpiece unloading device (M35) — optional

Use this command to move the hand or basket to an arbitrary position.

Command format

M35 A

Axis control groups

$1, $2, $3

Argument

- A : Specify the position to which the hand or basket moves in the work coordinate system. If
the A argument is not specified, it moves to the queuing position.

For the A4-axis work coordinate system, see <Section 5.11.6 Sequential operation of the workpiece
unloading device (M34) — optionalSequential operation of the workpiece unloading device (M34) —
optionalSequential operation of the workpiece unloading device (M34) — optionalSequential operation
of the workpiece unloading device (M34) — optionalSequential operation of the workpiece unloading
device (M34) — optional>.

Program sample

When collecting a workpiece with the machining pattern G610:
$1 $2 $3
G610 G610 G610
(G611) T4100
T2100 G00 Z–0.5
: G01 Z3.0 F0.1 T41
: G00 Z–0.5 T00
G612 :
: :
: M25
G611 M34 H1 A–5.0 B20.0 R1 .. The hand stops at the
unloading position.
Use the R1 argument to
transfer workpieces outside the
machine.

[Commands (e.g., transfer command)]
M117........................................ The hand opens.
:
:
M35 .......................................... The hand moves to the
queuing position.
G650 G650 G650
: :
: :

M3 Programming
5-144
When creating a program using M35:
$1 $2 $3
G610 G610 G610
(G611) T4300
T2100 G00 Z-0.5
: G01 Z3.0 F0.1 T43
: G00 Z–0.5 T00
G612 :
: M25
: M110................................ The hand air blower is turned ON.
G611 M117................................ The hand opens.
: G0 Z*** ......................... Z3 axis moves to the return position.
: M35 A–5.0 ..................... The hand moves to the workpiece
collection position.
G98 G1 X*** F10000 . X3 axis moves to the workpiece
collection position.
M116................................ The hand closes.
M111................................ The hand air blower is turned OFF.
G4 U0.2
M16 .................................. The back spindle chuck opens.
G4 U0.2
M35 .................................. The hand extracts the workpiece
and moves to the queuing position.
T4000 ............................. The back spindle moves to the
center of the guide bushing.
M35 A–1315.0 .............. The hand moves to the workpiece
unloading position.
M117................................ The hand opens.
M35 .................................. The hand moves to the queuing
position.
G650 G650 G650
: :
: :

Note

If creating a program using M35, be careful that the work coordinates of X3 and Z3 axes vary depending
on the selected tool number and the work coordinate of A4 axis (hand) varies depending on the value
specified for the back spindle chuck position in the machining data.

M3 Programming
5-145
5.11.8 List of M codes for the workpiece unloading device

M code Description
M34 The workpiece unloading device performs sequential operation.
M35 The workpiece unloading device moves.
M110 The hand air blower is turned ON.
M111 The hand air blower is turned OFF.
M116 The hand/basket closes.
M117 The hand/basket opens.

To create a program that performs workpiece unloading operations individually without using M34
(sequential operation by the workpiece unloading device), use commands such as M35, M110, M111,
M116, and M117 to specify the individual workpiece unloading operations.
In this case, be careful that the back headstock does not cause interference. (If the back headstock is not
at the position determined by T4000 [X3 = 0], it may interfere with the hand or basket moving.)



M3 Programming
5-146
5.11.9 Advance and retract the product knock-out device (M10 and M11)

Use the M10 command to move the knock-out jig of the back spindle forward, and use the M11 command
to move it backward.

Command format

M10 Z F T Knock-out advance

M11 Z F Knock-out retract

Argument

- Z : Specify the position to which the knock-out axis moves. If the Z argument is not specified,
the axis moves to the forward end position when the M10 command (forward knock-out) is
executed. The axis returns to the position 0 mm when the M11 command (backward
knock-out) is executed.

- F : Specify the feed rate at which the knock-out axis moves. If the F argument is not specified,
the axis moves at the rapid feed rate of 15000 (mm/min).

- T : This argument specifies the torque to be applied to the knock-out axis. Specify a ratio (%)
to the maximum torque. A value in the range 0 to 200% can be specified. If the T
argument is not specified, 200% is assumed. The T argument is valid only with the M10
command.

Notes

- The knock-out axis does not move if the back spindle chuck is closed or the back spindle is rotating.
An alarm is issued in this case.
- If the through-hole knock-out jig is equipped, place a check mark to "Knock-out jig for workpiece with
through hole" on the Machine Structure screen. Execute the M10 or M11 command to move the
knock-out jig foward or backward, respectively.

M12 M16 M20 M32
Knock-out forward end position 154.0 154.0 164.0 164.0

M3 Programming
5-147
5.11.10 Knock-out for the workpiece with through hole (M10) — M12, M16 optional

If a workpiece in which a through hole has been made is chucked by the back spindle chuck, coolant or
chips may go into the back spindle. To prevent this problem, use the through-hole knock-out jig when
machining workpieces having a through hole. To use the through-hole knock-out jig, place a check
mark to "Knock-out jig for workpiece with through hole" on the Machine Structure screen.
If the through-hole knock-out jig is provided, use the M10 command to collect machined workpieces.

Command format

M10 Z F The through-hole knock-out advance/retract

Axis control groups

Specify this command for $1, $2, or $3.

Argument

- Z : Specify the position to which the through-hole knock-out jig moves. If the Z argument is
not specified, the jig moves to the end face of the cap nut (0 mm).
To move the through-hole knock-out jig backward, subtract 1 or 2 mm from the length of a
workpiece into the back spindle chuck and invert the result to a negative value, then specify
the negative value as the Z argument. (This value indicates the length of the spring to be
pushed in.)

- F : Specify the feed rate at which the through-hole knock-out jig moves. If the F argument is
not specified, the jig moves at the rapid feed rate (15000 mm/min).

Program sample

$1 $2 $3
: : :
G630 G630 G630
: G632 G632
: :
: M32 Z–1.0
: M16
: M72
: M10 Z1.0 .................... The through-hole knock-out jig moves
forward until it reaches the position 1
mm ahead of the cap nut.

: G4 U1.0
: M10 Z–9.0 .................. The through-hole knock-out jig moves
backward until it reaches the position 9
mm behind the cap nut.

T0100 M73
G00 X13.0 Z30.0 T1 M33 T2500 C1
G650 G650 G650

M3 Programming
5-148
Notes

- To use the through-hole knock-out jig, specify the M10 command on the MDI screen beforehand, then
make adjustment so that the tip of the through-hole knock-out jig is aligned with the end face of the cap
nut.
- The through-hole knock-out jig is unable to operate while the back spindle chuck is closed or while the
back spindle is rotating.
- If the machine is equipped with the through-hole knock-out jig, use only the M10 command to operate
the jig without using the M11 command. (M12 and M16)
- If M20 or M32 is provided with the through-hole knock-out jig, see <Section 5.11.9 Advance and
retract the product knock-out device (M10 and M11)>.

M3 Programming
5-149
5.12 Program Samples

5.12.1 Program sample 1

Machining drawing

T01
T21
T20
(2) T01
(1) T21
(2') T20
3
6
1
2
40
24 16


Note

The tools on both the gang tool post and turret tool post are drawn in the same direction on the right of
the machining layout. The following shows the actual positional relation between the tools:

M03

View from the end face of material

Cut-off tool


Gang tool post
Material to be machined SUM24L (free-cutting steel)
Material diameter | 12.0
Machining layout
Front turning tool

Turret tool
post
Turret tool post
(workpiece receiver)
Tool on the
gang tool post
Tool on the
turret tool post
Comment [ER23]: m2pro-103a.wmf
Comment [ER24]: m2pro-103b.wmf
M3 Programming
5-150
Program sample

O0001
$1 $2 $3
Preparation process
G50 Z0.................. Coordinate system setting (on the side of gang tool post) (Figure 1)
G610 ................................................................... Alternate machining pattern command G610 G610
(G611).......................................................................... Gang tool post select separation
M33 T2500 C1 ................................................................................ Product separation
M06 ...................................................................................................... The chuck closes.
G00 X13.0 Z–0.5 .................... The tool is moved away from the material. (Figure 2)
M03 S1=4000 G99 ..... The main spindle rotates forward at the speed of 4,000 min
–1
.
Feed per rotation (mm/rev)

G712
T2100 ................................................................................................Selection of T2100
G00 X6.0 Z–0.5 T21 ......... The tool is positioned |6 at rapid feed rate. (Figure 3)
Selection of compensation number 21

G01 Z24.0 F0.04 ...... The tool machines the workpiece 24 mm in the longitudinal
direction, with the diameter of |6 mm. (Figure 4)

X13.0 ..................... The tool machines the workpiece up to the material outer diameter
+ 1 mm. (Figure 5)

T2000 .................... Selection of T2000 (tool with which the workpiece separator is
mounted)


Cut-off and end processes
T0100 ................................................................................................Selection of T0100
G711
G00 X13.0 Z43.0 T01 .................. The tool is positioned for the cut-off machining.
Selection of compensation number 1

M32 A1.0 U1.0 ................................................. Positioning of the workpiece receiver
G01 X–3.0 F0.03 ..................................................... The tool cuts off the workpiece.
M05 ............................................................................................ The main spindle stops.
M07 ...................................................................................................... The chuck opens.
G00 X–3.0 Z0 T00 ......... The tool returns to the start position. The compensation
command is canceled.

M56 ............................................................................................................ Product count
G999 .......................................................................... Last program execution command G999 G999
N999 ............................................................................................. Last program queuing N999 N999
M02 ............................................................................................................... 1-cycle stop M02 M02
M99 ...................................................................................... Return to the main program M99 M99
% ...................................................................................................................... Stop code % %

Calculation of spindle speed and feed rate

N = Error! × 1,000 = Error! × 1,000 = 5305 ~ 5000 (min
–1
)

N: Speed (min
–1
)
V: Cutting speed 200 m/min ....... Selected from the cutting condition table
D: Material diameter | 12 mm
t: Circular constant (~ 3.14)
Fx 0.03mm/rev ............................ Selected from the cutting condition table
Fz 0.08mm/rev............................. Selected from the cutting condition table
M3 Programming
5-151
Operation sample

T01
Z
1
.
5
X-3.0

0
.
5
1
2
Z

Figure 1 Figure 5

0
.
5
Z
0.5

40
Z
3
0
.
5
1
2
T01

Figure 2 Figure 6

T21
Z

43
Z

Figure 3 Figure 7

6
Z

T20
Z

Figure 4 Figure 8

Comment [ER25]: m2-01a.wmf
Comment [ER26]: m2-01e.wmf
Comment [ER27]: m2-01b.wmf
Comment [ER28]: m2-01f.wmf
Comment [ER29]: m2-01c.wmf
Comment [ER30]: m2-01g.wmf
Comment [ER31]: m2-01d.wmf
Comment [ER32]: m2-01h.wmf
M3 Programming
5-152
5.12.2 Program sample 2

This section shows a program sample including many machining processes (drilling and outer diameter
cutting).

Machining drawing

Material to be machined C3604 (brass)
Material diameter | 12.0

6
M
8
18
3
30
10
71
2
2-C0.2
2
M5 P0.8
C
0
.
5
C
0
.
3
7
C
C0.5
6
M
8
18
3
30
10
71
2
2-C0.2
2
M5 P0.8
C
0
.
5
C
0
.
3
7
C
C0.5
P
0
.
7
5


Machining layout
Comment [m33]: m2pro5165a-1.wmf
Comment [ER34]:
M3 Programming
5-153
Z0
Z0
(1) T21
(2) T22
(3) T23
(4) T24
(5) T02
(7) T26
(9)' T20
(6) T25 (8) T03 (9) T01
T20
T26
2
4
.
3
5
3
3
2
21.0
20

Tool for center drilling
T21
Drill
T22
Boring tool
T23
Tap
T24
Front turning tool T02
Groove tool T25
Back turning tool T03
Cut-off tool T01
Threading tool
Workpiece
receiver
Comment [ER35]: m2pro5165b.wmf
M3 Programming
5-154
Program sample

O0002
$1 $2 $3
Preparation process
G50 Z0.......................... Coordinate system setting (on the side of gang tool post)
G610 .......................................................... Alternate machining pattern command G610 G610
(G611)................................................................. Gang tool post select command
M06 ............................................................................................ The chuck closes.
G00 X13.0 Z–0.5 .......... The tool is moved away from the material outer
diameter. At the same time, it is moved – 0.5 mm
away from the end face of the workpiece.

M03 S1=5200 G99 ......... The main spindle rotates forward at the speed of 5,200
min
–1
. Feed per rotation (mm/rev)

G612 .................................................................................. Turret select command
T0200 .................................................................................... Pre-selection of T02
T2100 .......................................................................................... Selection of T21

Center drilling process
N0121 G612 ....................................... Sequence number, Turret select command
G00 X–30.0 ..................... The tool for center drilling is positioned to the center
of the workpiece.

G01 Z5.6 F0.1 T21 ..... The tool for center drilling cuts into the workpiece.
Selection of compensation number 21

G00 Z–0.5 T00 .............. The tool for center drilling is moved away from the
end face of the workpiece.

The compensation command is canceled.
T2200 .......................................................................................... Selection of T22

Drilling process
N0222 ........................................................................................ Sequence number
G00 X–30.0 ...................... The drill is positioned to the center of the workpiece.
G01 Z21.5 F0.1 T22 ... The drill cuts into the workpiece. Selection of
compensation number 22

G00 Z–0.5 ............ The drill is moved away from the end face of the workpiece.
G04 U0.5 ........................................................................ Dwell time (0.5 second)
Z21.0 ............................................... The drill is positioned for the second infeed.
G01 Z35.0 ................................................. The drill performs the second infeed.
G00 Z–0.5 T00 ... The drill is moved away from the end face of the workpiece.
The compensation command is canceled.

S1=5400 ...................................................... Speed command for the next process
T2300 .......................................................................................... Selection of T23

M3 Programming
5-155
$1 $2 $3
Boring process
N0323 ........................................................................................ Sequence number
G50 U34.0 ............................................................ Coordinate system shift ON
(Turret shift 30mm + 2mm × 2)

G00 X7.6 Z–0.5 T23 ................... The boring tool is positioned. Selection of
compensation number 23

G01 X6.0 Z0.3 F0.04 ............................... Chamfering until the inner
diameter | 6 mm (C0.3)

Z15.0 ................................................................ Machining until the depth 15 mm
X4.0 Z16.0 ....................................................Chamfering of the tapped opening
G00 Z–0.5(T00) .. The tool is moved away from the end face of the workpiece.
G50 U–34.0 ......................................... Coordinate system shift cancel command
S1=500......................................................... Speed command for the next process
G04 U1.0 .................... Dwell time 1.0 second (for stabilizing the spindle speed)
T2400 .......................................................................................... Selection of T24

Tapping process
N0424 ........................................................................................ Sequence number
G00 X–30.0(Z–0.5) ........ The tap is positioned to the center of the workpiece.
Z13.4 ...................................... The tap is positioned in the longitudinal direction.
G32 Z29.0 F0.64 T24 ...... The tap cuts into the workpiece. (Feed rate 80 %)
Selection of compensation number 24

Z15.0 F0.8 M04 T00 ........ The tap is returned. (Feed rate 100 %. The main
spindle rotates backward.)

The compensation command is canceled.
G04 U2.0 ............................................................................................ Dwell time
G00 Z–0.5 .............. The tap is moved away from the end face of the workpiece.
M03 S1=5000 ....... The main spindle rotates forward at the speed of 5,000 min
–1
.
G04 U0.5

Front turning process
N0502 G611 .................................. Sequence number, Gang tool select command
T2500 X13.0 ........................ T25 is pre-selected, then it is positioned at a | 13
mm diameter.

G00 X6.0 Z–0.5 T02 ....................... Rapid feed positioning, and selection of
compensation number 2

G01 X8.0 Z0.5 F0.08 ........................................................Chamfering (C0.5)
Z17.8 .................................... The tool machines the workpiece 17.8 mm in the
longitudinal direction (0.2 mm ahead of the collar).

X11.6 .................................................... The tool is moved to a position for the
chamfering position.

X13.0 Z18.5 ............................... Chamfering (The tool is moved away from the
material diameter in the axial direction.)


M3 Programming
5-156
$1 $2 $3
Grooving process
N0625 G612 ........................................ Sequence number, turret select command
T0300 X13.0 ..................................... T13 is pre-selected, then it is positioned at
| 13 mm diameter.

G00 X13.0 Z18.0 T25 ......................... Rapid feed positioning, and selection
of compensation number 25

G01 X7.0 F0.05 ........................ The tool cuts into the workpiece at the cutting
feed rate until the diameter | 7.0 mm.

X9.0 F0.2 .............................. The tool is moved away from the diameter
(finished by front turning) in the axial direction.

W–1.0 ............................ The tool is moved – 1.0 mm in the longitudinal
direction. (Incremental command).

X7.0 W1.0 F0.05 ............................... Chamfering until the diameter | 7.0 mm
X13.0 F0.2 ............... The tool is moved away from the material outer diameter.
S1=1200 ...................................................... Speed command for the next process
G04 U1.0 ............................................................................................ Dwell time
T2600 .......................................................................................... Selection of T26

Thread cutting process
N726 .......................................................................................... Sequence number
G00 X12.5 Z20.0 T26 .......................... Rapid feed positioning, and selection
of compensation number 26

X9.5 ............................................................ The tool is moved to the initial point.
G92 X7.36811.5 Z36.5 F0.75 .......Thread cutting cycle command, and first
infeed

X6.98811.1 ................................................................................... Second infeed
X6.86810.96 .................................................................................... Third infeed
X10X6.868.96 ........... Zero cut
(The same diameter as for the third infeed is specified.)

G00 X12.5 ................................................. Thread cutting cycle cancel (by G00)
S1=5000 ...................................................... Speed command for the next process
G04 U0.5

Back turning process
N0803 G611 ...................................Sequence number, gang tool select command
T2000 ................................................... Pre-selection of T20 (workpiece receiver)
G50 W–3.0 ................................................................ Coordinate system shift ON
G00 X13.0 Z19.3 T03 ...................... Rapid feed positioning, and selection of
compensation number 3

G01 X11.6 Z20.0 F0.03 ....................................................Chamfering (C0.2)
X7.0 ..................................... The tool cuts into the workpiece at the cutting feed
rate until the diameter | 10.0 mm.

Z29.5 F0.08 ...................... The tool machines the workpiece 29.5 mm in the
longitudinal direction (for the chamfering position).

X6.0 Z30.0 F0.03 .......................................................................... Chamfering
X13.0 F0.2 ............... The tool is moved away from the material outer diameter.
G50 W3.0 ................................................................ Coordinate system shift OFF
T0100 .......................................................................................... Selection of T01

M3 Programming
5-157
$1 $2 $3
Cut-off and end processes
N0901 ........................................................................................ Sequence number
G00 X13.0 Z32.0 T01 M97 ........ Rapid feed positioning, selection of
compensation number 1, and spindle speed
change detection OFF

G01 X8.0 F0.2 ...................................... The tool is moved toward the diameter
finished by back turning.

G201 X–3.0 F0.03 A1.0 T2500 U1.0 C1 .. Cut-off and product separation
G00 X13.0 Z31.5 (or W–0.5) .............. The tool is moved away in the axial or
longitudinal direction.

(Preparation for the second cut-off)
Z35.0 ................................................................ Positioning for the second cut-off
G96 S180 ............ Constant surface speed control ON (cutting speed 180 m/min)
G50 S6000 Q3000 ...................... Maximum and minimum spindle speed clamp
(6,000 min
–1
, 3,000 min
–1
)
G01 X–3.0 F0.03 .......................................... Completion of the second cut-off
G97 S1=500 M96 ........ Constant surface speed control OFF. The main spindle
rotates at the speed of 500 min
–1
.

Spindle speed change detection ON
M05 ................................................................................... The main spindle stops.
M07 ............................................................................................. The chuck opens.
T2100 .......................................................................................... Selection of T21
G00 X–3.0 Z0 T00 .......................... The tool returns to the start point.
The compensation command is canceled.

M56 ...................................................................................................Product count
G999 ................................................................. Last program execution command G999 G999
N999 .................................................................................... Last program queuing N999 N999
M02 ...................................................................................................... 1-cycle stop M02 M02
M99 ............................................................................. Return to the main program M99 M99
% ............................................................................................................. Stop code % %

M3 Programming
5-158
5.12.3 Program sample 3

Machining drawing

Material to be machined SUS303 (free-cutting stainless)
Material diameter |12.0 (– 0.015)

A
A
C0.5
4
5
C
0
.
5
1
0
C
0
.
5
6
35 10
2
4
50
20
2
1
0
1
2
10
3
7


M3P0.5×6
(Depth of the preparatory hole |2.55×12)
M3P0.5×6
(Depth of the preparatory hole
|2.55×12)
Cross-sectional view AA
|3.5 drilled through-hole
(Chamfering of both openings C1)
Comment [ER36]: m2pro5169a.wmf
M3 Programming
5-159
Machining layout

GSC 607
MSM 103
(1) T41
(2) T42
(3) T43
T23
T24
T25
T02
T20
T06
T07
T08
T26
MSS 345
T01
T21
(1) T21
(6) T06 (8) T06
(10) T26
(11) T20
(11) T01 (9) T08 (7) T07 (5) T02
(2) T23
(3) T24
(4) T25
1.5M
3.5
4.0
6
1M
2.55
M3
5
10
2
2
2
1
0
9
0
4
5
10
20
3
4
.
0
2.55
M3
1M T41
T42
T43


Cut-off
cutting
edges
2 slitting
cutters used
Center drilling
Drilling
Tapping
Center drilling
Drilling
End milling
End milling
Workpiece receiver
Center drilling
Drilling
Tapping
Grooving
Comment [y37]: m2pro5169b-1.wmf
M3 Programming
5-160
Note

The X1 stroke is up to – 7.0. Therefore, the ordinary tool setting is unable to machine a | 3.5 mm
diameter cross-drilled through-hole in a workpiece which has a | 12.0 mm diameter.
If no shift amount is considered in the program, the X value is calculated as shown below.
– 12.0 – (3.5 × 0.3) × 2 = – 9.9
The X1 stroke is permitted up to X–7.0. (An alarm is issued for a stroke exceeding X–7.0.)
9.9 – 7.0 = 2.9 ~ 3.0
In consideration of leeway, the tool should be shifted 3.0 mm in diameter. Set 3.0 as "DIA" value in the
tool set data.

M3 Programming
5-161
Program sample

O0003
$1 $2 $3
G50 Z0
G610 G610 G610
(G611) G99 M23 S2=1061
M06 T4100
G00 X13.0 Z–0.5 G00 Z–1.0
G612 G01 Z2.8 F0.05 T41
T0200 G00 Z–1.0 T00
T2100 S2=1900
M05 G98 M83 S4=460
M28 S0 T4200
G00 Z–1.0
N0121 G01 Z10.0 F0.05 T32
G501 B071 Z–1.0 F1.0
G00 X7.6 Z–0.5 T21 G04 U0.5
G01 Z3.0 F21 Z9.5
X–7.6 Z13.3 F0.05
Z–0.5 F500 Z–1.0 F1.0
G500 B071 G04 U0.5
S4=4400 Z12.8
T2300 Z16.6 F0.05
N0223 Z–1.0 F1.0
G501 B031 G04 U0.5
M28 S180
G00 X6.0 Z16.1
G01 Z4.5 F132 T23 Z19.6 F0.05
G00 Z–0.5 T00 Z–1.0 F1.0
G500 B031 G04 U0.5
T2400 Z19.1
Z21.0 F0.05
N0324 Z–1.0 F1.0 T00
G501 B031 S2=500
G00 X6.0 G04 U1.0
G01 Z7.7 F264 T24
G00 Z–0.5
G04 U0.5
Z7.2
G01 Z11.77
G00 Z–0.5 T00
G500 B031
S4=500
T2500

M3 Programming
5-162
$1 $2 $3
N0425
G501 B041 T4300
G00 Z4.0 G00 Z–1.5
X6.0 G01 Z13.0 F0.56 T43
G01 Z9.8 F200 T25 Z–1.5 F0.7 M24 T00
Z2.0 F250 M84 T00 G04 U2.0
G04 U2.0 G00 Z–5.0 M25
G500 B041 T4000
M85
M03 S1=2800 G99
N0502 G611
T2600
G50 W–10.0
G00 X13.0 T02
Z1.0
G01 X10.0 Z–0.5 F0.025
G00 X13.0
Z8.0
G01 X11.0 Z9.0
X10.0
X13.0
Z10.0
X11.0 Z9.0 F0.025
X13.0 F0.2
G50 W10.0
M05
M80 S3=3200 G98
M28 S0
G630 G630 G630
T0600 G632 G632
N0606 T2000
G501 A011 M32 Z-10.0
G00 X13.0 Z20.0 T06 M16
G01 X1.6 F96 M72
G00 X13.0 M10
M28 S180 G04 U1.0
G01 X1.6 M11
G00 X13.0 M73
G500 A011 M33 T2500 C1
T0700

M3 Programming
5-163
$1 $2 $3
N0707
G501 A011
G00 X21.0 Z20.0 T07
G01 X8.0 F192
G00 X21.0
G04 U0.5
X9.0
G01 X–0.5
G00 X21.0
G04 U0.5
X1.5
G01 X–6.0
G00 X21.0
G500 A011
M28 S90
T0600
G610 G610 G610
N0806
G501 A011
G00 X13.0 Z35.0 T06
G01 X7.8 F96
G00 X13.0
G500 A011
S3=2600
T0800
N0908
G501 A011
G00 X13.0 Z35.0 T08
G01 X8.0 F130
Z45.0
X13.0
G500 A011
M82 M28 315
M83 S4=1700
N1026 G712

M3 Programming
5-164
$1 $2 $3
T0100
G501 B051
G00 X16.0 Z38.0 T26
G01 X–10.0
Z42.0
X16.0
G500 B051
M82 M85
M03 S1=2800 G99
G611
G00 X13.0 Z53.0
G01 X10.0 F0.025
X13.0
Z52.0
G650 G650 G650
G00 Z–2.0
M24 S2=2800
G98 G01 Z30.0 F1000
G04 U0.5
M15
M73
!3L1 !1L1
G01 X11.0 Z53.0 F0.025
X–1.0 F0.025
G610 G610 G610
X–3.0
M05
M07
G00 X–3.0 Z0 T00
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

M3 Programming
5-165
5.12.4 Program sample 4

Machining drawing

Material to be machined SK4F (carbon-tool free-cutting steel)
C
0
.
5
C
0
.
5
C
0
.
5
3
7
27.5
45
10
2.5
8
1
0
1
2
2.5
7.5


Machining layout

T20
T22
T24
T06
T02
T01
2
Z0
(1) T06
(2) T02
(3) T01
(a) T22
T24 (b)


Note: Back spindle chuck position: 10
mm
Workpiece
receiver
Comment [ER38]: m2pro5173a.wmf
Comment [ER39]: m2pro5173b.wmf
M3 Programming
5-166
Program sample

O0004
$1 $2 $3 Line
G50 Z0 1
G630 G630 G630 2
G632 G632 3
M06 4
G00 Z–0.5 5
M03 S1=4000 G99 M23 S2=4000 G99 6
T0600 7
8
9
T2200 10
G00 X13.0 Z–0.5 G00 X13.0 Z–1.0 11
X–3.0 X–30.0 12
G01 Z2.5 F0.06 T06 G01 Z2.5 F0.06 T22 13
G00 Z–0.5 T00 G00 Z–1.0 T00 14
T0200 X13.0 T2400 X13.0 15
S1=3400 S2=3400 16
G00 X13.0 Z–0.5 T02 G00 X13.0 Z–1.0 T24 17
X6.0 X7.0 18
G01 X8.0 Z0.5 F0.05 G01 X10.0 Z0.5 F0.05 19
Z10.0 Z7.5 20
X13.0 Z17.472 X11.0 21
X13.0 Z8.5 22
T0100 T2000 23
M32 Z-1.0 24
M25 25
26
M16 27
M10 28
M72 29
G04 U1.0 30
M11 31
M33 T2500 H4320 C1 32
T2200 33
34
35

M3 Programming
5-167
O0004
$1 $2 $3 Line
36
37
G00 X13.0 Z47.0 T05 M24 S2=3400 38
G650 G650 G650 39
G00 Z–2.0 40
G98 G01 Z35.0 F5000 41
!3L1 !1L1 42
M15 43
M73 44
!3L2 !1L2 45
G231 X-3.0 F0.03 A-1.0 W2 46
47
48
M05 49
M25 50
M07 51
G00 X–3.0 Z0 T00 52
53
M56 54
G999 G999 G999 55
56
57
58
G630 G630 G630 59
G632 G632 60
M23 S2=4000 G99 61
T2200 62
G00 X13.0 Z–1.0 63
X–30.0 64
G01 Z2.5 F0.06 T22 65
G00 Z–1.0 T00 66
S2=3400 67
T2400 X13.0 68
G00 X7.0 Z–1.0 T24 69
G01 X10.0 Z0.5 F0.04 70
Z7.5 71
X11.0 72

M3 Programming
5-168
$1 $2 $3 Line
X13.0 Z8.5 73
T2000 74
M32 Z-1.0 75
M25 76
M16 77
M10 78
M72 79
G04 U1.0 80
M11 81
M73 82
M33 T2500 H4320 83
84
85
86
87
88
89
90
N999 N999 N999 91
M02 M02 M02 92
M99 M99 M99 93
% % % 94

M3 Programming
5-169
The following explains the program shown in the above.

O0004
$1 $2 $3 Line
Coordinate system setting 1
Front/back parallel machining
command
Front/back parallel machining
command. The Z2 axis moves to
the workpiece zero point.
Front/back parallel machining
command. The Z3 axis moves to
the fixed point.
2
3
The main spindle chuck closes. 4
The main spindle rotates forward
at the speed of 4,000 min
–1
.
The back spindle rotates forward at
the speed of 4,000 min
–1
.
5
6
Selection of T0600 7
8
9
Selection of T2200 10
T0600 on the gang tool post is
positioned to the front center,
and it performs center
machining up to Z2.5.
T2200 on the turret tool post
is positioned to the back
center, and it performs center
machining up to Z2.5.
11
12
13
14
T0200 is selected and positioned to
X13.0.
T2400 is selected and positioned to
X13.0.
15
The main spindle rotates at the
speed of 3,400 min
–1
.
The back spindle rotates at the
speed of 3,400 min
–1

16
17
T0200 performs front turning
|8 and tapering 37
º
.
T2400 machines the
workpiece |10×7.5 mm.
18
19
20
21
22
23
Selection of T0100 Selection of T2000 24
The Z2 axis moves to Z–1.0. 25
The back spindle stops. 26
27
The chuck opens. 28
Knock-out advance 29
Air blower ON 30
1-second stop 31
Knock-out retract 32
Back product separation 33
Selection of T2200 34
35

M3 Programming
5-170
$1 $2 $3 Line
36
37
Positioning of the cut-off tool The back spindle rotates backward
at the speed of 4,000 min
–1
.
38
Pick-off command Pick-off command
(For $2, the command is executed
at the return position of the turret.)
Pick-off command (Z3
superimposed on Z1)
39
The back spindle moves to the
coordinate system setting value
Z–2.0.
40
The back spindle is
positioned to Z35.0.
41
Queuing for axis control group 3
($3)
Queuing for axis control group 1
($1)
42
The chuck closes. 43
Air blower OFF 44
Queuing for axis control group 3
($3)
Queuing for axis control group 1
($1)
45
Cut-off machining 46
Pick-off cancel command 47
The Z2 axis returns to the fixed
point Z0.
The Z3 axis returns to the
fixed point Z0.
48
The main spindle stops. 49
The chuck opens. 50
51
The Z1 axis returns to
the coordinate system
setting value Z0.
52
53
Product count 54
Last program execution command Last program execution command Last program execution command 55
56
57
58
59
60
Front/back parallel machining
command
Front/back parallel machining
command. The Z2 axis moves to
the workpiece zero point.
Front/back parallel machining
command. The Z3 axis moves to
the fixed point.
61
The back spindle rotates forward at
the speed of 4,000 min
–1
.
62
63
64
T2200 on the turret tool post
is positioned to the back
center, and it performs center
machining up to Z2.5.
65
66
67
T2400 is selected and positioned to
X13.0.
68
69
T2400 machines the
workpiece |10×7.5 mm.
70
71
72

M3 Programming
5-171
$1 $2 $3 Line
73
Selection of T2000 74
Positioning of the Z2 axis for
product separation
75
The back spindle stops. 76
The chuck opens. 77
Knock-out advance 78
Air blower ON 79
1-second stop 80
Knock-out retract 81
Air blower OFF 82
83
84
85
86
87
88
89
90
Last program completion
command
Last program completion command Last program completion
command
91
92
Execution of the end program
from M02 to %
Execution of the end program
from M02 to %
Execution of the end program
from M02 to %
93
94


M3 Programming
5-172
5.12.5 Program sample 5

Machining drawing

C
0
.
5
C
0
.
5
C
0
.
5
C
0
.
5
C
0
.
5
13 4
1
0
1
2
40
30
20
10 8
8 1
0
C
0
.
5
C
0
.
5
C
0
.
5
C
0
.
5
C
0
.
5
13 4
1
0
1
2
40
30
20
10 8
8 1
0


Machining layout

2–1.5M Center drilling
Comment [ER40]: m2pro5180a-1.wmf
M3 Programming
5-173
T01
T02
T06
T20
T27
T28
3
4
15
(1) T02
(2) T06
(3) T01
*T27 *T27
*T28


* Machining with $2

End milling
Center drilling
Workpiece receiver
Front turning
Front turning
Cut-off
Comment [ER41]: m2pro5180b.wmf
M3 Programming
5-174
Program sample

O0005
$1 $2 $3
G50 Z0
G610 G610 G610
(G611)
G99 M06
G00 X13.0 Z–1.0
M03 S1=3000 M23 S2=3000
T2700
T0200

N1
G00 X13.0 Z–0.5 T01
G640 G640 G640
G01 X6.0 F0.2 G00 Z–1.0 G00 Z–1.0
X8.0 Z0.5 F X–5.0
!2!3L1 !1!3L1 !1!2L1
Z10.0 F G01 Z4.0 F T27 G01 Z4.0 F T37
X9.0 G00 Z–1.0 T00 G00 Z–1.0 T00
X10.0 Z10.5 !3L2 !2L2
Z20.0 T2800
X11.0 M23 S2=3000
X13.0 Z21.0
G630 G630 G630
M05 G98 M80 S3=2500 G632 G632
M28 S0 (M18 C0) G00 X13.0 Z–1.0 T28
G01 X7.0 F0.2
X10.0 Z0.5 F
Z10.0
N2 T0600 X11.0
G501 A011 X13.0 Z11.0
G00 X13.0 Z15.0 T06 T2000
Y11.05.5 G00 X20.0 Z–1.0 M25
X8.0 M16
G01 Y–511.0.5 F M72
M28 S180.0 (M18 C180.0) M10
G01 Y11.05.5 G04 U1.0
G00 X13.0 M82 M11
G500 A011 M73
M20 M33 T2500 H4320 C1
M03 S1=3000 G99 T2700
G04 U1.0
T0100

M3 Programming
5-175
$1 $2 $3
N3
G00 X13.0 Z43.0 T01
G650 G650 G650
G00 Z–10.0 M24 S2=3000
G98 G01 Z26.0 F1000
G04 U1.0
M15
!3L3 !1L3
G231 X–3.0 F0.03 A–1.0 W1

M05
M25
M07
G00 X–3.0 Z0 T00
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

M3 Programming
5-176
5.12.6 Program sample 6

Machining drawing
5
.
0
7
.
5
1
0
.
0
1
2
.
5
1
5
.
0
10 15 25 30 40
120.0


Machining layout
T01
T02
T21
T20
3

Rough machining
Finish machining
Cut-off
Workpiece receiver
Cut-off
Front turning
Front turning
Workpiece
receiver
Comment [ER42]: m2pro-123a.wmf
Comment [ER43]: m2pro-123b.wmf
M3 Programming
5-177
Program sample

O0006
$1 $2 $3
G50 Z0
G610 G610 G610
(G611)
M06
G00 X16.0 Z1.0 M03 S1=1270 G99
T0200
T2100

N102 G611
G00 X16.0 Z–1.0 T02
G01 X6.0 F0.1
Z1.0 F
G620 G620 G620
Z39.9 N121 (Front turning finished
with T2100)

X9.0 G00 X16.0 Z–1.0 T21
Z69.9 G99 G01 X5.0 F0.5
X12.5 G50 S1270
Z94.9 G96 S40
X13.0 Z40.0 F
Z109.9 X7.5
X15.5 Z70.0
W2.0 X10.0
Z95.0
X12.5
Z110.0
X14.95
W0.5
X15.5
G97 S1=454
G610 G610 G610
T0100

N201 G711
T2000
G00 X16.0 Z123.0 T02
G96 S30
G50 S2000
G201 X–3.0 F0.02 A1.0 T2500 U1.0 C1
G97 M05
M07
M96

M3 Programming
5-178
$1 $2 $3
T2100
G00 X–3.0 Z0 T00
M56
G999 G999 G999
N999 N999 N999
M02 M02 M02
M99 M99 M99
% % %

M3 Programming
5-179

Product Code C – M 3 1 2 1 6 2 0 3 2 III V – 7 7 0

Document Code 5 E 1 – 0 5 0 25
43


5 E 2 – 0 5 0 25
43

M3 Programming
5-180