0% found this document useful (0 votes)
59 views202 pages

ISO Programming: G Codes Overview

This document provides safety instructions and a comprehensive guide on ISO programming G Codes, essential for users operating the machine. It includes detailed sections on various G functions, macros, and their applications, ensuring users can effectively utilize the machine's capabilities. Users are advised to keep the document for future reference to ensure compliance with safety protocols.

Uploaded by

Peter Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views202 pages

ISO Programming: G Codes Overview

This document provides safety instructions and a comprehensive guide on ISO programming G Codes, essential for users operating the machine. It includes detailed sections on various G functions, macros, and their applications, ensuring users can effectively utilize the machine's capabilities. Users are advised to keep the document for future reference to ensure compliance with safety protocols.

Uploaded by

Peter Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Caution!

Before using this ma-


chine all users must
read and comply with
the "SAFETY IN-
STRUCTIONS"! Keep
this document for fu-
ture reference.

G Codes
ISO PROGRAMMING
Translated from the original version – Ref.: 298732 _en
ISO programming - G Codes

Table of contents

1 Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..5
2 Tornos macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..7
2.1 Advanced G functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1.1 G800 [storing workpiece variables]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.1.2 G801 [storing cutting variables] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
2.1.3 G802 [storing delay variables] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
2.1.4 G803 [storing machine component variables] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
2.1.5 G804 [storing integrated bar feeder variables] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
2.1.6 G805 [storing of Turbo process variables]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
2.1.7 G900 [Program initialisation]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
2.1.8 G901 [3-position guidebush management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
2.1.9 G902 [Sensor control] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
2.1.10 G903 [Tool indexing by circular interpolation] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
2.1.11 G904 [counter-spindle on gang operating mode] . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
2.1.12 G907 [Axis configuration management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32
2.1.13 G908 [Coolant spraying management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
2.1.14 G910 [Initial cut]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
2.1.15 G911 [Positioning Z1 before part cutting] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
2.1.16 G912 [Part feeding]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
2.1.17 G913 [Remnant extraction] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
2.1.18 G915 [zero offset for frontwork and workpiece pickoff] . . . . . . . . . . . . . . . . . . . . . . . . .46
2.1.19 G916 [Zero offset for frontwork on counter-spindle] . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
2.1.20 G917 [Positioning the polygoning attachment from the decentred position] . . . . . .48
2.1.21 G918 [early program stop] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
2.1.22 G919 [Part extraction/holding in counter spindle] . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.1.23 G920 [Operation configuration management]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
2.1.24 G921 [Releasing an axis destined for another channel]. . . . . . . . . . . . . . . . . . . . . . . . .55
2.1.25 G923 [Part extraction management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57
2.1.26 G924 [Part pickoff] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
2.1.27 G930 [Management of work with/no material]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
2.1.28 G933 [Traditional threading cycle] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
2.1.29 G939 [Chipbreaker - ACB+] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
2.1.30 G940 [preparation for cutting Turbo process] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
2.1.31 G941 [Cutting and feeding next workpiece/Turbo process] . . . . . . . . . . . . . . . . . . . . .72
2.1.32 G942 [Event manager/Turbo process] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73
2.1.33 G944 [Spindle selector management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
2.1.34 G945 [Counter spindle cleaning management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
2.1.35 G946 [Pneumatic drills management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
2.1.36 G947 [Sensors management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
2.1.37 G948 [HF spindles management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
2.1.38 G949 [Optional sockets management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80

298732_en - 11/21
ISO programming - G Codes

2.1.39 G950 [Tool rotation with ratio management] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85


2.1.40 G951 [Polygoning mode activation] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87
2.1.41 G952 [Cutting mode activation] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
2.1.42 G953 [Thread milling mode activation] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
2.1.43 G954 [External whirling] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93
2.1.44 G960 [Slanted inner thread whirling] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
2.1.45 G961 [Milling of inclined pins] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
2.1.46 G962 [Milling for internal hexalobe print]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
2.1.47 G963 [Internal polygon milling] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
2.1.48 G964 [TWISTER Turning]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
2.1.49 G965 [Chip breaker - ACB] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
2.1.50 G966 [Turning a span in numerous strokes] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
2.1.51 G971 [Groove turning] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
2.1.52 G972 [Incision turning] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
2.1.53 G973 [Engraving of numerical values] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
2.1.54 G974 [Engraving of alphabetical values] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
2.1.55 G975 [Cylindrical helicoidal/external spiral milling] . . . . . . . . . . . . . . . . . . . . . . . . . . .160
2.1.56 G976 [Cylindrical helicoidal/internal spiral milling] . . . . . . . . . . . . . . . . . . . . . . . . . . . .167
2.1.57 G977 [Drilling - deburring] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
2.1.58 G980 [Double tool approach position] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181
2.1.59 G981 [Side milling with optimal approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
2.1.60 G982 [External helicoidal/spiral polygon milling] . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
2.1.61 G990 [reading the status of a PLC input/output] . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199

298732_en - 11/21
ISO programming - G Codes

298732_en - 11/21
1. Identification - ISO programming - G Codes

1 Identification
Document
ISO programming G Codes
No. 298732_en

Version manager
OV Translation Edit Date Description
FR 06/21 15/06/2021 First edition
EN 11/21 05/11/2021 First edition

298732_en - 11/21
1-5
ISO programming - G Codes - 1. Identification

Manufacturer
TORNOS SA
Rue Industrielle 111, 2740 Moutier
Tel. +41 (0)32 494 44 44
[Link]

Products
Lathe distributed by the manufacturer:
– G Codes

Machine supplied with:


– ISO
– Double channel safety devices (DCS)

General information
This document is written based on information available at the time of publication. TORNOS SA how-
ever disclaims all responsibility for the completeness or exactitude of the information in this manual.
The original version is written in French.
The information contained in these instructions is the property of TORNOS SA and was prepared for
the customer's internal use to the exclusion of any other use; transmission to third parties and its re-
production are prohibited.
For any further information, please contact the manufacturer or your local representative.

Compliance with standards and directives

CE mark
The ”CE” marking indicates the product is in compliance with the European machinery directives
in terms of safety, health, the environment and protection of users.

298732_en - 11/21
1-6
2. Tornos macros - ISO programming - G Codes

2 Tornos macros
2.1 Advanced G functions

2.1.1 G800 [storing workpiece variables]


This function stores the variables pertaining to the machining of the workpiece.

G800

Argument Description Optional Default

A Bar diameter [mm] [inch] No -

B Workpiece length [mm] [inch] No -

C Counter spindle workpiece pickoff dis- No -


tance
[mm] [inch]

D Barfeeder surplus [mm] [inch] Yes 0

E Facing allowance in mainwork [mm] [inch] Yes 0

F Facing allowance in backworking Yes 0


[mm] [inch]

H Spindle collet length (for work without Yes Depend-


guidebush only) [mm] [inch] ing on the
machine

I Internal diameter in case of pipes machin- Yes 0


ing
[mm] [inch]

J Number of workpiece(s) per clamping Yes 1

K Number of barloading per workpiece Yes 1

Arguments A, B, C, D, E, F, I:

298732_en - 11/21
2-7
ISO programming - G Codes - 2. Tornos macros

Argument H:
This argument is only necessary if you are working without a guidebush.

Argument J:
The machine runs one part per clamping by default.
If the spindle stroke allows it, it may be interesting to feed several parts per clamping to reduce the
average machining cycle time of a part.
The spindle collet opening and closing times, their respective delays and the end of Z movement
delay during barfeeding are only taken into consideration once for the number of parts fed.

Note
The more workpieces are machined per clamping, the more precise the cutter width value
(G801.B_) must be.

(1)

(1) 4 workpiece barfeeder position

Indicative values

Number of workpieces per clamping Cycle time gained per workpiece [s]

1 0

2 0.75

3 1

4 1.125

5 1.2

6 1.25

7 1.285

8 1.312

9 1.333

10 1.35

298732_en - 11/21
2-8
2. Tornos macros - ISO programming - G Codes

Argument K:
By default, the machine executes one barloading for one workpiece.
It is also possible to execute several barloadings for a single workpiece. This allows among other
things the machining of a workpiece that is longer than the spindle stroke (Z1).
To perform partial workpiece feeds, you must use argument “Z” of the G912.

(1)

(1) Workpiece length (G800 B_)

Programming example

G800 A12 B31 C15 D5 E0.2 J4

298732_en - 11/21
2-9
ISO programming - G Codes - 2. Tornos macros

2.1.2 G801 [storing cutting variables]


This function stores the variables specific to the cutting (for G910/G913/G941).

G801

Argument Description Optional Default

A Cutting tool number No -


Example: for T11 D0 = A110

B Cutting tool width [mm] [inch] No -

C Cutting tool angle [degree] No -

D Spindle speed mode [G96/G97] Yes 97


(96=m/min and 97 = rpm)

E Spindle speed [rpm] [m/min] (depending No -


on argument D)

F Feed rate during cutting [mm/rev] [inch/ No -


rev]

I Spindle speed limit value [G92] Yes Maxi-


(to be used if D = 96) [tr/min] mum
speed

J increment to break the chip if you want an Yes -


interrupted cut
(requires the option “ACB”) [mm][inch]

K Duration of dead time to break the chip Yes 0


(requires the option “ACB”) [seconds]

M Withdrawal to break the chip Yes 0.1 mm


(requires the option “ACB”) [mm][inch]

298732_en - 11/21
2-10
2. Tornos macros - ISO programming - G Codes

Arguments A, B, C, E, F:

Argument D:

Argument I:

Argument J, K, M:

Programming example

G801 A110 B2 C12 D97 E5000 F0.03

298732_en - 11/21
2-11
ISO programming - G Codes - 2. Tornos macros

2.1.3 G802 [storing delay variables]


This function stores the delays for the G9xx macros.

G802

Argument Description Optional Default

A Delay on opening the spindle collet [sec] Yes Depend-


ing on the
machine

B Delay on closing the spindle collet [sec] Yes Depend-


ing on the
machine

C Delay on opening the counter-spindle col- Yes Depend-


let [sec] ing on the
machine

D Delay on closing the counter-spindle collet Yes Depend-


[sec] ing on the
machine

E Delay after bar feeder thrust command Yes 1


[sec]

F Delay between spindle retraction during Yes 0.5


part feeding and spindle collet closing
[sec]

Arguments A, C:

Arguments B, D:

298732_en - 11/21
2-12
2. Tornos macros - ISO programming - G Codes

Argument E:
This delay leaves the bar feeder time to thrust before the machine starts to produce.

Argument F:

(1) Barloading movement


(2) Dwell
(3) Closing of collet

Programming example

G802 A0.6 B0.5

298732_en - 11/21
2-13
ISO programming - G Codes - 2. Tornos macros

2.1.4 G803 [storing machine component variables]


This function stores the elements which make up the machine.
Certain G9xx cycles will be affected by the machine configuration.

G803

Argument Description Optional Default

A Guidebush type: No -
0 = Stationary guidebush
1 = Rotating guidebush
2 = Powered guidebush
3 = Without guidebush (behaviour 1)
3.1 = Without guidebush (behaviour 2)
4 = Self-adjusting (3 positions)
5 = Habegger
100 = Non-standard (stroke Z1 configu-
rable)

B Barfeeder type: No -
0 = Any
10 = SBF216 (3 metres)
11 = SBF216 (4 metres)
12 = SBF532 (3 metres)
13 = SBF532 (4 metres)
20 = manually loaded bar feeder
100 = None

C Counter-spindle workpiece extraction Yes -


type:
0 = Jaw (manipulator)
1 = Cage + ejector
2 = Long workpieces device (without ex-
traction actuator)
3 = Long workpieces device (with ex-
traction actuator)
100 = None

298732_en - 11/21
2-14
2. Tornos macros - ISO programming - G Codes

Argument A:
Selecting the right guidebush type ensures the proper behaviour of the cycle.
When A100 is selected, the guidebush is considered non-standard at TORNOS SA. You will be able
to configure the stroke and the reference position of the spindle Z axis.

Without guidebush, behaviour 1 (A3):


It is advisable to use "A3" when the Z1 stroke of your machine allowing the spindle collet to reach
the cutter (in Z).
By selecting "A3":
– The spindle (Z1) will come as close as possible to the cutter to cut the workpiece (it automati-
cally positions itself at 0.5 mm from the cutter).
– If the cutting position is not attainable by the spindle collet, it is necessary to add a bar feeder
allowance (G800 D_), which has the disadvantage of being farther from the spindle collet
when machining with the other tools of the tool gang.

Without guidebush, behaviour 2 (A3.1):


When the stroke Z1 of your machine is insufficient for the spindle collet to reach the cutter (Z axis),
the use of “A3.1” is recommended to avoid adding a bar feeder allowance (G800 D_) (and there-
fore the drawback of being further away from the spindle collet for machining with the other tools
of the tool gang).

298732_en - 11/21
2-15
ISO programming - G Codes - 2. Tornos macros

By selecting "A3.1":
• The spindle (Z1) will make the cut in the reference position.
• Since the cutting position can therefore be reached systematically, it is not necessary to add a
bar feeder allowance to reach the cutting position.
(1) (1)

(3)
(2)

(1) Minimum position Z1


(2) Stroke Z1 is sufficient to reach the cutter: use A3
(3) Stroke Z1 is insufficient to reach the cutter: use A3.1
Note
This is the machine model and the cutter Z geometry which determines whether the cutting position
is attainable by the spindle collet.

Argument B:
The selection of the correct type of bar feeder ensures that the cycle behaves correctly.
If B20 is programmed, when the machine reaches the end of the bar it is possible to open the spin-
dle collet, remove the remnant, manually reload a new bar and press "START" to restart production.
If B100 is programmed, all the bar feeder commands are inhibited.

298732_en - 11/21
2-16
2. Tornos macros - ISO programming - G Codes

Argument C:
Selecting C2 "long workpiece device without extraction actuator" prevents the inhibition of count-
er-spindle collet controls in material-free mode. This prevents the counter-spindle from remaining
open and the last machined workpiece does not walk in the collecting tube.

Programming example

G803 A1 B0

298732_en - 11/21
2-17
ISO programming - G Codes - 2. Tornos macros

2.1.5 G804 [storing integrated bar feeder variables]


This function configures the operation of the Tornos bar feeders (SBF216i/SBF532i).

G804

Argument Description Optional Default

A Bar end position [mm][inch] Yes Automatic


calculation.

B Work feed rate [mm/min][inch/rev] Yes G0

C Working torque [%] Yes Depending


on bar diam-
eter

D Control of workpiece length: Yes 0


0 = Inactive
1 = Active

E Permissible workpiece length error [mm][inch] Yes 0.2

F Cutter breakage test during workpiece feeding: No 0


0 = Inactive
1 = Active

Argument A:
The bar end position is calculated automatically. A fine adjustment can be made manually.
For manual adjustment of the bar and position, the spindle (Z1) must be positioned in the reference
position beforehand, retracting it by the “bar feeder allowance” + “safety”. Then you can push the
push-rod behind the spindle, note the value of the position of axis Z12 on the NC and enter it into
argument A of G804.

298732_en - 11/21
2-18
2. Tornos macros - ISO programming - G Codes

(1) Safety (10 mm)


(2) Surplus (G800 D)

298732_en - 11/21
2-19
ISO programming - G Codes - 2. Tornos macros

Arguments B, C:
Argument B should not be used as a rule. Its normal operating mode is G0.
Mode G1 is only used for very specific applications.

Argument C represents the bar feeder’s torque.


Default values are given in the table below:

Bar diameter [mm] Torque [%]

0.001… 3 2

3.001… 4 3

4.001… 7 5

4.001… 9 7

9.001 … 10

Arguments D, E:
When argument D is set to 1, the bar feeder checks on each cycle that the distance travelled by
the bar feeder push-rod matches the quantity of material consumed per workpiece. Argument E is
used to configure the permissible error.

298732_en - 11/21
2-20
2. Tornos macros - ISO programming - G Codes

Argument F:
When argument F is set to 1, the cutter breakage check is active. So on each material feed (G912)
when the spindle collet is open, if there is a significant movement of the push-rod, the cutter is con-
sidered to be more present in front of the bar and therefore potentially broken. In this case, the ma-
chine stops.

Note
If the guidebush is very tightly fitted, it is possible that there is no movement on the push-rod with the
spindle collet open, so the cutter breakage detection will not be possible.

Programming example

G804 A-2812 B500 C8

298732_en - 11/21
2-21
ISO programming - G Codes - 2. Tornos macros

2.1.6 G805 [storing of Turbo process variables]


This function configures the operation of the Turbo process.
It will influence the behaviour of the G940/G941/G942 macros.
This process aims to parallelise and optimise operations to reduce cycle time.

The turbo process allows, among other things:


– Parallelisation of the positioning of the bar and the positioning of the counter-spindle before
part pickoff.
– Parallelisation of cutting of one piece and the feeding of the next part, for machines with a bar
diameter greater than 10 mm.
– Optimisation of counter-spindle positioning movements for part pickoff.
– Optimisation of the withdrawal movements of the counter-spindle after part pickoff.
– A decrease in dead time.

G805

Argument Description Optional Default

A Z1 feed in cutting preparation phase Yes G0


[mm/min] [inch/min]

B Z4 feed in cutting preparation phase Yes G0


[mm/min] [inch/min]

E Feed next part at the same time as part Yes 0


cut-off
0 = inactive
1 = active

F Minimum diameter to ensure that the bar is Yes 2.5 mm


kept rotating [mm] [inch]

H Breakage test of the cutter by withdrawal Yes 0


of counter-spindle
0 = inactive
1 = active

I High performance mode. Yes 0


0 = inactive
1 = active

J Boost mode Yes 0


0 = inactive
1 = active

M Spindle synchronisation type for part pick- Yes 417


off
M417 = speed synchronisation
M418 = phase synchronisation

S New speed against spindle after part pick- Yes -


off
[rpm]

X Counter-spindle clearance position in X. Yes 0


[mm] [inch]

Y Counter-spindle clearance position in Y. Yes 0


[mm] [inch]

298732_en - 11/21
2-22
2. Tornos macros - ISO programming - G Codes

G805

Argument Description Optional Default

Z Counter-spindle clearance position in Z. No -


[mm] [inch]

Note
Arguments “E” and “F” are not available for machines with a diameter of less than 10 mm.

Attention!
The Turbo process uses the original G57 offset, so it is forbidden to overwrite it to ensure proper op-
eration.

Arguments A, B, M:

Arguments E, F:

298732_en - 11/21
2-23
ISO programming - G Codes - 2. Tornos macros

Argument H:

Argument I:
The high performance mode is interesting for reducing cycle times.
By default, the G942 functions of channel 1 and channel 2 are synchronised, that is to say that both
functions wait before going on to the next cycle.
By putting argument I to 1 the functions no longer wait and the cycle time decreases.

Attention!
By setting argument I to 1, it is inadvisable to enable/disable an event such as:
"Work with/without material" and "stop at the end of the cycle" at the moment when the cycle is
looped (during functions G940, G941 G942).
The risk is to have the alarm PS0160 that appears.

298732_en - 11/21
2-24
2. Tornos macros - ISO programming - G Codes

Argument J:
When the "boost" mode is active (J1), the cycle time is generally decreased.
In fact, the boost mode makes it possible to preserve, for the duration of the cycle, a counter-spin-
dle axis setting which allows indexing in rapid circular interpolation for part pickoff and clearing.
If the boost mode is deactivated, the parameters of the counterspindle axes are rewritten at each
part cycle, which may penalize the cycle time for up to 0.25 seconds.

Note
If backworking operations require interpolations with very high precision, it is advisable to set the “J”
argument to 0.

Arguments X, Y, Z, S:

Note
There are always 2 axes that make it possible to remove the counter-spindle in circular interpolation.
Depending on the machine model, the circular interpolation is done in X-Z or Y-Z.
The third axis makes it possible to centre the counter-operation tools.

Programming example

G805 X474 Z300 S1000

298732_en - 11/21
2-25
ISO programming - G Codes - 2. Tornos macros

2.1.7 G900 [Program initialisation]


This function is used to recover data from the G8xx functions and the program initialisation.
This function initialises the part program. It calculates the main zero offsets:
G54 = For frontwork
G55 = For backwork

Programming example

G900

298732_en - 11/21
2-26
2. Tornos macros - ISO programming - G Codes

2.1.8 G901 [3-position guidebush management]


This function is used to adjust the self-adjustable guidebush (3 positions) at any time.

G901

Argument Description Optional Default

A Guidebush adjustment type: No -


0 = Open
1 = Adjusted pressure closing (2 bar)
2 = Maximum pressure closing (5 bar)

(1) A0 = Open
(2) A1 = Adjusted (pressure of 2 bar)
(3) A2 = Closed (pressure of 5 bar)

Programming example

G901 A2

298732_en - 11/21
2-27
ISO programming - G Codes - 2. Tornos macros

2.1.9 G902 [Sensor control]


This function is used to control the correct operation of certain machine sensors.

G902

Argument Description Optional Default

A Manipulator arm collet sensor control: Yes 0


0 = Inactive
1 = Active

Argument A:

(1) Sensor

Note
The availability of the arguments depends on the machine equipment.

Programming example

G902 A1

298732_en - 11/21
2-28
2. Tornos macros - ISO programming - G Codes

2.1.10 G903 [Tool indexing by circular interpolation]


This function is used to index a tool in circular interpolation mode.

G903

Argument Description Optional Default

D No. of tool corrector with which you wish to Yes 0


work

F Advance during tool indexing [mm/rev] Yes Fast

T No. of tool with which you wish to work No -

Details
The advantages of indexing in circular interpolation are:
– prevent machine bouncing (while another tool is digging into the material);
– optimise machine power consumption.

(1) (2)

(1) Indexing in circular interpolation


(2) Traditional indexing

(1)

(1) (2) (1) (2)

(2) (1) (2) (1)

(1) Play with the F argument so that the indexing will be as long as possible, without nev-
ertheless making it longer than the machining that is being done in parallel in the oth-
er channel.
(2) Machining
(3) Indexing

298732_en - 11/21
2-29
ISO programming - G Codes - 2. Tornos macros

Programming example

Channel “machining in progress” Channel “tool indexing”

M9001 M9001

G1 Z-6 F0.05 (Machining) G903 T12 D0 F300 (Tool indexing)


G1 X9 F0.07
G1 X10 Z-7 F0.05

M9202 M9202

298732_en - 11/21
2-30
2. Tornos macros - ISO programming - G Codes

2.1.11 G904 [counter-spindle on gang operating mode]


This function activates a mode allowing work with the counter-spindle on a tool gang tool, as if it
were a stationary backwork tool.

G904

Argument Description Optional Default

A Operating mode: No -
0 = Mode deactivation
1 = Mode activation

D No. of tool corrector with which you wish to Yes 0


work

T No. of tool with which you wish to work No -

Principle
Put the tool gang tool in the desired position. Then the G904 is programmed in the backwork chan-
nel. This makes it possible to program machining in a traditional way.
The moving axes for machining are those of the counter-spindle.

Programming example

Channel “tool” Channel “counter-spindle”

G0 X3 Y0 T381 D0 (Gang tool positioning)

M9001 M9001

G904 A1 T381 D0 (Mode activation)


G1 X_ Z-_(Machining)
G0 Z_ (Tool retraction)
G904 A0 (Mode deactivation)

M9202 M9202

298732_en - 11/21
2-31
ISO programming - G Codes - 2. Tornos macros

2.1.12 G907 [Axis configuration management]


This function is used to modify the behaviour of a given axis.
Note
This function must be programmed in the original axis channel to be configured

G907

Argument Description Optional Default

A Name of axis A that you want to set up Yes -

B Name of axis B that you want to set up Yes -

C Name of axis C that you want to set up Yes -

F Brake locking Yes -

H Torque limit value [%] Yes No value


change

I Torque limit: Yes No status


0 = Deactivate change
1 = Activate

J Maximum lag error value tolerated Yes No value


[mm][inch] change

K Lag error check: Yes No status


0 = Deactivate change
1 = Activate

X Name of axis X that you want to configure Yes -

Y Name of axis Y that you want to configure Yes -

Z Name of axis Z that you want to configure Yes -

Arguments A, B, C, D, Y, Z, Y:
This argument allows choosing the axis that you wish to configure.
Only one of these arguments can be programmed at a time.

298732_en - 11/21
2-32
2. Tornos macros - ISO programming - G Codes

Argument F:
When this argument is 1, it activates the brake blocking of the chosen axis in its current position.
When it is reset to 0, the brake is unlocked.
Only brake axes can use this argument.

Programming example

G907 B2 F1 (Brake locking of axis B2)

298732_en - 11/21
2-33
ISO programming - G Codes - 2. Tornos macros

Argument H, I:
Argument H allows initializing a torque percentage that you want to set on the chosen axis.
chosen.
By default the axis torque is 100%.
Argument I enables the torque limitation passed by argument H to be turned on/off.

Programming example

G907 X4 H30 I1 J3 K1 (X4 axis torque limitation at 30% and a maximum permitted position error of
3 mm)

298732_en - 11/21
2-34
2. Tornos macros - ISO programming - G Codes

Arguments J, K:
Argument J allows initiating a maximum lag error distance.
Argument K allows turning the lag error on/off.
If K=1, if the difference between the axis theoretical position and actual position is greater than the
value passed in argument J, the NC will trigger and stop the cycle immediately.

Programming example

G907 H20 I1 J0.2 K1 (Z4 axis torque limitation at 20% and a 0.2 mm lag error)

298732_en - 11/21
2-35
ISO programming - G Codes - 2. Tornos macros

2.1.13 G908 [Coolant spraying management]


This function is used to configure the behaviour of coolant spraying very simply.

G908

Argument Description Optional Default

A Standard coolant spraying: Yes No status


0 = Inactive change
1 = Active

B Standard coolant spraying valve of tool 1 system: Yes No status


0 = Closed change
1 = Open

C Standard coolant spraying valve of tool 2 system: Yes No status


0 = Closed change
1 = Open

D Ejector standard coolant spraying valve: Yes No status


0 = Closed change
1 = Open

E Counter spindle standard coolant spraying valve: Yes No value


0 = Closed change
1 = Open

F Backwork block standard coolant spraying valve: Yes No status


0 = Closed change
1 = Open

H Curtain rinsing standard coolant spraying valve: Yes No status


0 = Closed change
1 = Open

I Z2 slide rinsing standard coolant spraying valve: Yes No status


0 = Closed change
1 = Open

J Standard coolant spraying valve of tool 1 & 2 system: Yes No status


0 = Closed change
1 = Open

L HP Coolant spraying 1: Yes No status


0 = Inactive change
1 = Active

M Coolant valves 1 HP pump 1: Yes No status


0 = Closed change
1 = Open

N Coolant valves 2 HP pump 1: Yes No status


0 = Closed change
1 = Open

O Coolant valves 3 HP pump 1: Yes No status


0 = Closed change
1 = Open

298732_en - 11/21
2-36
2. Tornos macros - ISO programming - G Codes

G908

Argument Description Optional Default

P Coolant valves 4 HP pump 1: Yes No status


0 = Closed change
1 = Open

R HP Coolant spraying 2: Yes No status


0 = Inactive change
1 = Active

S Coolant valves 1 HP pump 2: Yes No status


0 = Closed change
1 = Open

T Coolant valves 2 HP pump 2: Yes No status


0 = Closed change
1 = Open

U Coolant valves 3 HP pump 2: Yes No status


0 = Closed change
1 = Open

V Coolant valves 4 HP pump 2: Yes No status


0 = Closed change
1 = Open

Programming example

G908 A1 C1 H1 J0 L1 M1 R0 T0

298732_en - 11/21
2-37
ISO programming - G Codes - 2. Tornos macros

2.1.14 G910 [Initial cut]


This function makes it possible to perform the initial bar cutting before entering the machining loop.

G910

Argument Description Optional Default

A Adjustment of self-adjustable guidebush Yes 1


before the initial cut:
1 = Adjusted closing pressure (2 bars)
2 = Maximum closing pressure (5 bars)

B Spindle stop if end of cycle active at end of Yes 0


initialisation:
0 = Inactive
1 = Active

C Coolant spraying stop if end of cycle active Yes 0


at end of initialisation:
0 = Inactive
1 = Active

D Spindle rotation speed during initial posi- Yes End of


tioning of the spindle with an open collet cutting
[rpm] speed /
300

X Position of intermediate cut for manual en- Yes Depend-


try of the last workpiece machined. ing on the
machine

298732_en - 11/21
2-38
2. Tornos macros - ISO programming - G Codes

Argument X:
The check box “Stop partial cut” in the AUX panel of T-MI allows the initial cut to be temporarily in-
terrupted before the cutter reaches the centre of the bar. Argument “X” is used to enter the diam-
eter at which the machine stops. The argument is optional, by default a diameter of 0.2/0.3 mm is
used.
Principle:
1) Machining of part of a workpiece in operation
2) Press RESET (before having cut the workpiece)
3) Check the box “Stop partial cut” in the AUX panel of T-MI
4) Start the program
5) The cycle stops once the cutter has reached position X
6) Open the door and take the workpiece, breaking it manually
7) Measure the piece and adjust the tool correctors if necessary
8) Close the door and press "start” (the cycle resumes)

(1)

(1) T-MI: Configuration stop at partial cut


Note
The spindle and the spraying resume automatically when the cycle proceeds.

Programming example

G910

298732_en - 11/21
2-39
ISO programming - G Codes - 2. Tornos macros

2.1.15 G911 [Positioning Z1 before part cutting]


This function allows the Z axis of the spindle to be correctly positioned before cutting the workpiece.

G911

Argument Description Optional Default

A Axis Z feed speed [mm/min] [inch/min] Yes G0

Argument A:

(1)

(1) Part length + facing surplus in backwork

Programming example

Channel “cutting tool” Channel “counter-spindle”

G911 (Positioning before cutting)

M9201 M9201

M9202 G915
M418
G924 (Workpiece pickoff)

M9202 M9202

G1 G95 X0 F0.05 (Cutting)

298732_en - 11/21
2-40
2. Tornos macros - ISO programming - G Codes

2.1.16 G912 [Part feeding]


This function allows the feeding of a certain quantity of material to allow machining of one or more
workpieces.

G912

Argument Description Optional Default

A Z axis feed speed during barloading Yes G0


[mm/min] [inch/min]

B Rotation speed of the spindle during the Yes Last


barloading speed
[rpm] pro-
grammed

C Spindle speed at function output: Yes 1


0 = Cutting speed (according to G801 E)
1 = Preservation of bar feeding speed
(argument B)

Z Quantity of material to feed in case Yes Accord-


of partial barloading of the workpiece (sev- ing
eral to G800
barloadings for a single workpiece) [mm] argu-
[inch] ments

Arguments A, C:

Programming example

G912 B300

298732_en - 11/21
2-41
ISO programming - G Codes - 2. Tornos macros

Arguments A, B, Z:

(1)

(1) Workpiece length (G800B_)

Programming example

Channel “tool” Channel “counter-spindle”

G912 B300 Z50 (Bar feeding 1)


G0 W0.2
G0 X21 T110 D0 (cutting tool retraction)
...

M9005 M9005

M103 S300 P1 M11


G0 Z-50 T110 D0 (Bar positioning) G4 X0.5
M404 S300 P4
M418

M9006 M9006

G915
G924 Z-25 (Bar locking)

M9007 M9007

G912 B300 Z30 (Bar feeding 2)

M9008 M9008

M11
G4 X0.5
G28 W0

M9009 M9009

... ...

298732_en - 11/21
2-42
2. Tornos macros - ISO programming - G Codes

2.1.17 G913 [Remnant extraction]


This function checks whether the end of bar position has been reached by the bar feeder.
If so:
- The remnant is deburred then extracted;
- The new bar loading order is given to the barfeeder;
- The new bar is inserted into the guidebush then sheared by the cutting tool.

G913

Argument Description Optional Default

A Deburring method: Yes 0


0 = In-feed
1 = Straight turning

B Z axis feed speed for remnant extraction Yes G0


from guidebush and introduction of a new
bar into the guidebush [mm/min] [inch/
min]

C Coolant spraying during new bar loading: Yes -


- = Inactive during loading then restarts
0 = Always inactive
1 = Always active

D Spindle speed during bar feeding [rpm] Yes 300

E Delay before spindle collet closing follow- Yes 0.5


ing loading of a new bar [sec]

F Deburring distance on bar end [mm] [inch] Yes 0.5

H Distance for insertion of new bar/retraction Yes Depend-


of bar end from guidebush [mm] [inch] ing on the
machine
(without
guidebus
h = 0)

I Adjustment self-adjustable guidebush for Yes -


shearing of the bar:
1 = Adjusted closing pressure (2 bars)
2 = Maximum closing pressure (5 bars)

J Number of cuts to perform at start of bar to Yes 0


ensure no work is done in void on the first
parts (can be used with different bar
lengths and a type of barloading that does
not calibrate the bar)

K Quantity of material to remove per cut (in Yes 10


relation to argument “J”) [mm] [inch]

Note
If the remnant gets stuck in the guidebush during change of bar, it could be useful to adapt the
rotation speed of the bar using argument “D” and reduce the extraction speed of the remnant us-
ing argument “B”.

Arguments A, F:

298732_en - 11/21
2-43
ISO programming - G Codes - 2. Tornos macros

Arguments B, D, H:

298732_en - 11/21
2-44
2. Tornos macros - ISO programming - G Codes

Arguments I, J, K:
The “J” and “K” arguments may be interesting in two situations:
1) In case you have a bar feeder that does not calibrate the length of the bar and we have
batches of irregular bars. It is therefore possible to guarantee that one works well in the material
from the first part.
2) In case of machining parts of considerable length and remnant length too large to be extract-
ed by the bar feeder (usually 400mm max.).
Example:
Bar length: 3000 mm
Length consumed per workpiece: 518 mm
Maximum remnant length that can be extracted by the bar feeder: 400 mm

It is therefore possible to machine 5 parts (5 x 518 = 2590) per bar.


The remnant will be 410 mm (3000 - 2590 = 410).
It is therefore not possible to make an additional part or extract the chute.
By shortening the bar by 15 mm with the “J” and “K” arguments, the remnant length will in-
crease to 395 mm and can be extracted.

Programming example

G913 D300

298732_en - 11/21
2-45
ISO programming - G Codes - 2. Tornos macros

2.1.18 G915 [zero offset for frontwork and workpiece pickoff]


This function makes it possible to calculate and activate a zero offset in real time, depending on
the positioning of the bar.
It then allows you to work with the tools at the front or to perform a part pickoff by the counter spin-
dle (Z axis independent from the bar).

Attention!
It is vital that the spindle (Z1 axis) is positioned and no longer moving before running G915.

Programming example

Channel 1 Channel “Z axis regardless of the spindle”

G0 Z-26 T12 D0(Bar positioning)

M9001 G915 (Zero offset calculation)


G0 Y0 X0 T31 D0
G0 Z1
G1 Z-12
G0 Z-1

M9002 M9002

298732_en - 11/21
2-46
2. Tornos macros - ISO programming - G Codes

2.1.19 G916 [Zero offset for frontwork on counter-spindle]


This function makes it possible to calculate and activate a zero offset in real time, depending on
the positioning of the workpiece in the counter-spindle.
It allows you to then work with axis Z2 on the counter-spindle.
Note
It is vital that the counter-spindle (Z4 axis) is positioned and no longer moving before running G916.

Programming example

Channel 2 Channel “counter-spindle”

G0 Z536 T40 D0 (counter-spindle positioning)

M9001 P23 M9001 P23

G916 (Zero offset calculation)


G0 Y0 X0 T24 D0
M403 S4200 P4
G0 Z-2
G1 Z18 F0.08
G0 Z-2

M9002 P23 M9002 P23

298732_en - 11/21
2-47
ISO programming - G Codes - 2. Tornos macros

2.1.20 G917 [Positioning the polygoning attachment from the decentred position]
The special geometries of the polygoning attachment may prove to be a problem for machining
a polygon.
On certain machines with reduced strokes on X or on Y, the material cannot be worked on horizon-
tally (on the X axis).
The G917 macro makes it possible to work on the material obliquely on 2 simultaneous axes (X and
Y).

Note
G917 does not activate the polygoning mode activation (spindle synchronisation).

G917

Argument Description Optional Default

A Diameter to reach [mm] [inch] No -

B Type of movement: Yes 1


0 = Fast feed (G0)
1 = Work feed (G1)

C Work feed [mm/min] [inch/rev] No -


(except if B0)

D Position to reach in Z [mm] [inch] Yes Current


position

E Working angle [°] Yes 45

The reasons which make it impossible to work on a single axis:

(1) Maximum X position.


(2) Maximum Y position.

298732_en - 11/21
2-48
2. Tornos macros - ISO programming - G Codes

Arguments A, B, C, D, E: work on 2 simultaneous axes

Programming example

G0 Y-20 X10 T25 D0


G917 A8 B0 E45
G917 A6 B1 C150 E45
G917 A6 B1 C140 D-10 E35
G917 A8 B1 C150 D-12 E45
G917 A8 B0 E45

298732_en - 11/21
2-49
ISO programming - G Codes - 2. Tornos macros

2.1.21 G918 [early program stop]


This function makes it possible to perform programmed stops at regular intervals.
It is sometimes useful to be able to stop periodically (after a given number of cycles), for instance
when manual intervention by the operator is required to remove chips from inside the machine.
To do this, insert a G918 A_ in the part program (where you want it to stop).

G918

Argument Description Optional Default

A Stop every number of cycles No -

B In no material mode: Yes 0


0 = No stop
1 = With stop

M Type of stop: Yes 0


0 = Systematic stop
1 = Stop only if M1 is active on the NC

(1)

(1) 1x/A program stop

Programming example

G918 A10

298732_en - 11/21
2-50
2. Tornos macros - ISO programming - G Codes

2.1.22 G919 [Part extraction/holding in counter spindle]


This function makes it possible to eject (into the chips) or not the workpiece which is in the counter-
spindle after a "RESET" or a machine startup. This function also affects the workpiece counter.

(1)

(1) T-MI: Configuration of workpiece holding.

G919

Argument Description Optional Default

A Delay on ejection [sec] Yes Ejector = 2


Air = 2
Oil = 3

B Delay to allow the ejector to return [sec] Yes 0.3

C Holding the counter-spindle collet open af- Yes 0


ter ejection:
0 = No
1 = Yes

D Type of ejection: Yes 0


0 = Ejector
1 = Air through the counter-spindle
2 = Oil via the counter spindle

298732_en - 11/21
2-51
ISO programming - G Codes - 2. Tornos macros

Programming example

G919 A3 D1

298732_en - 11/21
2-52
2. Tornos macros - ISO programming - G Codes

2.1.23 G920 [Operation configuration management]


This function is used to call one or more axes in its channel. It is paired with function G921.
The function calculates and automatically activates the correct zero offset.
The function limits its changes of axis to only those which it considers to be useful.

G920

Argument Description Optional Default

A Axis A that I want to call in the current channel Yes -

B Axis B that I want to call in the current channel Yes -

C Axis C that I want to call in the current channel Yes -

Q Channel in which the axis (or axes) will be recovered No -

X Axis X that I want to call in the current channel Yes -

Y Axis Y that I want to call in the current channel Yes -

Z Axis Z that I want to call in the current channel Yes -

Note
On EvoDECO G920/G921 must only be programmed between channel synchronisations. On Swiss-
DECO this is not necessary.

298732_en - 11/21
2-53
ISO programming - G Codes - 2. Tornos macros

Programming example

Channel 1 Channel 2

M9001 M9001

G921 Z1 C1 Q2 (Releases Z1 and C1) G921 Z1 C1 Q1 (Calls Z1 and C1)

G941 (preparation for cutting) G941 (Cutting and feeding next workpiece)

M9002 M9002

G1 X_ Z_ T22 D0 (Machining)
...

M9003 M9003

G920 Z1 C1 Q2 (Calls Z1 and C1) G921 Z1 C1 Q1 (Releases Z1 and C1)

298732_en - 11/21
2-54
2. Tornos macros - ISO programming - G Codes

2.1.24 G921 [Releasing an axis destined for another channel]


This function is used to release one or more axes for another channel. It is paired with function G920.
The function limits its changes of axis to only those which it considers to be useful.

G921

Argument Description Optional Default

A Axis A that I want to call in the current channel Yes -

B Axis B that I want to call in the current channel Yes -

C Axis C that I want to call in the current channel Yes -

Q Channel in which the axis (or axes) will be recovered No -

X Axis X that I want to call in the current channel Yes -

Y Axis Y that I want to call in the current channel Yes -

Z Axis Z that I want to call in the current channel Yes -

Note
On EvoDECO G920/G921 must only be programmed between channel synchronisations. On Swiss-
DECO this is not necessary.

298732_en - 11/21
2-55
ISO programming - G Codes - 2. Tornos macros

Programming example

Channel 1 Channel 2

M9001 M9001

G921 Z1 C1 Q2 (Releases Z1 and C1) G921 Z1 C1 Q1 (Calls Z1 and C1)

G941 (preparation for cutting) G941 (Cutting and feeding next workpiece)

M9002 M9002

G1 X_ Z_ T22 D0 (Machining)
...

M9003 M9003

G920 Z1 C1 Q2 (Calls Z1 and C1) G921 Z1 C1 Q1 (Releases Z1 and C1)

298732_en - 11/21
2-56
2. Tornos macros - ISO programming - G Codes

2.1.25 G923 [Part extraction management]


This macro is used to control the counter-spindle workpiece extraction components.

G923

Argument Description Optional Default

H Status of the collet/manipulator basket: Yes No status


0 = Open change
1 = Closed

I Check presence of workpiece when closing collet: Yes 1


0 = Inactive
1 = Active

J Pivot status of manipulator arm: Yes No status


0 = Moved back change
1 = Advanced

K Output status of manipulator arm: Yes No status


0 = Moved back change
1 = Advanced

L Ejector state: Yes No status


0 = Moved back change
1 = Removed

M Status of the manipulator door: Yes No status


0 = Open change
1 = Closed

O Status of long-workpiece ejector: Yes No status


0 = Moved back change
1 = Advanced

P Check position of long-workpiece ejector: Yes 1


0 = Inactive
1 = Active

Q Status of long-workpiece output: Yes No status


0 = Moved back change
1 = Advanced

R Check position of long-workpiece output: Yes 1


0 = Inactive
1 = Active

S Opening of long-workpiece output door: Yes No status


0 = Closed change
1 = Open

T Check position of long-workpiece output door: Yes 1


0 = Inactive
1 = Active

U Delay after pneumatic action [dry] Yes 0

298732_en - 11/21
2-57
ISO programming - G Codes - 2. Tornos macros

G923

Argument Description Optional Default

V Long workpiece tipper: Yes No status


0 = Moved back change
1 = Advanced

W Check long-workpiece tipper: Yes 1


0 = Inactive
1 = Active

298732_en - 11/21
2-58
2. Tornos macros - ISO programming - G Codes

Argument H, I:
Argument “H” is used to modify the status of the manipulator collet.
This argument is optional; if omitted, the collet does not change status.
0 = opens the collet
1 = closes the collet
When H = 1 (collet closed), argument “I” is used to configure if the presence of the workpiece in the
manipulator collet is to be checked or not.
This argument is optional; if omitted, the check is active by default.

Argument M:
Argument “M” is used to modify the status of the door to allow the workpiece manipulator to move
from inside to outside the machine or vice-versa.
This argument is optional; if omitted, the door does not change status.
0 = opens the door
1 = closes the door

298732_en - 11/21
2-59
ISO programming - G Codes - 2. Tornos macros

Arguments J, K:
Arguments “J” and “K” are used to manage the movements of the pneumatic manipulator arm.
These arguments are optional, when they are omitted the pneumatic elements do not change sta-
tus.
K0 = the manipulator returns to its rest position
K1 = the manipulator comes out in its workpiece pick-off position
J0 = the manipulator pivots in its rest position
J1 = the manipulator pivots in its workpiece pick-off position

Argument L:
Argument L allows managing the pneumatic ejector state.
Argument L is optional, if it is omitted no state change takes place on the ejector.
L0 = the ejector retracts
L1 = the ejector comes out

Arguments O, P:
Argument “O” is used to manage the status of the pneumatic long-workpiece ejector.
Argument “O” is optional, if it is omitted no status change takes place on the ejector.
O0 = the ejector retracts
O1 = the ejector comes out

Argument “P” is used to manage the status of the long-workpiece ejector.


By default, the control is active.
P0 = Inactive
P1 = Active.

298732_en - 11/21
2-60
2. Tornos macros - ISO programming - G Codes

Arguments Q, R:
Argument “Q” is used to manage the movement of the pneumatic long-workpiece output.
Argument “Q” is optional, if it is omitted no status change takes place on the movement of the
long-workpiece output.
Q0 = Long-workpiece output retracted
Q1 = Long-workpiece output advanced

Argument “R” is used to manage the status of the long-workpiece output.


By default, the control is active.
R0 = Inactive
R1 = Active

Arguments S, T:
Argument “S” is used to manage the movement of the pneumatic long-workpiece door.
Argument “S” is optional; if it is omitted no state change takes place on the opening/closing of the
long-workpiece output.
S0 = Door closed
S1 = Door open

Argument “T” ” is used to manage the opening/closing of the long-workpiece door.


By default, the control is active.
T0 = Inactive
T1 = Active

298732_en - 11/21
2-61
ISO programming - G Codes - 2. Tornos macros

Argument U:
Argument U allows the application of a delay on a pneumatic operation, in order to wait for the
cylinder to complete its movement.
The argument is optional, if omitted, no delay is applied.

Arguments V, W:
Argument “V” is used to manage the status of the pneumatic long-workpiece tipper.
Argument “V” is optional; if it is omitted no status change takes place on the tipper.
V0 = the V tips forwards
V1 = the V tips backwards

Argument “W” is used to manage the long-workpiece tipper.


By default, the control is active.
W0 = Inactive
W1 = Active

Note
The optional use of certain arguments depends on the extraction system present on the machine.

298732_en - 11/21
2-62
2. Tornos macros - ISO programming - G Codes

Programming example (Motorised recovery)

M11 (COUNTER-SPINDLE COLLET OPENING)


G4 X0.3 (DELAY)
G923 L1 U0.2 (EJECTOR OUTPUT AFTER A DELAY)
G923 L0 (EJECTOR RETRACTION)

298732_en - 11/21
2-63
ISO programming - G Codes - 2. Tornos macros

2.1.26 G924 [Part pickoff]


This function makes it possible to grip the bar before the workpiece is cut.

G924

Argument Description Optional Default

A Axis Z feed speed for part pick off Yes 4000


(If A0 = movement in G0)
[mm/min] [inch/min]

Z Workpiece pickoff distance, to be used in Yes Argu-


case of intermediate workpiece pickoff to ment "C”
support the bar [mm] [inch] of G800

Arguments A, Z:

Programming example

Channel 1 Channel “Z axis regardless of the spindle”

G911 (Positioning before cutting)

M9201 M9201

G915
M418
G924 (Workpiece pickoff)

M9202 M9202

G1 G95 X0 F0.05 (Cutting)

298732_en - 11/21
2-64
2. Tornos macros - ISO programming - G Codes

2.1.27 G930 [Management of work with/no material]


This function allows switching mode management with or without material.

G930

Argument Description Optional Default

A Bar retraction distance when switching to Yes Automat-


no material mode ic retrac-
[mm] [inch] tion for
the bar to
retract
into the
guidebus
h

Principle
This function makes it possible to switch to the material or no material mode.
When the machine switches to no material mode (for instance by deactivating the material feed
on the operator panel key), the G930 function retracts the bar from the machining area, locks the
Z1 axis in a retracted position and inhibits the opening and closing of the spindle and counter-spin-
dle collets.
When the machine switches to material mode (for instance by activating the material feed on the
operator panel key), the G930 function unlocks the Z1 axis, gently repositions the bar against the
cutting tool and releases opening and closing of the spindle and counter spindle collets.

Argument A:
If the machine is equipped with a guidebush, when switching to no material mode,
the bar is retracted in order to be slightly inside the guidebush.
Argument “A” makes it possible to customise this retraction, which may be of interest when a drill
machines inside the guidebush.
When the machine works without a guidebush, there is no bar retraction when switching to no ma-
terial mode. Retraction must therefore be configured by argument “A”.

Programming example

G930

298732_en - 11/21
2-65
ISO programming - G Codes - 2. Tornos macros

2.1.28 G933 [Traditional threading cycle]


This function allows you to make external and internal threads by managing the input and output
angle of the tool.

G933

Argument Description Optional Default

A Start of thread in Z [mm] [inch] No -

B Roughing pass height [mm][inch] No -

C Finishing pass height [mm][inch] According to Ar- 0


gument D

D Number of finishing passes Yes 0

E Number of empty passes Yes 1

F Thread pitch [mm] [inch] No -

H Thread height [mm] [inch] Yes According to


step

I Entry angle [°] Yes 45

J Exit angle [°] Yes 45

M Nominal thread diameter [mm] [inch] No -

X End of X thread (if tapered thread) [mm] Yes Argument “M”


[inch]

Z End of Z thread [mm] [inch] No -

Arguments A, I, J, M, X, Z:

298732_en - 11/21
2-66
2. Tornos macros - ISO programming - G Codes

Arguments B, C, D, E, F, H:

Note
It is the X positioning of the threading tool that automatically defines whether it acts on an external
or internal thread.

Programming example

G0 X9 Z-2 T14 D0
G933 A-4 B0.1 C0.05 D1 E1 F1 J80 M6 Z-14

298732_en - 11/21
2-67
ISO programming - G Codes - 2. Tornos macros

2.1.29 G939 [Chipbreaker - ACB+]


This function is used to machine a linear or circular segment by breaking the chip at regular intervals
by oscillating the axis (X or Z).
The axis oscillation is synchronized with the rotation of the material spindle.

G939

Argument Description Optional Default

A Activation/deactivation of "Oscillation chip breaker" No -


mode:
1 = Activation
0 = Deactivation

C Oscillation amplitude: Yes 2


multiple of feed F

E Axis oscillating in case of interpolation of 2 axes: Yes Z


1 = X axis that oscillates
2 = Z axis that oscillates

298732_en - 11/21
2-68
2. Tornos macros - ISO programming - G Codes

Argument A:
This argument enables the "Oscillation chip breaker" mode to be turned on or off.
Once the mode is activated (A1), the mode remains active on all the following blocks until the
mode is cancelled (A0). The mode is by channel.
This argument is mandatory.

Argument C, E:
Argument “C” is used to configure the oscillation amplitude.
It corresponds to a multiple of feed F programmed on the segment.
The argument is optional. If omitted, a value of 2 is taken into account.
The minimum allowable setting value is 2.

298732_en - 11/21
2-69
ISO programming - G Codes - 2. Tornos macros

Argument “E” only influences oscillation on segments that interpolate two axes (X-Z, radius or cone).
Since oscillation is possible only on one axis at a time, it is possible to attribute it to the X or Z axis.
The argument is optional, by default axis Z (E2) is taken into account.

Programming example

M103 S2000
G0 X10 Z2 T12
G939 A1 C3
G1 Z-12 F0.06
G1 X14 Z-15 F0.03
G3 X20 Z-20 R18
G0 X15
G939 A0

298732_en - 11/21
2-70
2. Tornos macros - ISO programming - G Codes

2.1.30 G940 [preparation for cutting Turbo process]


This function allows you to position the axes for part cut-off in a mininum time. Indeed the move-
ments of the axes Z1 and Z4 may be carried out simultaneously.

This function is also used to ensure an optimal positioning movement of the counter-spindle, directly
from the backworking area.
The counter spindle rotates at the setting speed during positioning.
The ejector also returns during movement.

The function G940 must be programmed into both the cutter channel and the counter-spindle
channel.
The behaviour of this function is controlled by the arguments of function G805.

Programming example

Channel 1 Channel “Z axis regardless of the spindle”

... (Machining) ...(Part ejection)

G940 (preparation for cutting) G940 (preparation for cutting)

G941 (Cutting and feeding next part) G941 (Cutting and feeding next part)

G942 (Loopback) G942 (Loopback)

... ...

298732_en - 11/21
2-71
ISO programming - G Codes - 2. Tornos macros

2.1.31 G941 [Cutting and feeding next workpiece/Turbo process]


This function allows part cut-off and feeding the next part.
Part cut-off and feeding of the next part may be done simultaneously (if G805 E1).
During cutting, the drive of the bar is at least secured by the counter-spindle.

This function is also used to ensure optimal clearance of the counter spindle.

The G941 function must be programmed into both the cutter channel and the counter spindle
channel.
The behaviour of this function is controlled by the arguments of G805.

Programming example

Channel 1 Channel “Z axis regardless of the spindle”

... (Machining) ...(Part ejection)

G940 (*** preparation for cutting ***) G940 (*** preparation for cutting ***)

G941 (preparation for cutting) G941 (Cutting and feeding next workpiece)

G942 G942

... ...

298732_en - 11/21
2-72
2. Tornos macros - ISO programming - G Codes

2.1.32 G942 [Event manager/Turbo process]


This function allows the loopback of the Turbo program. It also manages the events, such as an end
of bar signal of the bar feeder or a request for work without material via the operator panel.

Programming example

Channel 1 Channel “Z axis regardless of the spindle”

... (Machining) ...(Part ejection)

G940 (*** preparation for cutting ***) G940 (*** preparation for cutting ***)

G941 (Cutting and feeding next part) G941 (Cutting and feeding next part)

G942 (Loopback) G942(Loopback)

... ...

298732_en - 11/21
2-73
ISO programming - G Codes - 2. Tornos macros

2.1.33 G944 [Spindle selector management]


This function is used to select the tool spindle to be used for machining.
This is only valid when the machine is fitted with a spindle selection device.

G944

Argument Description Optional Default

A Desired spindle: No -
1 = Longitudinal
2 = Transversal

Note
If the spindle of the tool is rotating at the time of the spindle switching, it automatically stops and
the new spindle selected starts to rotate again at the last programmed value.

Programming example

G944 A1
M4103 S5000 P41

298732_en - 11/21
2-74
2. Tornos macros - ISO programming - G Codes

2.1.34 G945 [Counter spindle cleaning management]


This function is used to manage the cleaning of the counter-spindle collet.

G945

Argument Description Optional Default

A Cleaning type: No -
1 = Air
2 = Oil
3 = Air and oil

B Action: No -
0 = Cleaning stop
1 = Cleaning start
2 = Timed cleaning

C Cleaning duration [sec] Yes 2

Argument A:
Argument “A” is used to chose the way in which the counter-spindle collet will be cleaned. It is pos-
sible to use air, oil or both.
A1 = Air
A2 = Oil
A3 = Air and oil

Arguments B, C:
Argument “B” is used to select where the cleaning of the counter-spindle collet is activated (B1) or
deactivated (B0). With (B2) it is possible to perform cleaning that lasts for a certain amount of time.
The time can be configured with argument “C”.

Note
It is recommended to open the collet and remove the workpiece from the counter-spindle before
cleaning.

Programming example

G945 A3 B2 C3

298732_en - 11/21
2-75
ISO programming - G Codes - 2. Tornos macros

2.1.35 G946 [Pneumatic drills management]


This function is used to bring out or put away the machine’s pneumatic drills.

G946

Argument Description Optional Default

A Pneumatic drill 1 Yes No change


0 = Retracted
1 = Out

B Pneumatic drill 2 Yes No change


0 = Retracted
1 = Out

C Pneumatic drill 3 Yes No change


0 = Retracted
1 = Out

Arguments A, B, C:

Programming example

G946 A0 B1

298732_en - 11/21
2-76
2. Tornos macros - ISO programming - G Codes

2.1.36 G947 [Sensors management]


This function is used to control the machine sensors.

G947

Argument Description Optional Default

A Control type: No -
1 = Tool breakage control sensor
2 = Workpiece presence control sensor

B Type of sensor No -
1 = Single sensor
2 = Double sensor

N Sensor number No -

Arguments A, B:
Argument “A” is mandatory.
It is used to configure if you want to check if a tool is broken (A1) or the presence of a workpiece
(A2).

A1

A2

298732_en - 11/21
2-77
ISO programming - G Codes - 2. Tornos macros

Argument B is mandatory.
It is used to configure if you want a single sensor (B1) or a double sensor (B2).

B1

B2

Argument N:
Argument “N” is mandatory.
It indicates the sensor to be activated.

Note
It is possible to refine the behaviour of the sensors (according to the model) directly from the oper-
ator page.

Programming example

G947 N1 A2 B1

298732_en - 11/21
2-78
2. Tornos macros - ISO programming - G Codes

2.1.37 G948 [HF spindles management]


This function is used to activate/deactivate the rotation of the high frequency spindles.

G948

Argument Description Optional Default

A HF 1 spindle Yes No change


0 = Stop
1 = Start

B HF 2 spindle Yes No change


0 = Stop
1 = Start

C HF 3 spindle Yes No change


0 = Stop
1 = Start

D HF 4 spindle Yes No change


0 = Stop
1 = Start

Arguments A, B, C, D:

Note
For HF spindles which are connected to the customer option sockets, program them with G949.

Programming example

G948 A0 B1

298732_en - 11/21
2-79
ISO programming - G Codes - 2. Tornos macros

2.1.38 G949 [Optional sockets management]


This function is used to activate, deactivate and/or configure an option socket for the machine.

G949

Argument Description Optional Default

A Action type: No -
0 = Turning off an output
1 = Turning on an output
2 = Reading an input
3 = Configuration of an output
4 = Configuration of an input

B Configuration: Output behaviour after Reset Yes No change


0 = Falls back down
1 = Stays active

C Configuration: Forcing the output to 0 Yes No change


0 = Inactive
1 = Active

D Configuration: Forcing the output to 1 Yes No change


0 = Inactive
1 = Active

E Configuration: Behaviour at output when the door Yes No change


opens:
0 = Falls back down
1 = Stays Active

H Configuration: Action if defect detected on an input Yes No change


0 = Message (no machine shutdown)
1 = Alarm (machine shutdown at the end of the cy-
cle)
3 = Alarm (immediate machine shutdown)
10 = Event Rises

I Configuration: Reversing the input direction Yes No change


0 = Inactive
1 = Active

J Configuration: Deactivation the input check Yes No change


0 = Inactive
1 = Active

K Configuration: permanent input check Yes No change


0 = Inactive
1 = Active

L Configuration: input check duration Yes No change


(max. 65 sec.) [sec]

298732_en - 11/21
2-80
2. Tornos macros - ISO programming - G Codes

G949

Argument Description Optional Default

N Number of sockets with options: No -


1 = Optional socket #1
2 = Optional socket #2
3 = Optional socket #3
4 = Optional socket #4

X Input number: No (un- -


1 = Input #1 less Y is
pro-
2 = Input # 2
grammed
)

Y Output number: No (un- -


1 = output #1 less X is
pro-
2 = output #2
grammed
)

Argument A :
Argument A allows selecting the action to be performed on an Input or Output from a customer
optional socket.
This argument is mandatory.
A0 = Turning off an output
A1 = Turning on an output
A2 = Reading an input
A3 = Configuration of an output
A4 = Configuration of an input

298732_en - 11/21
2-81
ISO programming - G Codes - 2. Tornos macros

Arguments N, X, Y :
The machines TORNOS SA are equipped with 4 optional customer sockets.
All 4 of them have 2 outputs and 2 inputs.
Argument N allows selecting the socket number on which to act (1, 2, 3, 4).
This argument is mandatory.
Argument X allows selecting the input number on which to act (1, 2).
Argument N allows selecting the output number on which to act (1, 2).
One of the two arguments (X or Y) must be programmed.

298732_en - 11/21
2-82
2. Tornos macros - ISO programming - G Codes

Arguments B, C, D, E :
Arguments B, C, D, E can be used when A3 is selected.
These arguments are optional.
When argument "B” is 0, the selected option socket output (arguments “N” and “Y”) reverts to a
machine RESET. If the argument is 1 the output remains active.
When argument "E” is 0, the selected option socket output (arguments “N” and “Y”) reverts to un-
locking the machine door. If the argument is 1 the output remains active.
When argument “C” is 1, the selected option socket output (arguments “N” and “Y”) is forced to
inactive. Otherwise it maintains its state.
When argument “D” is 1, the selected option socket output (arguments “N” and “Y”) is forced to
active. Otherwise it maintains its state.

298732_en - 11/21
2-83
ISO programming - G Codes - 2. Tornos macros

Arguments H, I, J, K, L :
Arguments “H”, “I”, “J”, “K” and “L” can be used when (A4) is selected.
These arguments are optional.
Argument “H” allows the machine’s behaviour to be configured when a fault is detected on the
selected output (Arg N and X).
H0 = Class 0 Message (no machine shutdown)
H3 = Class 1 Alarm (machine shutdown at the end of the cycle)
H3 = Class 3 Alarm (immediate machine shutdown)
H10 - Event #90 rises (allows choosing the program sequence and loop on another program)
When argument “I” is 1, the direction of the selected input (Arg N and X) is reversed.
Otherwise it maintains its operating direction.
When argument “J” is 1, the status of the selected input (Arg N and X) is no longer controlled.
Otherwise it maintains its control.
When argument “K” is 1, the selected input status (Arg N and X) is permanently controlled.
Otherwise it is controlled on an ad hoc basis.
Argument L allows setting the ad hoc control time selected input should be in operation (Arg N and
X).

Programming example (Activating an output)

G949 A3 N2 Y1 B1 E0 (Configuration of output 1 of optional socket 2)


G949 A1 N2 Y1 (Activation of output 1 of optional socket 2)


G949 A0 N2 Y1 (Deactivation of output 1 of optional socket 2)

Programming example (Reading an input)

G949 A4 N3 X2 H1 L5 (Configuration of input 2 of optional socket 3)


G949 A2 N3 X2 (Reading input 2 of optional socket 3)

298732_en - 11/21
2-84
2. Tornos macros - ISO programming - G Codes

2.1.39 G950 [Tool rotation with ratio management]


This function is used to rotate a tool at its programmed speed, taking account of the transmission
ratio between the motor and the tool, as well as its direction of rotation.
Also note that when the programmed feed is in G95 (mm/rev), this function is used to take account
of the tool rotation speed (and not the motor rotation speed).

G800

Argument Description Optional Default

D Corrector for the tool to be rotated No Last ac-


tive

M Rotation order (spindle number + direction) No -

R Total transmission ratio between motor and Yes Accord-


tool ing to ra-
tio of its
tool hold-
er

S Desired rotation speed of tool [rpm] No 0

T Tool Number for the tool to set rotating Yes 0

Difference between traditional programming and “G950”:


M2103 S2000 P21 T22 D1: Motor S21 rotates at 2,000 rpm in a clockwise direction.
G950 M2103 S2000 T22 D1: Tool T22 rotates at 2,000 rpm in a clockwise direction

Argument M:
The rotation order indicates which tool spindle should rotate and in what direction.
Example: Spindle S21 Clockwise (M03) -> M2103.

298732_en - 11/21
2-85
ISO programming - G Codes - 2. Tornos macros

Argument S:
Argument “S” indicates the desired speed for the tool.
Example: Spindle S21 Clockwise (M03) -> M2103.

Arguments T, D:
Tool “T” and its corrector “D” must be activated on the line of G950 or before G950.

Argument R:
By default, the function takes into account the ratio and the transmission direction of the media
(item) on which the tool is declared.
There is the option to use argument "R” to program a custom ratio.
Example: G950 M2103 S2000 R2, in this case the rotation order given to the motor is 1,000 rpm (2,000/
2). To reverse the direction of rotation, a negative “R” argument can be entered.
Note
It is important to stop the tool rotation with G950 Mxx05.

Programming example

G950 M2103 S2000 T22 D1 (Tool rotation


start-up)
G0 X5 Y10
G1 Y-10 F0.05 (Machining)
G1 Z-2
G1 Y10
G0 X20
G950 M2105 (Stop tool rotation)

298732_en - 11/21
2-86
2. Tornos macros - ISO programming - G Codes

2.1.40 G951 [Polygoning mode activation]


This function is used to activate/deactivate polygoning mode, taking into account the transmission
ratio between the motor and the tool as well as its direction of rotation.

G951

Argument Description Optional Default

A Polygoning mode: No -
0 = Mode deactivation
1 = Mode activation

B Number of faces on the part No -

C Number of teeth on the tool No -

D Tool corrector for the tool Yes Last ac-


to be rotated tive

E Direction of tool rotation: Yes 4


3 = Clockwise
4 = Counter clockwise

F Angular phase shift [°] Yes 0

M Direction of rotation of the material No -


Example: M103

R Customised tool-motor ratio Yes Depend-


For example: for "1:1.5" enter R1.5 ing
on tool
support

S Material spindle rotation speed [rpm] No -

T Tool Number for the tool Yes Last ac-


to be rotated tive

298732_en - 11/21
2-87
ISO programming - G Codes - 2. Tornos macros

Argument B :
This argument notifies the number of faces to machine on the part.

Argument C :
This argument notifies the number of blades (plates) fitted on the polygoning attachment.

Argument E :
This argument notifies the direction in which you wish the polygoning attachment to turn.
3 = clockwise
4 = counter clockwise

Argument F :
This argument is used to phase shift the orientation of polygoning with respect to the machining of
another workpiece.

Argument M :
This argument activates the material spindle which should rotate and its direction of rotation.
Example: M103 (spindle S1 and clockwise (M103))

Argument S :
Argument “S” notifies the rotation speed you want for the material.

Arguments T, D :
Tool “T” and its corrector “D” can be activated on the line of the G951 or before the G951.

Argument R :
By default, the function takes into account the ratio and the direction of transmission of the tool-
holder (article) on which the tool is declared.
There is the possibility of using argument "R” to activate a customised ratio.
In the example below, the order of rotation given to the tool motor will be divided by 2:
G951 A1 B6 C2 M103 S1000 T24 D0 R2.
To reverse the direction of rotation of argument “R”, the negative sign can be inserted before the
value.
Note
In the event of programming with a feed in mm/rev (G95) the feed is based on the speed of the
material spindle.

Programming example

G951 A1 B6 C2 M103 S1000 T24 D0 (Polygoning mode activation)


G0 Y0
G0 X5
G1 Z- 8 F0.05 (Machining)
G1 X9
G0 X20
G951 A0 (Stop polygoning mode)

298732_en - 11/21
2-88
2. Tornos macros - ISO programming - G Codes

2.1.41 G952 [Cutting mode activation]


This function is used to activate/deactivate the cutting mode, taking into account the tool motor
transmission ratio as well as its direction of rotation.

G952

Argument Description Optional Default

A Cutting mode: No -
0 = Mode deactivation
1 = Mode activation

B Number of teeth on the part No -

C Number of cutter teeth: Yes 1


1 = Tangential cutting (except if
>1 = Frontal cutting (breguet or return) frontal)

D Tool corrector for the tool Yes Last ac-


to be rotated tive

E Direction of rotation of the tool: Yes 4


3 = Clockwise
4 = Counter-clockwise

F Angular phase shift [°] Yes 0

M Direction of rotation of the material No -


Example: M103

R Tool/motor ratio Yes Depend-


Example: for “1:1.5” enter R1.5 ing
on tool
support

S Material spindle rotation speed [rpm] No -

T Tool Number for the tool Yes Last ac-


to be rotated tive

298732_en - 11/21
2-89
ISO programming - G Codes - 2. Tornos macros

Argument B :
This argument indicates the number of teeth to be machined on the workpiece.

Argument C :
This argument indicates the number of teeth that there are on the drill.
This argument must be entered only if it is for front cutting (breguet or return).

Argument E :
This argument indicates the direction in which the polygonning tool is to be turned.
3 = clockwise
4 = counter-clockwise

Argument F :
This argument can be used to dephase the starting direction of the cutting in relation to the ma-
chining of another workpiece.

Argument M :
This argument engages the material spindle which has to rotate and its direction of rotation.
Example: M103 (S1 Spindle and clockwise (M103))

Argument S :
Argument “S” provides the rotation speed required for the material.

Arguments T, D :
Tool “T” and its corrector “D” must be activated on lone G952 or before G952.

Argument R :
By default, the function takes into account the media (item) ratio and transmission direction on
which the tool is declared.
There is the option of using argument “R”, the minus sign may be inserted before the value.
In the example below, the rotation order given to the tool motor will be divided by 2:
G952 A1 B6 M103 S1000 T25 D0 R2.
A negative "R" can be inserted to reverse the rotation direction.
Note
In the case of programming with an advance in mm/turn (G95), the advance is based on the
speed of the material spindle.

Programming example

G952 A1 B10 M103 S1000 T25 D0 (Activation of cutting mode)


G0 Y-5
G0 X0
G1 Z-8 F0.05 (machining)
G1 Y-7
G0 Y-10
G952 A0 (Stopping cutting mode)

298732_en - 11/21
2-90
2. Tornos macros - ISO programming - G Codes

2.1.42 G953 [Thread milling mode activation]


This function is used to activate/deactivate the thread milling mode, taking into account the trans-
mission ratio between the motor and the tool, as well as its direction of rotation.

G953

Argument Description Optional Default

A Thread milling mode: No -


0 = Mode deactivation
1 = Mode activation

D Tool corrector for the tool Yes Last ac-


to be rotated tive

E Direction of rotation of the tool: Yes 4


3 = Clockwise
4 = Counter-clockwise

F Angular phase shift [°] Yes 0

M Direction of rotation of the material No -


Example: M103

R Tool/motor ratio Yes Depend-


Example: for “1:1.5” enter R1.5 ing
on tool
support

S Material spindle rotation speed [rpm] No -

T Tool Number for the tool Yes Last ac-


to be rotated tive

Argument E :
This argument indicates the direction in which the thread milling tool is to be turned.
3 = clockwise
4 = counter-clockwise

Argument F :
This argument is used to dephase the direction of the thread start point in relation to the machining
of another workpiece.

298732_en - 11/21
2-91
ISO programming - G Codes - 2. Tornos macros

Argument M :
This argument engages the material spindle which has to rotate and its direction of rotation.
Example: M103 (S1 Spindle and clockwise (M103))

Argument S :
The argument “S” provides the speed required on the material.

Arguments T, D :
Tool “T” and its corrector “D” must be activated on lone G953 or before G953.

Argument R :
By default, the function takes into account the media (item) ratio and transmission direction on
which the tool is declared.
It is possible to use argument "R” to program a custom ratio.
In the example below, the rotation order given to the tool motor will be divided by 2:
G953 A1 M103 S1000 T25 D0 R2.
To reverse the direction of rotation, a minus sign can be entered before the value in argument “R”.
Note
In the case of programming with an advance in mm/turn (G95), the advance is based on the
speed of the material spindle.

Programming example

G953 A1 B10 M103 S1000 T25 D0 (Activation of milling mode)


G0 Y0
G0 X6
G1 X5 F0.05 (machining)
G1 X6
G0 X20
G953 A0 (Stopping thread milling mode)

298732_en - 11/21
2-92
2. Tornos macros - ISO programming - G Codes

2.1.43 G954 [External whirling]


This function is used to machining an external thread using a whirling device.
The programming of only 4 arguments is sufficient for such a machining process.
Note
It is necessary to previously position its thread whirling device to the location where it is desired to
start machining.

G954

Argument Description Optional Default

A Work direction: Yes 0


0 = Direction X
1 = Y direction

B Material spindle rotation speed [rpm] No -

C Angular phase shift [°] Yes 0

D Tool retraction distance at the end of stroke No -


[mm][inch]

E Type of tool clearance at the end of pass: Yes 1


0 = Direct at 90°
1 = Clearance on a turret of the material spindle

F Thread pitch [mm] [inch] No -


Set a negative value for step to the left

H Tool rotation stop at end of function: Yes 1


0 = No
1 = Yes

M Direction of rotation of thread whirling device Yes Last


Example: M1104 tool spindle
control

S Rotation speed of the thread whirling device Yes Last


[rpm] speed

X Final diameter of thread bottom (for conical) Yes Starting


[mm] [inch] position

Z Thread end position [mm] [inch] No -

298732_en - 11/21
2-93
ISO programming - G Codes - 2. Tornos macros

Argument A :
The default work direction is direction X.
If the thread whirling device inclination is defined by the orientation of axis B, it is also possible
to program (A1) in order to be able to work in direction Y.

Argument B :
This argument is mandatory.
It is used to set the material spindle rotation speed.

Argument C :
This argument is optional.
It provides angular orientation of the thread start in relation to another workpiece machining.

Argument D :
This argument is mandatory.
It is used to program the clearance distance of the tool at the end of the pass. (in X or in Y, depend-
ing on the direction of machining).
If the machining starting position is negative (X- or Y-) the tool will be retracted in the “minus” (-)
direction. If the machining starting position is positive (X+ or Y+) the tool will be retracted in the “pos-
itive” (+) direction.
Once the retraction (X or Y) has been performed, the device retracts in Z to its original
position.

298732_en - 11/21
2-94
2. Tornos macros - ISO programming - G Codes

Argument E :
This argument is optional.
If the argument is 0, as soon as the end of machining position is reached, the material spindle stops
and the tool retracts to 90°.
If the argument is absent or equal to 1, as soon as the end of machining position is reached, the
material spindle performs an additional rotation to allow the tool to gradually release the material.

Argument F :
This argument is mandatory.
It determines the thread pitch.
To perform the machining of a left hand pitch, the value must be entered in negative.

Argument H :
This argument is optional.
If programmed to 0, the tool spindle remains in rotation at the end of the function.

Argument M :
The argument is optional, provided that the tool is already rotating in the desired direction and
speed. It engages the tool spindle which has to rotate and the direction of rotation.
Example: M1104 (S11 Spindle and clockwise (M04)).

298732_en - 11/21
2-95
ISO programming - G Codes - 2. Tornos macros

Argument S :
This argument is optional, provided that the tool is already rotating in the desired direction and
speed. Argument “S” provides the rotation speed required on the thread whirling device.

Argument X :
This argument is optional.
Allows to make a conical swirling.

Argument Z :
This argument is mandatory.
It provides the end of thread position.

298732_en - 11/21
2-96
2. Tornos macros - ISO programming - G Codes

Programming example

G0 Z5 Y0 T141 D0
G0 X-3.5
G954 A0 B12 C0 D2 E1 F1.75 M1104 S2600 Z-32
G28 U0

298732_en - 11/21
2-97
ISO programming - G Codes - 2. Tornos macros

2.1.44 G960 [Slanted inner thread whirling]


This function makes it possible to perform a milling according to an inclined axis, by thread whirling
or milling.

G960

Argument Description Optional Default

A Rotation direction: Yes 0


0 = Direction X
1 = Direction Y

B Angle of machining [°] No -

C Circle radius described [mm][inch] No -

D Number of circule radiuses to describe No -

E Number of points described per circle Yes 8

F Thread pitch [mm] [inch] No -

H Peripheral speed of the tool [tr/min] No -

Argument A:
This argument is optional. The default direction is direction X.
The argument allows you to define the work plan based on the layout of the tool. This plane is par-
allel to the axis of movement of the tool.

298732_en - 11/21
2-98
2. Tornos macros - ISO programming - G Codes

Argument B:
This argument is mandatory, with an admissible value of 0 to 90°:
– If the value is 0 °, the machining will be in the Z or Y plane (milling of the thread in the axis of the
part).
– If the value is 90 °, the machining will be done in the X plane (milling of the thread perpendicular
to the axis of the part).

Argument C:
This argument is mandatory.

The radius of the circle that the tool will have to describe in order to mill the thread by interpolation
of the 3 axes X, Y and Z, is determined according to the following calculation:
(Outside Ø of the thread - milling/swirling tool Ø)/2

This argument, together with argument F, generates a left or right-handed thread, as shown in the
table below:

Argument Machining type


C F
+ + Threading on the right, from the inside to the outside of the hole
+ - Threading on the left, from the outside to the inside of the hole
- + Threading on the left, from the inside to the outside of the hole
- - Threading on the right, from the outside to the inside of the hole

298732_en - 11/21
2-99
ISO programming - G Codes - 2. Tornos macros

Argument D:
This argument is mandatory and must be an integer.
The thread length will be determined by the value of argument "D” multiplied by argument “F”
(thread pitch). If you use a milling attachment, usually one pass is enough, so argument “D” = 1.
By whirling, divide the length of the thread by the step, taking care to program an integer.

Argument E:
This argument is optional and its default value is 8.
The value range of the argument is 8 to 360.
This is the number of points defined on the circumference of the ellipse.
By increasing this number of points, the line segments that describe the ellipse are reduced and the
machined shape is closer to the ideal curve.
On the other hand, a number of points that is too small will affect important facets on the thread
that will not be functional.
Following the various tests, the value of 30 points is a good starting point.

Argument F:
This argument is mandatory.
Positive value: the tool is positioned at G0 at the bottom of the hole and machining is performed
by coming out.
Negative value: the tool is positioned outside the material, the machining is done by penetrating
into the hole and the output is executed in G0.

298732_en - 11/21
2-100
2. Tornos macros - ISO programming - G Codes

Argument H:
This argument is mandatory.
The value range of the argument is 1 to 900.
It is used to program the approximate value in revolutions per minute of tool motion during X, Y and
Z interpolation.

298732_en - 11/21
2-101
ISO programming - G Codes - 2. Tornos macros

2.1.45 G961 [Milling of inclined pins]


This function is used to perform elliptical milling with movements on 3 axes simultaneously. It is used
for tilted pivot milling, for example for a dental implant.

G961

Argument Description Optional Default

A Work Plan: Yes 2


1 = X-Z Plan
2 = Y-Z Plan

B Beta Angle [°] No -

D Machining direction Yes 1


1 = Up-cut milling
-1 = Climb milling

E Number of points for an elliptical lathe Yes 120

F Work feed rate [mm/min][inch/rev] No -

H Out of round correction [mm][inch] Yes 0

X X ellipse radius [mm] [inch] No -

Y Y ellipse radius [mm] [inch] No -

Z Start position in Z [mm][inch] Yes Last posi-


tion pro-
grammed

298732_en - 11/21
2-102
2. Tornos macros - ISO programming - G Codes

Argument A :
This argument is optional. It allows choosing the Work Plan based on the milling machine layout. By
default the Y-Z Plan is taken into account.
A1 = X-Z Plan
A2 = Y-Z Plan

Argument D :
This argument is optional. It allows choosing the machining direction.
By default up-cut milling is taken into account.
D1 = Up-cut milling
D-1 = Climb milling

298732_en - 11/21
2-103
ISO programming - G Codes - 2. Tornos macros

Argument E :
This argument is optional. It allows determining the number of points set on the circumference of
the ellipse.
By default 120 points is taken into account.

Argument F :
This argument is mandatory. It allows determining the milling attachment feed rate.

298732_en - 11/21
2-104
2. Tornos macros - ISO programming - G Codes

Argument H :
This argument is optional. By default it is 0. It allows correcting any small shape errors.
The value is subtracted from the X radius and added to the Y radius.

298732_en - 11/21
2-105
ISO programming - G Codes - 2. Tornos macros

Arguments B, X, Y, Z :
Argument B is mandatory. It provides the Beta angle value.
The angle can be entered as a positive or negative value (depends on the direction of the axes
used).
Argument X is mandatory. It provides the X ellipse radius value.
Argument Y is mandatory. It provides the Y ellipse radius value.
Argument Z is optional. It provides the Z position value when the milling attachment axis (Y direction)
is at the pivot centre. If the Z argument is absent, the last programmed Z position is used.
These values are usually obtained from a CAD.

Front view (plane X-Y) Profile view (plane Z-Y)

298732_en - 11/21
2-106
2. Tornos macros - ISO programming - G Codes

Programming example

M415
G0 C0
M4103 S5000 P41
G0 Z-6.577 X12 Y-1 T41 D0
G1 X10 F0.01
G961 A2 B-1.147 D1 E300 F80 X4.758 Y4.954
Z-6.577
G0 Z10
M4105

298732_en - 11/21
2-107
ISO programming - G Codes - 2. Tornos macros

2.1.46 G962 [Milling for internal hexalobe print]


This function makes it possible to perform an internal hexalobe milling very simply.
The machining must be carried out with a micro milling attachment at the front. There is the possi-
bility of using a traditional spindle or a HF spindle. Machining is done with a helicoidal plunge.
This macro can be used on all the machine's tool systems.
The macro does not include hollowing out, so prior drilling is therefore necessary.
There are two programming possibilities:
Variant A = as per the ISO standard
Variant B = customised

G962 - Variant A

Argument Description Optional Default

A Print no. according to ISO 10664 standard No -

B Machining mode: Yes 1


1 = XC
2 = XY

C Orientation of print [°] Yes 0

D Depth of the helicoidal plunge by print turn [mm][inch] Yes 0.5

E Number of empty strokes Yes 1

F Milling feed No -
(If <1[mm/rev] / If >1 [mm/min])
[mm/rev] [inch/rev] [mm/min] [inch/min]

Z Print depth [mm][inch] No -

298732_en - 11/21
2-108
2. Tornos macros - ISO programming - G Codes

G962 - Variant B

Argument Description Optional Default

B Machining mode: Yes 1


1 = XC
2 = XY

C Orientation of print [°] Yes 0

D Depth of the helicoidal plunge by print turn [mm][inch] Yes 0.5

E Number of empty strokes Yes 1

F Milling feed No -
(If <1[mm/rev] / If >1 [mm/min])
[mm/rev] [inch/rev] [mm/min] [inch/min]

H Number of lobes Yes 6

I Limited print diameter [mm][inch] No -

J Inscribed print diameter [mm][inch] No -

K External print radius [mm][inch] No -

M Internal print radius [mm][inch] No -

Z Print depth [mm][inch] No -

Argument A :
The print number refers to the ISO 10664 standard.
To perform a print no. 20, type in argument A20.

298732_en - 11/21
2-109
ISO programming - G Codes - 2. Tornos macros

Argument B:
Two operating modes are possible.
Either using the X-Y-Z axes (G17) or using the X-C-Z axes (polar coordinates).
The advantage of “transmit” is that it reduces the risk of having a soft limit (unlike the Y axis), and it
can be used with all tool systems (no need to have a Y axis).

Argument C :
This argument allows you to orient the angle of your print with respect to another machining on the
part.

298732_en - 11/21
2-110
2. Tornos macros - ISO programming - G Codes

Argument D :
The depth of the helicoidal plunge is the value of the movement along Z for one print revolution.

Argument E :
The number of empty passes when you reach the end of the machining to improve the surface
condition or reduce burring.

Argument F :
The milling feed is the feed during machining of the print. If the value is equal to or less than 1, the
machining is done in G95 [mm/rev], if the value is above 1, the machining is done in G94 [mm/min].

298732_en - 11/21
2-111
ISO programming - G Codes - 2. Tornos macros

Argument H :
This argument makes it possible to define the number of lobes to machine.

298732_en - 11/21
2-112
2. Tornos macros - ISO programming - G Codes

Argument I, J, K, M, Z :

Programming example

Variant A

M890 (HF spindle power on)


G0 Z5 T25 D0
X0 Y0
Z1
G962 A25 B1 C10 D0.4 F80 Z-2
G28 U0
G28 V0
M891 (HF spindle stop)

Programming example

Variant B

M890 (HF spindle power on)


G0 Z5 T25 D0
X0 Y0
Z1
G962 B1 D0.4 F80 H8 I4.521 J3.241 K0.406
M0.348 Z-2
G28 U0
G28 V0
M891 (HF spindle stop)

298732_en - 11/21
2-113
ISO programming - G Codes - 2. Tornos macros

2.1.47 G963 [Internal polygon milling]


This function makes it possible to perform an internal hexalobe milling simply.
The machining must be carried out with a micro milling attachment at the front. There is the possi-
bility of using a traditional spindle or an HF spindle. Machining is done using helicoidal plunging.
This function can be used on all the machine's tool systems.
The macro does not include hollowing out, so prior drilling is therefore necessary.

G963

Argument Description Optional Default

B Machining mode: Yes 1


1 = XC
2 = XY

C Orientation of print [°] Yes 0

D Depth of the helicoidal plunge by print turn Yes 0.5


[mm][inch]

E Number of empty strokes Yes 1

F Milling feed No -
If <1 [mm/rev] [inch/rev]
If >1 [mm/min] [inch/min]

H Number of sections Yes 6

I Limited print diameter [mm][inch] Yes -

J Inscribed print diameter [mm][inch] Yes -

R Radius between 2 segments of the polygon Yes 0


[mm][inch]

Z Print depth [mm][inch] No -

298732_en - 11/21
2-114
2. Tornos macros - ISO programming - G Codes

Argument B :
Two operating modes are possible.
Either using the X-Y-Z axes (G17) or using the X-C-Z axes (polar coordinates).
The “transmit” advantage is that it reduces the risk of having a soft limit (unlike the Y axis), and it can
be used with all tool systems (no need to have a Y axis).

Argument C :
This argument allows you to orient the angle of your print with respect to another machining on the
part.

298732_en - 11/21
2-115
ISO programming - G Codes - 2. Tornos macros

Argument D :
The depth of the helicoidal plunge is the value of the movement along Z for one imprint revolution.

Argument E :
The number of blank passes once reaching the bottom of the machining to improve the surface
finish or reduce burring.

298732_en - 11/21
2-116
2. Tornos macros - ISO programming - G Codes

Argument F :
The milling feed is the feed during machining of the imprint. If the value is equal to or less than 1, the
machining is done in G95 [mm/rev], if the value is above 1, the machining is done in G94 [mm/min].

Argument H :
This argument allows defining the number of sections to machine. It is possible to machine as many
sections as required but there must be a minimum of 2.

Argument R :
This argument allows defining a radius between 2 segments. When it is not programmed, it is the
radius of the milling attachment that will give the radius on the imprint.

298732_en - 11/21
2-117
ISO programming - G Codes - 2. Tornos macros

Argument I, J, Z :
Arguments I, J, Z allow configuring the dimensions of the imprint.
When argument J is programmed, argument I should not be programmed.
When argument I is programmed, argument J should not be programmed.

Programming example

M890 (HF spindle power on)


G0 Z5 T25 D0
X0 Y0 Z1
G963 B1 D0.4 J8 E2 Z-4 F120
G28 U0
G28 V0
M891 (HF spindle stop)

298732_en - 11/21
2-118
2. Tornos macros - ISO programming - G Codes

2.1.48 G964 [TWISTER Turning]


This function is used to machine a span using an elliptical movement that has the following advan-
tages:
• Reduce cycle time.
• Reduce cutting forces.
• Break the chip regularly.
• Avoid kickbacks on the guidebush.
• Allow turning a long small diameter part.

G964

Argument Description Optional Default

A Start a span in Z Yes Current


[mm][inch] position

E Accuracy of ellipses Yes High


1 = Low
2 = Average
3 = Good
4 = High
5 = Very high

F Work feed No -
[Mm/min][inch/min] [mm/rev][inch/rev]

I Increment between 2 ellipses No -


[mm][inch]

J Fast feed rate value Yes 6000


[mm/min][inch/min]

K Mode: Yes 1
1 = Speed (cut ellipses)
2 = Normal (whole ellipses)

L Turning type: Yes 1


1 = Rough finishing
2 = Finishing

M Distance between passes per ellipse in finishing mode Yes Tool radi-
[mm][inch] us

298732_en - 11/21
2-119
ISO programming - G Codes - 2. Tornos macros

G964

Argument Description Optional Default

Q Ellipse start portion in rapid retraction Yes 50 %.


[%]

R Deceleration phase start portion on the ellipse Yes 70 %.


[%]

U Ellipse height (at the radius) No -


[mm][inch]

W Ellipse width No -
[mm][inch]

X End of segment in X position No -


[mm][inch]

Z End of segment in Z position No -


[mm][inch]

Arguments A, X, Z :
Arguments “X” and “Z” provide the bottom point of the span to be machined.
These 2 arguments are mandatory.

Argument “A” provides the location where the Z span machining should begin.
This argument is mandatory.

298732_en - 11/21
2-120
2. Tornos macros - ISO programming - G Codes

Arguments E, U, W :
Argument “E” is used to define the accuracy of the ellipse: the higher the accuracy, the more reg-
ular the trajectory will be.
However, the higher the accuracy, the longer the TISIS calculator will take to calculate the trajec-
tory.
This argument is optional. By default a trajectory with high accuracy is taken into account.

Arguments “U” and “W” are used to configure the size and shape of the ellipse. This shape is to be
configured according to the size of the span, the shape of the tool, etc.

298732_en - 11/21
2-121
ISO programming - G Codes - 2. Tornos macros

Argument I:
Argument “I” is used to configure the increment required between the ellipses. Therefore, it also de-
fines the amount of material to be removed for each ellipse.
This argument is mandatory.

Arguments F, J :
Argument “F” is used to indicate the speed at which the tool moves in the material, expressed in
mm/rev or mm/min according to the latest programmed G94/G95 mode.
This argument is mandatory.

Argument “J” indicates the speed at which the tool moves outside of the material, expressed in
mm/min.
This argument is optional; by default 6,000 mm/min is taken into account.

298732_en - 11/21
2-122
2. Tornos macros - ISO programming - G Codes

Arguments L, M :
Argument “L” is used to define whether it is a roughing or a finishing operation.
Roughing mode (L1) is a little faster than the finishing mode, on the other hand it leaves furrows on
the machined diameter. Therefore it must be followed by a finishing pass.
The finish mode (L2) is slightly slower than the roughing mode, but the machined diameter is clean.
Argument “L” is optional, by default the roughing mode (L1) is taken into account.

Argument “M” is used to configure the subsequent pass distance when machining in finishing mode
(L2).
This argument is optional; by default the subsequent pass distance corresponds to the radius size of
the tool used.
In roughing mode (L1), this argument is ignored.

298732_en - 11/21
2-123
ISO programming - G Codes - 2. Tornos macros

Arguments K, Q, R :
An ellipse can be composed of 3 phases:
1) Machining (tool in material)
2) Fast-forward clearance (tool out of material)
3) Repositioning in deceleration (tool out of material)

Argument “Q” defines where the rapid advance begins.


Argument “R” defines where the deceleration of the axes begins.
These two arguments are optional. By default Q50 and R70 [%] are taken into account.

298732_en - 11/21
2-124
2. Tornos macros - ISO programming - G Codes

Argument “K” allows the operating mode to be chosen.


K1 = speed mode: The ellipse is cut by a linear segment between the point configured using argu-
ment “Q” and the point configured using argument “R”. This allows the cycle time to be reduced.
K2 = normal mode: the entire ellipse. This helps to soften the axis movements.
Argument “K” is optional, by default speed mode (K1) is taken into account.

Note
If the alarm “Feed rate is too fast to allow deceleration over the remaining distance” appears, the
value of argument “J” or “R” must be reduced.

Programming example

G964 A0 I0.5 U7 W2 X7 Z-12 F0.1 Q30 R67 J7000 K2 L2

298732_en - 11/21
2-125
ISO programming - G Codes - 2. Tornos macros

2.1.49 G965 [Chip breaker - ACB]


This function is used to machine a linear segment by breaking the chip at regular intervals. It works
equally well for turning, drilling, milling and other operations.

G965

Argument Description Optional Default

F Work feed [mm/rv] [inch/rv]/[mm/min] [inch/min] Yes Last ad-


vance

I Increment before breaking the chip [mm] [inch] No -

J Downtime for chip breaking [s] Yes 0.01

K Withdrawal to break the chip [mm] [inch] Yes 0

X End of segment in X position [mm] [inch] Yes -

Y End of segment in Y position [mm] [inch] Yes -

Z End of segment in Z position [mm] [inch] Yes -

298732_en - 11/21
2-126
2. Tornos macros - ISO programming - G Codes

Argument F :
This argument is optional. By default the last programmed advance is taken into account.
This argument indicates how fast the tool moves in the material.
It is stated in mm/rev or mm/min depending on the last programmed “G94/G95” mode.

Argument I :
This argument is mandatory.
It programs the distance to travel before breaking the chip.

Argument J :
This argument is optional and defaults to 0.01 seconds.
It indicates the time out duration without moving axes for the chip to break.

Argument K :
This argument is optional and defaults to 0 mm.
It is possible to configure a small tool recoil to break the chip.

Argument X :
This argument is optional. If it is absent, there is no movement in X.
It indicates the end position of the segment in X.

Argument Y :
This argument is optional. If it is absent, there is no movement in Y.
It indicates the end position of the segment in Y.

Argument Z :
This argument is optional. If it is absent, there is no movement in Z.
It indicates the end position of the segment in Z.

Programming example

G965 X12 Z-18 I1 J0.002 K0 F0.08

298732_en - 11/21
2-127
ISO programming - G Codes - 2. Tornos macros

2.1.50 G966 [Turning a span in numerous strokes]


This function is used for turning a span with multiple automatic passes. Passes can be done by turn-
ing (Z direction) or by facing (X direction).

G966

Argument Description Optional Default

A Turning mode: Yes 1


1 = using turning
2 = using facing

B Height of roughing passes (at radius) [mm][inch] No -

E Feed rate on the next segment [mm/rev][inch/rev][mm/ Yes G0


min][inch/min]

F Feed rate during roughing pass [mm/rev][inch/rev]/ No -


[mm/min][inch/min]

H With a finishing pass: Yes 0


0 = No
1 = Yes

I Height of finishing pass on the diameter (at the radius) Yes -

J Height of finishing pass on the face Yes -

K Feed rate for finishing pass [mm/rev][inch/rev]/[mm/ Yes Argu-


min][inch/min] ment “F”

N Chipbreaker Yes 0
0 = Inactive
1 = On roughing passes
2 = On roughing and finishing passes
(requires option “ACB”)

O Increment before breaking the chip Yes 0


(requires option “ACB”) [mm][inch]

P Duration of dead time to break the chip Yes 0


(requires option “ACB”) [sec]

Q Withdrawal to break the chip Yes 0


(requires option “ACB”) [mm][inch]

R Conicality if conical span (at radius) [mm][inch] Yes 0

U Tool release position in X [mm][inch] Yes Starting


position

W Tool release position in Z [mm][inch] Yes Starting


position

X Span bottom position in X [mm][inch] No -

Z Span bottom position in Z [mm][inch] No -

298732_en - 11/21
2-128
2. Tornos macros - ISO programming - G Codes

Argument A :
This argument is optional; by default a turning in Z is taken into account.
This argument provides the turning mode data you want.
With (A1), the turning will be done by removing the material by a Z movement.
With (A2), the turning will be done by removing the material by facing with a Z movement.

Argument B, F :
These two arguments are mandatory.
Argument B provides the amount of material to be removed by the roughing pass (at the radius).
Argument F provides the turning feed rate data for the roughing passes.

298732_en - 11/21
2-129
ISO programming - G Codes - 2. Tornos macros

Argument H, I, J, K :
Argument H indicates whether a finishing pass is needed or not.
If argument H is 1, arguments I, J become mandatory and the arguments K, L, M become usable.
Argument I provides the finishing pass height on the diameter.
Argument J provides the finishing pass height on the face.
Argument K provides the feed rate for the finishing pass. If omitted, the roughing feed rate will be
used by default.

298732_en - 11/21
2-130
2. Tornos macros - ISO programming - G Codes

Argument E :
This argument allows setting up a feed rate on a segment of the machining movement (see image)
if the tool is ever in the material on the segment in question.
This argument is optional; in the majority of cases the segment being out of the material, the quick
feed rate is selected by default.

298732_en - 11/21
2-131
ISO programming - G Codes - 2. Tornos macros

Arguments U, W :
By default at the end of the last machining pass, the tool returns to its starting position.
It is possible to clear the tool at another position, for example to save cycle time.
Argument U allows choosing a clearance position in X.
Argument W allows choosing a clearance position in Z.
These two arguments are optional.

298732_en - 11/21
2-132
2. Tornos macros - ISO programming - G Codes

Arguments N, O, P, Q :
Argument N allows configuring chip breaking during turning.
N0 = No Chipbreaker
N1 = Chipbreaker on roughing passes only
N2 = Chipbreaker on roughing and finishing passes
This argument is optional; if omitted, there is no Chipbreaker.
Argument “N” is set to 1 or 2, argument "O" becomes mandatory and arguments “P” and “Q” be-
come usable.
The O argument provides the travel distance before the Chipbreaker.
Argument P provides the time out duration without moving axes for the chip to break.
This argument is optional; by default we take 0.01 seconds.
Argument Q allows configuring a small tool recoil to break the chip.
If the argument is missing, a default of 0 mm is taken into account.

298732_en - 11/21
2-133
ISO programming - G Codes - 2. Tornos macros

Arguments R, X, Z :
Arguments X and Z provide the span machining bottom point.
These 2 arguments are mandatory.

Argument R allows programming a conical span (distance to the radius).


This argument is optional; if omitted, the span will not be conical.

Note
Roughing passes start directly from the last programmed position.
Passes can be made in all directions, from the outside to the inside or vice versa and for indoor or
outdoor turning. The span starting position and bottom point (arguments X and Z) automatically de-
termine the work direction.
The macro automatically identifies whether it is an interior or exterior turning based on the latest tool
positioning in X.

Programming example

G0 X10 Z2
G966 B0.2 X5 Z-10 H1 I0.05 J0.03 F0.09

298732_en - 11/21
2-134
2. Tornos macros - ISO programming - G Codes

2.1.51 G971 [Groove turning]


This function makes it easy to turn a groove.
The function can be used for both exterior and interior cutting.

G971

Argument Description Optional Default

A Groove machining mode Yes 3


1 = Roughing (by infeeding)
2 = Finishing
3 = Roughing and finishing

B Diameter before grooving [mm][inch] No -

C Diameter after grooving [mm][inch] Yes Argu-


ment “B”

D Number of the second tool offset Yes -

E Width of the grooving tool (if no second offset available) Yes -


[mm][inch]

F Finishing feed during the X plunge No -


[mm/rev][mm/min][inch/rev][inch/min]

H Finishing feed during Z movement Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

I Finishing feed during chamfering Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

J Infeeding feed for roughing No -


[mm/rev][mm/min][inch/rev][inch/min]

K Feed retraction to clear the tool after infeeding Yes G0


[mm/rev][mm/min][inch/rev][inch/min]

L Spindle speed during infeeding roughing Yes Last


[rev/min][m/min] speed

M Extra thickness before finishing on the diameter Yes 0.05


[mm][inch]

N Extra thickness before finishing on the walls [mm][inch] Yes 0.05

O Chamfer 1: Yes 0
0 = none
1 = linear
2 = circular

298732_en - 11/21
2-135
ISO programming - G Codes - 2. Tornos macros

G971

Argument Description Optional Default

P Chamfer dimension side 1 [mm][inch] Yes 0

Q Chamfer angle side 1 (if linear) [°] Yes 45°

R Chamfer 2: Yes 0
0 = none
1 = linear
2 = circular

S Spindle speed during finishing [rev/min][m/min] Yes Last


speed

T Chamfer dimension side 2 [mm][inch] Yes 0

U Chamfer angle side 2 (if linear) [°] Yes 45°

V Turning direction when finishing Yes 1


1 = Z- direction
2 = Z+ direction

W Grooving depth [mm][inch] No -

X Diameter at bottom of groove [mm][inch] No -

Z Groove start position [mm][inch] No -

298732_en - 11/21
2-136
2. Tornos macros - ISO programming - G Codes

Argument A :
Argument A provides information on the groove machining method you want.
1 = Roughing (through several infeeding passes)
2 = Finishing
3 = Roughing then finishing
This argument is optional; by default the cycle performs the roughing and then the finishing (A3).e

Arguments D, E :
Argument D provides the second grooving tool offset number.

Argument E provides the grooving tool offset width.


Only one of the 2 arguments must be programmed.
TORNOS SA recommends the use of 2 offsets (argument “D”) to be able to have an effect on tool
wear during production.

298732_en - 11/21
2-137
ISO programming - G Codes - 2. Tornos macros

Arguments B, C, W, X, Z :
Argument B provides the diameter before the groove. This argument is mandatory.

Argument C provides the diameter after the groove. This argument is optional; if omitted, the value
passed using argument B is taken by default.

Argument X provides the diameter the bottom of groove. This argument is mandatory.

Argument Z provides the start position of the Z groove in relation to the original workpiece. This ar-
gument is mandatory.

Argument W provides the groove width. This argument is mandatory.

298732_en - 11/21
2-138
2. Tornos macros - ISO programming - G Codes

Arguments J, K, L, M, N :
Argument J provides the infeeding feed for roughing the groove. This argument is mandatory when
argument “A” is 1 or 3.

Argument K provides the backward feed to clear the tool in X after infeeding. This argument is op-
tional; by default the backward feed is performed using a fast feed rate.

Argument L provides the spindle speed during roughing infeeding. This argument is optional; by de-
fault the last speed programmed is taken into account.

Argument M provides the extra thickness to leave on the diameter for the finish.
This argument is optional, by default the value 0.05 mm is taken into account.

Argument N provides the extra thickness to leave on the walls of the groove for finishing.
This argument is optional, by default the value 0.05 mm is taken into account.

298732_en - 11/21
2-139
ISO programming - G Codes - 2. Tornos macros

Arguments F, H, I, S, V :
Argument F provides the feed rate when finishing during plunging and extraction in X.
This argument is mandatory when argument A is 2 or 3.

Argument H provides the feed rate when finishing during a move in Z.


This argument is optional; by default argument F is taken into account.

Argument I provides the feed rate when machining the chamfers.


This argument is optional; by default argument F is taken into account.

Argument S provides the spindle speed during finishing.


This argument is optional; by default the last speed used is taken into account.

Argument V provides the machining pass direction.


This argument is optional, by default direction 1 is taken into account.
1 = the tool moves in direction Z-
2 = the tool moves in direction Z+

298732_en - 11/21
2-140
2. Tornos macros - ISO programming - G Codes

Arguments O, P, Q, R, T, U :
Argument O tells the type of chamfer on the first side of the groove:
0 = none
1 = linear
2 = circular
This argument is optional, by default the cycle does not create any chamfer.

Argument R provides the chamfer type on the second side of the groove:
0 = none
1 = linear
2 = circular
This argument is optional, by default the cycle does not create any chamfer.

298732_en - 11/21
2-141
ISO programming - G Codes - 2. Tornos macros

Argument P provides the dimension of the first chamfer.


This argument is mandatory when argument O is 1 or 2.

Argument Q provides the angle of the first linear chamfer.


The argument can be programmed if argument P is 1.
By default 45° is taken into account.

Argument T provides the dimension of the second chamfer.


The argument is mandatory when argument R is 1 or 2.

Argument U provides the angle of the second linear chamfer.


The argument can be programmed if argument T is 1.
By default 45° is taken into account.

Note
The macro automatically identifies whether it is an interior or exterior turning based on the latest tool
positioning in X.

Programming example

G903 T13
G0 X10 Z-5
G971 A3 X3 Z-6 W6.2 B8 O1 P0.5 Q60 R2 T1 D1 J0.05 F0.04
G0 X10 Z-5

298732_en - 11/21
2-142
2. Tornos macros - ISO programming - G Codes

2.1.52 G972 [Incision turning]


This function makes it easy to turn a radial plunge cut.
The function can be used for both exterior and interior cutting.

G972

Argument Description Optional Default

A Angle of entry [°] No -

B Diameter before the radial plunge cut [mm][inch] No -

C Diameter after the radial plunge cut [mm][inch] Yes -

D Number of the second tool offset Yes -

E Width of the radial plunge tool (if no second offset avail- Yes -
able)
[mm][inch]

F Turning feed in Z Yes Last ad-


[mm/rev][mm/min][inch/rev][inch/min] vance

H Penetration distance in the face Yes 0


[mm][inch]

I Height of turning in the face Yes -


[mm][inch]

J Exit angle from the face Yes -


[°]

K Face finishing Yes 0


0 = Without
1 = With

L Feed rate on the X-Z plunge Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

M Feed rate on radius No. 1 Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

N Feed rate on radius No. 2 Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

O Feed rate when finishing the face Yes Argu-


[mm/rev][mm/min][inch/rev][inch/min] ment “F”

Q Radius no. 1 Yes 0


[mm][inch]

R Radius no. 2 Yes 0


[mm][inch]

S Spindle speed during turning [rev/min][m/min] Yes Last


speed

W Plunge cut width [mm][inch] No -

X Diameter at bottom of the radial plunge cut [mm][inch] No -

Z Radial plunge cut start position [mm][inch] No -

298732_en - 11/21
2-143
ISO programming - G Codes - 2. Tornos macros

Arguments A, B, C, H, I, J, K, Q, R, W, X, Z :
Argument “A” indicates the angle of entry into the material.
This argument is mandatory.

Argument B provides the diameter before the plunge cut.


This argument is mandatory.

Argument C provides the diameter after the plunge cut.


This argument is mandatory only if the tool that machines the plunge cut also finishes the face (ar-
gument K to 1).
Arguments H, I, J should only be used if you want the tool to enter the face at the end of the span.
For example, for a radial plunge cut before grinding (diameter+face).

Argument H provides the distance the tool must penetrate into the face.
This argument is optional; by default the tool does not penetrate into the face.

Argument I provides the height to be machined on the face.


Argument J provides the exit angle after penetration into the face.
If argument H contains a value other than 0, then argument I or J becomes mandatory.
Arguments I and J cannot be programmed at the same time.

Argument K provides information if the face needs to be finished using the plunge cut tool.
0 = Without face finishing
1 = With face finishing
This argument is optional; by default there is no face finishing.

Arguments Q and R provide the radii of the plunge cut.


These are optional arguments; by default the plunge cut will have the tool radius.

Argument W provides the groove width.


This argument is mandatory.

Argument X provides the plunge cut bottom diameter.


This argument is mandatory.

Argument Z provides the plunge cut start position in Z.


This argument is mandatory.

298732_en - 11/21
2-144
2. Tornos macros - ISO programming - G Codes

Behaviour of machining arguments F, L, M, N, O, S :


Argument F provides the work feed rate on the turning of the plunge cut (movement in Z).
The value is in mm/rev or mm/min depending on last active mode (G94/G95).
This argument is optional; by default the last value programmed is taken into account.

Argument L provides the work feed rate on the plunge cut turning during plunging (movement in -
Z).
The value is in mm/rev or mm/min depending on last active mode (G94/G95).
This argument is optional; by default the last value programmed is taken into account.

The M argument provides the work feed rate on the first radius of the plunge cut.
The value is in mm/rev or mm/min depending on last active mode (G94/G95).
This argument is optional; by default the last value programmed is taken into account.

Argument N provides the work feed rate on the second radius of the plunge cut.
The value is in mm/rev or mm/min depending on last active mode (G94/G95).
This argument is optional; by default the last value programmed is taken into account.

Argument O provides the work feed rate during the face finishing after the plunge cut.
The value is in mm/rev or mm/min depending on last active mode (G94/G95).
This argument is optional; by default the last value programmed is taken into account.

Argument S provides the spindle rotation speed during turning.


The value is in rev/min or m/min depending on the last active mode (G96/G97).
This argument is optional; by default the last value programmed is taken into account.

298732_en - 11/21
2-145
ISO programming - G Codes - 2. Tornos macros

Tool information for argument D,E :


Argument D provides the second plunge tool offset number.

Argument E provides the radial plunge tool width.


Only one of the 2 arguments must be programmed.
TORNOS SA recommends the use of 2 offsets (argument “D”) to be able to have an effect on tool
wear during production.

Note
The macro automatically identifies whether it is an interior or exterior turning based on the latest tool
positioning in X.
The positioning of the tool prior to machining the radial plunge cut and the retraction of the tool
must be programmed outside the macro.

Programming example

G0 Y0 Z-3 T23 D0 M103 S6000 P1


G0 X12
G972 A30 X5 Z-7 W4 R0.6 B6 K1 C10 D1 F0.02
N0.01
G0 X12 Z-5

298732_en - 11/21
2-146
2. Tornos macros - ISO programming - G Codes

2.1.53 G973 [Engraving of numerical values]


This function is used to engrave numerical values.

G973

Argument Description Optional Default

B Engraving type: No -
0 = On the face
1 = On a lateral milling
2 = On the workpiece mantle

C Position of the material spindle [°] Yes 0

D Numbering direction: Yes 1


1 = Parallel to the bar
2 = Perpendicular to the bar

E Feed rate on the tool plunge into the material Yes Argu-
[Mm/min][inch/min] [mm/rev][inch/rev] ment “F”

F Engraving feed No -
[Mm/min][inch/min] [mm/rev][inch/rev]

H Height of numbers [mm][inch] No -

L Total width of number to be engraved [mm][inch] No -

M Operating mode if engraving on the face: Yes 1


1 = XY
2 = XC

N Number to be engraved No -

P Engraving depth [mm][inch] No -


(in relation to the approach position)

X Start position in X [mm][inch] Yes Current


position

Y Start position in Y [mm][inch] Yes Current


position

Z Start position in Z [mm][inch] Yes Current


position

298732_en - 11/21
2-147
ISO programming - G Codes - 2. Tornos macros

Argument B :
Argument “B” is used to choose the engraving type.
0 = on the workpiece face
1 = on a lateral workpiece milling (flat)
2 = on the workpiece mantle (cylinder)
This argument is mandatory.

Argument D :
Argument “D” is used to define the direction of the engraving.
This argument can only be programmed if “B” is not 0.
By default the argument is 1 (parallel to the bar).

298732_en - 11/21
2-148
2. Tornos macros - ISO programming - G Codes

Argument M :
For engraving on the face (B1), 2 operating modes are possible.
Either using the X-Y axes (G17) or using the X-C axes (polar coordinates).
This argument can only be programmed if (B1).
By default the argument is 1 (X-Y).

Argument N :
Argument “N” is used to configure the number to be engraved.
Numbers with comma are equally tolerated.
This argument is mandatory.

298732_en - 11/21
2-149
ISO programming - G Codes - 2. Tornos macros

Arguments H, L :
Argument “H” is used to define the desired height of the numbers.
Argument “L” is used to define the desired width of the entire number.
It is mandatory that one of the two arguments is programmed.
The two arguments cannot be programmed at the same time.

Argument P :
Argument “P” is used to set the depth of the engraving.
It corresponds to the distance between the approach position of the tool and the background of
the numbers.
This argument is mandatory.

298732_en - 11/21
2-150
2. Tornos macros - ISO programming - G Codes

Argument C :
Argument “C” is used to define the angular orientation of the workpiece.
The argument works as well for a face engraving as for a side engraving.
This argument is optional, by default 0 is taken into account.

Arguments X, Y, Z :
Arguments “X”, “Y” and “Z” define the engraving starting point.
These are optional arguments.
If they are omitted, the last positions programmed are taken into account.
For engraving on the mantle (B2), in principle the Y axis must be positioned at 0.

298732_en - 11/21
2-151
ISO programming - G Codes - 2. Tornos macros

Arguments E, F :
Argument “F” is used to define the machining feed.
This argument is mandatory.

Argument “E” is used to define the tool plunge feed rate into the material.
This argument is optional; by default argument F is taken into account.

Programming example

M2103 S6000 P1
G0 X0 Y0 Z2 T211 D0
G973 N0.123 B0 M1 L8 P4 E0.05 F0.09 X10 Y2
G0 X0 Y0 Z2

298732_en - 11/21
2-152
2. Tornos macros - ISO programming - G Codes

2.1.54 G974 [Engraving of alphabetical values]


This function is used to engrave letters.

G974

Argument Description Optional Default

A First letter to engrave: No -

1=A 10 = J 19 = S
2=B 11 = K 20 = T
3=C 12 = L 21 = U
4=D 13 = M 22 = V
5=E 14 = N 23 = W
6=F 15 = O 24 = X
7=G 16 = P 25 = Y
8=H 17 = Q 26 = Z
9=I 18 = R 27 = space

AA Next letters to engrave: Yes -


AB
1=A 10 = J 19 = S
AC
2=B 11 = K 20 = T
AD
3=C 12 = L 21 = U
AE
4=D 13 = M 22 = V
AF
5=E 14 = N 23 = W
...
6=F 15 = O 24 = X
AZ
7=G 16 = P 25 = Y
8=H 17 = Q 26 = Z
9=I 18 = R 27 = space

B Engraving type: No -
0 = On the face
1 = On a lateral milling
2 = On the workpiece mantle

C Position of the material spindle [°] Yes 0

D Numbering direction: Yes 1


1 = Parallel to the bar
2 = Perpendicular to the bar

E Feed rate on the tool plunge into the material Yes Argu-
[Mm/min][inch/min] [mm/rev][inch/rev] ment “F”

F Engraving feed No -
[Mm/min][inch/min] [mm/rev][inch/rev]

H Height of letters [mm][inch] No -

L Total text width [mm][inch] No -

M Operating mode if engraving on the face: Yes 1


1 = XY
2 = XC

P Engraving depth [mm][inch] No -


(in relation to the approach position)

298732_en - 11/21
2-153
ISO programming - G Codes - 2. Tornos macros

G974

Argument Description Optional Default

X Start position in X [mm][inch] Yes Current


position

Y Start position in Y [mm][inch] Yes Current


position

Z Start position in Z [mm][inch] Yes Current


position

Argument B:
Argument “B” is used to choose the engraving type.
0 = on the workpiece face
1 = on a lateral workpiece milling (flat)
2 = on the workpiece mantle (cylinder)
This argument is mandatory.

298732_en - 11/21
2-154
2. Tornos macros - ISO programming - G Codes

Argument D:
Argument “D” is used to define the direction of the engraving.
This argument can only be programmed if argument “B” is not 0.
By default the argument is 1 (parallel to the bar).

Argument M :
For engraving on the face (B1, there are two possible operating modes.
Either using the X-Y axes (G17) or using the X-C axes (polar coordinates).
This argument can only be programmed if (B1).
By default the argument is 1 (X-Y).

298732_en - 11/21
2-155
ISO programming - G Codes - 2. Tornos macros

Argument A :
Argument “A” is used to configure the letter to be engraved.
This argument is mandatory.

Arguments AA, AB, AC, etc. :


Arguments “AA”, “AB”, AC”, etc. are used to add additional letters.
These arguments are optional.

298732_en - 11/21
2-156
2. Tornos macros - ISO programming - G Codes

Arguments H, L :
Argument “H” is used to define the desired height of the letters.
Argument “L” is used to define the desired width of the whole of the text.
It is mandatory that one of the two arguments is programmed.
The two arguments cannot be programmed at the same time.

Argument P :
Argument “P” is used to set the depth of the engraving.
It corresponds to the distance between the approach position of the tool and the background of
the letters.
This argument is mandatory.

298732_en - 11/21
2-157
ISO programming - G Codes - 2. Tornos macros

Argument C:
Argument “C” is used to define the angular orientation of the workpiece.
This argument is optional, by default 0 is taken into account.

Arguments X, Y, Z :
Arguments “X”, “Y” and “Z” define the engraving starting point.
These are optional arguments.
If they are omitted, the last positions programmed are taken into account.
For engraving on the mantle (B2), in principle the Y axis must be positioned at 0.

298732_en - 11/21
2-158
2. Tornos macros - ISO programming - G Codes

Arguments E, F :
Argument “F” is used to define the machining feed.
This argument is mandatory.

Argument “E” is used to define the tool plunge feed rate into the material.
This argument is optional; by default argument “F” is taken into account.

Programming example

M2103 S6000 P21


G0 X0 Y0 Z2 T211 D0
G974 A8 AA5 AB12 AC12 AD15 B0 M1 H4 P0.2 E0.1 F0.2 X5 Y2
G0 X0 Y0 Z2

298732_en - 11/21
2-159
ISO programming - G Codes - 2. Tornos macros

2.1.55 G975 [Cylindrical helicoidal/external spiral milling]


This function is used for performing external cylindrical milling.
It allows for pivot milling using a helical motion or a spiral motion.
Low cutting efforts are thus guaranteed.

G975

Argument Description Optional Default

B Machining mode: Yes -


1 = XC
2 = XY

E Number of empty strokes Yes 1

F Milling feed No -
(If <1 [mm/rev] | If >1 [mm/min])
[mm/rev][mm/min][inch/rev][inch/min]

Q Machining direction Yes 1


1 = Up-cut
2 = Climb

U Increment X for each imprint turn Yes -


(Use only if no Z value)
[mm][inch]

X Final diameter [mm][inch] No -

W Increment Z for each imprint turn Yes 0.5


(Use only if there is a Z value)
[mm][inch]

Z End of machining position in Z [mm][inch] Yes -

298732_en - 11/21
2-160
2. Tornos macros - ISO programming - G Codes

Argument B :
Two operating modes are possible.
Either using the X-Y-Z axes (G17) or using the X-C-(Z) axes (polar coordinates).
The advantage of polar coordinates is that they reduce the risks of having a software limit (unlike
the Y axis), and they can be used with all tool systems (no need to have a Y axis).
Working in X-Y offers the advantage of being able to perform off-centre or tilted machining in rela-
tion to the bar axis or to be able to perform a second machining in parallel with another tool system
(C-axis stationary).

Argument E :
The number of blank passes once reaching the bottom of the machining to improve the surface
finish or reduce burring.

298732_en - 11/21
2-161
ISO programming - G Codes - 2. Tornos macros

Argument F :
The milling feed is the feed during machining of the imprint.
If the value is equal to or less than 1, the machining is done in G95 [mm/rev], if the value is above
1, the machining is done in G94 [mm/min].

Argument Q :
Argument Q makes it possible to choose the machining direction.
1 = Up-cut
2 = Climb
This argument is optional; by default up-cut machining is taken into account.

298732_en - 11/21
2-162
2. Tornos macros - ISO programming - G Codes

Arguments U, W:
Argument W allows setting the Z increment to turn an imprint.
This argument is optional; by default 0.5 mm is taken into account.

Argument U allows setting the increment in X for an imprint rotation.


This argument can only be used if there is no movement in Z (no “Z” argument).
In the event that a Z-movement is programmed, the increment in Z is automatically defined propor-
tionally to ensure the correct diameter (argument “X”) once it reaches the depth (argument “Z”).
The value passed in argument U is approximate, it is rounded to allow the machining of an entire
number of imprint turns.

298732_en - 11/21
2-163
ISO programming - G Codes - 2. Tornos macros

Arguments X, Z :
Arguments X and Z allow configuring the dimensions of the cylinder to be machined.

Example of spiral milling programming (cutting effort in X)

G0 G17 G41 Z-5 X16 Y0 (Tool positioning)

M1103 S8000 (Milling attachment rotation)

G975 B2 Q2 E1 F0.08 X5 U1.5 (Machining)

G0 G40 X14 Z5 (Tool clearance)

298732_en - 11/21
2-164
2. Tornos macros - ISO programming - G Codes

Example of spiral milling programming (cutting effort in Z)

G0 G17 G41 Z2 X5 Y0 (Tool positioning)

M1103 S8000 P11 (Milling attachment rotation)

G975 B2 Q2 F200 X5 Z-5 W2 (Machining)

G0 G40 X14 Y0 Z5 (Tool clearance)

298732_en - 11/21
2-165
ISO programming - G Codes - 2. Tornos macros

Example of spiral milling programming (cutting effort in X-Z)

G0 G17 G41 Z2 X14 Y0 (Tool positioning)

M1103 S8000 P11 (Milling attachment rotation)

G975 B2 Q2 F0.08 E1 X5 Z-5 W2 (Machining)

G0 G40 X14 Y0 Z5 (Tool clearance)

298732_en - 11/21
2-166
2. Tornos macros - ISO programming - G Codes

2.1.56 G976 [Cylindrical helicoidal/internal spiral milling]


This function is used for performing internal cylindrical milling.
It allows for a cut to be milled with a helical or spiral movement. Low cutting efforts are thus guar-
anteed.

G976

Argument Description Optional Default

B Machining mode: Yes 1


1 = XC
2 = XY

E Number of empty strokes Yes 1

F Milling feed No -
(If <1 [mm/rev] | If >1 [mm/min])
[mm/rev][mm/min][inch/rev][inch/min]

Q Machining direction Yes 1


1 = Up-cut
2 = Climb

U Increment X for each imprint turn Yes -


(Use only if no Z value) [mm] [inch]

X Final diameter [mm][inch] No -

W Increment Z for each imprint turn Yes 0.5


(Use only if there is a Z value)
[mm][inch]

Z End of machining position in Z [mm][inch] Yes -

298732_en - 11/21
2-167
ISO programming - G Codes - 2. Tornos macros

Argument B:
Two operating modes are possible.
Either using the X-Y-Z axes (G17) or using the X-C-(Z) axes (polar coordinates).
The advantage of polar coordinates is that they reduce the risks of having a software limit (unlike
the Y axis), and they can be used with all tool systems (no need to have a Y axis).
Working in X-Y offers the advantage of being able to perform off-centre or tilted machining in rela-
tion to the bar axis or to be able to perform a second machining in parallel with another tool system
(C-axis stationary).

Argument E:
The number of blank passes once reaching the bottom of the machining to improve the surface
finish or reduce burring.

298732_en - 11/21
2-168
2. Tornos macros - ISO programming - G Codes

Argument F :
The milling feed is the feed during machining of the imprint.
If the value is equal to or less than 1, the machining is done in G95 [mm/rev], if the value is above
1, the machining is done in G94 [mm/min].

Argument Q :
Argument Q makes it possible to choose the machining direction.
1 = Up-cut
2 = Climb
This argument is optional; by default up-cut machining is taken into account.

298732_en - 11/21
2-169
ISO programming - G Codes - 2. Tornos macros

Arguments U, W :
Argument “W” is used to configure the Z increment for turning an imprint.
This argument is optional; by default 0.5 mm is taken into account.

Argument U allows setting increment in X to turn an imprint.


This argument can only be used if there is no movement in Z (no “Z” argument).
In the event that a Z-movement is programmed, the increment in Z is automatically defined propor-
tionally to ensure the correct diameter (argument “X”) once it reaches the depth (argument “Z”).
The value passed in argument U is approximate, it is rounded to allow the machining of an entire
number of imprint turns.

298732_en - 11/21
2-170
2. Tornos macros - ISO programming - G Codes

Arguments X, Z :
Arguments “Z” and “Z” are used to configure the dimensions of the cylinder interior to be machined.

Note
There is no need to start machining at X0.
For example, if the workpiece is already pre-drilled with a 5 mm diameter drill bit, it is possible to start
the spiral motion at X5.

298732_en - 11/21
2-171
ISO programming - G Codes - 2. Tornos macros

Example of spiral milling programming (cutting effort in X)

G0 G17 G41 Z2 X2 Y0 (Tool positioning)

M1103 S8000 (Milling attachment rotation)

G976 B2 Q2 E1 F0.08 X10 U1.5 (Machining)

G0 G40 X0 Z5 (Tool clearance)

298732_en - 11/21
2-172
2. Tornos macros - ISO programming - G Codes

Example of spiral milling programming (cutting effort in Z)

G0 G17 G42 Z2 X10 Y0 (Tool positioning)

M1103 S8000 (Milling attachment rotation)

G976 B2 Q1 F0.08 X10 Z-5 W0.8 (Machining)

G0 G40 X0 Z5 (Tool clearance)

298732_en - 11/21
2-173
ISO programming - G Codes - 2. Tornos macros

Example of spiral milling programming (cutting effort in X-Z)

G0 G17 G42 Z2 X2 Y0 (Tool positioning)

M1103 S8000 P11 (Milling attachment rotation)

G976 B2 Q2 E1 F0.08 X10 U1.5 (Machining)

G0 G40 X0 Z5 (Tool clearance)

298732_en - 11/21
2-174
2. Tornos macros - ISO programming - G Codes

2.1.57 G977 [Drilling - deburring]


This function allows successive recoils of the wick during drilling to evacuate the chips. This function
can be used on any drilling operation (end, transversal, counter-operation, etc.).

G977

Argument Description Optional Default

A Wick diameter [mm] [inch] No -

B Start of drilling [mm] [inch] No -

C End of drilling [mm] [inch] No -

D Clearing distance [mm] [inch] Yes 1 (0.04 inch)

E Margin during fast approach [mm][inch] Yes 0.2 (0.008 inch)

F Depth of first drilling, in multiples of wick di- Yes 5


ameter

H Depth of second drilling, in multiples of wick Yes 3


diameter

J Number of progressive passes Yes 3

K Drilling feed [mm/rv] [inch/rv] or [mm/min] Yes 0.01 x Argument


[inch/min] “A” [mm/rv]
[inch/rv]

M Wick tip height [mm] [inch] Yes Wick at 120°

Q Centring feed [mm/tr] [inch/tr] or [mm/ Yes 0


min] [inch/min]

R Wick output feed [mm/tr] [inch/rv] or [mm/ Yes 0


min] [inch/min]

S Drilling type: Yes 0


0 = longitudinal
1 = transversal

T Timer at the end of drilling [seconds] Yes 0

U Back feeding of the wick after deburring Yes 0


[mm/rv] [inch/rv] or [mm/min] [inch/min]

298732_en - 11/21
2-175
ISO programming - G Codes - 2. Tornos macros

Fig. 2-1 Figure 1.

Fig. 2-2 Figure 2.

Figure 1 shows the position of the wick at the beginning of the cycle.
Figure 2 shows the position of the wick after deburring.

Argument A:
This argument includes the diameter of the wick.
It is a mandatory argument.

Argument B:
This argument includes the position at which drilling begins.
It is a mandatory argument.

Argument C:
This argument includes the position at which drilling ends.
It is a mandatory argument.

298732_en - 11/21
2-176
2. Tornos macros - ISO programming - G Codes

Argument D:
This argument includes the distance at which the wick recoils for each break.
This is an optional argument, the default value is 1 mm or 0.04 inch.

Argument E:
This argument includes the distance the wick approaches during fast feeding.
This is an optional argument, the default value is 0.2 mm or 0.008 inch.

Argument F:
This argument is used to program a distance for the first drilling, equivalent to the diameter of the
drill bit programmed by argument “F”.
This is an optional argument, the default value is 5 times the wick diameter.

Argument H:
This argument is used to program a distance for the second drilling, equivalent to the diameter of
the drill bit multiplied by argument “H”.
This is an optional argument, the default value is 3 times the wick diameter.

298732_en - 11/21
2-177
ISO programming - G Codes - 2. Tornos macros

Argument J:
When argument “J” is specified, the cycle uses a mathematical formula that determines, for each
pass, the different drilling depths. The values given to arguments “F” and “H” (first and second drill-
ing) will influence the progression of the tool in the material. When all the passes defined in the J
argument are done, all the following ones will be done with a progression equal to argument “A”
(diameter of the drill bit), until the final depth (argument “C”).
This is an optional argument, the default value is 3 progressive passes.

Argument K:
This argument includes how fast the tool moves in the material.
This is an argument in mm/rv or mm/min depending on the last programmed G94/G95 mode.
This is an optional argument, the default value is 0.01 x Argument “A”, in mm/rv.

Argument M:
This argument includes the height of the tip of the wick.
This is an optional argument; the default value takes into account a 120° drill bit where the tip height
equals 0.288 x Argument “A”.

Argument Q:
This argument includes the feed if one carries out a centring with the wick; if it is not included, there
is no centring.
This is an optional argument, the default value is 0.

298732_en - 11/21
2-178
2. Tornos macros - ISO programming - G Codes

Argument R:
This argument makes it possible to program a feed in G1 for the recoil of the wick, to avoid scratch-
ing the hole.
If the argument is not included, a fast feed is carried out (G0).
This is an optional argument, the default value is 0.

Argument S:
This argument includes whether it is a longitudinal (diameter value) or transversal (radius value) drill-
ing.
This is an optional argument, the default value is 0.

Argument T:
This argument is used to program a delay in seconds at the bottom of the hole.
This is an optional argument, the default value is 0.

Argument U:
This argument makes it possible, for delicate holes, to program a feeding in G1 for the return of the
wick in the hole after deburring.
If the argument is not filled in, the wick is returned to the hole in fast feed (G0).
This is an optional argument, the default value is 0.

298732_en - 11/21
2-179
ISO programming - G Codes - 2. Tornos macros

Note
At the end of the cycle, the wick returns to the end of deburring position, as shown in figure 2. The
wick returns to the last position reached minus the value of the "E" argument.

Note
Feed per revolution (G95) or feed per minute (G94) must be selected before calling the cycle.
The default drilling feed of the "J" argument will always be set to [mm/rv] or [inch/tr].

Simplified programming example

G977 A5 B0.5 C-8

Detail programming example

G977 A5 B0.5 C-8 D0.5 E0.1 F4 H3 J2 K0.5 M1.44 Q0.03 R0.5 S0 T0.1 U0.2

298732_en - 11/21
2-180
2. Tornos macros - ISO programming - G Codes

2.1.58 G980 [Double tool approach position]


This macro is used to obtain two different tool approach distances between the machine setting
phase and the production phase.
A box is ticked in the AUX panel of the T-MI to go from one phase to another.

G980

Argument Description Optional Default

D Tool offset number Yes Last tool

M Code M Yes -

S Spindle speed [rv/min] [m/min] Yes -

T Tool number Yes Last tool

U Tool approach position in X in adjustment Yes Argument “X”


phase [mm] [inch]

V Tool approach position in Y in adjustment Yes Argument “Y”


phase [mm] [inch]

W Tool approach position in Z in adjustment Yes Argument “Z”


phase [mm] [inch]

X Tool approach position in X in adjustment Yes -


phase [mm] [inch]

Y Tool approach position in Y in adjustment Yes -


phase [mm] [inch]

Z Tool approach position in Z in adjustment Yes -


phase [mm] [inch]

Arguments T, D:
Arguments “T” and “D” are used to activate a new tool, if necessary.

Argument M:
Argument “M” is used to activate function “M”, if necessary, during axis movements.

298732_en - 11/21
2-181
ISO programming - G Codes - 2. Tornos macros

Arguments M, S:
Arguments “M” and “S” are used to rotate a spindle during axis movements.

Arguments X, U:

Arguments Y, V:

Arguments Z, W:

Prohibition!
It is forbidden to program an incremental movement following G980.

Programming example

G980 X27 Z2 U29 W2.5 T12 D0

298732_en - 11/21
2-182
2. Tornos macros - ISO programming - G Codes

2.1.59 G981 [Side milling with optimal approach


This function is used to mill flats on the workpiece by automatically managing the tool approaches
and retractions.
This ensures optimal cycle times while avoiding tedious calculations for the programmer.

G981

Argument Description Optional Default

A Action Yes 2
1 = Tool Approach
2 = Approach + machine of the flat part

B Machining type Yes 1


1 = Radial
2 = Longitudinal

C Position of the material spindle [°] Yes 0

D Tool offset for the tool to be rotated Yes Last ac-


tive

E Machining mode: Yes 1


1=XY
2=XC

F Milling feed Yes Last ac-


[mm/rev][mm/min][inch/rev][inch/min] tive

H Diameter of desired milling Yes bar diam-


[mm][inch] eter

I Machining direction Yes 1


1 = From Y+ to Y- (or from C+ to C-)
2 = From Y- to Y+ (or from C- to C+)

S Speed of the tool spindle Yes Last ac-


[rpm] tive

T Tool Number for the tool to set rotating Yes Last ac-
tive

X Dimension on flat parts (at diameter) No -


[mm][inch]

Y Safety distance for fast-approach feed Yes 0.2


[mm][inch]

Z Milling position in Z Yes Last ac-


[mm][inch] tive

298732_en - 11/21
2-183
ISO programming - G Codes - 2. Tornos macros

Arguments A, B, E, I :
Behaviour of the cycle:
Argument “A” is used to configure whether to only configure the tool to approach to an optimal
position, or to perform the positioning and movement of the milling until the milling attachment is
optimally released.
This argument is optional, by default the cycle performs the approach and milling of the flat part
(A2).
A1 = Tool Approach
A2 = Approach + machining of the flat part

298732_en - 11/21
2-184
2. Tornos macros - ISO programming - G Codes

Argument “B” is used to indicate if the tool used is a radial tool or a longitudinal tool.
The choice that is made will affect the positioning of the milling attachment.
This argument is optional, by default the cycle considers a radial tool (B1).
B1 = Radial milling
B2 = Longitudinal milling

Argument “E” is only used if (B1) (longitudinal milling).


It provides information on whether you want to work with X-Y movements or X-C polar coordinates.
This argument is optional, by default the cycle works in X-Y.
E1 = XY
E2 = XC

298732_en - 11/21
2-185
ISO programming - G Codes - 2. Tornos macros

Argument “I” is used to indicate the milling attachment machining direction.


Either from plus to minus, or from minus to plus.
This argument is optional, by default the machining runs from direction plus to direction minus (I1).
I1 = from Y+ to Y- (or from C+ to C-)
I2 = from Y- to Y+ (or from C- to C+)

Arguments H, Y :
Positioning of the milling attachment:
Argument “H” indicates the raw diameter on which the milling attachment will be machining.
The argument will influence the rapid positioning of the milling attachment.
The argument is optional, by default the bar diameter is used.

298732_en - 11/21
2-186
2. Tornos macros - ISO programming - G Codes

Argument “Y” is used to define the safe distance between the milling attachment quick approach
point and the material.
This argument is optional; by default 0.2 mm is taken into account.

Arguments T, D :
Arguments “T” and “D” are used to activate a new tool, if necessary.
These arguments are optional, by default the active tool is taken into account.

298732_en - 11/21
2-187
ISO programming - G Codes - 2. Tornos macros

Argument S :
Argument “S” is used to rotate a spindle tool during axis movements.
This argument is optional, by default the tool spindle does not change the speed.

Argument F :
This argument includes the diameter of the wick.
This argument is optional, by default it is the last feed rate command that is taken into account.

298732_en - 11/21
2-188
2. Tornos macros - ISO programming - G Codes

Argument C :
Position of the material spindle at the time of milling
This argument provides the angular orientation of the material spindle at milling time.
This argument is optional, by default the material spindle is oriented at 0°.

Arguments X, Z :
Dimensions of the milling:
Argument “X” indicates the dimension on the flat part after milling (on diameter).
This argument is mandatory.

Argument “Z” indicates the milling position in Z.


This argument is optional, by default there is no positioning movement in Z.

Note
The milling attachment radius must be correctly provided, it will play an essential role in the rapid
tool positioning.

298732_en - 11/21
2-189
ISO programming - G Codes - 2. Tornos macros

Programming example

G0 Y20 T13 D0 (Tool positioning)


G981 A2 B1 I2 C60 F200 H12 X8 Y0.1
G981 A2 B1 I2 C60 F200 H12 X8 Y0.1
G981 A2 B1 I1 C120 F200 H12 X8 Y0.1
G0 Y20 X15

298732_en - 11/21
2-190
2. Tornos macros - ISO programming - G Codes

2.1.60 G982 [External helicoidal/spiral polygon milling]


This function is used for performing external polygon milling.
It allows milling a polygon by a helical motion or by a spiral motion with a milling at the end.
This ensures a constant execution speed and cutting effort.

G982

Argument Description Optional Default

B Machining mode: Yes 1


1 = XC
2 = XY

C Angular orientation of the polygon [°] Yes 0

E Number of empty passes Yes 1

F Milling feed No -
(If <1 [mm/rev] | If >1 [mm/min])
[mm/rev][mm/min][inch/rev][inch/min]

H Number of polygon sides Yes 6

Q Machining direction Yes 1


1 = Up-cut
2 = Climb

U X increment for each imprint turn No -


[mm][inch]

W Z increment for each imprint turn Yes Automat-


[mm][inch] ic

X Polygon width No -
[mm][inch]

Y Polygon thickness Yes Arg X


[mm][inch]

Z Machining position end in Z Yes No move-


[mm][inch] ment in Z

298732_en - 11/21
2-191
ISO programming - G Codes - 2. Tornos macros

Argument B :
Two operating modes are possible.
Either using the X-C-(Z) axes (polar coordinates), or using the X-Y-(Z) axes (G17).
The advantage of polar coordinates is to reduce the risk of having a software limit (unlike the Y axis),
and to be usable with all tool systems (no need to have a Y axis).
The advantage of working in X-Y is that it allows off-centre or tilted machining in relation to the bar
axis or to be able to perform a second machining in parallel with another tool system (C-axis sta-
tionary).

Argument C :
Argument “C” is used to configure the polygon orientation.
This argument is optional, by default a 0° angle is taken into account.

298732_en - 11/21
2-192
2. Tornos macros - ISO programming - G Codes

Argument E :
The number of blank passes once reaching the bottom of the machining to improve the surface
finish or reduce burring.
This argument is optional: by default a turn without material is taken into account.

Argument F :
The milling feed is the feed during machining of the print.
If the value is less than or equal to 1, the machining is done in G95 [mm/rev],
if the value is above 1, the machining is done in G94 [mm/min].

Argument Q :
Argument Q makes it possible to choose the machining direction.
1 = Up-cut
2 = Climb
This argument is optional; by default up-cut machining is taken into account.

298732_en - 11/21
2-193
ISO programming - G Codes - 2. Tornos macros

Arguments U, W :
Argument U allows setting the increment in X for an imprint rotation.
This argument is mandatory.
If you want to machine a plunge in Z and no motion in X, it is possible to program U0.

Argument “W” is used to configure a plunge in Z per polygon rotation.


This argument is optional.
If it is omitted while the starting position in Z is the same as the arrival position in Z, there is an plunge
in X and no movement in Z.
If it is omitted while the starting position in Z is different from the finishing position Z, a constant incre-
ment in Z until it reaches the bottom of the machining is taken into account.

298732_en - 11/21
2-194
2. Tornos macros - ISO programming - G Codes

Argument H :
Argument “H” is used to configure the number of polygon sides.
This argument is optional; by default a hexagon (H6) is taken into account.
Minimum 3 sides are required.
If you program many points, for example 100, you can produce a circle or an oval.

Arguments X,Y,Z :
Arguments X, Y and Z allow configuring the polygon dimensions to be machined.
Argument “X” is mandatory.
Argument “Y” is optional: if omitted, the value set in argument “X” is taken into account.
Argument “Z” is optional: if omitted, there will be no movement in Z.

If argument Y is different from argument “X”, an elongated form will be machined, for example:
• With 4 sides (H4), a diamond is produced
• With 100 sides (H100), an oval is produced

298732_en - 11/21
2-195
ISO programming - G Codes - 2. Tornos macros

Example of spiral milling (cutting effort in X)

M1103 S5500 P11 (Milling attachment rotation)

G0 G17 G41 X20 Y0 Z-8 T12 D0 (Tool positioning)

G982 B2 F300 E1 H6 X8 Q2 U0.5 (Machining)

G0 G40 X20 (Tool clearance)

G18

298732_en - 11/21
2-196
2. Tornos macros - ISO programming - G Codes

Example of spiral milling (cutting effort in Z)

M1103 S5500 P11 (Milling attachment rotation)

G0 G17 G41 X8 Y0 Z1 T12 D0 (Tool positioning)

G982 B2 F300 E1 H6 X8 Q2 U0 W1 Z-8 (Machining)

G0 G40 X20 (Tool clearance)

G18

298732_en - 11/21
2-197
ISO programming - G Codes - 2. Tornos macros

Example of spiral milling (cutting effort in X-Z)

M1103 S5500 P11 (Milling attachment rotation)

G0 G17 G41 X20 Y0 Z1 T12 D0 (Tool positioning)

G982 B2 F300 E1 H6 X8 Q2 U0.5 Z-8 (Machining)

G0 G40 X20 (Tool clearance)

G18

298732_en - 11/21
2-198
2. Tornos macros - ISO programming - G Codes

2.1.61 G990 [reading the status of a PLC input/output]


This function is used for parametered programming by controlling the status of an input/output of
the PLC.

G990

Argument Description Optional Default

A State of the PLC input/output to be tested: No -


0 = Correct condition in state 0
1 = Correct condition in state 1

B Block number to execute if the condition is No -


met
(argument “A” status)

C State of the PLC output to be tested: Yes -


0 = Correct condition in state 0
1 = Correct condition in state 1

X Address of the PLC input to be tested No -


(xxx.x format)

Y Address of the PLC output to be tested Yes -


(yyy.y format)

Argument A:
Argument “A” is used to select the status of the input/output during the test.

Argument B:
Argument "B” is used to indicate the block number Nxxx to which the program skips if the condition
is correct.
Argument C:
Argument “C” defines the status of the output when the test is performed on an input and an out-
put.

Programming example 1

G990 A1 B5 X7.4
(programming)
N5
(programming)

Programming example 1

G990 A1 B5 C1 X7.4 Y10.6


(programming)
N5
(programming)

298732_en - 11/21
2-199
Ecological principles
Ecological principles
Roos printer - the business partner who
turns words into actions

FSC
certification

printed on FSC paper,


neutral for the climate
[Link]
We keep you turning

Printed in Switzerland – Copyright ©1999-2021

TORNOS SA
Spare parts online
shop
Rue Industrielle 111
CH-2740 Moutier
Phone +41 (0)32 494 44 44
Fax +41 (0)32 494 44 03
[Link] contact@[Link]

You might also like