Vous êtes sur la page 1sur 434

S4045 S4045P

User And Programming


Manual

S4045 S4045P
General

REVISIONS
Rev. # Rev. Date.
00

03/08/2001

Pages Revised
Emission

CMA44501080E

------- ---------------- ------------------------------------------------------------------------------------------------------------01

Sept. 2002

Second Edition

CMA44502091E

Updated following the new Software Release 0.11 20020306 and corresponding
to the 5th Edition of the Italian Manual.
------- ---------------- ------------------------------------------------------------------------------------------------------------02

Feb. 2003

Third Edition

CMA44503022E

Updated following the new Software Release 0.13 and corresponding to the 6th
Edition of the Italian Manual.
------- ---------------- ------------------------------------------------------------------------------------------------------------03

Oct. 2003

Fourth Edition

CMA44503103E

Updated following the new Software Release 1.2.17 and corresponding to the 7th
Edition of the Italian Manual.
------- ---------------- ------------------------------------------------------------------------------------------------------------04

April 2004

Fifth Edition

CMA44504044E

Updated the manual with the Chapter 3.11 Serial Management Part I.
Updated the G68 function Chapter 2.19 Rotary table control (Static TCPM) Part II.
------- ---------------- ------------------------------------------------------------------------------------------------------------05 Sept. 2004 Sixth Edition
CMA44504095E
Updated the manual following the new Software Release 1.4.22 and the new
operation system WINDOWS 2000 PRO.
------- ---------------- ------------------------------------------------------------------------------------------------------------06
July 2005
Seventh Edition
CMA44505076E
Updated the manual following the new Software Release 1.06.00.
Added the new SDU device (Shut Down Unit) Par. 1.1.1 SDU.
Added the new Export E version with limitation to 4 interpolated axes max.
Added the new option TCPM4000 to permit the continuous interpolations with 5
axes on S4045P CNC

Note: Pages marked (01) have been modified.


Pages marked (01)+ are new ones.

User and Programming Manual

S4045 S4045P
General

REVISIONS
Rev. # Rev. Date.
07

Sept. 2006

Pages Revised
Eighth Edition

CMA44506097E

Added a specific CNC shutdown procedure at Par. 1.3.2 Part I


Added the Paragraph 2.3.1 PART ORIGIN/2 Part I.
Updated the manual following the new Software Release 1.7.
------- ---------------- -------------------------------------------------------------------------------------------------------------

Note: Pages marked (01) have been modified.


Pages marked (01)+ are new ones.

User and Programming Manual

S4045 S4045P
General

INTRODUCTION
The new S4000 CNC Series combines the easy and powerful programming system and user friendly
interface of Numeric Controls belonging to the S3000 Series, with the Windows operating system,
offering more graphic and multimedia tools, and making the CNC more flexible and adaptable to
standard market software applications. S4000 CNCs have in fact a tested architecture based on
double CPUs: the first, a PC Pentium II processor, manages the user interface and external CAD/CAM
applications, the second, a Motorola processor, manages the machine tool in real-time.

WARNING SOFTWARE THAT HIGHLIGHTS POSSIBLE CONFLICTS


BETWEEN S4000 CNC SOFTWARE AND OTHER EXTERNAL
APPLICATIONS
Differently from the standard PCs that use the same Microsoft Windows operating systems, the
operator interface of the SELCA S4000 CNCs must exchange data with the central unit, which carries
out real-time functions for the machine tool control. It is therefore possible that the CNC software
clashes with other general applications regarding the CPU time occupation, memory or accesses to
the HDU.
For the above reasons, it is not advisable to install software applications on the CNC, that are not
needed or software applications that use system resources (memory, CPU, accesses to the disk) even
for short time.
Many software applications belongs to this category, also the screen-savers (that are not necessary
with the LCD display).
The use of these software applications could cause a slowing down of the CNC functioning as far as
the working is concerned up to the displaying of time-out error messages from the real-time processes.
In these cases and in case of serious alteration or tampering of the operating system (for example the
wrong configuration of the network services, the protocol removal or the change of the users
permissions) the CNC working could be compromised and a technical intervention could be necessary
in order to restore the system.
For all these cases, the restore activity will never be considered under warranty.

The Numerical Controls S4000, Export Version E excluded, are subject to export controls according
to Appendix I of the EU-Dual Use regulation.

User and Programming Manual

S4045 S4045P
General

GENERAL
GENERAL
This manual is addressed to those numerical control programmers that use the SELCA S4000 Series
Controls. It provides the basic concepts and the method of use for the various machine functions,
whether for basic programming or for particularly complex applications.
Before addressing the programming problems, the manual describes in detail all the commands
provided by the system and their performance. Programming is presented with difficulty levels
increasing in relation to the programming environments described.
This manual must be integrated into the machine documentation, supplied by the machine tool builder.

REFERENCES
The Selca Instruction

Handbook

is a summary of the functions described in this manual and can be used as a quick reference guide.

NOTE FOR PRELIMINARY SOFTWARE VERSIONS (0.X)


The following description may not be completely available for preliminary software versions and may
be subject to future variations to optimise its execution.

User and Programming Manual

S4045 S4045P
General

SUMMARY
The manual has been subdivided into three parts, independent of each other, plus one appendix:
Part I

Operating commands.
Contains the description of all the commands allowing to execute the functions provided
by the system.

Part II

Programming.
Consists of a detailed description of the various programming modes.

Part III

Programming examples
Consists of a number of programming examples that illustrate the great potential of the
Control

Appendix

Subdivided into three sections:


A - provides the system G-function general list
B - provides the list of all the state / alarm /error messages displayed by the system
C - starting from some of the messages listed in Appendix B, this section provides useful
information on the possible malfunction sources and the corresponding remedies.

The content of each chapter is as follows:


Part I
Chap. 1

System configuration
Provides a summary of the screen structure and describes the keyboard key functions.

Chap. 2

Machine preset commands


Consists of a detailed description of:
- the various zero setting procedures for machine axes, parts and tools
- the definition/modification/display procedures for origin, tool and machine
parameters.

Chap. 3

Programming and editing operations


Describes the commands that allow program editing and display.

Chap. 4

Execution commands
Describes the commands for the different program execution modes (automatic,
semiautomatic, manual etc.) as well as the commands allowing to modify tool length
compensations while machining.

User and Programming Manual

S4045 S4045P
General

Part II
Chap. 1

Programming
Provides a summary of the different programming environments.

Chap. 2

Basic programming
Consists of a detailed description of the various ISO basic programming functions. The
single functions (G, M, F, S, T, etc.) are first described, then more complex functions,
such as circular and helical interpolations, fixed cycles, etc. are illustrated.

Chap. 3

PROGET2 programming
Contains a detailed description of all the functions provided by the PROGET2
language. This is an advanced language, developed for SELCA Controls, that allows
the programming of very complex profiles using basic geometric elements.

Chap. 4

Logical mathematical programming


Describes the functions allowing program management in decisional terms (jumps,
subprograms, etc.) and the conditioning parameters.

Chap. 5

Advanced programming or macro instructions


Contains a description of the functions allowing very complex machining cycles, such
as various types of pocket milling, fixed cycles on grid/circumference patterns,
complex 3-D machining requiring 4/5 interpolated machine axes, etc.

Chap. 6

Special functions
Describes some special functions of SELCA Controls, developed to enhance machine
performance and to ease programming. These functions include origin offset and
machine axis displacement during machining by means of handwheels, measuring
cycles by means of touch probes, etc.

Part III
Chap. 1

PROGET2 programming
Consists of programming examples in PROGET2 language.

Chap. 2

Logical-Mathematical programming
Consists of examples of logical mathematical programming.

Chap. 3

Advanced programming
Consists of examples of pocket milling cycles, profile storage, fixed cycles on
grid/circumference patterns, rotation/offset in space, 3-D programming etc.

Chap. 4

Complete programming example


Consists of a complete programming example containing all geometric and technical
data necessary to obtain a finished part.

User and Programming Manual

S4045 S4045P
General

Appendix
App. A List of G-Codes
Listing of all the G-Code functions used by the system.
App. B Diagnostic messages
Listing of all the state/alarm/error display messages.
App. C System malfunctions and remedies
Listing of some system malfunctions with an indication of the possible sources and the
corresponding remedies.

SYMBOLS AND TERMINOLOGY


All variable names, predefined instructions, axis and parameter names are written in capital bold italics
(ex, G81).
In the instruction syntax everything that is between the symbols [ and ] is optional and may be omitted.
The symbol | separates alternative parameters. Example: the instruction A|B|C means that only one of
the three parameters must be entered.
The keys (excluding the alphanumeric ones) are reproduced in the text as they appear on the NC
keyboard. (ex.

, etc.)

Note: The Return key is placed vertically (


encumbrance, a horizontal representation (

User and Programming Manual

) on the keyboard. However, because of its


) will be used in the manual.

S4045 S4045P
General

User and Programming Manual

S4045 S4045P
General

INDEX
PARTE I
1. SYSTEM CONFIGURATION.............................................................................. 1-1
1.1 VIDEO DISPLAY / KEYBOARD UNIT .................................................................................. 1-1
VTC4015, Video Display Unit with integrated Keyboard ............................................ 1-2
Separated VC4015 Video Display Unit and TA4000 Keyboard.................................. 1-3
1.1.1 SDU ............................................................................................................................. 1-4
1.2 CENTRAL UNIT .................................................................................................................... 1-5
1.3 BASIC OPERATIONS ........................................................................................................... 1-6
1.3.1 SWITCHING THE NC ON .......................................................................................... 1-6
1.3.2 SWITCHING THE NC OFF ........................................................................................ 1-6
1.3.3 SHUTTING DOWN THE SYSTEM IN EVENT OF INTERNAL ERRORS.................. 1-7
1.4 USER INTERFACE ............................................................................................................... 1-8
1.4.1 DIFFERENT ACCESS PRIVILEGE LEVELS ............................................................. 1-10
1.5 FUNCTION BUTTONS (SOFTKEYS)................................................................................... 1-11
NC function button (C area) ....................................................................................... 1-11
Machine tool function button (D area) ........................................................................ 1-11
1.5.1 KEYBOARD ................................................................................................................ 1-11
Command keys .......................................................................................................... 1-11
Specific machine control coloured keys ..................................................................... 1-12

2. MACHINE PRESET COMMANDS ..................................................................... 2-1


2.1 HOMING THE MACHINE AXES ........................................................................................... 2-1
2.2 SETTING PART ZERO.......................................................................................................... 2-1
2.3 SETTING MACHINING PLANE AXIS ZERO ........................................................................ 2-2
2.3.1 PART ORIGIN/2 ......................................................................................................... 2-5
Resting the spindle axis.............................................................................................. 2-8
2.4 MULTIPLE ORIGINS AND ORIGIN TABLE ......................................................................... 2-9
2.5 SETTING TOOL ZERO ON THE MACHINE......................................................................... 2-12
Measuring the tool length ........................................................................................... 2-12
2.6 SETTING TOOL ZERO OFF THE MACHINE....................................................................... 2-14
2.7 TOOL TABLE ........................................................................................................................ 2-15
2.8 DISPLAYING AND SETTING THE TOOL PARAMETER TABLE........................................ 2-18
2.9 DISPLAYING AND SETTING PROGRAM PARAMETERS ................................................. 2-22
2.10 DISPLAYING GEOMETRIC ENTITIES............................................................................... 2-24

3. PROGRAMMING AND EDITING OPERATIONS ............................................... 3-1


3.1 PROGRAM AND DIRECTORY LIST .................................................................................... 3-1
3.2 PART PROGRAM EDITING ................................................................................................. 3-2
The possible operations ............................................................................................. 3-4
3.3 PROGRAM EDITOR FUNCTIONS ....................................................................................... 3-12
Basic editing operations ............................................................................................ 3-14
Advanced editing functions......................................................................................... 3-14
3.4 S3000 TYPE ADVANCED EDITING FUNCTIONS ............................................................... 3-17
3.5 DRAWING: 2/3-D GRAPHIC DISPLAY, SIZE AND ZOOM.................................................. 3-19
3.6 STORING DISPLAY PARAMETERS ................................................................................... 3-23
Other uses of the $ character..................................................................................... 3-24
3.7 PROGRAM EXECUTION IN GRAPHIC MODE .................................................................... 3-25
3.8 CONVERSATIONAL PROGRAMMING ................................................................................ 3-28
3.8.1 GENERAL SETUP ...................................................................................................... 3-28
3.8.2 EXAMPLE OF CONVERSATIONAL PROGRAMMING ............................................. 3-32

User and Programming Manual

S4045 S4045P
General

3.9 PROGRAM COMPRESSION AND ARCHIVE MANAGEMENT ........................................... 3-52


3.10 COMPILING PROGRAMS................................................................................................... 3-66
PROGRAM COMPILATION EXAMPLE ..................................................................... 3-69
3.11 SERIAL MANAGEMENT ..................................................................................................... 3-70
3.11.1 INTRODUCTION ....................................................................................................... 3-70
3.11.2 CONFIGURATION (SETUP) ..................................................................................... 3-71
3.11.3 STARTING THE LINK................................................................................................ 3-72
3.12 SELCAM AND SELDXF ...................................................................................................... 3-75

4. EXECUTION COMMANDS.................................................................................4-1
4.1 RUNNING A MDI FROM KEYBOARD .................................................................................. 4-2
4.2 MANUAL MOVEMENTS ....................................................................................................... 4-3
4.3 MANUAL MOVEMENTS IN HOLD STATE........................................................................... 4-4
4.4 RUNNING A MACHINE PROGRAM ..................................................................................... 4-5
4.5 FAST MACHINE RUNNING .................................................................................................. 4-9
4.6 AUTOMATIC CYCLES RESTART ........................................................................................ 4-10
4.6.1 NORMAL CYCLES RESTART ................................................................................... 4-10
4.6.2 FAST CYCLE RESTART ............................................................................................ 4-14
4.7 STORED SEARCH ................................................................................................................ 4-15
4.7.1 NORMAL STORED SEARCH .................................................................................... 4-16
4.7.2 FAST STORED SEARCH........................................................................................... 4-19
4.8 MACHINE EXECUTION BEGINNING WITH A BLOCK ....................................................... 4-19

PART II
1. PROGRAMMING ................................................................................................1-1
2. BASIC PROGRAMMING ....................................................................................2-1
2.1 G-CODES .............................................................................................................................. 2-1
3-digit G-codes ........................................................................................................... 2-3
2.2 F-CODE ................................................................................................................................. 2-3
2.3 S-CODE ................................................................................................................................. 2-4
2.4 M-CODES .............................................................................................................................. 2-4
2.5 H-CODES............................................................................................................................... 2-5
2.6 O-CODES .............................................................................................................................. 2-6
2.7 T-CODES ............................................................................................................................... 2-6
2.8 MACHINING PLANE AND PERPENDICULAR AXIS............................................................ 2-6
Main machining planes ............................................................................................... 2-6
2.9 MOTION CODES AND AXIS CO-ORDINATES .................................................................... 2-7
2.9.1 PROGRAMMING IN ABSOLUTE CO-ORDINATES ................................................... 2-7
2.9.2 PROGRAMMING IN INCREMENTAL CO-ORDINATES............................................. 2-8
2.9.3 PROGRAMMING IN POLAR CO-ORDINATES .......................................................... 2-8
2.9.4 RAPID MOVES ............................................................................................................ 2-9
2.9.5 LINEAR INTERPOLATION .......................................................................................... 2-9
2.9.6 CIRCULAR INTERPOLATION..................................................................................... 2-10
2.9.7 HELICAL INTERPOLATION ........................................................................................ 2-11
2.10 CUTTER COMPENSATION ................................................................................................ 2-12
2.11 AUTOMATIC FEED ADJUSTMENT ................................................................................... 2-15
2.12 ROTATION / OFFSET OF WORK CO-ORDINATES.......................................................... 2-16
2.13 SCALING ............................................................................................................................. 2-18
2.14 MIRROR MACHINING......................................................................................................... 2-19

10

User and Programming Manual

S4045 S4045P
General

2.15 FIXED CYCLES................................................................................................................... 2-20


Fixed cycle parameters ............................................................................................ 2-20
2.15.1 DRILLING OR SPOT FACING CYCLES ................................................................. 2-21
2.15.2 DEEP MIXED DRILLING CYCLES.......................................................................... 2-22
2.15.3 DEEP DRILLING CYCLE ........................................................................................ 2-23
2.15.4 TAPPING CYCLE .................................................................................................... 2-24
2.15.5 REAMING CYCLE ................................................................................................... 2-25
2.15.6 BORING CYCLE...................................................................................................... 2-25
2.15.7 SPACED PLANE DRILLING CYCLE....................................................................... 2-26
2.15.8 DIFFERENTIATED DRILLING CYCLE ................................................................... 2-27
2.15.9 EXAMPLES OF FIXED CYCLES ............................................................................ 2-29
2.15.10 NOTES ON FIXED CYCLES ................................................................................... 2-30
2.16 AXIS EXCHANGE ............................................................................................................... 2-31
2.17 INCH / METRIC MODES ..................................................................................................... 2-31
2.18 1/2-AXIS ROTARY HEAD CONTROL (STATIC TCPM)..................................................... 2-31
2.19 ROTARY TABLE CONTROL (STATIC TCPM) .................................................................. 2-33

3. PROGET2 PROGRAMMING.............................................................................. 3-1


3.1 CIRCLE DEFINITION ............................................................................................................ 3-1
The previous element is a straight line....................................................................... 3-2
The previous element is a circle................................................................................. 3-2
3.1.1 Examples of circle definition ........................................................................................ 3-2
Point or counterclockwise circle ................................................................................. 3-2
Clockwise circle .......................................................................................................... 3-3
Circle intersected by a straight line............................................................................. 3-3
Circles intersected by another circle........................................................................... 3-3
3.2 STRAIGHT LINE DEFINITION.............................................................................................. 3-4
3.2.1 STRAIGHT LINE TANGENT TO TWO CIRCLES OR PASSING THROUGH
TWO POINTS............................................................................................................. 3-5
Example 1: Straight line through two points ............................................................... 3-5
Example 2: Straight line through two points ............................................................... 3-6
Example 3: Straight line through a point and tangent to a circle ................................ 3-6
Example 4: Straight line tangent to two circles........................................................... 3-6
Example 5: Straight line intersecting a circle.............................................................. 3-7
3.2.2 STRAIGHT LINE TANGENT TO A CIRCLE OR PASSING THROUGH A
POINT AND FORMING A KNOWN ANGLE WITH THE X-AXIS ............................... 3-7
Example 1: Straight line point / angle (positive angle)................................................ 3-8
Example 2: Straight line point / angle (negative angle) .............................................. 3-8
Example 3: Straight line circle / angle (positive angle) ............................................... 3-8
Example 4: Straight line circle / angle (negative angle).............................................. 3-9
3.3 CHAMFER DEFINITION........................................................................................................ 3-9
3.4 LINKING RADIUS DEFINITION ............................................................................................ 3-10
Example 1: Radius between two straight lines ........................................................... 3-10
Example 2: Radius between two straight lines ........................................................... 3-11
Example 3: Radius between two straight lines ........................................................... 3-11
Example 4: Radii between a straight line and a circle ................................................ 3-11
Example 5: Radii between a straight line and a circle ................................................ 3-12
Example 6: Radii between circles............................................................................... 3-12
Example 7: Radii between circles............................................................................... 3-12
3.5 PROFILE DEFINITION.......................................................................................................... 3-13
3.5.1 DEFINITION OF PROFILE APPROACH..................................................................... 3-13
Example 1: Non-automatic profile approach (programmed) ...................................... 3-15
Example 2: Non-automatic profile approach (programmed) ...................................... 3-15
Example 3: Automatic linear approach....................................................................... 3-15
Example 4: Automatic semicircular approach ............................................................ 3-16
Example 5: Automatic semicircular approach ............................................................ 3-16

User and Programming Manual

11

S4045 S4045P
General

3.5.2 DEFINITION OF PROFILE EXIT ................................................................................. 3-16


Example 1: Programmed exit ..................................................................................... 3-17
Example 2: Programmed exit ..................................................................................... 3-17
Example 3: Automatic linear exit ................................................................................ 3-18
Example 4: Automatic semicircular exit...................................................................... 3-18
3.6 PERPENDICULAR AXIS MOVEMENT ................................................................................. 3-18
3.7 GEOMETRIC ELEMENT STORING ..................................................................................... 3-20
3.8 POINT STORING................................................................................................................... 3-21
3.8.1 DIRECT DEFINITION .................................................................................................. 3-21
3.8.2 INDIRECT DEFINITION............................................................................................... 3-23
Point as intersection between two straight lines ......................................................... 3-23
Point as intersection between two circles ................................................................... 3-23
Point as intersection between a straight line and a circle ........................................... 3-24
Point as center of a stored circle ................................................................................ 3-24
3.9 STRAIGHT LINE STORING .................................................................................................. 3-24
Straight line point / angle ............................................................................................ 3-25
Straight line circle / angle............................................................................................ 3-26
Straight line through two points................................................................................... 3-26
Straight line circle / circle ............................................................................................ 3-26
Straight line point / circle............................................................................................. 3-27
Straight line circle / point............................................................................................. 3-27
Straight line parallel to other straight lines .................................................................. 3-27
Straight line with reverse direction .............................................................................. 3-28
3.10 CIRCLE STORING .............................................................................................................. 3-28
3.10.1 DIRECT DEFINITION ................................................................................................ 3-29
Circle of known radius and center .............................................................................. 3-29
3.10.2 INDIRECT DEFINITION............................................................................................. 3-30
Circle of known radius tangent to two straight lines.................................................... 3-30
Circle of known radius tangent to one straight line and one circle.............................. 3-30
Circle of known radius tangent to one circle and one straight line.............................. 3-31
Circle of known radius tangent to two circles.............................................................. 3-31
Circle of known radius through a point and tangent to a straight line ......................... 3-31
Circle of known radius through a point and tangent to a circle ................................... 3-32
Circle of known radius through two points .................................................................. 3-32
Circle through three points.......................................................................................... 3-32
Circle with center in a point and tangent to a straight line .......................................... 3-33
Circle with center in a point and tangent to a circle .................................................... 3-33
Concentric circles ....................................................................................................... 3-34
Circle with reverse direction........................................................................................ 3-34
Circle tangent to three elements................................................................................. 3-35
Circle tangent to two elements in a point.................................................................... 3-35
3.11 ORIGIN OFFSET / ROTATION STORING.......................................................................... 3-35
3.12 DISTANCE STORING ......................................................................................................... 3-37
3.13 RECALL OF STORED ELEMENTS INTO A PROFILE ...................................................... 3-38
3.14 SPLINE CURVES ................................................................................................................ 3-39

4. LOGICAL MATHEMATICAL PROGRAMMING..................................................4-1


4.1 PARAMETRIC PROGRAMMING .......................................................................................... 4-1
4.1.1 ALLOWABLE MATHEMATICAL OPERANDS............................................................. 4-3
One-element operands ............................................................................................... 4-3
Two-element operands ............................................................................................... 4-4
4.1.2 P-PARAMETER INITIALIZATION................................................................................ 4-4
Reading values stored in E geometric elements with the Pn=Em instruction............. 4-4
Reading date and time from the system clock............................................................ 4-5

12

User and Programming Manual

S4045 S4045P
General

Reading the O, T, S, F-function values................................................ ...................... 4-5


Reading the current axis positions ............................................................................. 4-5
Values from keyboard ................................................................................................ 4-5
Measuring point co-ordinates with a touch probe....................................................... 4-6
Reading a tool offset value ......................................................................................... 4-6
Reading PLC values................................................................................................... 4-6
4.2 CONDITIONAL BRANCHES................................................................................................. 4-7
4.3 REPEAT EXECUTION OF A PROGRAM SEQUENCE........................................................ 4-8
4.4 INTERNAL SUBROUTINES.................................................................................................. 4-8
4.5 EXTERNAL SUBROUTINES ................................................................................................ 4-9
4.6 PREDEFINED SEQUENCE CALL ........................................................................................ 4-11
4.7 OUTPUTTING P- PARAMETERS......................................................................................... 4-12
OPEN ......................................................................................................................... 4-12
FORMAT .................................................................................................................... 4-12
PRINT......................................................................................................................... 4-13
CLOSE ....................................................................................................................... 4-13
Programming example ............................................................................................... 4-13
4.7.1 TABLE SAVING EXAMPLE DURING PROGRAM PRINTOUTS................................ 4-14
4.8 MESSAGES DISPLAYING.................................................................................................... 4-15
Programming example ............................................................................................... 4-15

5. ADVANCED PROGRAMMING OR MACRO INSTRUCTIONS .......................... 5-1


5.1 POCKET MILLING ................................................................................................................ 5-2
5.1.1 POLYGONAL POCKETS ............................................................................................ 5-2
5.1.2 CIRCULAR POCKETS ................................................................................................ 5-5
5.1.3 PROFILED POCKETS WITH PARALLEL PASSES.................................................... 5-8
5.1.4 PROFILED POCKETS WITH INTERNAL ISLANDS (PARALLEL PASSES) .............. 5-11
5.1.5 PROFILED POCKETS WITH PASSES PARALLEL TO THE PROFILE..................... 5-12
5.2 PROFILE DIRECTION REVERSAL ...................................................................................... 5-14
5.3 PROFILE STORING.............................................................................................................. 5-15
5.4 CALCULATION OF INTERSECTION POINTS BETWEEN A PROFILE AND A
STRAIGHT LINE................................................................................................................... 5-16
5.5 CALCULATION OF EQUIDISTANT POINTS ON A PROFILE............................................. 5-17
5.6 FIXED SUPERCYCLES ........................................................................................................ 5-18
5.6.1 GRID PATTERN DRILLING ........................................................................................ 5-19
5.6.2 MACHINING CYCLE REPEAT ON GRID PATTERNS..................................... .......... 5-20
5.6.3 CIRCUMFERENCE PATTERN DRILLING.................................................................. 5-21
5.6.4 MACHINING CYCLE REPEAT ON CIRCUMFERENCE PATTERNS ........................ 5-21
5.7 AXIS TRAVEL DELIMITATION............................................................................................. 5-22
Selecting the Q discriminator ..................................................................................... 5-23
5.7.1 EXAMPLE OF AXIS TRAVEL DELIMITATION ........................................................... 5-24
Profile in XZ with limits in X and Q2 as discriminator ................................................. 5-25
Profile in XZ with limits in Z and Q1 as discriminator ................................................. 5-25
Profile in YZ with limits in Z and Q1 as discriminator ................................................. 5-26
5.8 CYLINDRICAL PROGRAMMING ......................................................................................... 5-26
Example of cylindrical programming .......................................................................... 5-27
5.9 POLAR PROGRAMMING ..................................................................................................... 5-28
5.10 CUTTER COMPENSATION IN SPACE .............................................................................. 5-29
5.11 ROTATION / OFFSET IN SPACE ....................................................................................... 5-31
5.12 INCLINED SURFACE MACHINING.................................................................................... 5-32
5.13 4/5-AXIS (S4045P AND EXPORT VERSIONS) OR 4/5-AXES SURFACE
MACHINING (S4045P WITH TCPM4000 OPTION) WITH 1/2-AXIS ROTARY OR
DOUBLE TWIST ROTATING HEADS................................................................................. 5-33
5.14 4 AXES (S4045P AND EXPORT VERSIONS) OR 4/5-AXES SURFACE MACHINING
(S4045P WITH TCPM4000 OPTION) WITH ROTARY/TILTING TABLES ....................... 5-34

User and Programming Manual

13

S4045 S4045P
General

5.15 3-D PROGRAMMING OF SURFACE DEFINED BY A PLANE PROFILE AND ONE


OR MORE SECTION PROFILES....................................................................................... 5-35
Programming example ............................................................................................... 5-36
5.15.1 MILLING OF SURFACES DEFINED BY A PLANE PROFILE AND ONE OR
MORE SECTION PROFILES................. .................................................................. 5-38
5.16 3-D PROGRAMMING OF RULED SURFACES BETWEEN TWO PROFILES .................. 5-39
5.17 CHARACTER STRING ENGRAVING ................................................................................. 5-41
5.18 PROGRAMMABLE ZONE SCALING.................................................................................. 5-44
5.19 SPIRAL MILLING ................................................................................................................ 5-46
5.20 SPECIAL USE OF G751 FOR SCALING FACTORS ........................................................ 5-47
5.21 SUBPROGRAM MODAL RECALL .................................................................................... 5-48
5.22 PLANETARY MILLING ....................................................................................................... 5-49

6. SPECIAL FUNCTIONS.......................................................................................6-1
6.1 HIGH SPEED MILLING OF PROFILES ............................................................................... 6-2
6.1.1 HIGH SPEED MILLING OF PROFILE DEFINED BY POINTS WITH "S"
SPEED RAMP (G733) ................................................................................................ 6-2
6.2 PART ORIGIN OFFSETTING BY HANDWHEEL ................................................................. 6-3
6.3 MANUAL AXIS CONTROL DURING MACHINING............................................................... 6-4
6.4 TOOL LENGTH OFFSET ON AN AXIS NON-ORTHOGONAL TO THE MACHINING
PLANE................................................................................................................................... 6-4
6.5 SYNCHRONIZATION OF PROGRAM EXECUTION WITH TOOL POSITION..................... 6-5
6.6 TOUCH PROBE MEASURING CYCLE ................................................................................ 6-5
6.7 DRIFT COMPENSATION ...................................................................................................... 6-7
6.8 DEFINITION OF PART ORIGINS AND TOOL LENGTHS FROM PROGRAM .................... 6-7
6.9 WRITING ORIGIN TABLE..................................................................................................... 6-9
6.10 GRAPHIC EXECUTION OF PROGRAM SECTIONS ......................................................... 6-10
6.11 STORING AXIS ACTUAL POSITION.................................................................................. 6-10
6.12 DISABLING EDIT AND GRAPHIC EXECUTION MODES DURING MACHINING............. 6-11
6.13 CHECKING TRAVEL LIMITS.............................................................................................. 6-11
6.14 MASTER-SLAVE AXES ..................................................................................................... 6-12

PART III
1. PROGET2 PROGRAMMING ..............................................................................1-1
1.1 PROFILE 1...................................................................................................................... 1-1
1.2 PROFILE 2...................................................................................................................... 1-2
1.3 PROFILE 3...................................................................................................................... 1-3
1.4 PROFILE 4...................................................................................................................... 1-4
1.5 PROFILE 5...................................................................................................................... 1-5
1.6 PROFILE 6...................................................................................................................... 1-6
1.7 PROFILE 7...................................................................................................................... 1-7
1.8 PROFILE 8...................................................................................................................... 1-8
1.9 PROFILE 9...................................................................................................................... 1-9
1.10 PROFILE 10.................................................................................................................. 1-10
1.11 PROFILE 11.................................................................................................................. 1-11
1.12 CLOSED CURVE DEFINED BY POINTS..................................................................... 1-12
1.13 OPEN CURVE DEFINED BY POINTS ......................................................................... 1-13
1.14 ANTI COLLISION.......................................................................................................... 1-14
1.15 MIRROR MACHINING.................................................................................................. 1-15
1.16 XZ-PROFILE MACHINING ........................................................................................... 1-16

14

User and Programming Manual

S4045 S4045P
General

2. LOGICAL MATHEMATICAL PROGRAMMING ................................................. 2-1


2.1 ANGULAR REPEAT OF A PROFILE ............................................................................. 2-1
2.2 LINEAR REPEAT OF A PROFILE.................................................................................. 2-2
2.3 PROFILE ROTATION / OFFSET ................................................................................... 2-3
2.4 ANGULAR REPEAT OF PART OF A PROFILE ............................................................ 2-4
2.5 LINEAR REPEAT OF PART OF A PROFILE................................................................. 2-5
2.6 CALLING A SUBPROFILE WITHIN A PROFILE ........................................................... 2-6
2.7 REPEATING A PROFILE AT DIFFERENT DEPTHS..................................................... 2-8
2.8 TAPERED PROFILE WITH SHOULDER....................................................................... 2-9
2.9 SPHERICAL SURFACE ................................................................................................. 2-10
2.10 ELLIPSE ....................................................................................................................... 2-11
2.11 ARCHIMEDES SPIRAL ................................................................................................ 2-12
2.12 CONVEX PARABOLOID .............................................................................................. 2-13
2.13 CONCAVE PARABOLOID............................................................................................ 2-14
2.14 REPEATING AN ELLIPSE WITH INCREMENT IN Z................................................... 2-15
2.15 SPHERICAL POCKET.................................................................................................. 2-16
2.16 TAPERED PROFILED POCKET .................................................................................. 2-17

3. ADVANCED PROGRAMMING........................................................................... 3-1


3.1 POCKET MILLING CYCLES .......................................................................................... 3-1
Polygonal pocket in several passes ........................................................................... 3-1
Tapered polygonal pocket .......................................................................................... 3-2
Circular pocket in several passes............................................................................... 3-3
Tapered circular pocket.............................................................................................. 3-4
Circular pocket with spiral passes and finish pass ..................................................... 3-5
Profiled pocket............................................................................................................ 3-6
Profiled pocket with internal islands ........................................................................... 3-7
Profiled pocket with passes parallel to the profile ...................................................... 3-8
Example 1............................................................................................................. 3-8
Example 2............................................................................................................. 3-9
3.2 STORING PROFILES..................................................................................................... 3-10
Line / profile intersection for constant pitch groove machining................................... 3-10
Equidistant points on a profile for the application of a drilling fixed cycle................... 3-12
Equidistant points on a profile for the application of a rotated / offset profile ............. 3-13
Profile equidistant point function to realize a variable cross section
semicircular tube ........................................................................................................ 3-14
3.3 FIXED SUPERCYCLES ................................................................................................. 3-16
Grid pattern drilling ..................................................................................................... 3-16
Linear grid pattern tapping.......................................................................................... 3-17
Circumference pattern drilling .................................................................................... 3-18
Arc pattern drilling....................................................................................................... 3-19
Machining repeat on a grid pattern............................................................................. 3-20
Machining repeat on a circumference pattern. ........................................................... 3-21
Example 1...........................................................................................................3-21
Example 2...........................................................................................................3-22
3.4 CYLINDRICAL PROGRAMMING ................................................................................... 3-23
Open profile (cam)...................................................................................................... 3-23
Closed profile.............................................................................................................. 3-25
3.5 ROTATION/OFFSET IN SPACE .................................................................................... 3-26
Spherical surface........................................................................................................ 3-26
Profile programmed in XY and machined in ZX ......................................................... 3-27
Solid of revolution (vase) ............................................................................................ 3-28
Solid of revolution (bottle)........................................................................................... 3-29

User and Programming Manual

15

S4045 S4045P
General

3.6 INCLINED SURFACE MACHINING ............................................................................... 3-30


Pockets and fixed cycles on inclined surfaces ........................................................... 3-30
3.7 PROGRAMMING 3-D SURFACES DEFINED BY A PLANE PROFILE AND A
SECTION PROFILE ...................................................................................................... 3-31
Bottom die defined by a plane profile and a section profile ........................................ 3-31
Punch defined by a plane profile and two section profiles .......................................... 3-33
Solid defined by an open plane profile and a semicircular section ............................. 3-35
Solid defined by an open plane profile and a section profile....................................... 3-36
XZ-plane machining of a solid defined by an open plane profile and a
semicircular section .................................................................................................... 3-37
YZ-plane machining of a solid defined by an open plane profile and a
semicircular section .................................................................................................... 3-39
Milling of a bottom die defined by a plane profile and two section profiles ................. 3-41
3.8 3-D PROGRAMMING OF RULED SURFACES BETWEEN TWO PROFILES............. 3-42
Ruled surface without profile offset / rotation ............................................................. 3-42
Ruled surface with profile offset / rotation .................................................................. 3-44
3.9 DELIMITATION OF MACHINING AREA ........................................................................ 3-45
Roughing a profile with several passes in Z ............................................................... 3-45
3.10 SPIRAL MILLING .......................................................................................................... 3-46
Example of spiral milling of a profile ........................................................................... 3-46
3.11 SUBPROGRAM MODAL RECALL ............................................................................... 3-47
Example of subprogram modal recall ......................................................................... 3-47

4. COMPLETE PROGRAMMING EXAMPLE .........................................................4-1

APPENDIX
APPENDIX A - GENERAL LIST OF THE G FUNCTIONS .....................................A-1
APPENDIX B - DIAGNOSTIC MESSAGES............................................................B-1
B.1 MESSAGES .......................................................................................................................... B-1
B.2 ERRORS ............................................................................................................................... B-2
Programming errors.................................................................................................... B-2
Tool change cycle errors ............................................................................................ B-4
Compensation cam management errors .................................................................... B-5
B.3 PROBE AND COPY OPTION ............................................................................................... B-5
Programming errors and alarms in copying, digitizing and measuring cycles ............ B-5
B.4 ALARMS ............................................................................................................................... B-5
Axis feedback transducers ......................................................................................... B-5
Spindle feedback transducer ...................................................................................... B-6
Point to point axis feedback transducer...................................................................... B-6
Inductosyn position feedback module......................................................................... B-6
Temperature control module ...................................................................................... B-6
CPU Master Module ................................................................................................... B-6
I/O MIX Module........................................................................................................... B-7
Errors caused by PLC program anomalies................................................................. B-7
Errors caused by robot program anomalies ............................................................... B-8
PLC programming errors ............................................................................................ B-8
DDI Module................................................................................................................. B-9
RIO Module................................................................................................................. B-9
Errors caused by anomalies in programs with more axis groups ............................... B-9
CCU Module ............................................................................................................... B-9

16

User and Programming Manual

S4045 S4045P
General

APPENDIX C - SYSTEM MALFUNCTIONS AND REMEDIES .............................. C-1


C.1 AXIS FEEDBACK TRANSDUCERS..................................................................................... C-1
C.2 INDUCTOSYN POSITION FEEDBACK MODULE............................................................... C-2
C.3 SPINDLE FEEDBACK TRANSDUCER................................................................................ C-2
C.4 I/O MIX MODULE ................................................................................................................. C-3
C.5 CPU MASTER MODULE...................................................................................................... C-4
C.6 POINT-TO-POINT AXIS FEEDBACK TRANSDUCER ........................................................ C-5
C.7 COPY AND PROBE OPTION............................................................................................... C-5
C.8 CPU MASTER AND PC MODULES..................................................................................... C-6
C.9 SDD SERIES DIGITAL DRIVE FOR AXIS AND SPINDLE ................................................. C-7

User and Programming Manual

17

S4045 S4045P
General

18

User and Programming Manual

S4045 S4045P

PART I

CONTROL
OPERATION

User and Programming Manual - Part I

S4045 S4045P

User and Programming Manual - Part I

S4045 S4045P
1. System Configuration

1. SYSTEM CONFIGURATION
The following two basic components comprise the CNC system:
-

VIDEO DISPLAY / KEYBOARD UNIT

CENTRAL UNIT

1.1 VIDEO DISPLAY / KEYBOARD UNIT


The S4000 series Video Display and Keyboard, unlike the previous S3000 series Operator Panel,
consists of a smart Video Display and Keyboard including a PC, storage memories and I/O peripherals.
Exploiting the small size of the liquid crystal display and the high level of component integration, all the
tools required by the operator are concentrated in a small volume.
Two versions of the Video Display and Keyboard are provided for a greater flexibility in integrating the
MT operator station:

VTC4015, Video Display Unit with integrated Keyboard

Separated VC4015 Video Display Unit and TA4000 Keyboard.

The Video Display/Keyboard Unit is connected to the Central Unit through a fiber optic cable.
The power supply is provided through 24V continuous current.
The Video Display/Keyboard Unit includes:
-

PC board with Pentium class processor


Integrated Floppy Disk and Hard Disk
Optional CD-ROM
15-inch TFT color Display with touch screen and pen for touch screen
Complete alphanumeric Keyboard (Windows type)
Optional Joystick
Optional lighted Keyboard

User and Programming Manual Part I

1-1

S4045 S4045P
1. System Configuration

The operator interface software is based on the Windows operating system running on a Pentium
class processor PC platform.
The standard 128 MB RAM capacity can be expanded to 256 MB.
The communication port access connections are provided for permanent use and consequently
arranged on the back of the device. PS2 sockets an additional mouse socket and the Audio IN and
OUT sockets for microphone and headset - with the USB sockets for multimedia unit use - are
arranged on the front of the device. The USB plug on systems running WINDOWS 2000
PROFESSIONAL can be used to connect multimedia peripherals, such as, for example, web cams,
printers, pen drives, etc.
Remember that the USB plug must always be disconnected via software before being physically
disconnected from the port with WINDOWS 2000 PRO.
The following connectors are located on the back of the unit on the lower side:

One COM3 serial port 9-pin male plug connector with RS232 interface
One COM/SDU serial port with RS232 interface also for controlling the Shut Down Unit (SDU)
One LPT1 parallel port with 25-pin female plug connector
One LAN port for local Ethernet network (built-in Ethernet board)
One supplementary VGA port with 15-pin female HD plug connector
Two USB interfaces
One 9-pin female plug connector (Separate Keyboard only)
Two Audio Line IN and Line OUT jacks
24V power input
Two Rx and Tx fibre optic connectors.

VTC4015, Video Display Unit with integrated Keyboard


103.0

40.0

7.0

500.0

275.5

61.5

396.0

.0
82
R=

36.0
84.0
92.0

1-2

FACE
PIANO DI
PLANE

APPOGGIO

361.0

User and Programming Manual Part I

S4045 S4045P
1. System Configuration

Separated VC4015 Video Display Unit and TA4000 Keyboard

396.0

36.0

FACE
PLANE

364.0

361.0

130.0

83.0

7.0

275.5

61.5

103.0

18.0

User and Programming Manual Part I

1-3

S4045 S4045P
1. System Configuration

1.1.1 SDU
This device is useful in the event of frequent or accidental electrical power blackouts. It replaces the
previous UPS device.
A function button for automatic Windows operating system shutdown is provided for correctly switching
off the CNC. The system can be switched off safety at the end of the procedure.
Start up following accidental CNC shutdown caused by an unexpected blackout does not normally
cause problems. However, it may occur that the incorrect Windows shutdown causes loss of files
needed for regular machine operation.
The (optional) Shut Down Unit (SDU) correctly closes all PC activities in progress but does not save
programs opened in Edit mode.
As the previous UPS model, this is not a simple power back-up unit capable of keeping the CNC
running during a power blackout. This device comes into operation when the 24V power from the
electrical panel drops after informing the operating system to shut down all applications. After 100
seconds it also cuts off the power provided temporarily by the battery.
The batteries have a nominal capacity of 1.2Ah. It is important to know that for each SDU intervention,
the percentage of the load taken from the battery depends on the Video Unit CPU power and that
several hours of CNC operation are needed to recharge this power. This must be taken into account in
the event of excessively frequent shutdowns and particularly in case of intermittent blackouts.

1-4

LED Green
LED Red

Batt. Totally down


Batt. in charge

LED Green
LED Green

Network present
Active output

User and Programming Manual Part I

S4045 S4045P
1. System Configuration

1.2 CENTRAL UNIT


The Central Unit consists of a rear rack mount chassis available in various widths supporting the back
panel and the main power supply.
It provides slots for a number of electronic boards (double Euro card size), which slide into the rack
and connect to the back panel.
It also includes a chassis bay for installing various single Euro card option boards.
The power supply is provided through 24V continuous current.
There are four families belonging to the S4000CNC Series:
-

S4000D - Digital for managing Selca or Siemens Digital Drives


S4000DH - Digital for managing HEIDENHAIN Digital Drives
S4000DDH - Digital for managing linear and torque motors with HEIDENHAIN Digital Drives.
S4000 - Analog

Central Unit components:

Standard Motorola Master board or Fast Motorola Master board for S4045P models
I/O MIX-A board with two flat wires for connecting to terminal board
24V input power supply unit
RIO interface with fiber optic connectors (digital versions only. Digital versions can also be
supplied for analog machines)
SERCOS interface with fiber optic connectors (digital versions only)
4 slots for double Euro card size boards
9 slots for single Euro card size boards or 8 slots for single Euro card size boards + 1 for
Heidenhain digital drive interface (MCBH-INT)
Interface board with fiber optic connectors for connecting to Video Display and Keyboard
(PCREM)
Back panel.

User and Programming Manual Part I

1-5

S4045 S4045P
1. System Configuration

1.3 BASIC OPERATIONS


1.3.1 SWITCHING THE NC ON
The WINDOWS operating system start-up message will appear on the NC display when the central
processing unit and the graphic terminal are powered. The NC S4000 software will be automatically
started. During the initial phase, a menu containing the system reset option (by means of a button) will
appear: this procedure is not normally used for NC operation.
A window will appear containing the SELCA S4000 logo and scrolling the Motorola board message.
The main NC menu will appear at the end of the operation.

1.3.2 SWITCHING THE NC OFF


The S4000 Numerical Controls, using the operating system WINDOWS 2000, need a specific
shutdown procedure, that must be absolutely followed.
If this procedure is not followed, you loose data and the software can be damaged. The most serious
cases can be solved only through a Selca technical intervention to re-install and/or re-configure the
Operating System. These problems appear through blue screen at the CNC start-up or messages of
missing or corrupt files.
The correct shutdown procedure of the S4000 CNC is written on all Selca manuals but you are
requested to inform the customers that use your machine tools about the need to shutdown the CNC
following three simple steps, that are hereunder listed:
1. From the main menu of the CNC, enter the UTILITY environment by pressing the relevant button
on the Touch Screen video.

2. Press the CONTROL OFF button: following message will appear

3. Confirm by pressing YES, then wait for the message Now you can shutdown the CNC and take
off the feed.

1-6

User and Programming Manual Part I (06)

S4045 S4045P
1. System Configuration

WARNING!!

Technical intervention to solve problems that are caused by an incorrect


use of the CNC, as for example the wrong procedure to shutdown the
CNC, are, in any case, not covered by Selca warranty.

We remind you that in case of frequent and sudden lack of network voltage, in order to avoid damages
and guarantee the correct stop of the System, it is possible to install the optional device SDU (Shut
Down Unit), that automatically executes the shutdown procedure of the CNC.

1.3.3

SHUTTING DOWN THE SYSTEM IN EVENT OF INTERNAL


ERRORS

Despite the care taken in developing the NC basic software, the preliminary versions may occasionally
"crash" following internal errors. In most case, a Windows debugging tool will detect the errors
automatically. In this case, a Dr. Watson window will appear. Simply switch off NC power to reset the
error.

User and Programming Manual Part I

1-7

S4045 S4045P
1. System Configuration

1.4

USER INTERFACE

The S4000 user interface is generally managed by means of consolidated SELCA systems soft key
system enriches with numerous dialogue windows, which are very efficient for entering data and
selecting elements from a predefined list.
All the controls can be operated by clicking directly on the areas where the function buttons are
displayed (i.e. by lightly pressing on the touch screen with your fingers or with the specific "pen", or by
pressing the left-hand mouse or joystick button).

Some soft keys access a new menu; the


The

button is used to return to the previous menu.

button to return to the basic menu is not managed at this time.

The window is split into four areas or operative fields:


A.

Displaying axis dimensions data, auxiliary functions and technological functions, origins, program
and drawing data.

B.

Displaying system environments.

C.

Displaying function button menus (soft keys) managed by the system.

D.

Displaying function button menus (soft keys) managed by the PLC.

B
C

1-8

User and Programming Manual Part I

S4045 S4045P
1. System Configuration

The right-hand part of the page (D area) is devoted to the PLC managed soft key buttons, which are
always present in the various NC environments.
The lower part of the page (C area) contains the system-managed soft keys specific to the
environment.
An essential difference of this new interface is the presence of five environments (B area) at the same
time thanks to the implementation of a multitasking operating system. Each environment has a video
page and a menu-independent hierarchic structure.

As shown in the figure above, the possible environments are:

Unlike the previous Selca S3000 numeric control, this type of structure allows moving between the
various environments without necessarily closing one environment before accessing another. This
feature means that working "in parallel" is possible, i.e. information related to programming and
processing can be displayed at the same time. This real MULTITASKING advantage means
considerable time saving and avoids cumbersome operations for repeatedly quitting and opening the
required environments.
Either press the display or click with the left-hand mouse button in the area of the screen where the
name of the environment appears to go from one environment to another. This area will be simply
referred to as TAB.
The central area of the screen (VIS_MC) can be independently configured for any environment by
means of VisMC Editor: this utility is a powerful tool for creating customised graphic pages, by very
simply positing and sizing a set of predefined objects (text and system variable display boxes, bitmap
recalls (*.bmp files), buttons, bar indicators, pointers, potentiometer and switch displays).
It is very important to note that the internal activities in each environment will run regardless of whether
they are displayed or not. For example, a first active graphic program can be run in the [Machine tool]
environment and a second graphic program can be run in the [Programming] environment: the graphic
program will keep running even if it is not displayed. Conversely, the graphic analyser for displaying the
performance of utilities in the environment [PLC] can be run and the parameters can be calibrated in
the [TABLES] environment.

User and Programming Manual Part I

1-9

S4045 S4045P
1. System Configuration

A brief description of the main functions will can be accessed within each environment is given below:

This environment includes the program; MDI, manual jogging and axis reset control menus.

This environment is used to edit programs and run simulated graphics.

This environment is used to access the machine parameter and user table configuration tables:
offsets, utilities, program parameters, graphic parameters, PLC tables, geometry entities and graphic
geometric entities.

This environment is used to access the NC test and diagnostic tools, i.e. the circle test, the software
versions as well as the function button used to stop the system.

The NC application developer for PLC software development and tuning can use this environment. It
also includes tools for calibrating and optimising utilities.

1.4.1 DIFFERENT ACCESS PRIVILEGE LEVELS


Some buttons in the various environments can be present and accessible with different functions
according to the NC user's access privilege level. Specifically, the PLC programming access functions,
the parameter configuration functions, the software installation and configuration functions and the
operating system functions (peripheral installation) will be available to higher level users (SELCA,
machine tool manufacturers) and not to end users.

1-10

User and Programming Manual Part I

S4045 S4045P
1. System Configuration

1.5 FUNCTION BUTTONS (SOFTKEYS)


NC function buttons (C area)
Function buttons can activate all the system functions. The meaning of the buttons changes and is
displayed in the menu in the C area of the video.
The function displays in the menu for each function button is called a soft key. The menus are
organised as a hierarchy, i.e. a lower level menu can be activated by means of a soft key from the
previous menu.
The highest-level menu will appear when the system is either switched on or by pressing
keyboard.

on the

Machine tool function buttons (D area)


The eight buttons on the right of the video are for the functions defined by the machine tool
manufacturer and are described in the corresponding D area of the video.

1.5.1 KEYBOARD
The complete WINDOWS compatible alphanumeric keyboard includes two special buttons for
controlling the machine tool: the [MENU 0] button and the yellow [BREAK] button.

COMMAND KEYS
Brings you back from any environment to the initial menu as shown when the
control is turned on (it has to be pressed twice).
Brings you back to the previous menu. By clicking on the text SELCA that
rotates on the screen, the same results are obtained
Confirms entered data and selects the highlighted selection in dialogue windows.
Moves the selection over the displayed fields in the dialogue windows.
Selects upper case characters of the alphabetical keys. It is enabled when the
control is turned on and shall normally stay enabled as axis name and functions
(G, F, S, etc.) have to be entered in upper case. The green CAPS LOCK warning
light will come on under the video.
Selects upper characters of dual functions keys and, if CAPS LOCK is on, the
lower case characters of the alphabetical keys.
Copies the screen snapshot to WINDOWS clipboard.
Deletes the character at the left of the cursor.
Deletes the character on which the cursor is positioned.

User and Programming Manual Part I

1-11

S4045 S4045P
1. System Configuration

Light blue.
Move the cursor in the four directions shown.
Moves the cursor to the beginning of the row.
Moves the cursor to the end of the row.
Moves the cursor onto the previous screen page.
Moves the cursor onto the next screen page.
Changes the usual overwriting mode and allows insertion of characters between
characters displayed on the screen. The flashing cursor will appear as wide as a
character instead of a thin line.
Disables the ARROW, HOME, END, PGUP, PGDN, INS and DEL keys and
enables the numeric pad.

SPECIFIC MACHINE CONTROL COLOURED KEYS


Yellow button;
Stops the programming running.

1-12

User and Programming Manual Part I

S4045 S4045P
2. Machine preset commands

2. MACHINE PRESET COMMANDS


2.1 HOMING THE MACHINE AXES
If the machine is equipped with Selca Absolute Inductosyn transducers homing the machine axes is
not necessary.
In case the machine is not equipped with absolute transducers the axes must be homed at each startup by moving them to a fixed reference position.
The machine zero may coincide with this fixed reference position, or may be offset by a value to be
defined as a machine parameter at installation time.
The machine tool builder shall document the homing procedure.

2.2 SETTING PART ZERO


Before machining a programmed part, its position in relation to the machine zero has to be defined and
tool lengths must be taken into account.
Tool lengths, whether measured directly on the machine or measured off the machine and then stored
in the tool table, are referred to an origin on the O plane.
There are 199 possible origins, which can be recalled in a program through the O-code (O1 to O199).
If no origin is programmed the last defined/recalled origin remains enabled and displayed on the
screen.

User and Programming Manual - Part I

2-1

S4045 S4045P
2. Machine preset commands

2.3 SETTING MACHINING PLANE AXIS ZERO


To define the part zero position with reference to the machining plane axes (or to other axes, including
spindle axis) apply the following procedure starting from the MACHINE TOOL environment, which is
active when the control is switched on.
The following menus will appear in this screen page:

2-2

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

1. If the system is not already in the required machining plane (G17 or G18 or G19) do the following:
-

Press the MDI soft key. The following screen page will appear:

If the flashing cursor does not appear, select the enter block window with the touch screen or click
the mouse.

Enter G17 (or G18 or G19).

Press START on the external console or with the PLC buttons (D area of the video, if provided by
the manufacturer).

Press ESC to go back to the previous menu.

2. Press the MANUAL soft key and position the machine axes with the JOG buttons or handwheels in
a known position on the work piece.

User and Programming Manual - Part I

2-3

S4045 S4045P
2. Machine preset commands

3. Press the SET ZERO OFFSETS soft key. The following screen page will appear

with the number of the active origin followed by the axis name and the offset value.
4. Press PART ORIGIN.
5. Enter the number of the origin you want to define (O1 to O199) and the axis positions with reference
. If, for example, you want to zero the X, Y, Z-axes and wish that this
to part zero and press
zeroing is identified with origin 2, it is necessary to write
O2 X...Y...
O2 X...Z...
O2 Y...Z...

on plane G17
on plane G18
on plane G19

If the origin number is not defined the current active origin will be zeroed.
The system will consider the machine tool lengths, compute the distance between the machine zero
(origin O0) and the part zero (origin from O1 to O199) and will store this distance in the origin table.
During the resetting phase, the CNC enables MANUAL movement of the axes.

2-4

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

The following drawing shows an example of origin 1 definition (in the center of the part). Mount a pin of
known diameter (10 mm for example) and perform operation No. 1 and No. 2 as indicated in the figure
below.

1. Position the pin against the lateral


surface and enter:

O1 X-115
2. Position the pin against the lower
surface and enter:

O1
X
10

70

110

O1 Y-75
The values to be entered are the shown
values plus the pin radius.

2.3.1 PART ORIGIN/2


With this feature it is not necessary to calculate a piece center through parameters or calculator to be
able to reset in the middle, but it allows you to reset the piece offset in the middle of two walls.
This feature cannot be used under the effect of rotation and translation in the active space.
The procedure is the following:
1. Lightly brush the left side of an already squared rectangular piece using JOGS or the
HANDWHEELS, press SET ZERO OFFSETS, PART ORIGIN and set X0:

User and Programming Manual - Part I

2-5

S4045 S4045P
2. Machine preset commands

2. Then, still move manually on the opposite side of the piece (right side), press PART ORIGIN/2 and
set the position required for the center (normally X0):

3. The result will be accurate resetting in the piece center, as noted by the X position calculated by
the NC:

2-6

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

4. Repeat the procedure also for axis Y.


E.g. : set zero in the center of a rectangle

With the centering reference lightly


brush the part wall (X-)
SET ZERO OFFSETS command
Then
PART ORIGIN command
Then
Press O2X0

Move the axes manually to lightly


brush the opposite wall
SET ZERO OFFSETS command
Then
PART ORIGIN/2
Then
Press X0

With the centering reference lightly


brush the part wall (Y+)
SET ZERO OFFSETS command
Then
PART ORIGIN command
Then
Press Y0

Move the axes manually to lightly


brush the opposite wall
SET ZERO OFFSETS command
Then
PART ORIGIN/2 command
Then
Press Y0

User and Programming Manual - Part I

2-7

S4045 S4045P
2. Machine preset commands

Resting the spindle axis


The spindle axis (Z on machine plane G17, Y for G18, X for G19) is reset after measuring the length of
the various tools to be used on the machine or on an external pre-setting bench.
In the first case, the lengths are stored automatically in the tool table. In the second case, the storing
procedure is described in paragraph 2.6.
The spindle axis resetting procedure is described below:
1. Select the machine plane by setting functions G17 / G18 / G19 to MDI.
2. Recall the selected reset tool by setting MDI T...M6 (T5M6, in this example), if the machine is
equipped with an automatic tool change function. Otherwise, manually fit the tool in the spindle.
3. Recall the tool length compensation in the spindle by setting MDI G48K... (G48K5, in this
example).
4. Position the tip of the tool in a known point of the work piece with the JOG buttons or the
handwheel.

T5 TOOL

T5 TOOL
T5 TOOL

PIECE

PIECE

PIECE

5. Press the SET ZERO OFFSETS soft key.


6. Press PART ORIGIN.
7. Set the number of the origin to the set (normally the one used for the other axes on the plane) and
position the tool tip with respect to the work piece zero.
In this example:
O1Z0 or O1Z20 or O1Z100 for G17 plane
O1Y0 or O1Y20 or O1Y100 for G18 plane
O1X0 or O1X20 or O1X100 for G19 plane
The system will consider the machine tool lengths, compute the distance between the machine zero
(origin O0) and the part zero (origin from O1 to O199) and will store this distance in the origin table.

2-8

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

PIECE

MACHINE

MACHINE

ZERO PIECE

The OFFSET X, Y, Z values are stored in the origin table.

2.4 MULTIPLE ORIGINS AND ORIGIN TABLE


The origins are listed in a table that can be displayed using the following procedure:
1. Select the TABLES environment with the touch screen or mouse. The following menu will appear:

User and Programming Manual - Part I

2-9

S4045 S4045P
2. Machine preset commands

2. Press PARAM. CORRECT. The following menu will appear:

3. Press PART ORIGINS. The following screen page will appear:

As can be seen, the names of the configured axes (X, Y, Z in the figure) and the other configurable
axes (A, B, C, U, V...) appear. The presence of a numerical value in a column means that the
corresponding origin has been defined for that axis. The presence of a dot "." indicates that no origin
has been defined.
The table contains two hundred origins. Moving the cursor in the table with either the touch screen,
mouse or buttons

and

can scroll it.

The displayed values can be modified only with the previously described resetting procedure.
If it is required that an origin, previously defined for several axes (for example X Y Z), is enabled for
one or more of them (for example X and Y only), proceed as follows:
1. Press SET ZERO OFFSETS.

2-10

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

2. Press PART ORIGINS.


3. Enter the desired origin, in this example 03, and press
the axis it refers to will be displayed.

. The origin followed by the name of

Example:
Origin 3 for XYZ axes
4. To state that the O3 origin only refers to the X and Y-axes, press PART ORIGINS, enter the name
of the axes to which the origin must refer (XY) and press

Example:
XY
This means that when O3 is programmed, the Z axis origin will be not be changed and the last recalled
origin that contained a Z-axis position would remain active.
The following will appear for origin O3 if the previous table is recalled after this operation:

As you can see, the Z-axis is not defined for the specific origin. You will need to reset the axes, as
described in the previous paragraphs, to assign values to the to the Z-axis again or, more in general, to
the undefined axes.
N.B. Set X followed by Y to completely deletes an origin.
The first command will cancel all axes except for X, and the second control will cancel axis X.

User and Programming Manual - Part I

2-11

S4045 S4045P
2. Machine preset commands

2.5 SETTING TOOL ZERO ON THE MACHINE


Setting tool zero on the machine is performed after having defined a part origin for the spindle axis
coinciding with the point of the tool. For this purpose, a pre-setter is fitted on the bed. It this is not
available, keep a work piece of any height for this purpose and fit it whenever a tool needs to be preset on the machine. The selected origin, e.g. O99, must not be used for work piece resetting.

SPINDLE
NOSE

SPINDLE
NOSE

PIECE

TABLE

Proceed as follows:
1. Unload the spindle tool with the specific machine functions, e.g. by setting MDI: T0M6.
2. Deactivate length correction by setting function G48I0 to MDI.
3. Select the machining plane by setting MDI: G17 (or G18 or G19).
4. In MANUAL mode, take the spindle point to touch the pre-setter or the work piece.
5. Press RESET.
6. Press PART ORIGINS.
7. Enter the number of the origin to be defined, e.g. O99Z0 (or O99Y0 for G18 plane, or O99X0 for
G19 plane).

Measuring the tool length


The procedure for measuring the tool on the machine after fitting the pre-setter or the work piece used
for the reference origin, e.g. O99, is:
1. Select the machining plane by setting MDI: G17 (or G18 or G19).
2. Recall the origin on the work piece or pre-setting by setting MDI: O... e.g. O99.
3. Recall the selected reset tool by setting MDI T...M6, if the machine is equipped with an automatic
tool change function. Otherwise, manually fit the tool.

2-12

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

4. In MANUAL mode, take the spindle point to touch the pre-setter or the work piece.

LENGTH
TOOL

LENGTH
TOOL

T5 TOOL

T5 TOOL

PIECE

5. Press the SET ZERO OFFSETS soft key.


6. Press TOOL OFFSET. The following screen page will appear and the active tool identification will
appear in the lower part of area A:

Enter the compensation number and the Z0 dimension and press


Example: T4Z0

RETURN

User and Programming Manual - Part I

2-13

S4045 S4045P
2. Machine preset commands

The set Z dimension (Z0) will appear in the upper part of area A and the length value computed by the
system will appear in the lower part of area A. This value will be stored in the tool table.
The length compensation can be recalled with either the tool change function or the G48 function.
Repeat operations 3. / 4. / 5. And 6. For all the tools to be measured.

2.6 SETTING TOOL ZERO OFF THE MACHINE


Tools can be measured on an external setting bench.
Display the tool table (see chap. 2.8) and enter the measured lengths and radiuses.
The measured lengths and radiuses can be entered in the tool table in MDI with the following format:
Tnn = length
Knn = radius

example:
example

T1=189.59
K3=5

The measured length and radiuses can be written in a program to be run on the machine to store the
values in the tool table.
Example:
T1=190.45
T2=208.84, K2=10
T3=188.85
T4=203.38, K4=40
........
.......
........
T20=170.23, K20=12
M30

2-14

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

2.7 TOOL TABLE


The tool information is stored in a table, which can be displayed as follows:
1. Select the TABLES environment with the touch screen or mouse. The following menu will appear:

2. Press the PARAM. CORRECT soft key the following menu will appear:

3. Press the TOOL PARAMS soft key. A screen page similar to the following will appear:

User and Programming Manual - Part I

2-15

S4045 S4045P
2. Machine preset commands

Move the window bar to the right with the mouse or a pen on the touch screen to display an additional
screen page similar to the following:

The number of tools in the tool table can be configured at installation time, up to a maximum of 300
tools. To facilitate reading and seeking tools in the presence of many configured items, the table is
split into several pages, each containing 100 tools (from 1 to 100, from 101 to 200, from 201 to 300),
which can be selected with the mouse or touch screen in the upper part of the area A of the video.
Different colours are used for greater clarity, i.e. whether the machine tool is configured with an
automatic tool change feature, the presence of tools in the spindle (row highlighted in RED), the tool in
the tailstock (row highlighted in GREEN), and tool in the intermediate station (row highlighted in BLUE).
As you can see in the first page of the page, the recently edited field appear ORANGE (see the Pos in
crib column in the example shown).

2-16

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

The information contained in the two pages of the table is as follows:


TOOL NUMBER

Tool identification number (from T1 to T300).

TOOL RADIUS

Tool radius.

LENGTH COMPENSATION

Tool length offset. This parameter is the effective length of the tool
referred to the spindle point; if the zero resetting procedure
described in the previous paragraphs is followed.

POS IN CRIB

Tool position in magazine (where fitted on machine).

TOOL INHIBIT

Tool not to be used if the field contains the yes value.

SPECIAL

Special tool if the field contains the yes value.

TOOL SIZE

Automatic tool change tool size: if large tools are used, the nearest
positioning in the magazine is left empty (where managed by the
PLC). Available sizes: SMALL, MEDIUM, LARGE, EXTRA

MAX LIFE

Maximum expected tool life in minutes. If the field contains a dot "."
the value is not defined. Tool life can be managed by the PLC.

MIN LIFE

Minimum expected tool life in minutes. If the field contains a dot "."
the value is not defined. The tool will be replaced by the father tool
when the value is reached (where this function is managed by the
PLC).

RESID LIFE

Remaining tool life in minutes.

FATHER

Father tool identifier.

WORN-OUT

Worn-out tool, if the field contains the YES value. This column can
be written by the user program: see part II paragraph 6.8

WORD #1

User parameter containing a whole number (from -32768 to


+32767). The user program can write the value: see part II
paragraph 6.8.

WORD #2

Second user parameter containing a whole number (from -32768 to


+32767). The user program can write the value: see part II
paragraph 6.8.

FLOAT #1

User parameter containing a decimal number (from -131072 to


+131071). The user program can write the value: see part II
paragraph 6.8.

FLOAT #2

Second user parameter containing a decimal number (from -131072


to +131071). The user program can write the value: see part II
paragraph 6.8.

DESCRIPTION

Alphanumeric field for entering a descriptive comment of the type of


tool used.

User and Programming Manual - Part I

2-17

S4045 S4045P
2. Machine preset commands

2.8

DISPLAYING AND SETTING THE TOOL


PARAMETER TABLE

Access to the two pages of the tool table was previously described.
To modify the displayed values proceed as follows:
1. Position the cursor on the required door by means of the mouse, the touch screen or the

and

keys. Click once only. The field will be highlighted in a box.


2. Press
or click the mouse or touch screen again.
The value in the field will turn BLUE.
3. Edit the value and press

to confirm.

will appear
To edit the parameter INTERDICT, SPECIAL, CUT and WORN-OUT parameters, a
after selecting them (paragraph 2). Position cursor on the item with the mouse or touch screen and
click. The list of possible options will appear (YES / NO, SMALL / MEDIUM / LARGE / EXTRA).
To quit and save the edited data, simply press ESC on the keyboard or click the "Selca" icon turning
the bottom right of the screen (area C).
Press the SAVE soft key to save the table without quitting (unlike pressing

).

Press the PRINT soft key to print the tool table using a connected printer, configured in WINDOWS.
Length correctors can be saved in MDI using the following format:
Tnn= length
Example:

2-18

T15=200.3

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

Modification of the length correctors can also be carried out incrementally. Complete the following to
achieve this:
1. Select the Machine Tool environment using the touch screen or mouse.
The following video screen will appear:

2.

Press the SET ZERO OFFSETS softkey. The following video screen will appear:

User and Programming Manual - Part I

2-19

S4045 S4045P
2. Machine preset commands

3.

Press the CHANGE COMPS softkey.


The following video screen will appear:

4. The number of the corrector to be altered is that set on the machine. Insert the name of the axis to
which the correction is to be applied (Z on G17, Y on G18 or X on G19) and the value of the desired
correction (max. 2 mm) with the relative sign.
Note: the sign of the variation introduced will be algebraically added to the value contained in the
length corrector field corresponding to the tool assembled on the machine. The following rules must
be applied to the desired variation to be effected:
The variation must cause
the piece to move nearer
(the tool is shorter or the
hole is shallower or the
milled surface is higher):
Negative value
Variation
(ex. 0.17 mm (ex 0.17)

2-20

Variation
(ex. 0.15 mm)

The variation must


cause the piece to move
further away (the tool is
longer or the hole is
deeper or the milled
surface is lower:
Positive value
(ex +0.15)

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

Visualisation and modification of the tool table is also possible during machining.
Alternations introduced become effective at the next tool change. Parameters that are saved in the
table are recalled by the programme or in single block using the T function of tool change or with the
G48 function.
The G48 function recalls and immediately enables a length corrector. Its programming format is:
G48 [K...] [I...]
Where:
K...
corrector number
I...
machining allowance value. With I positive, the tool moves away from the piece; with I
negative, the tool moves closer to the piece.
By programming G48I... only, a correction length of I... mm is applied; by programming therefore G48I0
the active correction length is deactivated.
If the number of the K corrector is preceded by a minus sign (-), its length is applied with a negative
sign (useful when working in G18 or in G19 in a positive axis direction).
The value of the tools radius can also be recalled or programmed using the G49 function.
programming format is as follows:

Its

G49 [K...] [I...]


Where:
K...
corrector number
I...
machining allowance value or tool radius
By programming G49I... only, the value of I is the tools radius.
The value of the radius defined by the G49 function does not alter the table and is valid until the
following function G49 or the T function.
The G49 function is also used to define the shape of spherical or torical tools to be used collectively
with the radius correction in the space and in three-dimensional programming ( see Part II, chapter
5.10 and 5.15).

User and Programming Manual - Part I

2-21

S4045 S4045P
2. Machine preset commands

2.9 DISPLAYING AND SETTING PROGRAM PARAMETERS


The system provides 200 parameters that are used during parameter programming (see chapter 4.1).
The letter P followed by a number between 0 and 199 identifies these parameters. They are used for
storing data that may vary during program execution or are the result of calculations etc.
In other terms, the parameters contain a numeric value, which can be recalled with the parameter
identification.
The programming parameters are stored in a table that can be displayed in the following way:
1. Select the TABLES environment with the touch screen or mouse. The following menu will appear:

2. Press PARAM. CORRECT. The following menu will appear:

3. Press the PROGRAM PARAMS Soft key. A screen page similar to the following will appear:

2-22

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

To edit a parameter:
1. Position the cursor on the required door by means of the mouse, the touch screen or the

and

keys. Click the required Parameter value field. The field will be highlighted in a box (see P0 in
drawing).
or click the mouse or touch screen again.
2. Press
The value in the field will turn BLUE.
3. Edit the value and press

to confirm.

To quit and save the edited data, simply press


the bottom right of the screen (area C).

on the keyboard or click the "Selca" icon turning

Press the SAVE soft key to save the table without quitting (unlike pressing

).

Press the PRINT soft key to print the tool table using a connected printer, configured in WINDOWS.
The P parameter values are normally allocated in the programs (part II chapter 4.1).

GRAPHICS PARAMS button displays the parameters used by the program in EDIT or GRAPHIC
MODE. In SEMIAUTO GRAPHIC MODE, the parameter values (allocated or computed) will appear on
the video.

User and Programming Manual - Part I

2-23

S4045 S4045P
2. Machine preset commands

2.10 DISPLAYING GEOMETRIC ENTITIES


The geometric entities E (lines, points, circles, distances, used in PROGET2 geometric language, see
part II chapter 3.7) are contained in a table.
Thirty geometric entities are available (from E1 to E30).
Assume that we are running a machine or MDI program containing the following geometric definitions:
E1=G20X20.5Y55.3I25.8
E3=G20X50.113Y-60.668
E5=G13X0Y0I-10J45
E10=G20X30Y-50, G20X100Y25
To display the geometric entity table proceed as follows:
1. Select the TABLES environment with the touch screen or mouse. The following menu will appear:

2. Press PARAM. CORRECT. The following menu will appear:

2-24

User and Programming Manual - Part I

S4045 S4045P
2. Machine preset commands

3. Press the GEOMETRIC ENTITIES soft key. A screen page similar to the following will appear.
The table contains the previously entered machine or MDI program geometric elements:

The table contains the following fields:


Entity type

circle, point, line, distance

Abscise

for points:
For circles:
For lines:

Ordinal

for points:
For circles:
For lines:

Distance

for points:
For circles:
For lines:
For distances:

the abscise value of the point


the abscise value of the circle centre
the abscise value of an intersection point of the line
with the Cartesian axes
For distances: not used

the ordinal value of the point


the ordinal value of the circle centre
the ordinal value of an intersection point of the line
with the Cartesian axes
For distances: not used

User and Programming Manual - Part I

not used
not used
distance of the line from the Cartesian axis origin
value of the distance computed between two points,
between one point and line, between two lines

2-25

S4045 S4045P
2. Machine preset commands

Angle

for points:
For circles:
For lines:

Radius

for points:
For circles:
For lines:
For distances:

not used
not used
slant angle of line with respect to axis
X (Z for G18, Y for G19)
For distances: not used

not used
circle radius value
not used
not used

As appears in the table, the parameters of the circle E1 and the point E3 are those entered. E5 is the
unchanged angle, while abscise and the ordinal of the intersection point with the Cartesian axis and the
distance of the line from the origin are shown. In the case of the distance between the two points (E10)
the computed value is shown.
The values can be directly written in the geometric entity table as described in the previous chapter on
program parameters but normally these tables are only used to display the results.

N.B. The GRAPHIC ENTITY key displays the geometric entities used by the program in EDIT or
GRAPHIC MODE.

2-26

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3. PROGRAMMING AND EDITING


OPERATIONS
The system features sets of controls, called edit functions, that allow programming of new parts,
modification of existing programs, graphic display of programs, verification on the machine etc. The
functions are described in this chapter.
A new part can be programmed while another program is being executed. The information concerning
the program being run will continue to be displayed on the screen.
The controls are organised in various environments, such as Machine Tool, Programming, Tables,
Utilities, PLC for displaying the information concerning the program being run, the tool table, the
origins, etc., at any time, while editing a program. This information will remain displayed on the video at
all times.

3.1 PROGRAM AND DIRECTORY LIST


The number of programs that can be stored in the system is only limited by the hard disk memory
capacity.
Each program may be identified by a name of any length, containing letters, number and other
characters. An extension (three characters proceeded by a dot ".") can be assigned to the program.
This extension is not managed by the system.
N.B. The extension .PRG was managed by the system and by the part programs in S3000 controllers.
Program was recalled in other programs with the LNAME command. Adding the extension .PRG after
the file name was not required. This is no longer the case in S4000 controllers. Consequently, when
using other programs with extension (.PRG or other), you will need to specify the extension when
running the LNAME recall command, e.g.: LNAME.PRG:

User and Programming Manual - Part I

3-1

S4045 S4045P
3. Programming and editing operations

The part program is normally stored on the hard disk in the main directory (D:\S4000\PARTPROG) but
they can be stored in other sub-directories created by the user.
The list of programs includes the name, the size in bytes and the date and time of creation or of last
change, the file attributes (e.g.: A for archive file, etc.) and a small V next to the name to indicate that
this was the last edited program.
The program list will appear on the screen whenever a program is selected, i.e. in graphic mode,
machine mode, etc.

3.2 PART PROGRAM EDITING


To open the program editor and graphic mode:
1. Select the PROGRAMMING environment by tapping the touch screen or clicking the mouse.
The following screen page will appear:

3-2

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

2. Press the EDIT PROGRAM soft key to edit a program, delete a program or a program directory
(folder), copy a program or a program folder, move a program into another folder and rename a
program, archive one or more programs.
A dialogue window similar to the one below will appear:

The following will appear:


-

The current folder (directory) will appear in the top left.


The main directory on the hard disk is D:\S4000\Partprog; the main directory of the diskette is A:\
the main CD-ROM directory is normally G:\; the main network directory is normally F:\ or H:\ .
Several sub-directories can be created on the hard disk and on the diskette, on the CD-ROM and in
the network.

To select the drive, either click the mouse or tap the touch screen on the black arrow on the right of
the drive pointing downwards: the available drives will appear. Select the required drive by clicking
the mouse or tapping on the touch screen (o con I tasti
confirm)

and

and press RETURN to

a programmable FILTER will appear in the top right to select only the files with a certain extension
which start with certain characters:
e.g.: to select all files with extension .PRG select FILTER: *.PRG
To select all files starting with characters CA, select FILTER: CA*.*
Press Find to view only the files with this filter.

User and Programming Manual - Part I

3-3

S4045 S4045P
3. Programming and editing operations

The contents of the current folder will appear in the middle of the window. The list includes the
program name, size in bytes, date of creation or last change and the attribute. Click the field buttons
(Name, Date, Size, , Attribute) to sort the list in increasing or decreasing order by the selected
field. The list will be displayed with a red arrow pointing upwards (increasing) or downwards
(decreasing) on the selected field. Program is shown in the list next to an icon showing a light blue
sheet with the top right corner folded. The folders present a yellow folder icon. A small red V on the
light blue sheet next to the name marks the most recently edited program.
A red arrow pointing upwards followed by two dots will appear on the first row a sub-directory. Click
to move up to a higher folder or to the main directory.
This red arrow appears also in the upper part of the directory contents on the extreme right of the
video. The function is the same.
Click or tap the scroll bar in the right column or the up/down buttons with the mouse or touch
screen. Alternatively, use the buttons

and

on the keyboard to scroll the list.

Copy, Move, Delete, Zip, Rename, New, Select all, Find, OK and CANCEL soft keys will appear
under the list.

WARNING!!:

The name of the program and the relevant directory cannot be longer than 256
characters in all.

The possible operations are:


SELECT ALL
This soft key is used to select all the contents of the current folder, including programs and subdirectories. The selection will appear reversed and blue.
These programs can be deleted, copied, moved or compressed (archived).
To select several programs, but not all the contents of the current folder, simply select the first program
required clicking or tapping on the right of the name with the mouse or touch screen and, holding
pressed, scroll the list down or up. The selected programs will appear reversed and blue. Alternatively,
the same operation can be carried out with buttons

program and scrolling up or down holding button

on the keyboard pressed at the same time.

and

by positioning the cursor on the first

Programs in random order in the list can be selected as follows: select the programs with the mouse or
touch screen holding the button

on the keyboard pressed at the same time.

DELETE
To delete one or more programs or an entire folder (or several folders at the same time), select the
items to be deleted with the touch screen, the mouse or up/down scroll buttons and press the DELETE
soft key "Are you sure you want to delete .......?" will appear. to delete a file or: Are you sure
you want to remove the folder ...... and all its contents? to delete a directory; then press YES or
NO.
Select YES or NO. Press YES by clicking or tapping the mouse or touch screen to delete all the
selected programs and folders (which appear reversed and blue). Alternatively, you can press the DEL
button on the keyboard to delete the programs and the folders.

3-4

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

NEW
To make a new program or folder, firstly select the directory. The current Directory will appear in the
top left. Click the downwards black arrow by the side of the current directory (hard disk only) to select a
drive. The starting directory is:
D:\S4000\Partprog
Press the New softkey the following window will appear:

Select the option:


1) the following window will appear if you confirm the creation of a new folder (or directory):

The same window will appear also by clicking the yellow folder icon in the top right of the video:

Type the name of the FOLDER to be created and press OK.

User and Programming Manual - Part I

3-5

S4045 S4045P
3. Programming and editing operations

2)

to create a new file, select Create new file. The following window will appear:

The same window will appear also by clicking the blue sheet icon in the top right of the video:

Type the name of the FILE to be created and press OK.


Program name extensions will be ignored.
After pressing Create new file, the program will be created and the writing environment (EDIT) will be
automatically opened. See the next chapter for details. After pressing the Directory contents soft key,
the new folder will appear in the Create new folder list preceded by a yellow folder icon.
Press CANCEL to quit the NEW environment.

3-6

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

COPY
To copy a program, several programs or an entire folder (or several folders), select with the mouse,
and
buttons and press the COPY soft key. . If you want to COPY and
touch screen or
rename the file (e.g. to copy it into the same folder with a new name), click the checking box, which is
a small square box that appears by the side of Copy and rename; a small V will appear to indicate
that the renaming function is enabled.
The following window will appear in the case of COPY only:

Selezionare innanzitutti la directory di destinazione.


The Current directory will appear in the top right. The available drives are (currently) two:
Hard disk:
Floppy disk:
CD ROM:
Network:

D:\S4000\Partprog
A:\
G:\
F:\ or H:\

CD-ROM (drive G:\) and network disk will be provided as options.


To select the drive, either click the mouse or tap the touch screen (or press

on the keyboard to

to confirm) on the grey arrow pointing downwards to the right of the drive.
move and press
The available drives will appear. Select the required drive by clicking or tapping the mouse or the touch
screen (or with buttons

and

and press

to confirm).

Select the target folder and press the OK soft key : the selection (single program or folder, otherwise
several programs or folders) which appears blue and reversed will be copied to the target folder.

User and Programming Manual - Part I

3-7

S4045 S4045P
3. Programming and editing operations

The following window will appear in the case of Copy and rename:

Enter the new name and click OK to copy into the current folder; otherwise click the softkey next to
the folder. The following window will appear again:

Repeat the operations above to select the drive and the target folder.

3-8

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

MOVE
To move a program, several programs or an entire folder (or several folders), select with the mouse,
and
buttons and press the Move softkey. The previous screen page will
touch screen or
appear.
If you want to MOVE and rename the file (e.g. to copy it into another folder where a program with the
same name already exists), click the checking box, which is a small square box that appears by the
side of Move and rename; a small V will appear to indicate that the renaming function is enabled.
The following window will appear in the case of MOVE only:

Firstly, select the target drive.


The Directory attuale will appear in the top left. The available drives are:
Hard disk:
Floppy disk:
CD ROM:
Network:

D:\S4000\Partprog
A:\
G:\
F:\ or H:\

To select the drive, either click the mouse or tap the touch screen (or press

on the keyboard to

to confirm) on the black small arrow pointing downwards to the right of the
scroll and press
drive. The available drives will appear. Select the required drive by clicking or tapping the mouse or the
touch screen (or with the buttons

and

and press

to confirm).

Select the target folder and press the OK soft key: : the selection (single program or folder, otherwise
several programs or folders) which appears blue and reversed will be copied to the target folder.

User and Programming Manual - Part I

3-9

S4045 S4045P
3. Programming and editing operations

The following window will appear in the case of Move and rename:

Enter the new name and click the softkey next to the folder. The following window will appear again:

Repeat the operations above to select the drive and the target folder.

3-10

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

RENAME
To rename a program, several programs or an entire folder (or several folders), select with the mouse,
touch screen or

and

buttons and press the RENAME soft key.

The following window will appear:

Enter the new name, press RETURN or the OK softkey to confirm.


FIND
To find a program or a folder in the current directory, press the Find softkey.
The following window will appear:

Enter the correct file or folder name to be sought. It will be automatically shown in the list. Otherwise,
the following will appear:

User and Programming Manual - Part I

3-11

S4045 S4045P
3. Programming and editing operations

3.3 PROGRAM EDITOR FUNCTIONS


Either makes a new program as described in the previous chapter or select an existing program as
follows:
1. Select the PROGRAMMING environment by means of the touch screen or by clicking the mouse.
The following screen page will appear:

2. Press the EDIT PROGRAM soft key. A screen page similar to the one below will appear:

3-12

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3. Select the required directory in the top left (only the hard disk can be edited).
The current directory will appear. The initial directory is:
D:\S4000\Partprog
4. Select the required sub-directory, clicking twice with the touch screen or mouse (or using the
up/down scroll buttons and press

to confirm) the folder graphic symbol or name.

5. Select the required program and either press


or click the OK soft key to confirm.

, double click the touch screen or the mouse

Either the program list or a new blank page (in the case of a new program) will appear filling the entire
screen. The advanced EDIT PROGRAM function tools will appear over the list.
A screen page similar to the one below will appear:

The drawing activation (ACTIVE DRAWING), the converse programming guide (CONVERSATIONAL)
and the CNC Series S3000 (ADVANCED FUNCTIONS) type advanced edit functions soft keys are
arranged in area C. These soft keys are illustrated in the following chapters.
The Series S4000 controller editor is a WINDOWS based system. It is consequently user-friendly and
compatible with all text editors using this operating system.
The program comments, i.e. the blocks proceeded by "[", appear green, to distinguish them from the
executive program blocks.

User and Programming Manual - Part I

3-13

S4045 S4045P
3. Programming and editing operations

Basic editing operations


Move the cursor in the list to the concerned block with the touch screen or the mouse (or with the
buttons

and

To add a block

).
Move the cursor to the end of the previous block or to the beginning
.
of the block following the block to be added and press
The data are directly saved in the program. You do not need to press

To edit a block

to confirm. Press
to start a new program row.
Blocks will be numbered automatically by the system.
Programs containing numbering may be changed and consequently
the number row may not correspond to the real position in the list.
This will not cause problems.
Move the cursor to the required block and edit it. You do not need to
to confirm. You can also select the row with the

press

mouse or touch screen (or with buttons

and

holding the

button pressed): in this case, the entire selected row will be edited.
To delete a block

Move the cursor to the required block, select the entire row with the
mouse or touch screen (or with buttons

and

holding the

button pressed) and press CANC.

Advanced editing functions


With the drawing is deactivated and, consequently, the program list filling the entire screen, the editor
tools of any advanced WINDOWS editing program will appear in the upper toolbar (select blocks,
delete blocks, copy blocks, move blocks, search strings, replace, etc.).
Move the cursor to the required block with the touch screen or mouse (or with buttons
To select a set of
blocks

).

With the touch screen, select the first block in the set by tapping on the left
(the block will be reversed and blue). Without lifting the pen (or finger) from
the touch screen, move up or down, on the left of the blocks to be selected
(they will all be reversed and blue). With the mouse, click on the left of the first
block (the block will be reversed and blue) and scroll the lift down or up
holding the right mouse button pressed. With buttons
first block and moved down or up holding button
time.

3-14

and

and

, select the

pressed at the same

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The tools on the toolbar are:

The purpose of the tools is:


FLOPPY DISK

This function saves the program without quitting edit mode.

To save a program
Press
on the keyboard or click the "Selca" icon turning on the
video to quit and automatically save created or edited program.
SCISSORS
To cut blocks
To delete blocks

This function "cuts", i.e. removes the previously selected blocks


from their position. They can be moved to a new position, or even to
a new program, by means of the PASTE function.
This function can also be used to delete the "cut" blocks. In this
case, simply do not "paste" the blocks anywhere.
More simply, select the required block and press the DEL button on
the keyboard to delete.
More proficient users, enable the CUT function with the WINDOWS
command:
+

TWO SHEETS
To copy blocks

This function copies the previously selected boxes. They can be


copied to a new position, or even to a new program, by means of
the PASTE function. More proficient users, enable the COPY
function with the WINDOWS command:
+

CLIPBOARD
To paste blocks

This function "pastes" the previous "cut" or copied block in the


required point of the program or even to a new program.
More proficient users, enable the PASTE function with the
WINDOWS command:
+

ARROW BACK

This function undoes the last operations, working backwards.

To undo operations

More proficient users, enable the UNDO function with the


WINDOWS command:
+

ARROW FORWARD

This function is used to undo "undone" operations.

To undo "undo"

User and Programming Manual - Part I

3-15

S4045 S4045P
3. Programming and editing operations

BINOCULARS
To find a string

This function is used to find a string of characters. The following


dialogue window will appear:

Key in the string to search and tap or click Find next on the touch
screen or with the mouse. Various search options are offered:
search up, down, whole word, etc. Click Close or X in the top left to
close the window.
BINOCULARS AND SHEET
Find and replace

This function is used to find and replace a character string. The


string can be replaced in the entire file or in one block at a time.
The following window will appear:

PRINTER
To print the program list
+N12
-N12

This function prints the file list to a previously installed printed,


configured in WINDOWS.

This function renumbers or removes the numbers in a program.


Numbering is set, as in previous controllers, from N1 in steps of 1,
without limitation in terms of file length.

To renumber a program

3-16

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.4 S3000 TYPE ADVANCED EDITING FUNCTIONS


To allow previous S3000 controller users to work with the editor functions they acquired and learned to
know over the years, a functional compatibility is ensured by means of the ADVANCED FUNCTIONS
soft key.
A screen page like the one below will appear in the program to be edited (opened as described in the
previous chapters):

1. Press the ADVANCED FUNCTIONS soft key. The following menu will appear:

To highlight a sequence of blocks


Position the cursor on the first block of the sequence, press SELECT BLOCK, move the cursor to the
last block and press SELECT BLOCK again to complete the operation. The selected blocks will
appear RED.
The commands that follow may be executed upon the highlighted blocks.

User and Programming Manual - Part I

3-17

S4045 S4045P
3. Programming and editing operations

To delete highlighted blocks


Press DELETE BLOCK. The blocks will be deleted.
To copy highlighted blocks elsewhere within a program
Place the cursor on the block before the position where you want to insert the copied blocks and press
the COPY AND PASTE key. The blocks will be copied and inserted in the new position.
To move highlighted blocks elsewhere within a program
Place the cursor on the block before the position where you want to insert the blocks being moved and
press the MOVE BLOCK key. The blocks will be moved to the new position.
To replace a character string with another one
Press the REPLACE STRING key. A dialogue box for searching and replacing a character string will
appear.

The replacement can also be made in the entire file.


To find a character string
Press SEARCH STRING. A dialogue box for searching a character string will appear:

To save a program without quitting


Press SAVE. The program will be saved without quitting edit mode.

3-18

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.5 DRAWING: 2/3-D GRAPHIC DISPLAY, SIZE AND ZOOM


Program geometry can be graphically displayed in two dimensions (plan view, front or side view) or in
three dimensions by defining the angles of rotation.
Open the program edit environment, as described in the previous chapters. The following menu will
appear:

The program list will fill the screen.


Press the ACTIVE DRAWING soft key. The following screen page will appear:

User and Programming Manual - Part I

3-19

S4045 S4045P
3. Programming and editing operations

The START DRAWING function is used to draw the tool path defined by the program. The path is
automatically updated after each block insertion and editing.
The drawing function can be activated and deactivated at any time.
The drawing will fill the entire screen and the program list will be minimised in a small five-row window
in the upper left of the screen (A area).

The following will appear in area A of the screen:


-

The boundary co-ordinates of the four graphic box corners


The scale dimensions by means of a segment indicating the length
The Cartesian axes, if included in the graphic box, and the dotted lines, indicating the significant
values of the selected scale co-ordinates (2-D view only).

The function buttons are:


ZOOM

To change the graphic scale using the functions implemented in the


previous S3000 controller with additions and improvements.

START DRAWING

To activate program graphics.

STOP DRAWING

To interrupt the program graphic previously activated with the START


DRAWING soft key.

SAVE IMAGE

To store the screen snapshot in a graphic file to recall it quickly


without needing to draw the entire profile
(Function not available at this time).

3-20

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

ZOOM
Press ZOOM. The following menu will appear:

Cross hairs will appear in the middle of the screen. The position of the cross hairs with respect to the
drawing zero point is shown in the left of the screen (only for 2-D views). The cross hairs can be moved
on the screen with the mouse, the touch screen or the scroll arrows.
Holding the respective scroll button can move the cross hairs fast or slow.
The position of the cross hairs defines the point around which you can zoom in or out the displayed
drawing.
To change the drawing scale
Move the cross hairs to the desired point and press the ZOOM X 2 or ZOOM / 2 key. The drawing is
enlarged or reduced every time you press one of these soft keys.
To enlarge or reduce a portion of the drawing
Press the DELIMIT WINDOW key. Position the cross hairs in a corner of the required window. Click
again in the opposite corner of the window. The required window will appear.

Click the mouse or tap the touch screen in the middle of this window. The drawing will be enlarged or
reduced according to the delimited window. This function is usually used to zoom into a detail of the
area.

User and Programming Manual - Part I

3-21

S4045 S4045P
3. Programming and editing operations

To store the limits in the program


Both the limits modified with the zoom and the type of display selected must be stored in the program
to remain active. Press the STORE LIMITS soft key. This function will store the active graphic
parameters automatically as the first block in the program, by entering $ followed by the view type (top
view, front view, side view, 3-D), graphic window limits and 3-D rotation angle (where relevant).
To cancel the ZOOM effect
To return to the previous drawing dimensions press RESTORE LIMITS.
To centre the drawing
Move the cross hairs to the desired screen centre and press CENTRE WINDOW.

To stop graphics display


Press STOP GRAPHICS.
Graphic display during machining
The graphic parameters for display during the machining phase may be different from those in edit
mode. To transfer the active Edit parameters into the current machining parameters press STORE
LIMITS.
This function will transfer the $ instruction to the first program block.
To change graphic views
Press CHANGE VIEW. The following menu will appear:

3-22

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

2-D view
In order to enable the 2-D view press the TOP VIEW, SIDE VIEW or FRONT VIEW key.
Return to the editor window and click inside with the touch screen the mouse to view the changes.

3-D view
The following menu appears by pressing 3-D VIEW and ROTATE 3-D VIEW. The softkey
ROTATE 3-D VIEW will appear in the CHANGE GRAPHICS menu only when the 3-D VIEW softkey is
pressed.

As can be seen, five rotations, corresponding to five soft keys, are provided.
Return to the editor window and click inside with the touch screen the mouse to view the changes.
Press ESC several times to return to the previous menus.

3.6 STORING DISPLAY PARAMETERS


When the program geometry drawing session is over the current display parameters can be saved by
entering a $ character as the first program block.
The programming format for 2-D display is:
$1 M...X...I...Y...J...
Where:
M = 0 Plan view
M = 1 Side view
M = 2 Front view
X...
Left limit
I...
Right limit
Y...
Lower limit
J...
Upper limit
Example:
$1 M0 X-100 I100 Y-80 J80
This block will enable the display of a 2-D plan view with -100,100, -80 and 80 as boundary limits.
The programming format for 3-D display is:
$2 X... I... Y...J...K...Q...

User and Programming Manual - Part I

3-23

S4045 S4045P
3. Programming and editing operations

Where:
X...
Left limit
I...
Right limit
Y...
Lower limit
J...
Upper limit
K...
Horizontal rotation
Q...
Vertical rotation
Example:
$2 X-100 I100 Y-80 J80 K0 Q-15
This block will enable 3-D display with horizontal rotation of 0 degrees, vertical rotation of -15 degrees
and -100, 100, -80 and 80 as boundary limits.

Other uses of the $ character


$0
$3
$4

Cancels the drawing on the screen, without modifying the current parameters.
Disables drawing and leaves the current screen contents unmodified.
Re-enables the drawing disabled with $3.

The default color codes (equivalent to $6) are blue for rapid movements and green for feed
movements.
The instruction $n allows the use of different colors, according to the value of n, both for feed and rapid
movements. By changing the default color to one of those listed below, there will be no color
discrimination between rapid and feed movements.
$5
$7
$8
$9
$10
$11
$12
$13
$6

Light blue
Red
Green
Yellow
Blue
Pink
White
Black
Restores default colors.

The instruction $21, when the plan view mode is enabled, allows to perform a machining simulation by
drawing a series of circles on the tool center path. Circles diameter is the same as tool diameter.
Circle distance is set by the formula shown below.
The programming format is:
$21 K... I...
Where:
K...
coefficient for the calculation of the distance
between the circles according to the formula:
RT = Tool Radius

I...

K
DISTANCE=
RT x SCALE

circle color

The instruction $20 cancels the $21.

3-24

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.7 PROGRAM EXECUTION IN GRAPHIC MODE


Proceed as followed to run a program in graphic mode, for automatically or semi automatically - i.e.
block by block - simulating the program to verify correctness (the graphic system will report errors and
alarm which did not appear during editing):
1. Select the PROGRAMMING environment by tapping the touch screen or clicking the mouse. The
following screen page will appear:

2. Press the GRAPHIC EXECUT soft key. A screen page like the one below will appear:

User and Programming Manual - Part I

3-25

S4045 S4045P
3. Programming and editing operations

3. Select the required program by clicking the mouse or tapping the touch screen or with buttons
and

and press OK to confirm. The following screen page will appear:

4. Select the required mode (AUTO or SEMIAUTO) and press the required function button and the
START soft key to start graphic mode. The following screen page will appear:

3-26

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Press the STOP button to stop the program.


SEMIAUTO graphic mode can be used to follow program forming in the programming sequence on the
screen.

A program can be run in graphic mode while the machine, or another program, is running.
The ZOOM button can be used to change the drawing scale and views.
The dimensions reached at the end of each block and the result of the programmed parameter
expressions are displayed in graphic mode.

User and Programming Manual - Part I

3-27

S4045 S4045P
3. Programming and editing operations

3.8 CONVERSATIONAL PROGRAMMING


A part program consists of various G functions which specify the required operations and define
parameters, in addition to the programming dimensions.
Complex programming (profile definition, fixed drilling cycles or fixed drilling supercycles, complex
cavity cycles, etc.) require entering a great deal of G functions.
A conversational programming function is provided to help the operator to program these cycles. This
program uses very articulated softkey menus and graphically displays the operations which can be
selected to provide a step-by-step guide to programmers for defining the necessary or optional
parameters needed for correctly setting up the required machining cycle.
Each parameter is described in terms of action and permissible input values in addition to being
graphically displayed on the video.
The very powerful functions for this type of programming will not be described in this manual because
there are a great deal of softkey menus and graphic windows and because each operation or selection
is self-explanatory.
Only a practical example and the environment access method will be shown here.
Most functions in this environment are common to the programming environment PROGET2 described
in detail in the second part of this manual. Refer to this section for greater details.

3.8.1 GENERAL SETUP


The mandatory fields are yellow and the optional fields are green in the graphic data entry
windows.
Some windows contain light blue optional calculation fields to help the operator by automatically
calculating values, such as, for example, the tool S rpm according to cutting speed and diameter,
advancement speed F according to tooth advancement and number of teeth, slant angle of a line in
degrees and seconds, etc.
The fields will turn yellow if a value is entered in an optional field requiring the introduction of other
values (indicating that the fields have become mandatory).
Explanatory help-on-line is provided for each performed function.
Press the OK button only after introducing the fields needed for correct programming to generate the
code.

3-28

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

At this point, the function parameter window and program list window in the middle of the screen or in
the top left will disappear. The block containing the G function followed by the defined parameters will
appear if the drawing is active.
A general RESET button is provided in all windows for clearing and resetting all parameters. The
CANCEL button is used to close the window without generating the program block.
Press EDIT in PROGRAMMING environment to access conversational programming. Select an
existing program or define the name of a new program. The following menu will appear:

Press CONVERSATIONAL. The following screen will appear:

The G function (or other functions, such as T tool function, O origin function or M functions) will appear
in the middle of the display. Short descriptions can be recalled either by double tapping on the touch
screen, double clicking the mouse or using the up/down arrow on the keyboard and pressing ENTER.
The respective panel will appear.
A number of softkeys with the following meanings will appear in the right of the display:
Information about the currently installed CONVERSATIONAL programming version.
The version will be constantly updated by implementing new menus to satisfy the
various customers' needs.

User and Programming Manual - Part I

3-29

S4045 S4045P
3. Programming and editing operations

Press the button. The following window will appear:

Press OK to confirm and quit.

3-30

Available window menu. Press the button. The following window will appear:

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The softkey in windows and menus will be constantly updated.


A brief description is provided in the following example.
PROGET2 profile programming menu. Press the button. The following window will
appear:
:

All softkeys in this window can be used for creating geometrical profiles using Selca PROGET2
programming language.
A brief example of how to use the softkeys is show below.

This softkey is used to quit the conversational programming environment.


:

This softkey is used to confirm the selection in the window (it is equivalent to
ENTER on the keyboard).
:
The drawing will be updated if the graphic display function is active during conversational programming
(ACTIVE DRAWING softkey).

User and Programming Manual - Part I

3-31

S4045 S4045P
3. Programming and editing operations

3.8.2 EXAMPLE OF CONVERSATIONAL PROGRAMMING


The following conversational programming actions are provided as an example to illustrate the
simplicity of this environment. Cycle and function programming is mostly based on basic or PROGET2
programming described in the second part of this manual. Refer to this section for greater details.
The following is an example of fixed drilling cycles and PROGET2 programming.
We will assume a set of grid pattern drillings and the profile shown in the following example:

Select the PROGRAMMING environment. The following window will appear:

3-32

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Press EDIT PROGRAM. The following window will appear:

Press NEW. Enter the required program name (e.g. CONV) and press OK.
The menu will appear:

Press CONVERSATIONAL. The following window will appear:

User and Programming Manual - Part I

3-33

S4045 S4045P
3. Programming and editing operations

Press the softkey

The following window will appear:

Press the softkey.

The following line will appear in the program:


G17

Press the softkey.

3-34

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The following window will appear:

Enter the required part origin number (e.g.: 1) and press OK. The following line will appear in the
program:
O1

Press the softkey

The following softkeys will appear:

Press the softkey.

User and Programming Manual - Part I

. The following window will appear:

3-35

S4045 S4045P
3. Programming and editing operations

Enter the required tool number (from 1 to 300, e.g. 2) and press M6. Enter the values S and F directly
in the yellow fields. Alternatively, have the system compute the values by entering the cutting speed,
the bit diameter and the advancement per revolution in the light blue fields and clicking on the red
import arrows. Finally, click the required M function (M3, M13, M4, M14).

Press OK to confirm or RESET to reset the data.


Press OK. The following lines will appear in the program:
T2M6
S1415F170M3

Press the softkey.

Press the softkey.

The following softkeys will


appear:

3-36

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Press the softkey.

to approach to the part.

The following window will appear:

Enter the rapid or feed safety Z values, the X values, the rapid or feed Y value and the part Z approach
value. Rapid and feed values are optional (as are all movements).
Example:

User and Programming Manual - Part I

3-37

S4045 S4045P
3. Programming and editing operations

Press OK. The following will appear in the program:


Z100 R
X50 Y30 R
Z2
Press the softkey
.
The following
softkeys will appear:

Select one of the three options (scattered, grid or circumference).

For example, press the softkey.

The following
softkeys will appear :

3-38

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Select the type of fixed cycle (drilling, mixed deep drilling, deep drilling, tapping, boring, etc.).

For example, press the softkey

The following window will appear:

Enter the required parameters. The OK key cannot be pressed to continue until all the yellow fields
have been filled in.
Example:

User and Programming Manual - Part I

3-39

S4045 S4045P
3. Programming and editing operations

Press OK or RESET to reset the values. Press OK. The following line will appear in the program:
G781J2Z-20X50Y30D1=6D2=18.5D4=3D5=22
Press the ACTIVE DRAWING softkey. The following menu will appear:

Press START DRAWING. The following drawing will appear:

The second part of the program is a simple PROGET2 profile.

Press the softkey

Then, press the softkey.

3-40

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The following softkeys will appear:

Press the softkey.

The following window will appear:

User and Programming Manual - Part I

3-41

S4045 S4045P
3. Programming and editing operations

Set the data referred to the required tool.


Example:

Press OK or RESET to reset the values. For example, press RESET and have the system calculate
the technological parameters according to tool diameter, cutting speed, tooth advancement and
number of teeth. Set the light blue values and press the red buttons to have the values calculated.

Press OK.

3-42

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The following lines will appear in the program:


T4M6
S1911F1529M13
G49I5

Press the softkey.

The following window will appear:

Set the Z release values, the X and Y positions and the Z part approach.
Example:

Press OK.

User and Programming Manual - Part I

3-43

S4045 S4045P
3. Programming and editing operations

The following lines will appear in the program:


Z100 R
X20 Y80 R
Z-10 R
The drawing will be automatically updated.

Press the softkey.

The following window will appear:

Select the tool position with respect to the profile and the type of attachment (linear or circular).
Example: left and circular. The following will appear in the program:
G41K2
Press the softkey.

The following window will appear:

3-44

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Enter the value in the required position. The other fields will go out.

Press OK to confirm
The following will appear in the drawing:

The following will appear in the program:


G13J90X40

Press the softkey.

User and Programming Manual - Part I

3-45

S4045 S4045P
3. Programming and editing operations

The following window will appear:

Enter the value in the required position. The other field will go out.

Press OK. The following will appear in the program:


G21I-20

Press the softkey.

The following window will appear:

3-46

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Enter the value in the required position. The other fields will go out.

Press OK. The following will appear in the drawing:

The following will appear in the program:


G20I-100X90Y30

Press the softkey.

The following window will appear:

User and Programming Manual - Part I

3-47

S4045 S4045P
3. Programming and editing operations

Enter the value in the required position. The other fields will go out.

Press OK.
The following will appear in the drawing:

The following will appear in the program:


G13J180Y-5

Press the softkey.

3-48

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The following window will appear:

Enter the X and Y co-ordinate of the profile detachment point and the type of output (linear or circular).

Press OK. The following will appear in the drawing:

User and Programming Manual - Part I

3-49

S4045 S4045P
3. Programming and editing operations

The following will appear in the program:


G40K2X30Y-20

Press the softkey

Enter the rapid release Z value only.

Press OK.
The following will appear in the program:
Z200 R

Press the softkey.

Finally press the softkey

The following will appear in the program:


M30

3-50

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

The program is complete. The generated list is:


G17XYZ
O1
T2M6
S1415F170M3
Z100 R
X50 Y30 R
Z2 R
G781J2Z-20X50Y30D1=6D2=18.5D4=3D5=22
T4M6
S1911F1529M3
G49I5
Z100 R
X20 Y80 R
Z-10 R
G41K2
G13J90X40
G21I-20
G20I-100X90Y30
G13J180Y-5
G40K2X30Y-20
Z200 R
M30

User and Programming Manual - Part I

3-51

S4045 S4045P
3. Programming and editing operations

3.9 PROGRAM COMPRESSION AND ARCHIVE


MANAGEMENT
S4000 series CNC units can be used to compress programs of entire folders transforming them into
"zipped" files to archive them and reduce the space they occupy.
The compression procedure offers the possibility of selecting the storage destination, i.e. the CNC HD
or one or more diskettes.
The opposite operation is possible, i.e. the compressed programs and folders previously generated by
the S4000 function or other external systems (Winzip or Pkzip) can be extracted to the HD from one or
more diskettes, CD-ROMs or via a network connection.

Proceed as follows to compress a program or folder:


1. Select PROGRAMMING environment. The following window will appear:

2. Press EDIT PROGRAM. A window similar to the one below will appear:

3-52

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3. Select the folder(s) or program(s) to be compressed using the touch screen, the mouse of the
up/down arrows on the keyboard. The selected folder is compressed in the following example.

4. Press the Zip softkey. The following window will appear:

5.

Select Add at the archive. The following window will appear:

User and Programming Manual - Part I

3-53

S4045 S4045P
3. Programming and editing operations

6.

Press OK to confirm. The following window will appear:

The archived programs will appear in the left of the video.


7. Press Exit to quit. The program(s) or folder(s) are zipped. The zipped file/folder icon will appear on
the screen with extension .ZIP:

3-54

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

Proceed as follows to compress a program or a folder to a floppy disk:


1.

Prepare one or more formatted diskettes.

2.

Select PROGRAMMING environment.

3.

Press EDIT PROGRAM.

4.

Go to the program or folder to be archived with the touch screen, mouse or up/down arrows.

Example:

5.

Press ZIP. The following window will appear:

6.

Select Add at the archive. The following window will appear:

User and Programming Manual - Part I

3-55

S4045 S4045P
3. Programming and editing operations

7.

Click the ... softkey next to the folder. A window like the one below will appear:

8.

Select drive A:\ by clicking the black small arrow pointing downwards in the top right next to the
current directory. The following window will appear:

3-56

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

9.

Press OK. The following window will appear::

10. Press OK. The following window will appear:

11. Press OK. The procedure will start. If prompted, insert diskettes in sequence after the first
diskette and press OK to confirm. The following screen page will appear:

User and Programming Manual - Part I

3-57

S4045 S4045P
3. Programming and editing operations

12.

Press Exit to quit the file archiving environment. The zipped program/folder icon will appear on
the screen with extension .ZIP:

Proceed as follows to extract an archive file to the CNC hard disk:


1. Firstly, check whether the folder where to extract the archive file has been created. Otherwise,
extract the archive in the main folder D:\S4000\PARTPROG.
2. Select PROGRAMMING environment.
3. Press EDIT PROGRAM. A window similar to the one below will appear:

3-58

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

4. Select the .ZIP program to be extracted with the touch screen, the mouse or the up/down arrows on
the keyboard.

5. Press ZIP. The following window will appear:

6. Select Open archive. The following window will appear:

User and Programming Manual - Part I

3-59

S4045 S4045P
3. Programming and editing operations

7.

Press Select all. All programs will appear blue and reversed:

8.

Press Extract. The following window will appear:

3-60

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

9. Select the folder where to extract the archive with the touch screen, the mouse or the up/down
arrows and double tap/click to enter. The following window will appear:

10. Press OK. The archive file with be extracted. The following screen page will appear.

11. Press EXIT.

User and Programming Manual - Part I

3-61

S4045 S4045P
3. Programming and editing operations

Proceed as follows to extract an archive file from one or more diskettes to the CNC hard disk:
1. Firstly, check whether the folder where to extract the archive file has been created. Otherwise,
extract the archive in the main folder D:\S4000\PARTPROG.
2. Insert the last diskette containing the archive file (.ZIP).
3. Select PROGRAMMING environment.
4. Press EDIT PROGRAM.
5. Select drive A: by clicking on the window in the top right of the display.
A window similar to the one below will appear:

6. Select the .ZIP file to extract with the touch screen, the mouse or the up/down arrows on the
keyboard.

7.

3-62

Press ZIP. The following window will appear:

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

8.

Select Open archive. The following window will appear:

This window will appear if the last diskette is actually inserted. Otherwise, the following window will
appear:

Insert the last diskette in the set and press YES.


9.

Select the program and press Extract. Then press OK. The following window will appear:

Insert the first diskette and press OK.

User and Programming Manual - Part I

3-63

S4045 S4045P
3. Programming and editing operations

The following window will appear.

10.

Select the program to be extracted by pressing SELECT ALL or clicking the archived file and
pressing EXTRACT. The following window will appear:

11.

Select drive D:\S4000\PARTPROG in the top left window and then the folder where to extract
the program by clicking twice; otherwise the program will be extracted to the main directory
D:\S4000\PARTPROG. Then press OK.

3-64

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

12.

Select the folder where to extract the archive with the touch screen, the mouse or the up/down
arrows on the keyboard and click twice to access the folder. The following window will appear:

13.

Press OK. The archived file will start being extracted. You will be prompted to insert the
diskettes in the correct sequence. Proceed and press OK to confirm.

14.

Press EXIT at the end. The program will be extracted to the required folder.

Zipped programs archived in .ZIP format cannot be edited or run. The programs must be extracted as
described above.
Zipped programs can be extracted to external personal computers by using softwares such as WINZIP
or PKUNZIP, etc.

User and Programming Manual - Part I

3-65

S4045 S4045P
3. Programming and editing operations

3.10 COMPILING PROGRAMS


The COMPILE function is used to process the special PROGET2 language functions. It generates a
program containing only the elementary functions which can be run also on older controller versions
(S1200, S1100 and S1000). This operation is not required for S3000 and S4000 systems which are
capable of directly interpreting programs written in PROGET2 language.
All special G functions are compiled, including G49 G41 G42 (except for G201 G202 G748
G749 G751 functions), repeated cycles, internal and external subprogram recalls and parametric
programming.

Proceed as follows to compile a program:


1.

Access Programming environment. The following menu will appear:

2.

Press the COMPILE softkey. A screen page similar will appear:

3-66

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.

Select the program to be compiled by tapping on the touch screen, clicking the mouse or using
the up and down arrows on the keyboard:

4.

Press OK. The following screen page will appear:

User and Programming Manual - Part I

3-67

S4045 S4045P
3. Programming and editing operations

5.

Press the START COMPILE softkey. A page similar to the following will appear at the end of
compilation:

6.

A program named as the original with the suffix COMP will be generated. In the example shown,
the program PROG02 is compiled and program PROG02COMP is created in the original
directory. A different name than that automatically defined by the system can be used if needed.

3-68

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

PROGRAM COMPILATION EXAMPLE


This example shows a simple profile programmed using PROGET2 language before (left column) and
after compilation (right column).
Original program
PROG26

Compiled program
PROG26COMP

[Profile 26
G17
O1
T2M6
F1000S1400M3
G49I4
X-55Y2Z2R
Z-10
G42K1 [linear etching to the right of L1
G13Y20J0 [L1
G21I5 [R5
G20X-15Y15I-18 [C1
G13Y25J0K2 [L2
G20X40Y25I15 [C2
G13J0 [L3
G40X50Y-5K1 [linear stop at

User and Programming Manual - Part I

G17
O1
T2M6
F1000S1400M3
G0X-55Y2Z2
G1Z-10
G1X-55Y16
G1X-35.7124Y16
G3X-27.6075Y21.087I-35.7124J25
G2X-2.351Y21I-15J15
G1X21.4259Y21
G3X40Y6I40J25
G1X50Y6
G1X50Y-5
M30

3-69

S4045 S4045P
3. Programming and editing operations

3.11 SERIAL MANAGEMENT


3.11.1 INTRODUCTION
The S4000 CNC can be connected via a serial line to an external PC using the Selcom4000
communication protocol installed on the CNC. Press the specific button in Programming environment
to access the communication protocol.
This function is only possible in systems running Windows NT4.

A remote (or industrial data link) communication protocol is used for transferring data directly from the
CNC keyboard. In this case, the external connected PC HDD is only used as an additional S4000 CNC
memory.
WARNING! The S4000 serial cannot be used for directly running a program from an external
station.
It can only be used to transfer programs from the external PC to the CNC and vice versa.
Press SERIAL MANAGEMENT in the programming menu. Two buttons for configuring (SETUP)
and starting the link will appear.

3-70

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.11.2 CONFIGURATION (SETUP)


Press SETUP after accessing the SERIAL MANAGEMENT environment. The following window will
appear:

In detail:
Disk 1: is the primary CNC working directory. This can be a directory or a peripheral unit (diskette, CDROM).
Disk 2: is the secondary CNC working directory. This can be an alternative directory or a peripheral
unit (diskette, CD-ROM).
COM port parameters: this defines the serial port number to be used for the line and the baud rate.
Checksum: this defines the transmission check code type. Must be Checksum S3000 for S4000 CNC.
Press OK to confirm the entered data. Press Cancel to close the dialog without saving the entered data
and maintain old values.

User and Programming Manual - Part I

3-71

S4045 S4045P
3. Programming and editing operations

3.11.3

STARTING THE LINK

Press START. The following page will appear:

There are three areas:


Remote disk: the files stored on the PC according to Selcom setting are shown.
Serial: the serial port configuration parameters and the control buttons for program transmission and
reception are shown.
Local disk: to set up the S4000 working environment.

IMPORTANT!
To establish a link between the S4000 and the PC, start Selcom by pressing
transmission in INDATAL mode) and connect the two with a serial cable.

3-72

(to set up data

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

REMOTE DISK
This window contains information on the programs stored on the external PC.

Two storage units configured with SELCOM program are available.


Press CHANGE DISK to select the unit to be used for transfer operations.

CONTROLS

The upper part contains a window showing data configuration (communication port, baud rate, data
flow parity bit management, data flow format and finally stop bit value). See Chapter 5.2 SETUP for
instructions on how to edit some of these items.

User and Programming Manual - Part I

3-73

S4045 S4045P
3. Programming and editing operations

The operative file controls are arranged underneath:


Delete: deletes the selected file.
Send file: for sending the selected file. Only active when a "LOCAL DISK" file is selected.
Receive file: for receiving the selected file. Only active when a "REMOTE DISK" file is selected.
Refresh: this button refreshes the file list in the window.

LOCAL DISK
This window contains information on the programs on the S4000 HDD.

Use the CONFIGURE button to select the program loading folders.


Use CHANGE DISK to select the unit from where to load programs.

Note:
Refer to the: SELCOM communication program for SELCA systems manual for all details on
using and configuring the Selcom communication program.
Specifically, note that SELCOM can only be used in systems running MS-DOS 5 or higher, WIN
95 and WIN 98.

3-74

User and Programming Manual - Part I

S4045 S4045P
3. Programming and editing operations

3.12 SELCAM AND SELDXF


Two optional software modules can be installed in S4000 systems for creating 2- or 3-dimensional
paths aboard the machine.
SelCAM is a powerful and flexible CAM module, specially created for the die and mold industry, that
offers the most recent 3D design software solutions.
It is used in PROGRAMMING environment and is graphically displayed as an external CNC
application. Press the S4000 button to return.
SelCAM was specifically designed for the S4000 Series CNCs, on which it can be installed without
amaging the CNC functionality.
It can also be installed on an external PC.
It allows the operator to use IGES or STL format files from other CAD/CAM systems, to choose the
machining strategy, to generate the graphic tool path, and to display and verify the generated tool path
in the CNC environment up to the finished product.
SelCAM also offers a graphical animated simulation of the tool path.
An additional mode in the SelCAM, allows the operator to generate the program that can machine in
the part name, job number, ect. Based on Windows True Type characters.
SelDXF is an option that allows the conversion of one or more 2-D CAD profiles from DXF drawing
format into CNC program format for the Selca S4000 Series CNCs.
It is used in PROGRAMMING environment as SelCAM and is graphically displayed as an external
CNC application. Press the S4000 button to return.
The SelDXF graphic interface helps the operator to choose one of the imported profiles and, it allows
zoom functions (+, -, window, or All) and profile move/cancel functions in order to prepare the
programming.
The profile may be converted into either an ISO or ASCII format program for the CNC.
A header and footer file can be created and will automatically dock onto the created program.
A SelDXF integrated module, select hole, allows the interpretation of a circle as a hole, and therefore
will calculate the position of the center of the hole that can be used in a fixed cycle.
Two softkeys will appear in the menu for using these two optional modules in Programming
environment:

The message OPTION NOT ENABLED. CONTACT SELCA will appear if either of the two softkeys
are pressed and the optional features are not installed.

User and Programming Manual - Part I

3-75

S4045 S4045P
3. Programming and editing operations

3-76

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

4. EXECUTION COMMANDS
Select the MACHINE TOOL environment with the touch screen or the mouse to run machine
programs, move axes manually or run MDI.
The following screen page will appear:

User and Programming Manual - Part I

4-1

S4045 S4045P
4. Execution commands

4.1 RUNNING A MDI FROM KEYBOARD


Proceed as follows:
1. Press the MDI softkey. The following screen page will appear:

2. Enter the block to run and press START (external console or PLC function buttons, area D in the
video, where fitted).

To run other blocks

Continue by entering the new block to run in the dialogue row


and press START (external console or PLC function buttons).

To repeat the displayed block

Hold START press. This is useful for incremental moves. Set


X1I, for example, to move axis X by 1 mm whenever START is
pressed.

Press

4-2

or click the rotating "Selca" icon to quit and return to MACHINE TOOL environment.

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

4.2 MANUAL MOVEMENTS


Select the MACHINE TOOL environment with the touch screen or the mouse to carry out manual
movements by means of the JOG controls or handwheels.
The following screen page will appear:

1.

Press the MANUAL softkey.

Manual movements can be made by means of either the JOG buttons (external console or PLC
function buttons, in area D, where fitted) or the handwheels, which step can normally be selected by
means of the PLC function buttons in area D of the video.
The JOG movement speed is controlled by the manual potentiometer. The machine tool manufacturer
must describe the possible operations.

User and Programming Manual - Part I

4-3

S4045 S4045P
4. Execution commands

4.3 MANUAL MOVEMENTS IN HOLD STATE


While a program is being run (see following chapters) the following screen page will appear:

To temporarily stop machining

4-4

Press HOLD. Other function buttons will appear in a screen


page similar to the following:

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

To run manual
movements

Press MANUAL and move the axis manually with either the JOG buttons
or the electronic handwheels.

To return to the stop


Press the REPOS softkey. Reposition each of the moved axes by pressing
point
the JOG buttons related to the correct positioning direction (the other
direction will be disabled) until the axis reaches the previously abandoned
position.
The HOLD and REPOS movements are controlled by the manual
movement potentiometer.
To resume machining

Press START. If the axes have not been correctly repositioned the control
will signal an error condition:
E92: axis off position

4.4 RUNNING A MACHINE PROGRAM


Firstly, select the MACHINE TOOL environment with the touch screen or the mouse to run a machine
program.
The following screen page will appear:

1. Press EXECUTE PROGRAM. The list of programs on the selected drive (D:\S4000\PARTPROG)
and selected directory will appear. The directory can be selected as described in the program
editor section (see chapter 3.2).

User and Programming Manual - Part I

4-5

S4045 S4045P
4. Execution commands

2. Select the required program with the touch screen, the mouse or buttons

and

Press OK to confirm. The following menu will appear:

4-6

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

3. Press IN MACHINE. A screen page similar to the following will appear:

4. Select the required machining mode (AUTO or SEMIAUTO).


5. Press START to start machining. The START button is normally on the machine tool console or in
the PLC function button set (D zone of the video) as in the example shown.
A screen page similar to the following will appear:

User and Programming Manual - Part I

4-7

S4045 S4045P
4. Execution commands

The position of the axes and the technological functions are displayed in area A of the video under
which the path drawing is shown.
This area contains the dimensions and the manufacturer or system designer can customise the
technological functions. The following are normally displayed during machining:
-

the configured machine axis dimensions;

the programmed T and O functions;

the programmed and the current F and S functions;

the current G, M, H functions;

the processing time in seconds (Sec) and the number of blocks run by the machine (Ex).

If the DRAW softkey is pressed during the process, the machine path to be followed will appear green
and the path done will appear white.
If the LIST softkey is active, the program blocks being run will appear.

A new part can be programmed and a stored program and will run in graphic mode while running a
machine program.

4-8

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

The programming format for creating a procedure for recalling other programs in an executable
program, considering the external programs as external subprograms, is:
e.g.:
LNAME:
LNAME1:
LNAME2:
These programs must reside on the drive.
If they are stored in a different folder than that of the calling program, the programming format is:
L\folder_name\file_name
e.g.: L\ESEMPI\PROG1;
If the program name has an extension, this must be included in the recall instruction:
e.g.:
LNAME.EST:

4.5 FAST MACHINE RUNNING


For testing purposes a program can be quickly executed on the machine. The feedrate may be
adjusted by means of the FEEDRATE OVERRIDE potentiometer.
Proceed as normal but select DRY RUN instead of IN MACHINE.
The drawing will appear blue (RAPID) while the program is running.

User and Programming Manual - Part I

4-9

S4045 S4045P
4. Execution commands

4.6 AUTOMATIC CYCLE RESTART


The system can resume machining at the beginning of the block where the program was interrupted or
N blocks before, even in case of repeat cycles, macros, subprograms, etc.
The system simulates the program to the block to be resumed and displays the position where the
axes should be to resume operation next to the actual axis position.
The simulation, and machining resuming, may be NORMAL (i.e. with complete graphic simulation of
the entire program) or FAST (i.e. without graphic view, for use only with CAD/CAM system generated
or digital programs).

4.6.1 NORMAL CYCLE RESTART


When the NORMAL CYCLE RESUME mode is selected, the system performs a graphic simulation of
the entire program. All the blocks, even those belonging to programs called by the main program (:),
are processed and displayed.
The NORMAL CYCLE RESUME procedure is:
1. Press the EXECUTE PROGRAM softkey in the MACHINE TOOL environment. The following
screen page will appear:

4-10

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

Select the programs with the mouse, the touch screen or the scroll up/down buttons and press OK.
The following menu will appear:

The cycle may resume at the beginning of the block where the program was interrupted (displayed in
the upper part of the screen with the EX... format) or N blocks before.
2. Press RESUME CYCLE. The following menu will appear:

The default restart mode is the NORMAL mode.


Press FULL RESTART to restart from the beginning of the last block.
Press PARTIAL RESTART to restart N blocks before. The following menu will appear:

Enter the number of blocks and press ENTER to confirm.


Only positive numbers and no other characters (N, etc.) are accepted.

User and Programming Manual - Part I

4-11

S4045 S4045P
4. Execution commands

The graphic display of the program starts. When it is over, the system displays the position where the
axis should be for cycle restart, the actual axis position and the following menu:

3. Press END SEARCH. The following screen page will appear:

4-12

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

4. Set the required M functions in MDI and press START each time to activate (e.g.: M3/M4 or
M13/M14, etc.).
5. Press RESTART The system will display error E92 (axis off position) if the axes are not positioned
correctly. Press REPOS. The co-ordinates of the axes, which are not positioned, will appear in the
top by the side in red and flashing.

6. Reposition the machine axes (one axis at a time) with the JOG buttons. The positioning speed is
controlled by the relevant potentiometer. Motion will stop automatically when the correct position is
reached. The correct axis position is stored by the control in the parameters P101, P102, P103,
etc. for the axes X, Y, Z, etc., respectively. Therefore, in the MDI mode machine axes can be
repositioned, one or more axes at a time, by entering a positioning instruction to the co-ordinates
XP101, YP102, ZP103, etc.
7. Press RESTART to resume processing. The following menu will appear:

8. Select the view type (list or drawing) and press START to resume the machining cycle.

User and Programming Manual - Part I

4-13

S4045 S4045P
4. Execution commands

The described operation sequence, the M functions entered and the axis repositioning are the
responsibility of the operator. To speed up repositioning, MDI with XP101 YP102 ZP103 is
recommended. This function offers the possibility of moving several axes rapidly at the same time.
The machine must be properly set up for resuming the cycle with the correct tool on the spindle and
the correct M codes enabled.
The system will flash an error signal if the axes have not been repositioned.
The system may check (according to the tool change management system implemented) whether the
tool in the spindle is correct but will not check whether the required M functions have been activated.
Proceed as follows to resume machining from a block after the one where the program was
interrupted:
Wait for the graphic simulation to finish. The following menu will appear:

Press SEARCH LINE, set the number of blocks forward (normally one at a time) and press ENTER.
Only positive numbers and no other characters (N, etc.) are accepted.
Setting a new block number or confirming the setting can repeat this operation.
Press END SEARCH and proceed as described above.

4.6.2 FAST CYCLE RESTART


When the FAST cycle restart mode is selected, the program simulation is executed in different ways,
depending on whether L functions (:) calling for other programs are present or not.
If no call to other programs exists, the FAST mode operates as the NORMAL mode without activating
the graphic simulation. All the blocks are read and processed but not drawn.
If the program contains calls to other programs the blocks of the main program are read and
processed, not drawn, while in the recalled program the system only reads the block from where the
machining has to restart. The previous blocks are skipped.
Therefore, the FAST mode shall be used only in case of very long programs, generated by CAD/CAM
or digital systems and just consisting of the co-ordinates of the points of the surface to be machined.
The program shall not be executed directly; it shall be recalled by another small program containing O,
T, S, F, M functions, initial positioning, possible figure reversals, scaling factors, etc.

4-14

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

Example:
O1
T1M6
F1200S2000M3
Z100R
X...YR
LNAME:
Z100R
M30
The procedure for FAST cycle restart is the same as for the NORMAL restart. In this case, press the
FAST function button.

If, upon completion of the search process, the system does not display all the co-ordinates for
processing (for example Y, Z and not X), this means that the final block of the search process does not
contain the missing co-ordinate and therefore a correct positioning of the X-axis is not possible.
Press the NORMAL function key and press SEARCH LINE, set one (or more blocks) and press
ENTER until the missing co-ordinate appears on the video (e.g. X).
This procedure may result in a cycle resumption starting more forward with respect to the point where
the program was interrupted. For this reason, it is advisable to use the PARTIAL RESTART function N
blocks before the interruption point. Otherwise, press BREAK and repeat the FAST cycle restart
operation anticipating resumption by a certain number of blocks with the PARTIAL RESTART function
key.

4.7 STORED SEARCH


The automatic procedure restarts the machining from the beginning of the last executed block or from
N blocks before.
The AUTOBLCK SEARCH function can be used to resume from any block set by the operator.
The AUTOBLCK SEARCH function can also be carried out in NORMAL and FAST mode.

User and Programming Manual - Part I

4-15

S4045 S4045P
4. Execution commands

4.7.1 NORMAL STORED SEARCH


The NORMAL STORED SEARCH procedure is the following:
1.

In MACHINE TOOL environment, press the EXECUTE PROGRAM softkey.


The following screen page will appear:

Select the programs with the mouse, the touch screen or the scroll up/down buttons and press OK.
The following menu will appear:

2. Press AUTOBLCK SEARCH. The following menu will appear:

a. Press SEARCH LINE, set the number of blocks from the beginning of the program and press
ENTER. This procedure can be used when the program contains repetitive cycles, connected to
subprograms, macro instructions, etc., reason for which it is not possible to know exactly the
program row where to start. The number of blocks run by the machine before the interruption is
shown in area A of the video, on the right after Ex
Only positive numbers and no other characters (N, etc.) are accepted.

4-16

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

b. Press SEARCH BLOCK, set the number N of the block or T of the tool for resuming the cycle
and press ENTER, if the program presents a sequential block structure, without repetitive cycles or
macroinstructions. Only positive numbers and no other characters (in addition to N and T) are
accepted.
The program graphic execution will begin. When it is over, the position where the axes should be for
cycle restart will be displayed.
To resume a cycle from a block after the one specified:
1. Press SEARCH LINE, set the number of blocks with respect to the previous resumption point and
press ENTER. Setting a new number of blocks or confirming the setting can repeat the operation.
2. Press END SEARCH to end. The following screen page will appear:

3. Set the required M functions in MDI and press START each time to activate (e.g.: M3/M4 or
M13/M14, etc.).
4. Press RESTART. The system will display error E92 (axis off position) if the axes are not positioned
correctly. Press REPOS. The co-ordinates of the axes, which are not positioned, will appear in the
top by the side in red and flashing.

User and Programming Manual - Part I

4-17

S4045 S4045P
4. Execution commands

5. Reposition the machine axes (one axis at a time) with the JOG buttons. The positioning speed is
controlled by the relevant potentiometer. Motion will stop automatically when the correct position is
reached.
The correct axis position is stored by the control in the parameters P101, P102, P103, etc. for the
axes X, Y, Z, etc., respectively. Therefore, in the MDI mode machine axes can be repositioned,
one or more axes at a time, by entering a positioning instruction to the co-ordinates XP101, YP102,
ZP103, etc.
Press RESTART to resume processing. The following menu will appear:

6. Select the view type (list or drawing) and press START to resume the machining cycle.
The described operation sequence, the M functions entered and the axis repositioning are the
responsibility of the operator. To speed up repositioning, MDI with XP101 YP102 ZP103 is
recommended. This function offers the possibility of moving several axes rapidly at the same time.
The machine must be properly set up for resuming the cycle with the correct tool on the spindle and
the correct M codes enabled.
The system will flash an error signal if the axes have not been repositioned.
The system may check (according to the tool change management system implemented) whether the
tool in the spindle is correct but will not check whether the required M functions have been activated.

4-18

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

4.7.2 FAST STORED SEARCH


The FAST STORED SEARCH procedure is similar to the NORMAL STORED SEARCH procedure.
Press the FAST function button in this case.

4.8 MACHINE EXECUTION BEGINNING WITH A BLOCK


To initiate a program execution that begins with a block that follows the first and completely ignores all
previous blocks, carry out the following:
1. Enter in the MACHINE TOOL environment using the touch screen or mouse. The following video
screen will appear:

User and Programming Manual - Part I

4-19

S4045 S4045P
4. Execution commands

2.

Press EXECUTE PROGRAM A list of catalogued programs for the drive selected
(D:\S4000\PARTPROG or A:\) and available in the chosen directory will appear. The choice of
drive and directory is to be carried out as in the program editor environment (see chap. 3.2)

3.

Select the desired program using the touch screen, mouse or up/down arrow keys. Press OK.
The following menu will appear:

4-20

User and Programming Manual - Part I

S4045 S4045P
4. Execution commands

4.

Press FROM. The following video screen will appear:

User and Programming Manual - Part I

4-21

S4045 S4045P
4. Execution commands

5. Set the block number or tool from which to start (example: N24 or T3) or any other string in the
program (all characters are accepted) and press RETURN. Operation done correctly will
appear in red text if the block has been found or alternatively Error: block not found should that
not be the case. Therefore press IN MACHINE. The following video screen will appear:

6.

4-22

Select the type of execution desired (AUTO or SEMIAUTO), select, if desired, the LIST or DRAW
and press START to initiate execution.

User and Programming Manual - Part I

S4045 S4045P

PART II

PROGRAMMING

User and Programming Manual - Part II

S4045 S4045P

User and Programming Manual - Part II

S4045 S4045P
1. General

1. PROGRAMMING
Four programming levels are provided:
BASIC programming
PROGET2 programming
LOGICAL MATHEMATICAL programming
ADVANCED programming (macros).
The first level, BASIC programming, uses standard ISO codes to define various types of movements
with linear, circular or helical interpolation (G0, G1, G2, G3) and T, S, F, M codes to define tools, tool
parameters and fixed cycles for drilling, reaming, tapping (G81, G83, G84) etc.
To program an interpolation in BASIC programming it is necessary to specify the coordinates of the
final point for each profile section. For circular interpolation it is also necessary to provide the circle
center coordinates.
These parameters are not required for drawing a part either with a drafting machine or on a CAD
system and therefore they do not normally appear in the part drawings.
Designers use a ruler, protractor, compass and template in order to draw the proper sequence of basic
geometric elements (points, straight lines, circles) or they can use equivalent CAD tools. The
information not provided in the drawings is usually calculated by means of a programming support
system on an external computer.
The second level, PROGET2, is the ideal tool for plane geometry requirements. This geometric
programming language, embedded in the control, eliminates the need for external devices.
PROGET2 uses the information provided by the part drawing in order to automatically calculate all the
necessary tangent and intersection points between straight lines and circles. It also applies tool radius
compensation according to the relative position of the tool and the part.
PROGET2 is based on an oriented geometry in which straight lines and circles are defined not only by
point coordinates, but also by a direction that normally coincides with the machining direction.
This avoids the introduction of discriminators to choose the desired solution from the various
mathematical possibilities.
PROGET2 consists of five basic instructions. It is easy to learn and is part of the standard NC.

User and Programming Manual - Part II

1-1

S4045 S4045P
1. General

PROGET2 views the profile as a series of straight lines, circles and radii.
Cutter entry/exit into/from a profile may be programmed along a straight line perpendicular to the
first/last programmed entity or with a half-circle tangent to the first/last programmed entity. A profile
may also start or end at the intersection between the first and second programmed entity or between
the last and second-last programmed entities.
There are five PROGET2 G-code functions that simulate drawing tools.
G20
G21
G13

Compass (for circles of known center and radius)


Circles templates (to form radii or arcs of known radius)
Ruler and protractor (for straight lines forming a known angle, passing through a point or
tangent to a circle)
G10 / G11 Ruler without protractor (straight lines resting on two points or circles).

1-2

User and Programming Manual - Part II

S4045 S4045P
1. General

PROGET2 uses the following codes and formats:


G

Followed by two digits, specifies the type of geometric definition.

X or Y

Specifies point coordinates.

Specifies circle radius.

+-

(+) specifies a CCW circular path and may be omitted. (-) specifies a CW circular path
and must be used.

Specifies the angle formed with the axis of the positiv abscissa.

Discriminator between diverse possible solutions in the various definitions.

The third level, LOGICAL MATHEMATICAL programming, exploits the control powerful calculation
capabilities to generate complex macro instructions, shapes and grids.
This level offers additional features, such as parametric calculations, internal and external subroutine
calls, repeat cycles and conditional branches.
The fourth level, ADVANCED programming, makes it possible to program special macros: circular,
polygonal and profiled pocket milling cycles, rotations/offsets in space, machining on inclined planes,
profiles on cylindrical surfaces, measuring cycles with touch probes, etc.

User and Programming Manual - Part II

1-3

S4045 S4045P
1. General

1-4

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

2. BASIC PROGRAMMING
A program consists of a sequence of information blocks.
A block can contain different functions prefaced by an address (non-numeric character) followed by a
number. Example X10.3 F500
If a block contains more than 70 characters it needs to be divided into more lines.
The character > (greater than) at the end of a line / function allows the continuation of the block on the
following line.
A block cannot include two codes with the same address (for example two G-codes or two M-codes
are not permitted).
A block can contain comments or other data intended for information only, not for execution. Such
comments must be preceded by the character [ (an open square bracket).
Example:

[ PROGRAM CODE 0125/66A


S4045 M13 F250 [technological tool parameters
X-124.55 Y100.21 Z5 R

The Export versions (distinguished by the letter E after the version number), allow a maximum
interpolation of 4 axes, therefore it is not possible to program more than 4 axes in a block.
Es. X100Y50Z200A0
For example, in the case of programming X100Y50Z200A0B90, the NC will indicate an error.
The dynamic TCPM functions (G748 and G749) do not allow the programming of more than one axis.
Es. G748C
G749A
For example, in the case of programming G748BC or G749AB, the NC will indicate an error.

2.1 G-CODES
G codes are preparatory functions that prepare the system or the machine tool for the operations to
follow. They are composed of the letter G followed by 2 (in this programming environment) or 3 digits
that may be valid only in the block in which they are programmed or until they are cancelled by another
function. Those used in this programming environment are listed as follows.
G00
G01
G02
G03
G04
G09

axis rapid positioning.


linear interpolation.
CW circular/helical interpolation.
CCW circular/helical interpolation.
timed dwell (pause time is specified by the K parameter in units of tenths of a second).
deceleration at block end.

User and Programming Manual - Part II

2-1

S4045 S4045P
2. Basic programming

G14
G15
G16
G17
G18
G19
G25
G26
G30
G31
G40
G41
G42
G43
G44
G48
G49
G50
G51
G52
G53
G54
G55
G56
G57
G58
G59
G60
G61
G62
G67
G68
G69
G70
G71
G74
G75
G76
G80
G81
G82
G83
G84
G85
G86
G88
G89
G90
G91
G92
G93
G94
G95

2-2

cancels G15.
enables the slave axes to be linked with the respective master axes.
axis exchange.
plane selection (XY is the machining plane and Z is the perpendicular axis).
plane selection (ZX is the machining plane and Y is the perpendicular axis).
plane selection (YZ is the machining plane and X is the perpendicular axis).
G17 G18 and G19 must be programmed alone in one block.
cancels G26 (must be programmed when machining surfaces described by points).
axis reversal compensation (the compensation value is a machine parameter).
cancels G31 and re-establishes deceleration at block end.
continuous motion mode with automatic feed adjustment.
exit from profile and cutter compensation disable (cancels G41/G42).
enables tool radius compensation, tool left of profile.
enables tool radius compensation, tool right of profile.
paraxial radius compensation (compensation is added to the co-ordinate).
paraxial radius compensation (compensation is subtracted from the co-ordinate).
recalls and enables tool length compensation.
defines tool for radius compensation.
cancels G51 and disables the secondary origin defined by the last G51.
offset/rotation of the co-ordinates system on the plane.
offset of the co-ordinates system on the plane.
cancels mirror machining.
X-mirror machining.
Y-mirror machining.
Z-mirror machining.
XY-mirror machining.
ZX-mirror machining.
YZ-mirror machining
cancels G61.
scaling factor.
type of co-ordinates for the definition of circle center.
cancels G68/G69
static TCPM for rotary tables.
static TCPM for rotary heads.
inch system programming with CNC metric configuration.
metric system programming with CNC inch configuration
rounding off in the 180 range for rotary axes.
Cartesian co-ordinate programming (cancels G76).
polar co-ordinate programming.
cancels fixed cycles.
drilling / spot-facing fixed cycles.
deep mixed drilling cycle.
deep drilling fixed cycle.
tapping fixed cycle.
reaming fixed cycle.
boring fixed cycle.
spaced plane drilling fixed cycle.
differentiated drilling fixed cycle.
absolute co-ordinate programming.
incremental co-ordinate programming.
F feedrate override.
F - feedrate defined as invers of block execution time.
F - feedrate-in mm/minute or inches/minute (enabled at machine start-up).
F - feedrate-in mm/revolution or inches/revolution.

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

G00, G02, G03, G09 are non modal and valid only in the block in which they are programmed.
With the exception of G17, G18, G19 and G31 all G-codes may be cancelled by an M30 function or a
command.
All G-codes are usually enabled at the beginning of the block in which they are programmed.
G04 establishes a dwell at block end after the programmed move has been completed.
In the G00, G01, G02, G03, G04 and G09 codes the zero may be omitted (for example G0, G1 etc.).

3-digit G-codes
3-digit G-codes are used for advanced programming or macro-instructions (see chapter 4) or special
functions (see chapter 5).

2.2 F-CODE
The F-code defines the machining feedrate and is programmed with the letter F followed by 3 digits
that express the actual velocity.
Programmed after G94 the speed F is defined in mm/min or in inch/min.
Programmed after G95 the speed F is defined in mm/rev or in inch/rev.
Programmed after G93 the speed F is defined as inverse of the time required to cover the trajectory
programmed in a block. The F to be programmed is equal to the speed desired along the trajectory
divided by the length of the trajectory, that is:

F=

Speed (mm/min. or inch/min.)


Space (mm or inch)

The programmed feedrate values can be changed by the G92 or G61 functions.
G92 defines a feedrate that will override all F functions programmed in the subsequent blocks.
The programming format is:
G92 F...
G92 can be cancelled by programming G92 alone in one block or G93, G94, G95 followed by the F
function.
G61 establishes a scaling factor that can be applied to co-ordinates as well as to feedrate values.
The programming format is:
G61 F...
In this case, the feedrate values programmed in the subsequent blocks will be multiplied by the
F - scale factor defined in G61.

User and Programming Manual - Part II

2-3

S4045 S4045P
2. Basic programming

The G95 function is modal and is not reset by the M30 function.
It is therefore necessary to program the G94 function to go back to the feed speed expressed in
mm/min or inch/min.

2.3 S-CODE
This function defines the spindle rotation speed. It is programmed with the letter S followed by 5
digits, up to 65535. Spindle speeds are programmed in rpm.
Example:
S1500 specifies a spindle speed of 1500 rpm.

2.4 M-CODES
M-codes define miscellaneous functions. The code format consist of the letter M followed by 2 to 4
digits (from M00 to M9999).
The M-codes described in this section are only examples of the most frequently used M functions.
Machine tool builders can either use these codes as suggested, or implement their own M-codes
through the built-in PLC in order to satisfy specific application requirements.
The machine tool builder must provide users with the list and meaning of the M-codes implemented on
the machine.
M00
M03
M04
M05
M06
M07
M08
M09
M10
M11
M13
M14
M19
M30

2-4

program stop: resets all active M codes.


CW spindle on.
CCW spindle on.
spindle off.
tool changer.
secondary coolant on.
primary coolant on.
coolant off.
axis lock.
axis unlock.
If you want to unlock only certain axes, program M11 followed by the name of the axes you
want to unlock (ex. M11XY).
CW spindle and coolant on.
CCW spindle and coolant on.
spindle orientation.
end of program: resets active M-codes and positions the cursor at program start.
It must be programmed alone in the last program block, before any subroutines.

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

M45
M46
M48
M49

cancels M46 and restores axis control.


specifies which axes are to be controlled by the system; the others are abandoned and may be
managed by external systems such as tracers.
Example: M46XY: the X Y axes are under control, the Z axis is free.
cancels M49.
allows the programmed rapid rate to be controlled by the feedrate potentiometer; it can be
cancelled with the M48 and M30 functions.

In codes M00 through M09 the zero may be omitted.


The following table shows how the M functions are enabled, if programmed together with an axis
movement, and indicate if they are executed by the NC or the PLC.

CODE

PROGRAMMED
AT BLOCK
BEGINNING

M00 - M01 - M02


M03
M04
M05
M06
M07 - M08
M09
M10
M11
M12
M13
M14
M15 - M18
M19
M20 - M29
M30
M31 - M39
M40 - M44
M45
M46
M47
M48
M49
M50 - M8999
M9000 - M9999

PROGRAMMED
AT BLOCK
END

EXECUTED
BY THE NC

X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X

FUNCTION DESCRIPTION
Program stop
Clockwise spindle
Counterclockwise spindle
Stop spindle
Tool changer
Coolant ON
Coolant OFF
Axes locked
Axes unlocked
Synchronization
Clockwise spindle and coolant
Counterclockwise spindle and coolant
Not assigned
Spindle orientation
Not assigned
End of program
Not assigned
Range change
Restores axis control
Disables axis control
Not assigned
Inhibits override to rapid rate
Applies override to rapid rate (default)
Not assigned
Not assigned

2.5 H-CODES
Auxiliary H-codes are similar to M-codes and can be programmed between H0 and H9999.
H-codes are defined via PLC. Therefore, the machine tool builder must provide users with the list and
meaning of the H-codes implemented on the machine.

User and Programming Manual - Part II

2-5

S4045 S4045P
2. Basic programming

2.6 O-CODES
O-codes (from 01 through 099) invoke the origins defined during the machine homing sequence.
The O0 function disables the origins and displays the co-ordinates referred to machine zero. The O1
function recalls, after an O0, the last programmed origin.
For Machine Tools with manual tool change. If at initialization the system has been configured for a
tool change TYPE S1200, the origins defined during the homing procedure are only 10 and they are
recalled with the T functions from T0 to T9.
The T99 function disables the origins and displays the co-ordinates referred to the machine zero. The
T1 function, programmed after of a T99, recalls the last programmed origin.

2.7 T-CODES
The T-codes program automatic or manual tool changes. The digits following the T functions specify
the tool number to be recalled.
Besides the tool, the T-codes also recall the tool parameters stored in the tool table (length/radius
compensation etc.)
The tool change mode (manual or auto, random or not, with or without tool changer) may vary
according to machine specifications. The machine tool builder shall provide users with all the
necessary information for programming these codes.
Program G48I0 to disable the active length compensation.

2.8 MACHINING PLANE AND PERPENDICULAR AXIS


Allowable axis names are: X, Y, Z, A, B, C, U, V, W.
Any pair of axes can be the machining plane to which the control applies cutter compensation. The
third axis defines the axis perpendicular to the machining plane and executes fixed cycles. Tool length
offset is applied to this third axis.
There may be other axes related to these three, but no compensation is applied to them.

Main machining planes


The three main machining planes can be defined with G17, G18 or G19.
G17:

XY machining plane, Z perpendicular axis.


X is the abscissa on the Cartesian plane and Y is the ordinate.

G18:

ZX machining plane, Y perpendicular axis.


Z is the abscissa on the Cartesian plane and X is the ordinate.

2-6

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

G19:

YZ machining plane, X perpendicular axis.


Y is the abscissa on the Cartesian plane and Z is the ordinate

To program parts with G18 and G19 it is necessary to rotate the drawing so that ZX with G18 or YZ
with G19 becomes the horizontal plane. Conventional signs must be observed. The resulting program
is compatible with a program for G17.
Values to the right of the co-ordinates zero are positive and values to the left of the co-ordinate zero
are negative. Vertical axis values above zero are positive, below zero they are negative.
The angles for polar co-ordinates (or those formed by straight lines in PROGET2) will be positive if
measured counter clockwise and negative if measured clockwise. Degree fractions must be expressed
in decimal form. Example:
10 30 = 10.5
10 40 30 = 10 + 40/60 + 30/3600 = 10.675
To define a plane different than XY, ZX or YZ it is necessary to program G17 followed by the axis
names in the following sequence: abscissa, ordinate and perpendicular axis.
For example; G17 UVC defines a co-ordinate system where U is the abscissa axis, V is the ordinate
axis and C is the perpendicular axis.
G17, G18 and G19 must be programmed alone in a block.

2.9 MOTION CODES AND AXIS CO-ORDINATES


To program an axis move it is necessary to write the axis name followed by the destination coordinates.
Allowable axis names are: X, Y, Z, A, B, C, U, V, W.
Two axes belonging to different groups may have the same name.
Co-ordinates values can be positive or negative (the + sign need not be programmed); the decimal
separator is the point.
Example: X-3.5 Y1234.353 Z0
Motion codes are G00, G01, G02 and G03.

2.9.1 PROGRAMMING IN ABSOLUTE CO-ORDINATES


The G90 function, enabled at power up, selects the absolute programming mode.
Co-ordinate references are as follows:
The co-ordinate values on the machining plane are referred to the part origin enabled at that time
(programmed with the O function: may be moved using the functions of rotation/offset G51 and
G52).

User and Programming Manual - Part II

2-7

S4045 S4045P
2. Basic programming

The co-ordinate values of the axes perpendicular to the machining plane are referred to the length
offset compensation enabled at that time (programmed with the T function (tool change) or with the
G48 function).
To program moves with respect to the machine zero rather than the part zero, it is necessary to
program the O0 function before the motion block. This disables all the current origins and the enabled
length compensations. The O-1 function recalls the last programmed origin before O0.

2.9.2 PROGRAMMING IN INCREMENTAL CO-ORDINATES


The function G91 enables the incremental programming mode. All the following moves are referred to
the position of the axes in the previous block. This also applies to the center co-ordinates I, J, K in the
G2 and G3 functions.
To restore the absolute programming it is necessary to program the G90 function.
It is possible to program incremental moves by adding the I (incremental) function after the coordinates of the axes that are to be moved incrementally. This will allow the programming of both
absolute and incremental moves in the same block.
It is not necessary to activate and cancel the incremental programming with the G91 and G90
functions since the I function is valid only in the block and for the axis selected.
Example:
X10 Y-50 Z-5 I

moves the axes X and Y to absolute co-ordinates 10 and -50 and the Z
axis to -5 mm with respect to its previous position.

Note: After the O, T, G51, G52 and G751 functions always program an absolute co-ordinate before
an incremental.
Do not use an incremental program with the geometric language PROGET2 and with radius
compensation.

2.9.3 PROGRAMMING IN POLAR CO-ORDINATES


The G76 function allows programming in polar co-ordinates. It is used for programming positions on a
circumference of known radius.
The abscissa of the machining plane (X in G17, Z in G18, Y in G19) specifies the radius of the circle.
The ordinate (Y in G17, X in G18, Z in G19) represents the angle referred to the abscissa. Positive if
counter clockwise, negative if clockwise. Degree fractions must be expressed in decimal form (ex. 10
30 = 10.5)
The center of the circle is the current part origin; this may be moved using the G51 and G52 functions.
To restore Cartesian co-ordinates program the G75 function.

2-8

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

Example:
The following blocks program four positions; each at 45 degrees in each quadrant of a circle of radius r
= 100:
G76 X100 Y45
Y135
Y225
Y-45
G75

100

To program incremental polar co-ordinates it is necessary to add the I function after the co-ordinates. If
used in a repeat cycle this method is particularly convenient for drilling equally spaced holes on a
circumference.
Example:
The program to drill 36 holes placed on a circumference of radius 100 with an angular increment of 10
degrees and a starting angle of 45 degrees is:
G76 X100 Y45
L=1
Y10 I
L1 K34
G75

[first point, radius 100, angle 45


[beginning repetitive cycle
[10 degree increment
[repeat 34 times
[restores Cartesian co-ordinates

2.9.4 RAPID MOVES


The function G00 (G0) or, alternatively, the letter R (rapid) specifies a rapid move.
Example: X250.7 R or G0 X250.7 execute the move at the rapid rate.
These rapid codes (G0 or R) are valid only in the block in which they are programmed.
If neither R nor G0 is present the moves will be performed at the last programmed feedrate (F).

2.9.5 LINEAR INTERPOLATION


The G01 (G1) function programs a linear interpolation, i.e. co-ordinated moves of all the axes
programmed in the block at the programmed feedrate.
Unless another interpolation mode (such as G0 or R for rapid, G2 or G3 for circular or helical
interpolation) has been programmed, G1 is the default mode and may be omitted.
A linear interpolation move is programmed by specifying the final position.
Example: X100 Y100 Z100

User and Programming Manual - Part II

2-9

S4045 S4045P
2. Basic programming

2.9.6 CIRCULAR INTERPOLATION


The G02 (G2) and G03 (G3) functions specify clockwise(G2) and counter clockwise(G3) circular
interpolations.
The circular move is carried out on one of the 3 co-ordinated machining planes, XY or ZX or YZ at the
machining feedrate or in rapid (if R is programmed in the block).
The clockwise or counter clockwise sense is established by looking at the plane of interpolation from
the positive side of the axis perpendicular to the plane itself.
Any circular interpolation must be programmed after the axes have been positioned on the starting
point of the arc. The functions G2 and G3 are non modal and valid only in the block in which they have
been programmed.

A circular interpolation is defined in the following way:


select G2 or G3 to define the interpolation direction.
program the final absolute co-ordinates of the arc.
program the absolute co-ordinates of the center with the address I for the X-axis, J for the Y-axis
and K for the Z-axis.
Example:
G2 X...Y...I...J...
G3 X...Z...I...K...
G2 Y...Z...J...K...
The co-ordinates of the circle center may be absolute, i.e. referred to the part zero, or incremental, i.e.
referred to the starting point of the circle, according to system configuration.
Independent of the configuration the G62 function allows the selection of the programming mode.
G62 K1:
G62 K2:

in absolute co-ordinates
in incremental co-ordinates.

To program circular interpolations for axis pairs other than XY, ZX and YZ, the machining plane must
be selected with G17 followed by the name of 3 axes representing respectively the abscissa, the
ordinate and the perpendicular axis of the new plane.
The circle centers on the three axes must always be programmed with the addresses I, J and K
respectively.
A 360-arc is the maximum arc that can be programmed.
To program a complete circle it is necessary to specify only the center co-ordinates. The final point
may be omitted.

2-10

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

Example:
X50 Y0
G3 I0 J0
The system can also execute circular interpolations with any orientation in space by means of the
function of rotation/offset in space. See chapter 5 - Advanced programming.

2.9.7 HELICAL INTERPOLATION


A circular interpolation block makes it possible to program other axes in addition to the three defined
Cartesian axes.
This feature allows circular interpolation of two axes simultaneously with other linear or rotary axis
movements.
Example: G3 X...Y...I...J...Z...A...B...C...
Helical interpolation can be obtained by programming a circular interpolation and the movement of the
axis perpendicular to the interpolation plane.
Example: G3 X...Y...I...J...Z...
In a single block it is possible to program up to one complete helical turn. To obtain more turns it is
necessary to program a repeat cycle.
The following instructions program, for example, a four turn helical interpolation with a pitch of 10 and a
radius of 50:
X50 Y0 R
Z2 R
Z0
L=1
G3 I0 J0 Z-10 I
L1 K3
The circular and helical interpolation functions G2 and G3 are enabled only in the block in which they
are programmed.

User and Programming Manual - Part II

2-11

S4045 S4045P
2. Basic programming

2.10 CUTTER COMPENSATION


Cutter compensation is enabled by G41 (tool left of profile) or G42 (tool right of profile).
G49 or the T tool change function recalls the cutter compensation value.
Always program function G49 to use the automatic cycle resuming (Chapter 4.6 - Part I) and stored
search functions (Chapter 4.7 - Part I).
The programming formats for the G49 function are:
G49 KnSpecifies cutter compensation n.
G49 Kn I...
Specifies cutter compensation n with a stock allowance equal to I.
G49 I...
Specifies a tool radius equal to I.
The programming format for G41 and G42 is as follows:
G41/G42 [I1] [Q...] [D0=...] [D1=1] [D2=1]
where:
I1

a linking radius equal to mill radius is automatically applied on convex edges.

Q...

control of tool direction reversal resulting from cutter compensation. It may assume the
following values:
Q0 displays an error message (ERR 95) and stops execution.
Q1 executes circles or straight lines in the opposite direction (default value).
Q2 executes straight lines in the opposite direction (circles will not be executed).

D0=

An alternative to the Q parameter. By programming D0=1 a collision control of the tool (look
ahead) with the profile is enabled. This eliminates the profile elements that, because of the
radius offset, would cause a change of tool direction and possible gouging.
To test for gouging the default amount of look ahead is 60 blocks. This number can be
modified by programming it directly into the D0 parameter (for example, D0=30, D0=200, etc.).
The first and last profile element must be defined so that they do not change direction,
regardless of the radius offset.

2-12

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

D1=1

With the D0 parameter it is necessary to program this parameter to handle those closed
profiles that begin and end in one point. With this parameter the beginning and the end of the
profile is not on the perpendicular of the elements in that point, but on the bisector of the angle
formed by the two elements in that point. The profile remains closed.
Profile start point
without D1=1
(perpendicular to P1)

Profile end point without D1=1


(perpendicular to P1)
Beginning and end
point of the profile

P1

P1

Beginning and end


point of profile on the
bisector with D1=1

D2=1

This parameter allows the storing of the profile elements that have not been machined
because of the collision control into a program resident in system memory. The program
name is defined by the G666 function with the format G666 LNAME:
The G666 function shall be programmed after the G40 (profile end). If a program contains
several profiles, the G666 function shall be programmed after the last profile.
This storing procedure is possible only in the GRAPHIC EXECUTION mode (not in EDIT or
in PROGRAM EXECUTION on the machine).

G41/G42 must be programmed alone in one block followed by the I1 code and the Q parameter.
For further details please refer to chapter 3.5 - Profile definition.
The move to the first profile point must be linear, at feed or rapid rate. On this point the compensation
operates on the perpendicular to the first profile element.
Cutter compensation is disabled by programming G40 alone in the block following the last block of the
profile.
The last profile element may be either linear or circular. On the last profile point the compensation
operates on the perpendicular to the last profile element.

User and Programming Manual - Part II

2-13

S4045 S4045P
2. Basic programming

Example:
G49 K1
G41
X-50 Y15
X-30 Y35
X20 Y40
G2 X37.32 Y30 I20 J20
G40

2-14

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

2.11 AUTOMATIC FEED ADJUSTMENT


The G31 function, enabled at system power-up (default), causes the control to look ahead along the
profile for 256 blocks after the one being processed.
The programmed feedrate is automatically modified, based on the machine servomechanism
characteristics, to take into consideration the accelerations and decelerations required by the
trajectory.
The feed rate is modified according to the radius of curvature of the trajectory.
In correspondence of the edges the feedrate is reduced to prevent anomalous axis stress.

The programming format is:


G31 [I...] [Q...] [D14=...] [D4=...]
where:
I...

minimum speed

Q...

multiplication factor for machine acceleration (if not programmed: Q=1)

D14=... corner rounding coefficient (between 2 and 6). The higher the value of D14, the softer the axis
movement but the greater the rounding.
Program an average value, e.g. D14=4.
D4=... control of the radius of curvature on profiles defined by points. If the control is enabled, the
system reduces speed in relation to the radius according to the formula
F= (ACC. x RADIUS x 0.5) (if not programmed: D4=1)
D4=1 : control on.
D4=0 : control off.
The G30 function cancels G31 and introduces a forced deceleration at the end of each block.
The G09 function introduces a forced deceleration at the end of the block in which it has been
programmed.

User and Programming Manual - Part II

2-15

S4045 S4045P
2. Basic programming

2.12 ROTATION / OFFSET OF WORK CO-ORDINATES


Within a program G51 provides the ability to define an unlimited number of secondary work coordinates that may be offset and/or rotated with respect to the current part origin or to the last
programmed secondary origin.
It is also possible to rotate the complete program about any point.

The programming format is as follows:


G51 [X...][Y...][Z...][J...] [K...]
with:
X...Y...Z...

co-ordinates of the new origin with respect to the enabled origin


or
point about which the program is to be rotated

J...

angle between the X axis of the new reference system and the X axis of the primary
system. It can be positive (CCW) or negative (CW).
or
angle of rotation for the program

K...

K1 : rotation/offset with respect to the part origin (default)


K2 : rotation/offset with respect to the last programmed secondary origin
K3 : rotation/offset with respect to the programmed point

G50 disables the secondary origin and restores the primary part origin.

2-16

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

Examples:

G51 X40 Y24 J45


X23 Y10
....

G51 X40 Y10 J15


G51 X20 Y20 J12 K2
X25 Y15
....

G51 X25 Y40 J45 K3


X5 Y5
X25
Y40
X5
Y5
....

The rotate/offset function is also used in the G18 and G19 planes with the following format:
G51 Z...X...Y...J...
G51 Y...Z...X...J...

for the plane Z X (G18)


for the plane Y Z (G19)

The rotation occurs on the active plane (X Y in G17, Z X in G18, Y Z in G19).


G52 performs offsetting only of the current part origin.

User and Programming Manual - Part II

2-17

S4045 S4045P
2. Basic programming

The programming format is as follows:


G52 [X...][Y...][Z...]
with:
X...Y...Z...

co-ordinates of the new co-ordinate system origin measured from the current origin.

G52 can be cancelled by programming G52 alone in one block.


The offset/rotation of the co-ordinate system both with G51 and G52 may be programmed in an
incremental mode by writing the I function after the XYZ co-ordinates or the J angle.
Example: G51 J45 I
In this case the origin will be displaced from the last programmed origin rather than from the current
part zero. This feature can be used in conjunction with a repeat cycle to perform cuts separated by a
constant pitch on a linear or angular path.
Both G51 and G52 are used for offsetting co-ordinates but G51 must be used for rotation and offset
purposes.
G51 and G52 may be programmed together in the same program. G52 is always applied after G51
and will offset a system that has been already rotated and offset with G51.
A program containing the G52 and G51 functions can be again rotated/offset by programming the
G751 function (see chapter 5.11).
WARNING!
After an origin shift through G51 or G52 functions, it is always necessary to program in the
same block both axes of the working plane (ex: X...Y... for G17, Z...X... for G18, Y...Z... for G19)
to rightly confirm the offset point.
This rule is valid also at the end of the use of the origin shift functions, that is after a G50 or
G52, single or in block: always program both axes of the working plane in the same block (ex:
X...Y... for G17).

2.13 SCALING
The function G61 applies a scale factor to the programmed co-ordinates.
To apply the same scale factor to all the axes program G61 followed by the scale factor with the K
parameter.
Example:
G61 K1.015
With this block a 1.5% scale factor is applied.
To apply a different scale factor to each axis program G61 followed by the axis name and the scale
factor.
Example:
G61 X1.015 Y1.015 Z1.02
A 1.5% scale factor is applied to the X, Y axes and a 2% to the Z axis.
G61 will be cancelled by G60.
The same scale factor can also be applied to all three axes when a profile is made up of straight lines
and circles. If cutter compensation is enabled the scale factor will be applied to the profile after the
compensation.
In this case G49 must be programmed with a radius that is the tool radius divided by the scale factor.
If a G51 offset/rotation function has been programmed, the control first rotates and offsets the profile
and then applies the scale factor to the secondary origin.

2-18

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

If a G52 offset function has been programmed, the control first applies the scale factor and then offsets
the profile. This means that the scale factor is not applied to the secondary origin.
It is possible to apply a scale factor to the feedrate programmed with the function and apply a scale
factor to the advancement speed of axis movements perpendicular to the working plane (Z for G17, Y
for G18, X for G19) using the Q parameter.
It is also possible to apply another scale factor to the quick speed with the J function.
Example:
G61 F.8 All the F functions met in the program will be multiplied by 0.8.
G61 Q.5 All movements of the mandrel axis are carried out at F as programmed divided by 2.
G61J.2 All rapid motions are performed at the rapid speed set in the CNC setup data multiplied by 0.2.
WARNING!
After the G61 function for the scale factors, it is always necessary to program both axes of the
working plane in the same block (ex: X...Y... for G17, Z...X... for G18, Y...Z... for G19) to rightly
confirm the point.
This rule is valid also at the end of the use of the scale factor, that is after a G60: always
program both axes of the working plane in the same block (ex: X...Y... for G17).

2.14 MIRROR MACHINING


These codes allow mirror machining by switching the sign of the programmed co-ordinates.
The available options are as follows:
G54
G55
G56
G57
G58
G59

X-mirror machining (switches the sign of the X co-ordinates)


Y-mirror machining (switches the sign of the Y co-ordinates)
Z-mirror machining (switches the sign of the Z co-ordinates)
XY-mirror machining
ZX-mirror machining
YZ-mirror machining

Mirror machining can be disabled with G53.


If a G51 rotation/offset function has been programmed, the control first rotates and offsets the profile
and then applies the mirror function. Mirroring is therefore referred to the primary part origin.
If a G52 offset function has been programmed, the control first applies mirroring and then offsets the
profile. As a result, mirroring will be referred to the secondary origin defined by G52.
In programs made up exclusively of linear interpolations, such as programs generated by digitizing
systems or 3-D programming utilities, it is possible to mirror co-ordinates by applying a -1 scale factor
to the axes.
Example:
G61 X-1 Y-1 Z-1

programs XYZ mirror machining.

WARNING!
We suggest you to insert the positioning of ALL axes (that are involved in the machining) in
the original program you intend to mirror in order to get a right working of the mirror function
This rule is valid also at the end of the use of the mirror functions, that is after a G53: always
program both axes of the working plane in the same block (ex: X...Y... for G17).

User and Programming Manual - Part II

2-19

S4045 S4045P
2. Basic programming

2.15 FIXED CYCLES


The available fixed cycles comprise:
G81: drilling or spot-facing cycle with or without dwell for chip breakage and with a programmable
dwell at the bottom of the hole.
G82: deep mixed drilling cycle.
G83: deep drilling cycle with tool retract for chip discharge.
G84: tapping cycle.
G85: reaming cycle with a programmable dwell at the bottom of the hole.
G86: boring cycle with a programmable dwell at the bottom of the hole and return with spindle
stopped.
G88: spaced plane drilling with a programmable dwell at the bottom of the hole.
G89: differentiated drilling cycle.
Fixed cycles are enabled by programming the above G-codes. They can be disabled by G80, M30 or
another G-code specifying a different type of motion or another fixed cycle.
Fixed cycles must always be disabled before a tool change.
When a fixed cycle is enabled the programmed cycle is executed each time the control processes a
block containing axis co-ordinates.
While a fixed cycles is active it is possible to change the co-ordinates of the bottom of the hole and the
cycle parameters (I, J, Q, K). They will be operative in the block in which they are programmed and in
the subsequent blocks.
If positioning co-ordinates are not specified in the block that enables the cycle or re-defines the cycle
parameters, the cycle will not be executed. It will be executed when the control processes a block that
contains new positioning co-ordinates. Conversely, to execute the fixed cycle, specify D9=1.
This rule does not apply to G88 since this cycle does not allow moves in the machining plane between
two subsequent cycles.
If the F... function is not specified, the last programmed F outside the cycle will remain active.
The machining axis in a fixed cycle can be:
Z for the XY machining plane (G17)
Y for the ZX machining plane (G18)
X for the YZ machining plane (G19).
The programming format for the different fixed cycles described in this chapter is always referred to the
drilling axis Z.

Fixed cycle parameters


Fixed cycles use a series of parameters that are common to most of them. These parameters are:
I
J
Q
K

depth increment
start position for drilling axis
drilling axis clearance plane (by default, Q=J)
dwell in tenths of a second.

Further details on these parameters may be found in the description of the single cycles.
In the following illustrations the dotted lines represent rapid moves and the solid lines moves at
feedrate.

2-20

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

2.15.1 DRILLING OR SPOT FACING CYCLES


G81 will program a drilling or spot facing cycle with or without dwell for chip breakage and with a
programmable dwell at the bottom of the hole.
The programming format is:

XY
J

XY

Q
I

Q
J

G81

Z...J...[I...][Q...][K...][F...][X...Y...]
[D8=][D9=1][D10=][D11=]
[D13=]

Dwell K

I
Dwell K

I
Dwell K

Dwell K

A typical G81 cycle would include the following steps:


1. Rapid move to the X...Y... position
2. Z rapid move to the start position defined by J...
3. Possible lead-in (D11=...) from J... at speed limited by parameter D13=... ( F*D13) for centering.
D11=I is overridden if D11 is higher than I... (is not programmed, D11=0 and D13=0.7).
4. Drilling at the programmed feedrate F... with :
possible stop after each increase equal to I... mm (calculated as an absolute value starting
from plane J... without considering the possible lead-in D11), for a time equal to K... in tenths
of a second (specified with up to three digits)
or with:
possible detachment of D10=... mm to be carried out rapidly after each performed increase I...
(default D10=0, waiting time K is ignored)
to reach Z... and possibly stop for K... tenths of a second.
If the I parameter is not specified the drilling operation is performed with no dwell for chip breakage.
If the K parameter is not specified the default dwell time is zero.
5. Rapid return to the J... (or Q if specified) plane with spindle on. The J parameter defines the plane
on which all subsequent XY moves between drilling cycles will occur. The rapid speed can be
reduced by programming parameter D8, scale factor with values between 0 and 1 (D8=1 by
default).

User and Programming Manual - Part II

2-21

S4045 S4045P
2. Basic programming

2.15.2

DEEP MIXED DRILLING CYCLE

The function G82 is used to drive the bit for deep drilling operations by subdividing the working cycle
into three phases. The first part of the hole is a centering cycle G81, the second part of the hole is
drilling cycle with increases to break chip G81 and the third is a deep drilling cycle with chip discharge
G83.
The various phases can be selected by the programmer.
Program format is:
Q

G82
XY

Z...J...I...[Q...][K...][F...][X...Y...][D0=...]
[D7=1][D8=][D9=1][D10=...][D11=...]
[D12=...][D13=...][D14=...]

J
F*D13

D11
I
D10
I

D10
I

D12

D0
I

D0
I*D14

D0
I*D14

D0
I*D14

The deep mixed drilling cycle consists of the following phases:


1. Rapid move to the X...Y... position
2. Z rapid move to the start position defined by J...
Possible lead-in (D11=...) from J... a at speed limited by parameter D13=... ( F*D13) for centering.
D11=I is overridden if D11 is higher than I... (is not programmed, D11=0 and D13=0.7).

3.

4. Drilling at the programmed feedrate F... with :

possible stop after each increase equal to I... mm (calculated as an absolute value starting
from plane J... without considering the possible lead-in D11), for a time equal to K... in tenths
of a second (specified with up to three digits, K0 if not programmed)
or with:

5.

2-22

possible detachment of D10=... mm to be carried out rapidly after each performed increase I...
(default D10=0, waiting time K is ignored)
to reach D12=... referred to plane J... (if not programmed D12=0; if programmed D12 less
than or equal to D11 is not managed D12).

Rapid return to the J... (or Q... if D7=1 is programmed) plane with spindle on. The rapid speed
can be reduced by programming parameter D8, scale factor with values between 0 and 1 (D8=1
by default).

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

6.

Rapid return to the previously reached position to a safety distance of D0=... working the
remaining part (if not programmed, D0=0.5).

7.

Work for depth increases equal to I...* D14 (if not programmed D14=10). These machining and
chip discharge cycles are repeated in the section from D12 e Z... and decrease each time by
D14 % of the programmed increase value (I...) to reach the minimum value of 50 % of the initial
value, after which the value is fixed until the programmed Z... is reached.

8.

Rapid return to the J... (or Q if specified) plane with spindle on, , which is the plane on which all
drilling cycles will move.

2.15.3 DEEP DRILLING CYCLE


G83 programs a deep drilling cycle with tool retraction for chip discharge.
The programming format is:

XY
Q
J

G83

Z...J...I...[Q...][K...][F...][X...Y...][D0=...]
[D7=1] [D8=][D9=1]

I
D0=xx

I-10%

D0=xx

Z
A typical G83 cycle would include the following steps:
1. Rapid move to the X...Y... position
2. Z rapid move to the start position defined by J...
3. Drilling at the programmed feedrate F... to a depth defined by I..., and any pause for a time of K
tenths of a second.
4. Rapid return to the J... plane with spindle on (or to the Q plane, if D7=1).
5. Rapid return to the previous depth.
If a value for D0 has been specified the rapid move will change to the programmed feedrate at this
distance from the previous depth. (Default value D0=0.5).
6. Machining down to an I... -10% depth increment and any pause for a time of K tenths of a
second. All these drilling and chip discharge cycles will be executed by decreasing each time by
10% the programmed depth increment (I...) until 50% of the original value is reached. Then the
depth increment remains constant until the tool reaches the programmed depth Z....
7. Rapid return to the J... (or Q if specified) plane with spindle on. The J parameter defines the plane
on which all subsequent XY moves between drilling cycles will occur. The rapid speed can be
reduced by programming parameter D8, scale factor with values between 0 and 1 (D8=1 by
default).

User and Programming Manual - Part II

2-23

S4045 S4045P
2. Basic programming

2.15.4 TAPPING CYCLE


G84 programs a tapping cycle.
The programming format is:

XY
Q
J

Restoring previous
spindle rotation

G84

Z...J...F...[Q...][K...][I][X...Y...][D8=]
[D9=1]

Spindle reversal

The parameter K assumes the following definitions:


a. Dwell time at the bottom of the hole after the command to reverse the spindle (in tenths of a
second) for Alternate Current (AC) spindle motors.
b. Stretching the compensation at the bottom of the hole (in thousandths of a millimeter) for Direct
Current (DC) spindle motors without transducer. The F feedrate is reduced proportionately.
c. Does not have to be programmed for Direct Current (DC) spindle motors with transducer (rigid
tapping)
d. The I parameter defines a dwell time at the bottom of the hole (in tenths of a second) before the
spindle inversion command for a DC spindle motor without transducer.
A typical G84 cycle would include the following steps:
1. Rapid move to the X...Y... position
2. Z rapid move to the start position defined by J...
3. Tapping at the programmed feedrate F... to the Z... depth; feedrate is to be programmed in
thousandths of mm for spindle revolution (equal to thread lead).
4. (K...) dwell for spindle reversal; then return at feed to the start position defined by J....
For rigid tapping, the rise speed is multiplied by the parameter D8 (if not programmed, D8=1).
5. Resetting of the initial spindle direction (M03 for right threading, M04 for left threading).
6. The

command during a tapping cycle generates immediate spindle inversion with return to

the hole start position J. Only after it has reached this position, the system enters

status. If

is pressed, execution continues on the next blocks. If you want to complete a tapping
cycle interrupted by the
command, exit from program execution using the
and perform an AUTOMATIC CYCLE RESUME (see Chap. 4.7 Part I)

2-24

command

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

2.15.5 REAMING CYCLE


G85 programs a reaming cycle with a programmable dwell at the bottom of the hole.
The programming format is:

XY
Q
G85

Z...J...[Q...][K...][F...] [X...Y....][D9=1][D8=]

Dwell K

A typical G85 cycle would include the following steps:


1. Rapid move to the X... Y... position
2. Z rapid move to the start position defined by J...
3. Reaming at the programmed feedrate F... to the Z... depth
4. Programmed (K...) dwell in tenths of a second.
5. Return at feed with spindle on to the start J... (or Q if specified) plane. The J parameter defines the
plane on which all subsequent XY moves between reaming cycles will occur. It is possible to
program a return speed multiplication factor with the parameter D8= (if not programmed, D8=1).

2.15.6 BORING CYCLE


The G86 function defines a boring cycle with return with spindle stopped. The return can take place
with the tool in contact with the workpiece or, for machine tools equipped with spindle orientation, with
the tool off the wall.
G86 programs a reaming cycle with a programmable dwell at the bottom of the hole.
The programming format is:

XY
J

Dwell K

Q
Restoring spindle
rotation

G86

Z...J...[Q...][K...][I...][F...][X...Y....]
[D8=][D9=1][D0=][D7=]

Spindle stop

The parameter D0 defines the angle of the bore cutting edge after spindle orientation. The parameter
D7 defines the value by which the tool is off the wall (if not programmed, D7=0.5 mm).
A typical G86 cycle would include the following steps:
1. Rapid move to the X...Y... position
2. Z rapid move to the start position defined by J...
3. Boring at the programmed feedrate F... to the Z... depth.
4. Programmed (K...) dwell in tenths of a second.

User and Programming Manual - Part II

2-25

S4045 S4045P
2. Basic programming

5. Spindle off and waiting I... in tenths of a second.


If parameter D0 is missing, spindle stop and waiting for I tenths of a second.
In the presence of the parameter D0, spindle orientation performed by the PLC in the same
direction as the rotation direction, lifting off wall by D7 mm along angle D0. The spindle orientation
function must be programmed before the fixed cycle, expressed between round brackets, for
example (M19H45)
6. Rapid return to the J... (or Q... if specified) plane with spindle off. The J parameter defines the plane
on which all subsequent XY moves between boring cycles will occur. The rapid speed can be
reduced by programming parameter D8, scale factor with values between 0 and 1 (D8=1 by
default).
7. Restoring of spindle rotation, with rapid return to hole centre, if required.

2.15.7 SPACED PLANE DRILLING CYCLE


G88 programs a drilling cycle of spaced planes with a programmable dwell at the bottom of the hole.
The programming format is:
XY

ZR

G88 X...Y...Z...J...[K...][F...][D8=]

J
Z

Example shown in the figure:

J1

N1 G88 X... Y... Z... J... K... F...


N2 Z1... J1...
Z
Dwell K
N3 G80 ZR... R
A typical G88 cycle would include the following steps:
1

1. Rapid move to the X...Y... position


2. Z rapid move to the start position defined by J...
3. Drilling at the programmed feedrate F...to the Z... depth
4. Programmed K... dwell in tenths of a second and reading of the following block.
If another plane needs to be drilled the cycle will continue reading the next instructions containing the
new Z and J values. After drilling the last plane it is necessary to program a rapid tool out move with
G80. The rapid speed can be reduced by programming parameter D8, scale factor with values
between 0 and 1 (D8=1 by default).
The G88 fixed cycle is executed even if the plane co-ordinates are not specified. Therefore it is
executed in the actual position of the machine and it is only valid for that point.
If several holes are to be executed, program axis rapid moves to the different positions and recall the
same fixed cycle by programming it as a subprogram.
Example:
...
...
X100 Y100 R
L1
X-100 R
L1
...
...

2-26

[first drilling position


[second drilling position

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

M30
L1
G88 J2 Z-12
J-18 Z-32
J-38 Z-52
G80 Z2 R
G32

[G88 fixed cycle subprogram

2.15.8 DIFFERENTIATED DRILLING CYCLE


The G89 function defines the differentiated drilling cycle for drilling materials of different texture and
hardness by changing the spindle speed and feed parameters for each layer of the material. The
function is useful for drilling walls which are reciprocally separated and need to be processed with
different technological parameters. It avoids the need for different standard fixed cycles or particular,
complex parametric programs.

The programming format is:

G89

ZJ[I][K][Q][F]
[S][XY][D9=1][D10=]
[D14=][D15=][D16=]
[D17=][D18=][D19=]
[D20=][D21=]
[D22=][D23=]

The differentiated drilling cycle consists of three working steps:


1. Upper range: run at programmed speed and feed.
2. Section to be run at different speed and feed or in rapid mode (for tubes or separated walls).
3. Lower range: run a different speed and feed.
Various parameters (optional and not) must be entered in the fixed cycle so that the operator can use
the cycle in the best way for the reasons illustrated above.

User and Programming Manual - Part II

2-27

S4045 S4045P
2. Basic programming

G89

GENERAL FIXED CYCLE DEFINITION

XY

Plane hole coordinates.

Default

Start of hole position and return for unloading chip.

Depth increase for chip breakage.

Z/Y/X

Bottom of hole position.

Rapid return position at end of hole (Q=J if not programmed).

Pause for chip breakage in tenths of a second.

Upper range feed from J to D15. Last programmed F if used if G89 is not
programmed.

Upper range spindle speed from J to D15. Last programmed S if used if G89 is
not programmed.

D9=1

Runs cycle in machine position without needing to program the plan position
coordinates.

D9=0

D10=

Part detach value for each increase and chip breakage. If D10=0.5 is not
programmed:
D10=0 K..., no detach, K pause every I mm
D10=.... K..., D10 detach, K pause every I mm.
D10=. K0, D10 mm detach without pausing K after I mm
D10=0 K0, equivalent to not programming I.. (cycle does not break chip)

0.5

D14=

Incremental position from J after which pauses are made every I mm (if I is
programmed). (Normally the distance between J and part surface).

D15=

End of upper range and start of intermediate range absolute position. The zone
between D15 and D18 (if D18 is programmed) or between D15 and Z is run
with FD16 and SD17. The upper range included between J and D15 is run at
feed and speed programmed before G89.

D16=

Feed used in intermediate zone, between D15 and D18 (if D18 is programmed)
or between D15 and Z (if D18 is not programmed).

D17=

Speed used in intermediate zone, between D15 and D18 (if D18 is
programmed) or between D15 and Z (if D18 is not programmed).

D18=

Start of lower range absolute position. The zone between D18 and Z is run at
FD19 and SD20.

D19=

Feed used in lower range between D18 and Z.

D20=

Speed used in lower range between D18 and Z.

D21=

Detachment value in D15 and D18 positions for speed change (D21=1 if not
programmed).

D22=

Pause after D21 detach for spindle to speed up. D21=10 (1 sec) if not
programmed. Detach and pause are skipped if only feed (not speed) is
changed.

10

D23=

Intermediate range mode from D15 to D18:


D23=0 I increases, D10 detaches and possible K
D23=1 middle range run in rapid mode R.

2-28

Q=J
0

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

The differentiated drilling cycle consists of the following phases:


1.

Rapid movement on the plane in X...Y... position.

2.

Rapid movement of Z axis perpendicular to J... plane.

3.

Processing at F... and S... programmed in cycle or last programmed values with:
-

possible pause every I... mm (calculated as absolute value from the J... plane or from D14=...
mm under each J) for K... time expressed in tenths of a second (default K0) or

possible detach at D10=... mm in rapid mode at every I... increase (default D10=0.5) for chip
breakage to each absolute position D15=...

4.

Detach at D21=... mm (default 1) for D22=... expressed in tenths of a second (default 10=1 sec)
for the spindle to reach correct speed if speed is changed between first and second range.

5.

Intermediate range run between D15=... and D18=... at different F and S (feed D16=... and speed
D17=..., respectively) with chip breakage every I... mm (always with the possibility of selecting D10
detach or K pause) if D23=0 (default); alternatively run in rapid mode R if D23=1.

6.

Detach at D21=... mm (default 1) for D22=... expressed in tenths of a second (default 10=1 sec)
for the spindle to reach correct speed if speed is changed between second and third range.

7.

Lower range run between D18=... and Z... at different F and S (feed D19=... and speed D20=...,
respectively; first range feed D16 and speed D17 remain valid if these values are not
programmed) with chip breakage every I... mm (always with possibility of D10 detach or K pause).

8.

Rapid return with spindle turning to J... plane (or Q... if specified), which is the plane on which all
movements between drilling cycles are made. The rapid speed can be reduced by programming
parameter D8, scale factor with values between 0 and 1 (D8=1 by default).

2.15.9 EXAMPLES OF FIXED CYCLES


The program below is an example of fixed cycles for centering and drilling 5 deep holes whose coordinates are specified in the subroutine 1. The tools and their speeds of rotation are defined in the first
part of the listing together with the characteristics of the centering and drilling fixed cycles.
The second part of the program consists of the subroutine that is recalled in order to perform the active
cycle in the positions defined by the co-ordinates of each block.

T10
S1100M3
G81 Z-3 J2 F300
L1
T11
S750 M3
G81 Z-50 J2 I10 K5 F100
L1
.........
M30

[centering tool
[rotation speed 1100 rpm
[centering cycle, depth -3 mm, rapid move plane 2 mm
[recall of centering co-ordinates
[drilling tool
[spindle speed 750 rpm
[drilling cycle, depth 50 mm, chip breakage every 10 mm with a
0.5-sec dwell
[recall of drilling co-ordinates

User and Programming Manual - Part II

2-29

S4045 S4045P
2. Basic programming

[Subroutine 1
L=1
X10 Y5
X15 Y10
X20 Y15
X25 Y20
X30 Y25
G80 Z100 R
G32

2.15.10 NOTES ON FIXED CYCLES


Z, I, J, K and Q parameters can be changed for subsequent holes by programming them either in the
positioning block or in a separate one, immediately before the positioning block.
Example:
G81 Z-20 J2
X...Y...
X...Y...Q30
X...Y...Q2
X...Y...
Z-25
X...Y...
X...Y...Z-20
.........
G80 Z200 R

[high return to clear part clamps


[restoring return height to Z2
[depth change
[restoring depth to Z-20

Fixed cycles may be applied to an axis other than the spindle axis by programming the fixed cycle code
(G81, G83, etc.) followed by the axis name and by the parameters that define the cycle.
Fixed cycles are kept in memory and are executed as the control processes a block containing plane
co-ordinates.
Example:
X-50 Y-10 R
Z2 R
Z-5
G81 Y30 J10
X-50
X-30
X-10
X10
G80
Z2 R

2-30

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

2.16 AXIS EXCHANGE


G16 makes it possible to exchange the moves of the programmed axes e.g. the Z axis moves where Y
is programmed and Y moves where Z is programmed, etc.
G16 must be followed by the names of the axes that will replace the original machine axes.
Axes are swapped sequentially: the first axis after G16 will replace the first machine axis, the second
axis will replace the second machine axis, etc.
For example, by programming G16 Y Z X the machine will move Y instead of X, Z instead of Y and X
instead of Z.
The system will apply any co-ordinate offset (G51 and G52), mirror image and scaling to the
programmed co-ordinates before exchanging the axes.
Axis exchange is executed after the application of these functions; in other words it acts on the
modified co-ordinates.

2.17 INCH/METRIC MODES


The control system can be configured at installation time for inch or metric mode operation.
This configuration can be changed from within the program by the G70/G71-codes.
G70 will permit selection of the inch system on a control that has been configured for metric mode
operation.
G71 will permit selection of the metric system on a control that has been configured for inch mode
operation.
The original configuration is restored by programming the complementary function or the M30 function
(program end).
G70/G71 affect co-ordinates, fixed cycles, macro parameters and dimensional parameters as well as F
function values.
G70/G71 will not affect the values displayed on the screen. These values will always be displayed
according to the unit of measurement defined at installation time.

2.18

1/2-AXIS ROTARY HEAD CONTROL (STATIC TCPM)

The G69 function calculates the position to be assumed by the tool point after the rotation of any type
of heads (continuous, indexing or manual).
The machine initialization data (supplied by the machine builder) must include head configuration
parameters, head type specifications, distance between head center and spindle nose, etc.
The system can manage up to 8 heads.
Function G69 can always be active in modal format, i.e. even after a BREAK. With this function active
it is possible to set zero all the axis origins, defining any reset value
When the NC is turned off, this function is reset, therefore it will have to be reprogrammed the next
time the system is turned on. To make G69 modal, during System Setup, the following setting is
required ENABLE MODAL TCPM = Yes.

User and Programming Manual - Part II

2-31

S4045 S4045P
2. Basic programming

The programming format is:


G69 [A...] [B...] [I...] [J...] [Q...][D1=]
where:
A... , B...

head rotation values

I... , J... , Q...

positive or negative values to be added to the distance between head center and tool
virtual point. I, J, Q operate on the configured axes: spindle, abscissa and ordinate
respectively.
By default, the system rotate the tool virtual point.

D1=

number of the head (from 1 to 8). By default, D1=1.

The G69 function does not include head rotation instructions. These shall be programmed either in the
previous or in the following block.
G69 allows, for example, the rotation of the head in order to prevent a spherical tool from cutting in
correspondence of its axis of rotation, where the cutting speed is very low.
In this case it would be advisable to make tool zero and tool center coincide.
If the cutter has been zeroed with respect to the tool point, G69 must be programmed with a negative
radius value.
Example:
G69 B30 I-10

G69 is also useful in case of machining of several sides of the same part.
The tool and the part shall be zeroed with respect to the side parallel to the machining plane.

The other sides can be programmed on the plane, referred to the edge with respect to which the
rotation/offset function in space (G751) will be applied.

2-32

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

Example:
G751 TRS X-25 ROT Y-45
G751 TRS X30 ROT Y90

G69 is cancelled by G67.


If a G69 is programmed by itself, in MDI or from the PROGRAM, the last head rotation values
programmed are recalled.
WARNING !! : for correct use of function G69 all axes, including rotary ones, must be previously
SET ZERO in the PART ORIGIN used.

2.19 ROTARY TABLE CONTROL (STATIC TCPM)


The G68 function calculates the position to be assumed by the tool point after the rotation of the table.
Therefore it allows the machining of parts placed on the table in such a position that part zero does not
coincide with table center.
The system is able to manage 4 tables.
The programming format is:
G68 [A...] [B...] [C...] [X] [Y] [Z] [D1=]
where:
A... ,B..., C...

table rotation values.

X... ,Y..., Z...

displacement values of the point of rotation with respect to table center.

D1=...

table number (from 1 to 4. If not programmed D1=1)

The G68 function does not include table rotation instructions. These shall be programmed either in the
previous or in the following block. G68 is cancelled by G67.
Function G68 can always be active in modal format, i.e. even after a BREAK. With this function active
it is possible to set zero all the axis origins, defining any reset value
When the NC is turned off, this function is reset, therefore it will have to be reprogrammed the next
time the system is turned on. To make G68 modal, during System Setup, the following setting is
required ENABLE MODAL TCPM = Yes.
For a correct operation of the G68 function it is necessary that the values on the TABLE AND HEAD
PARAMETERS page have been defined and that the TABLE ZERO SETTING procedure has been
performed. The TABLE ZERO SETTING procedure shall be performed every time the table is
removed and mounted again.

User and Programming Manual - Part II

2-33

S4045 S4045P
2. Basic programming

Press UTILITY

Press ENABLE MAINT. to select it as shown in the drawing.


Press MACHINE TOOL

2-34

User and Programming Manual - Part II

S4045 S4045P
2. Basic programming

Press SET ZERO OFFSETS

A menu containing the normal offset reset and tool length in addition to the ROT HEAD ZERO and
ROT TABLE ZERO function buttons will appear.
Shift the machine axes to a known position with respect to the table centre, press ROT TABLE ZERO
and set the axis position with respect to the table centre.

User and Programming Manual - Part II

2-35

S4045 S4045P
2. Basic programming

During table zero setting, define the table number by K parameter (1 or 2).
If K is not programmed, table 1 is zero set.
Example:
X 118.3 Y 109.3

Table centre

WARNING !! :

for correct use of function G68 all axes, including rotary ones, must be previously
SET ZERO in the PART ORIGIN used.

Use of G68 for machining different sides of a part.


Only one part zero is defined, not coinciding with table center.
Example:
G19
S100 M3 F3000
X50 Y0 C0R
G81 X10 J17
Y15 Z-10
Y-15 Z-15
G80 X50R
C90R
G68 C90
X40 Y0R
G81 X25 J32
Y0 Z-12
G80 X50R
C180R
G68 C180
X30 Y0R
G81 X10 J17
Y15 Z-10
Y-15 Z-15
G80 X50R
C270R
G68 C270
X40 Y0R
G81 X25 J32
Y0 Z-12
G80 X50R
M30

2-36

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3. PROGET2 PROGRAMMING
The following G-codes are used in the PROGET2 programming environment:
G10
G11
G13
G20
G21
G27
G28
G29

First point (or circle) that defines a straight line.


Second point (or circle) that defines a straight line.
Straight line at a known angle, through a point or tangent to a circle.
Circle of known center and radius.
Linking radius or chamfer.
First point of a SPLINE curve.
Cusp point of a SPLINE curve.
Last point of a SPLINE curve.

3.1 CIRCLE DEFINITION


The following format will define a CIRCLE of known center and radius:
G20 [X...Y...I...] [K...]
where:
X... and Y... Coordinates of circle center.
I...
Circle radius, positive for a CCW circle and negative for a CW circle.
K...
Discriminates between the two intersection points with a previously defined geometric
element in the profile (K=1 may be omitted).
The X... Y... I... parameters may be omitted if they are equal to the corresponding parameters of the
last circle programmed in the same profile.
If the I parameter is not programmed (or if it is programmed as I0) the circle will be a POINT.
The K parameter can assume different meanings, depending on the intersected geometric element.

User and Programming Manual - Part II

3-1

S4045 S4045P
3. PROGET2 programming

The previous element is a straight line


Y
K2

K1 Defines the first intersection point in the


direction of the straight line.

K1

K2 Defines the second intersection point.

The previous element is a circle


Y

second circle

K1 Defines the intersection point to the LEFT of


the straight line that links the center of the
first circle (in order of definition) to the center
of the second circle.

left

K1
right

K2 Defines the intersection point to the RIGHT of


the straight line that links the center of the
first circle (in order of definition) to the center
of the second circle.

K2
first circle

3.1.1 Examples of circle definition


Point or counterclockwise circle
Y

To define the point P1:

C1

G20 X27 Y20


20

P1

15

To define the circle C1:


G20 X27 Y20 I15
0

3-2

27

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Clockwise circle
Y
C1

G20 X24 Y20 I-12

P1

20

12

24

Circle intersected by a straight line


L1 was defined in the preceding block.

Y
P2

To start the circular path in P1:

L1

G20 X25 Y21 I-15 K1

P1

21

15

C1

K1 may be omitted.
To start the circular path in P2:
G20 X25 Y21 I-15 K2

25

Circle intersected by another circle


The circle C1 was defined in the preceding block.

To start the circular path on C2 in P1:

P1

G20 X29 Y23 I13

23

13
C2

13

To start the circular path on C2 in P2:


C1

P2

G20 X29 Y23 I13 K2


0

15

29

User and Programming Manual - Part II

3-3

S4045 S4045P
3. PROGET2 programming

3.2 STRAIGHT LINE DEFINITION


A straight line can be programmed in two different ways:
straight line tangent to two circles or passing through two points
straight line tangent to one circle (or passing through one point) that forms a known angle with the
X-axis.
Every straight line is characterized by a path direction that can be defined in the following way:
Path direction from the first to the second defined element
Direction defined by the angle formed by the straight line and the axis of abscissas.
When defining a straight line tangent to a one or more circles it is necessary to consider the direction
of the circles. Among the possible geometrical solutions illustrated in the figures below, the NC selects
the straight line that in the point of tangency has the same direction as the circle.

L1
T1

The straight line selected by the NC is L1 because


in the T1 point of tangency L1 has the same
direction as the circle.

P
C1

T2

L2

L1
T1

In this case also the straight line selected by the


NC is L1 because in the T1 point of tangency L1
has the same direction as the circle.

C1
L2

T2

L4

In this case there are 8 possible solutions.


The figure shows 4 solutions because only one
straight line direction has been considered.

T2

L1

C2

L3

The straight line selected by the NC is L1 because


in the T1 and T2 points of tangency L1 has the
same direction as the two circles.

T1
C1
L2

3-4

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3.2.1 STRAIGHT LINE TANGENT TO TWO CIRCLES OR PASSING


THROUGH TWO POINTS
The definition of a straight lines always consists of two programming blocks in which the two
supporting elements are specified. This way it is possible to define:
A straight line through two points
A straight line through a point and tangent to a circle
A straight line tangent to a circle and passing through a point
A straight line tangent to two circles.
The programming format for the two elements is:
G10 X...Y...[I...]]
G11 X...Y...[I...] [K...]

first circle or supporting point


second circle or supporting point.

The definition (G10) of the first element (circle or point) may be omitted if it coincides with the last
element programmed in the profile (except for radii defined with G21).
The parameters have the following meaning:
X...Y...
I...
K...

circle center or supporting point coordinates


circle radius (omitted if the element is a point)
Selects one of the two intersections between the straight line and the circle programmed in
the preceding block:
K1 first intersection between the straight line and the circle in the direction of the line.
K2 second intersection.
Default value K=1.

Example 1: Straight line through two points


Y
P1

G10 X35 Y25

25
P2

10

G11 X8 Y10

L1

35

[Point P1 coordinates, first


supporting element
[Point P2 coordinates, second
supporting element

User and Programming Manual - Part II

3-5

S4045 S4045P
3. PROGET2 programming

Example 2: Straight line through two points


Y

G10 X8 Y12

P2

30
L1

G11 X31 Y30

P3

20

G11 X45 Y20

L2

12
P1

31

[point P1 coordinates, first


supporting element
[point P2 coordinates, second
supporting element
[point P3 coordinates, second
supporting element (the first one
is the point programmed in the
previous block)

45

Example 3: Straight line through a point and tangent to a circle


L1

G10 X9 Y34
P1

G11 X40 Y28 I-15

34
28

C1

G20

15
L2

G11 X31 Y6

P2

6
0

31

[point P1coordinates, first


supporting element
[circle C1 second supporting
element
[path on circle C1 up to the
tangency with L2
[point P2 coordinates, second
supporting element (the first
one is the circle programmed
in the previous block)

40

Example 4: Straight lines tangent to two circles


L4

Y
L1

C2

34
15

L3
C1
20

[circle C1 1st supporting element


[circle C2 2nd supporting element

Straight line L2
G10 X18 Y20 I10
G11 X57 Y34 I15

[circle C1 1st supporting element


[circle C2 2nd supporting element

Straight line L3
G10 X57 Y34 I-15
G11 X18 Y20 I10

[circle C2 1st supporting element


[circle C1 2nd supporting element

Straight line L4
G10 X18 Y20 I10
G11 X57 Y34 I-15

[circle C1 1st supporting element


[circle C2 2nd supporting element

10

L2

Straight line L1
G10 X18 Y20 I-10
G11 X57 Y34 I-15

18

57

Note: The order of definition of the two circles, first C1 then C2 or vice-versa, and their direction (sign
of the I radius) allow the definition of all the straight lines tangent to the two circles.

3-6

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Example 5: Straight lines intersecting a circle


Y
L1

40
P4
P3

24

15

P2

20
C1

P1

55

30

Y
L1

40

P4
P3
P2

24

15

20
P1

First point of intersection


G20 X30 Y24 I-15 [circle C1
G10 X5 Y20
[point P1 coordinates, first
supporting element
G11 X55 Y40
[point P4 coordinates, second
supporting element. Straight
line direction starting from P2.

Second point of intersection


G20 X30 Y24 I-15 [circle C1
G10 X5 Y20
[point P1 coordinates, first
supporting element
G11 X55 Y40 K2
[point P4 coordinates, second
supporting element. Straight
line direction starting from P3

C1

30

55

3.2.2 STRAIGHT LINE TANGENT TO A CIRCLE OR PASSING


THROUGH A POINT AND FORMING A KNOWN ANGLE WITH
THE X-AXIS
In this case, the definition of a straight line consists of only one block in which the supporting element
(point or circle) and the angle formed with the axis abscissa are defined. In this way it is possible to
define:
straight line at a known angle passing through a point
straight line at a known angle tangent to a circle.
The programming format is as follows:
G13 [X...Y...[I...]] J...[K...]
with:
X...Y...[I...] Define the point or the circle (of I... radius) tangent to the straight line.
If these coordinates are the same as those of the last circle programmed in the profile
they may be omitted.
J...

Angle (in degrees) formed by the X-axis and the oriented straight line (as shown in the
examples).

User and Programming Manual - Part II

3-7

S4045 S4045P
3. PROGET2 programming

K...

Selects one of the two intersections between the straight line and the circle programmed
in the preceding block:
K1 first intersection between the straight line and the circle in the direction of the line.
K2 second intersection.
Default value K=1.

Example 1: Straight line point/angle (positive angle)


Y

G13 X30 Y15 J35

15
Lx

35
0
30

Example 2: Straight line point/angle (negative angle)


Y

15

G13 X30 Y15 J-145


Lx

or
35

G13 X30 Y15 J215

0
X

35

-145

Example 3: Straight line circle/angle (positive angle)


Y
15
Lx

17

3-8

15

26

G13 X26 Y17 I-15 J15

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Example 4: Straight line circle/angle (negative angle)


Y

G13 X26 Y17 I-15 J-165

15
17

or
15

G13 X26 Y17 I-15 J195

Lx

-165
0

26

3.3 CHAMFER DEFINITION


To program a chamfer between two intersecting lines, use this format.
G21 J...
where:
J...
Chamfer value (distance from the vertex)
Examples:

Y
10
25

G13 Y25 J0
G21 J10
G13 X40 J-90

10

40

[horizontal path
[chamfer
[vertical path

Y
8

[climbing path
[chamfer
descending path

45

40

G13 X30 Y25 J40


G21 J8
G13 X30 Y25 J-45

25

30

User and Programming Manual - Part II

3-9

S4045 S4045P
3. PROGET2 programming

3.4 LINKING RADIUS DEFINITION


This definition is utilized for inserting an arc connecting the intersection between two ELEMENTS.
The order of definition of the two elements to be connected and the sign of the connecting radius
allows to select, among the possible solutions, the desired link.
The control selects the solution which guarantees direction agreement between the elements to be
connected and the connection itself, as illustrated in the following figures.

To program a link between two profile elements, use this format:


G21 I...
where:
I...
Radius of the connecting circle:
positive for CCW direction
negative for CW direction

Example 1: Radius between two straight lines


Y
G13 X30 Y25 J40
G21 I-10
G13 J-45

25
10
40

3-10

45

30

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Example 2: Radius between two straight lines


Y
G13 X30 Y22 J150
G21 I-10
G13 J-40

10
22

150
40

30

30

Example 3: Radius between two straight lines


Y

17

G13 X33 Y17 J30


G21 I8
G13 J130

130

30

33

Example 4: Radii between a straight line and a circle


Y

G10 X0 Y0
G11 X42 Y25
G21 I-12
G20 X42 Y25 I10
G21 I-15
G10 X0 Y0
G11 X42 Y25

15
25

10
130

12

42

User and Programming Manual - Part II

3-11

S4045 S4045P
3. PROGET2 programming

Example 5: Radii between a straight line and a circle


G10 X0 Y0
G11 X32 Y21
G21 I12
G20 X32 Y21 I-10
G21 I15
G10 X0 Y0
G11 X32 Y21

Y
15
10
21
12

32

Example 6: Radii between circles


Y
G20 X22 Y23 I-12
G21 I6
G20 X40 Y27 I-10
G21 I5
G20 X22 Y23 I-12

6
12

27

10

23
5

40

22

Example 7: Radii between circles


Y

18
17

G20 X30 Y18 I-12


G21 I-6
G20 X20 Y17 I-13

13

G20 X30 Y18 I-12


G21 I7
G20 X20 Y17 I-13

6
12
7

3-12

20

30

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3.5 PROFILE DEFINITION


With PROGET2 a profile can be programmed as a sequence of geometric elements. There are three
ways of starting or ending a profile:
PROGRAMMED profile start/end
AUTOMATIC profile start/end with a STRAIGHT LINE perpendicular to the first/last programmed
element
AUTOMATIC profile start/end with a CIRCLE tangent to the first/last programmed element.
Cutter compensation can be programmed with G49 in the following formats:
G49 Kn
G49 Kn I...
G49 I...

Invokes the n cutter compensation


Invokes the n cutter compensation with an (I...) stock allowance
Defines a tool radius equal to I

3.5.1 DEFINITION OF PROFILE APPROACH


The following format defined tool path when approaching the profile for cutting start-up:
G41 [K...] [I1] [Q...] [D0=...] [D1=1] [D2=1]
G42 [K...] [I1] [Q...] [D0=...] [D1=1] [D2=1]
where:
G41

Tool LEFT of profile

G42

Tool RIGHT of profile

K...

Selects one of the following automatic start-up modes:


K1, automatic start-up with a straight line perpendicular to the first programmed element.
K2, automatic start-up with a semicircle tangent to the first programmed element.
If K is omitted, the profile start-up mode is to be programmed (non automatic). In this case
the start-up point will be the point of intersection or tangency between the first and second
element programmed in the block (after G41 or G42).
It shall be noted that the first defined element will not be part of the actual tool path and will
only serve the function of defining the point of intersection or tangency with the second
element; in other words, the tool path will start from the second declared element.

I1

Convex edges automatic rounding off with a linking radius equal to mill radius

Q...

Control code for tool direction reversal because of cutter compensation


Q0: displays an error message (ERR95) and stops execution.
Q1: executes circles and straight lines in the opposite direction. Default value.
Q2: executes straight lines in the opposite direction (circles will not be executed).

User and Programming Manual - Part II

3-13

S4045 S4045P
3. PROGET2 programming

D0=

An alternative to the Q parameter. By programming D0=1 a collision control of the tool (look
ahead) with the profile is enabled. This eliminates the profile elements that, because of the
radius offset, would cause a change of tool direction and possible gouging.
To test for gouging the default amount of look ahead is 60 blocks. This number can be
modified by programming it directly into the D0 parameter (for example, D0=30, D0=200, etc.).
The first and last profile element must be defined so that they do not change direction,
regardless of the radius offset.

D1=1

With the D0 parameter it is necessary to program this parameter to handle those closed
profiles that begin and end in one point. With this parameter the beginning and the end of the
profile is not on the perpendicular to the elements in that point, but on the bisector of the angle
formed by the two elements in that point. The profile remains closed.
Profile start point
Profile end point without D1=1
without D1=1
(perpendicular to P1)
(perpencicular to P1)
Start and end point of
programmed profile

P1

P1

Start and end point of


profile on the bisector
with D1=1

D2=1

3-14

This parameter allows to store the profile elements that have not been machined because of
the collision control into a program resident in system memory. The program name is defined
by the G666 function with the format G666 LNAME:
The G666 function shall be programmed after the G40 (profile end). If a program contains
several profiles, the G666 function shall be programmed after the last profile.
The described storing procedure is possible only in the GRAPHIC EXECUTION mode (not in
EDIT or in PROGRAM EXECUTION on the machine).

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Example 1: Non-automatic profile approach (programmed)


Initial tool position: X40 Y45

X55 Y45
G41
G20 X20 Y35
G13 J-45

45

[P1
[L1

35
P1

Profile start point on the perpendicular to


the straight line in the point P1

L1

45
0

55

20

Example 2: Non-automatic profile approach (programmed)


Initial tool position: X15 Y10

Y
L2

X15 Y10
G42
G13 X0 Y32 J-20 [L1
G13 X34 Y0 J-70 [L2

70
32

20

Profile start point on the intersection of


the straight lines offset by the tool radius.

P1
L1

10
0

15

34

Example 3: Automatic linear approach


Initial tool position X34 Y37

X34 Y37
G41 K1
G20 X17 Y16 I-12 [C1

37
C1

Linear approach along the straight line


perpendicular to the circle, i.e. along the
straight line connecting the tool start
point to the circle center.

12

16

17

34

User and Programming Manual - Part II

3-15

S4045 S4045P
3. PROGET2 programming

Example 4: Automatic semicircular approach


Initial tool position X34 Y37

X34 Y37
G41 K2
G20 X17 Y16 I-12

37
C1

Approach along the semicircle tangent to


the circle, offset by the tool radius

12

16

17

34

Example 5: Automatic semicircular approach


Initial tool position X26 Y38

X26 Y38
G41 K2
G13 X37 Y0 J-45

38

L1

Approach along the semicircle tangent to


the circle, offset by the tool radius

45
0

26

37

3.5.2 DEFINITION OF PROFILE EXIT


To define tool path when exiting the profile, use this format:
G40 [K...X...Y...]
where:
G40
K...

3-16

Exit from profile and cutter compensation disable.


Selects one of the following automatic profile exit modes:
K1 - automatic profile exit with a straight line perpendicular to the last element programmed
before G40.
K2 - automatic profile exit with a semicircle tangent to the last element programmed before
G40.
If K is omitted, profile exit will not be automatic and must be programmed.

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

If the profile ends with an element and a point, the profile end point is on the perpendicular to
the element in the point. If the profile ends with two elements, the profile end point is the point
of tangency or intersection between the second last and the last element programmed before
G40.
It shall be noted that the last programmed element will not be part of the actual tool path. It
will be used for defining the intersection or tangency point with the second-last programmed
element. This is the actual profile end point (where the tool cutting path ends).
X...Y...

Coordinates of the point to be reached after the tool has left the profile.
Cutter compensation shall be disabled at this point.

Example 1: Programmed exit


Y

L2
G13 X0 Y32 J-20
G13 X34 Y0 J-70
G40
X15 Y10

70
32

20

[L1]
[L2]

Profile end at the intersection point


between the two straight lines, offset
by the tool radius.

P1
L1

10
0

15

34

Example 2: Programmed exit


Y

G13 X40 Y10 J-30


G20 X40 Y10
G40
X70 Y20 R

30
L1

20
10
0

Profile end perpendicular to the straight


line L1 in the point P1

P1

40

70

User and Programming Manual - Part II

3-17

S4045 S4045P
3. PROGET2 programming

Example 3: Automatic linear exit


Y
31
G13 X0 Y31 J-45
G40 K1 X37 Y23

45
P1

23
Profile exit along the straight line
perpendicular to L1 in the point P1.

L1

37

Example 4: Automatic semicircular exit


Y
31
45
G13 X0 Y31 J-45
G40 K2 X37 Y24

P1

24

Automatic profile exit with a semicircle


tangent to L1

L1

37

3.6 PERPENDICULAR AXIS MOVEMENT


In profile milling, the tool is usually positioned to the machining depth before approaching the profile.
The milling operation is carried out on the machining plane.
However, the axis perpendicular to the interpolation plane can be moved both within the profile and at
profile approach/exit.
To obtain perpendicular and machining axis simultaneous moves within a profile, program the
perpendicular axis in the same block that defines the geometric element.
Perpendicular axis motion at the end of an element can be obtained by programming it in a separate
block.

3-18

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Examples:
1. Perpendicular axis motion during an automatic approach:
G41 K1 Z-5

move to Z-5 during a linear approach

G41 K2 Z-5

move to Z-5 during a circular approach

2. Perpendicular axis motion during a programmed approach:


G41
G13 X...Y...J...Z-5
G13 X...Y...J...

move to Z-5 while positioning machining axes to the intersection point


between two straight lines

G42
G20 X...Y...Z-5
G13 X...Y...J...

move to Z-5 while positioning machining axes to G20 X...Y...

3. Perpendicular axis motion at the end of an automatic approach:


G42 K2
Z-5
G13 X...Y...J...

move to Z-5 at the end of a circular approach

4. Perpendicular axis motion at the end of a programmed approach:


G41

move to Z-5 with machining axes positioned on the intersection


point between two straight lines

G13 X...Y...J...
Z-5
G13 X...Y...J...
G42
G20 X...Y...
Z-5
G13 X...Y...J...

move to Z-5 after positioning machining axes to G20 X...Y...

5. Perpendicular axis motion along a geometric element:


G13 X...Y...J...Z-10

move to Z-10 along a straight line

G20 X...Y...I...Z-5

move to Z-5 along a circle

G21 I...Z-12

move to Z-12 along a linking radius

6. Perpendicular axis motion at the end of a geometric element:


G13 X...Y...J...
Z-10

move to Z-10 at the end of a straight line

User and Programming Manual - Part II

3-19

S4045 S4045P
3. PROGET2 programming

G20 X...Y...I...
Z-5

move to Z-5 at the end of a circle

G21 I...
Z-12

move to Z-12 at the end of a linking radius

7. Perpendicular axis motion during an automatic profile exit:


G40 K1 X...Y...Z10

move to Z-10 during a linear exit

G40 K2 X...Y...Z10

move to Z-10 during a circular exit

Five movements in Z are allowed if one of the two elements is a linking radius; they are six if the two
elements are a straight line and or a circle.

3.7 GEOMETRIC ELEMENT STORING


The geometric elements (origins, points, circles, straight lines, etc.) that make up a profile and the
distances can be stored in the control memory and afterwards recallled into the profile program or used
to define other geometric elements.
The code that identifies a stored geometric element has the En format, where E is the code and n is a
numeric field from 1 to 30.
An element can be defined directly by programming all its parameters, indirectly by using previously
stored elements, or through a combination of direct and indirect definitions.
The comma is used as separator between geometric elements.
Examples:
E1=
E2=
E14=
E24=
E5=
E6=
E7=
E10=

G51 X18 Y18 J45


G13 X30 Y30 J50
G13 E17 J30
G51 X30 Y30 J45, G20 X50 Y33
G20 X10 Y10 I30, G20 X20 Y20 I15
E12, E13
G20 X10 Y10 I30, E13
G20X45Y87, G20X136Y-12

A geometric element can be stored at any point in the program before or after the profile approach
(G41/G42). Obviously the elements must be in the control memory before being used.
Geometric elements are stored in a table that can be displayed by pressing the COMP/PARM TABLES
and GEOMETRIC ENTITIES keys in sequence.

3-20

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Depending on the type of element the following information will appear:


points:
abscissa and ordinate
circles:
abscissa and ordinate of the center and radius
straight lines: abscissa and ordinate of the intersection point with one of the Cartesian axes,
distance from the origin and angle
origins:
abscissa and ordinate of the new origin and angle with respect to the axis of
abscissas.
distances:
the value of the distance between two points, between a point and a straight line,
between two parallel straight lines
There are two tables: one for auto and MDI execution, and one for graphic mode execution.
It is possible to visualize one or the other depending on the control state.

3.8 POINT STORING


A point can be defined directly or indirectly as intersection between two known elements.
For direct definition it is necessary to program the proper format in one block.
For indirect definition it is necessary to invoke previously stored elements.
A point can be defined in the following ways:

Point defined by polar or Cartesian coordinates.


Point as intersection between two straight lines.
Point as intersection between two circles.
Point as intersection between a straight line and a circle.
Point as center of a stored circle.

Straight lines and circles used for point definition can be defined directly or recalled from the control
memory where they are stored.
Example:
Ep = G13 X...Y...J..., G20 X...Y...I...K2
Ep = G10 X...Y..., G11 X...Y..., G20 X...Y...I...
Ep = G10 X...Y..., G11 Ep, Ec
Ep = Er, G20 X...Y...I...
Ep = Er, G20 Ep I...
Ep = Ec, Er K2

3.8.1 DIRECT DEFINITION


A point is defined with Cartesian coordinates, or polar when G76 is enabled.
A point defined with polar coordinates must be referenced to part zero using the following format:
Ep = G20 X...Y...

User and Programming Manual - Part II

3-21

S4045 S4045P
3. PROGET2 programming

Examples:
Y

E12 = G20 X30 Y20


E12

20

30

Y
E12

G76
E12=G20 X40 Y45
G75

40

45
0

A point defined with Cartesian coordinates can be referred to an origin other than part zero.
In this case the origin must be programmed directly or indirectly before defining the point.
Example:
Ep = G51 X...Y...J..., G20 X...Y...
Ep = Eo, G20 X...Y...
Y
E7=G51 X15 Y5 J15, G20 X40 Y20
E7

E6=G51 X15 Y5 J15


E7=E6, G20 X40 Y20

20
E6

40

15

5
0

3-22

15

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3.8.2 INDIRECT DEFINITION


Point as intersection between two straight lines
The format is the following:
Ep = [origin, ] line1, line2

Y
E8

E10=G13 X...Y...J..., G13 X...Y...J...

E9

E10=E8, E9
E1
0

Point as intersection between two circles


Ep = [origin, ] circle1, circle2[K2]
K2 selects the second intersection, which is to the right of the straight line connecting the center of the
first circle with the center of the second circle. If K is not programmed, the first intersection will be
selected.

Y
E2
E1

E3=G20 X...Y...I..., G20 X... Y...I...


E4=G20 X...Y...I..., G20 X...Y...I...K2

E3
E3=E1, E2
E4=E1, E2 K2

E4

User and Programming Manual - Part II

3-23

S4045 S4045P
3. PROGET2 programming

Point as intersection between a straight line and a circle


Ep = [origin, ] line, circle [K2]
Ep = [origin, ] circle, line [K2]
K2 selects the second intersection in the direction of the line.
Y
E1

E3=G13 X...Y...J..., G20 X...Y...I...


E4=G13 X...Y...J..., G20 X...Y...I...K2

E3
E4

E3=E1, E2
E4=E1, E2 K2

E2

Point as center of a stored circle


Ep = Ec I0
With this definition the coordinates of the center of the circle (Ec) are stored in the Ep point.

Y
E4 = E3 I0

E3
E4

3.9 STRAIGHT LINE STORING


Straight lines can be defined directly or indirectly, i.e. by recalling previously stored elements.
Possible straight line definitions are as follows:

3-24

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Straight line at an angle passing through a point.


Straight line at an angle tangent to a circle.
Straight line through two points.
Straight line tangent to two circles.
Straight line through a point and tangent to a circle.
Straight line tangent to a circle and passing through a point.
Straight line parallel to a previously defined straight line.
Straight line with reverse direction.

Points and circles used for defining a straight line can be defined directly or indirectly by recalling
previously stored elements.
Example:
Er = G51 X...Y...J..., G13 X...Y...J...
Er = G13 Ec J...
Er = G10 X...Y..., G11 X...Y...
Er = G10 X...Y..., G11 Ep
Er = G10 Ep, G11 Ec
Er = G10 X...Y...I..., G11 Ec
Er = G10 Ec, G11 Ec
When a stored circle is used for defining a straight line, it could be necessary to reverse the original
circle direction to make circle and straight line directions coincide in the point of tangency.
Circle direction reversal is obtained by entering the - (minus) sign before circle name.
Example:
En = G10 X...Y..., -Ec

Straight line point-angle


Straight line passing through a point and forming an angle with the positive X-axis.
Er = [origin] G13 point J...
Y

E7

E7 = G13 X30 Y12 J45


E7 = G13 E6 J45

E6

12
45
0

30

User and Programming Manual - Part II

3-25

S4045 S4045P
3. PROGET2 programming

Straight line circle-angle


The straight line is defined by a circle it is tangent to and the angle formed with the positive X-axis.
Er = [origin] G13 circle J...
Y

E12 = G13 X15 Y15 I8 J60

E12
E10

E12 = G13 E10 J60


8

15

60
0

15

Straight line through two points


The straight line is defined by two points it passes through.
Er = [origin, ] G10 point1, G11 point2
Y

33

E5

E18 = G10 X38 Y33, G11 X15 Y9

E1

E18 = G10 E5, G11 E6

9
E6

15

38

Straight line circle - circle


The straight line is defined by two circles it is tangent to.
Er = [origin, ] G10 circle1, G11 circle2
Y

E4

E2

10

24

E4 = G10 X14 Y13 I7, G11 X46 Y24 I-10


E4 = G10 E1, G11 E2

E1

13

3-26

14

46

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Straight line point-circle


The straight line is defined by a point it passes through and a circle it is tangent to.
Er = [origin, ] G10 point, G11 circle
Y
E7

32

E9 = G10 X15 Y32, G11 X45 Y20 I10

E8
E9

20

E9 = G10 E7, G11 E8

10

45

15

Straight line circle - point


The straight line is defined by a circle it is tangent to and a point it passes through.
Er = [origin, ] G10 circle, G11 point
Y
32

E9

E7

E9 = G10 X45 Y20 I10, G11 X15 Y32


10

20

E9 = G10 E8, G11 E7


8
E7

E8

15

45

Straight line parallel to other straight lines


Straight line is defined by another line it is parallel to.
Er = line Q...
where Q is the distance between the two straight lines. A positive value defines a straight line on the
left of the stored one. A negative distance defines a straight line on the right of the stored one.
To change the direction of the stored straight line, enter the - (minus) sign.
Example:
Er = - line Q...

User and Programming Manual - Part II

3-27

S4045 S4045P
3. PROGET2 programming

To define the sign of the Q distance you must consider the new direction of the resulting straight line.
Y

E2
E1

E2 = E1 Q8

8
E3

10

E3 = E1 Q-10

Straight line with reverse direction


Straight line with reverse direction
Er = - Er
The new straight line coincides with Er, except for the direction.
Y
E1

E2 = - E1
E2

3.10 CIRCLE STORING


A circle can be defined directly (through its center and radius) or indirectly, by recalling pre-defined
elements.
Possible circle definitions are as follows:

Circle of known radius and center.


Circle of known radius tangent to two lines.
Circle of known radius tangent to a straight line and one circle.
Circle of known radius and tangent to a circle and one straight line.
Circle of known radius tangent to two circles.
Circle of known radius through a point and tangent to a straight line and vice-versa.
Circle of known radius through a point and tangent to a circle and vice-versa.
Circle of known radius through two points.
Circle through three points.

3-28

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Circle of known center tangent to a straight line.


Circle of known center tangent to a circle.
Concentric circles.
Circle with reverse direction.
Circle tangent to three elements.
Circle tangent to two elements in a point.

The straight lines, points and circles used for defining a circle can be defined directly or indirectly.
Example:
Ec = G13 X...Y...J..., G21 I..., G13 X...Y...J...
Ec = G13 Ec J..., G21 I..., G13 X...Y...J...
Ec = Er, G21 I..., G13 X...Y...I...J...
Ec = G20 X...Y...I..., G21 I..., G20 X...Y...I...
Ec = Ec, G21 I...,G20 Ep I
To change the direction of a stored element program the - (minus) sign before calling the element.
Example:
Ec = G20 X...Y...I..., G21 I..., - Ec

3.10.1 DIRECT DEFINITION


Circle of known radius and center
Ec = G20 X...Y...I...
where:
X...Y... center coordinates
I...
circle radius, positive if CCW, negative if CW.
The circle can be referred to an origin other than part zero. In this case the origin must be defined
directly or indirectly before programming the circle.
Example:
Ec = G51 X...Y...J..., G20 X...Y...I...
Ec = Eo, G20 X...Y...I...
The circle center can be a previously stored point.

User and Programming Manual - Part II

3-29

S4045 S4045P
3. PROGET2 programming

Example:
Ec = G20 Ep I...
Y

E4

E1 = G20 X11 Y11 I-7


7

E4 = G51 X26 Y19 J30, G20 X17 Y9 I7

9
17

19
E1

11

30

E4 = E2, G20 X17 Y9 I7

E2

26

11

3.10.2 INDIRECT DEFINITION


Circle of known radius tangent to two straight lines
Ec = [origin, ] line1, G21 I..., line 2
Y
E2

E3 = G13 X...Y...J..., G21 I-8, G13 X...Y...J...

E3

E3 = E1, G21 I-8, E2


E1

Circle of known radius tangent to a straight line and a circle


Ec = [origin, ] line, G21 I..., circle
Y

E7

E2

E3 = G13 X...Y...J..., G21 I-7, G20


X...Y...I...
E1
E3

3-30

E3 = E1, G21 I-7, E2

7
X

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Circle of known radius tangent to a circle and a straight line


Ec = [origin, ] circle, G21 I..., line
Y
E2

E3 = G20 X...Y...I..., G21 I-8, G13 X...Y...J...


E3 = E2, G21 I-8, E1

E1

E3

Circle of known radius tangent to two circles


Ec = [origin, ] circle1, G21 I..., circle2
Y

E3
E1

E2

E3 = G20 X...Y...I..., G21 I8, G20 X...Y...I...


E3 = E1, G21 I8, E2

Circle of known radius through a point and tangent to a straight line


Ec = [origin, ] point, G21 I..., line
Ec = [origin, ] line, G21 I..., point
Y
E7

E7 = G20 X...Y..., G21 I10, G13 X...Y...J...

10
E5

E7 = E5, G21 I10, E6


E6

User and Programming Manual - Part II

3-31

S4045 S4045P
3. PROGET2 programming

Circle of known radius through a point and tangent to a circle


Ec = [origin, ] point, G21 I..., circle
Ec = [origin, ] circle, G21 I..., point
Y
E5

E7 = G20 X...Y..., G21 I10, G20 X...Y...I...

10

E6

E7 = E5, G21 I10, E6


E7

Circle of known radius through two points


Ec = [origin, ] point, G21 I..., point
Y
E6

10

E6 = G20 X...Y..., G21 I10, G20 X...Y...

E4

E6 = E4, G21 I10, E5

E5

Circle through three points


Ec = [origin, ] G10 point, G20 point, G11 point
Ec = [origin, ] G20 point, G20 point, G20 point
Y

E6 = G10 X...Y..., G20 X...Y..., G11 X...Y...

E6

E6 = G10 E1, G20 E2, G11 E3


E1

E2
E3

E6 = G20 X...Y..., G20 X...Y..., G20 X...Y...


E6 = G20 E1, G20 E2, G20 E3

3-32

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Circle with center in a point and tangent to a straight line


Ec = [origin, ] G21 point, line
Y

E4

E6 = G21 X...Y..., G13 X...Y...J...

E5

E6 = G21 E5, E4

E6

Circle with center in a point and tangent to a circle


Ec = [origin, ] G21 point, circle K2
K2 marks the solution with the longest radius.
Y
E6

E6 = G21 X...Y..., G20 X...Y...I...

E5

E6 = G21 E5, E4

E4

Y
E6

E6 = G21 X...Y..., G20 X...Y...I... K2


E4

E5

User and Programming Manual - Part II

E6 = G21 E5, E4 K2

3-33

S4045 S4045P
3. PROGET2 programming

Concentric circles
Ec = circle Q...
where Q is the distance between the two circles. A positive distance defines a circle left of the stored
circle. A negative distance defines a circle right of the stored circle.
E3

E1

E2

E2 = E1 Q4

7 4

E3 = E1 Q-7

Ec = circle I...
defines a circle with the same center and I radius. Obviously, the predefined circle must be stored in
memory.
Y

E2

E1

E2 = E1 I15

15

Circle with reverse direction


Ec = - Ec
The new circle coincides with the predefined circle, except for the direction.
Y

E1

E2

E2 = - E1

3-34

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

Circle tangent to three elements


Ec = [origin,] element1, element2, element3
The three elements can be points, circles or straight lines.
Y
E3
E2

E4 = G13 X...Y...J..., G13 X...Y...J..., G20 X...Y...I...


E4

E4 = E1, E2, E3
E1

Circle tangent to two elements in one point


The point of tangency must belong to one of the two elements (straight line or circle) and must be
programmed as a circle with zero radius (G20 X...Y...)
Y

E1 = G13 X0 Y20 J0
E2 = G20 X40 Y20 I15
E3 = E1, G20 X18 Y20, E3

E1

E2
E3

3.11 ORIGIN OFFSET / ROTATION STORING


An origin can be defined directly or indirectly by recalling a predefined point.
Direct definition

Eo = G51 X...Y...J...

Indirect definition

Eo = G51 Ep J...

User and Programming Manual - Part II

3-35

S4045 S4045P
3. PROGET2 programming

E5 = G51 X30 Y10 J45


45

10
E5

30

The G51 X...Y...J... coordinate rotation/offset code can be programmed within a profile.
The elements programmed after G51 will be referred to the new coordinate system.
Coordinate rotation/offset is disabled by G50.
This programming mode allows to subdivide a profile into sections that can be referred to different
origins and coordinate systems. However, after rotating/offsetting sections of a profile with G51, it is
not possible to use G51 for rotating/offsetting the complete profile.
Profile offset can be programmed with G52.
For a subsequent rotation of the whole profile, G51 must be used as the origin for rotating/offsetting
the single profile elements. This way, the stored elements are already referred to the primary origin and
can be recalled into the profile program.

Example:
E2 = G51 X20 Y20 J30, G20 X5 Y5 I10
E3 = G51 X20 Y20 J30, G13 X20 Y0 J90
E2
E3

E13 = G51 X-55.4 Y66.3 J-35.5


E14 = E13, G13 X0 Y-22.5 J180
E15 = E13, G10 X-20 Y-20, G11 X22 Y-12.3
E14
E15

3-36

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3.12 DISTANCE STORING


A distance is defined in indirect form.
1.

Distance between two points

E1

2.

E3=G20XY,G20XY
E3=E1,E2

+ E2

E3

Distance between a point and a straight line

E1

+
E2

E3=G20XY,G13XYJ
E3=E1,E2

E3

3.

Distance between two straight lines

E3=G13XYJ,G13XXJ
E3=E1,E2

E1
E2
E3

The distance value is read in the parameters wth the format Pn=Em

User and Programming Manual - Part II

3-37

S4045 S4045P
3. PROGET2 programming

3.13 RECALL OF STORED ELEMENTS INTO A PROFILE


Stored elements (points, straight lines, circles, etc...) can be recalled into a profile by programming E
followed by the element identification number.
Example:
G13 X0 Y-60 J180
G21 I-12
E7
G13 X-25 Y0 J90
E8
Stored elements can also be used for programming other profile elements.
Example:
E7
G13 E4 J-45
G10 X-23 Y35 I-45
G11 E16
G20 E12 I-33 K2
In case of non-automatic profile approach/exit, elements stored as ' points' can only be recalled as
start/end points (G41/G42/G40 without the K parameter)
In a fixed cycle, elements stored as 'points' can also be recalled into a fixed cycle, as application point
for a G51 or G52, in a linear interpolation block.
For a rapid linear interpolation add R or G0 to the block containing the element.

3-38

User and Programming Manual - Part II

S4045 S4045P
3. PROGET2 programming

3.14 SPLINE CURVES


G27 allows the linking of a series of at least five points with a SPLINE or cubic polynomial curve.
The system automatically segments the calculated curve in order to execute it as a sequence of linear
moves.
The allowable chordal error (segmentation tolerance) between the calculated curve and the linear
segments must be programmed in the first curve block with the I parameter (default value I=0.05
mm).
The program shall be opened by a G27 code:
G27 X...Y...[I...] [Q...] [D1=1]
where:
X...Y...
I...
Q...
D1=1

first point of the curve.


segmentation tolerance (default value I=0.05 mm).
angle on the starting point.
closed curve.

The program must be closed by a G29 code with the following format:
G29 X...Y...[Q...]
where:
X...Y...
Q...

last point of the curve.


angle on the last point.

Example:
G49 I...
G41/G42
G27 X...Y... [I...][Q...]
X...Y...
X...Y...
X...Y...
X...Y...
X...Y...
G29 X...Y...[Q...]
G40

tool radius definition.


cutter compensation enable.
first point on the curve.

subsequent points.

last point on curve.


cutter compensation disable.

If cutter compensation is enabled, the calculated curve will be offset by the compensation value
(programmed with G49) to the right (G42) or the left (G41) of the calculated curve.
This compensation value must be as small as possible. Therefore, it is advisable to program the mill
center path and then apply a compensation equal to the difference between the actual and the
programmed mill radius.

User and Programming Manual - Part II

3-39

S4045 S4045P
3. PROGET2 programming

The control automatically positions the tool perpendicular to the curve in its first and last points.
To position the tool at any other angle you must use the Q parameter to program the angles formed by
the straight line tangent to the curve in the start/end points and the X axis.
To close a curve with a perfect fit it is necessary to program D1 =1 in the G27 starting block without
making the starting and final points coincide. The system will automatically close the curve and return
to the starting point.
It shall be remembered that curve machining will start from the third rather than from the first
programmed point.
If a point in the curve must be taken as a cusp (that is, a sharp edge) it must be programmed with G28
preceded and followed by at least five points.
If along with the curve points different Z coordinates are programmed, the control performs an
interpolation on the Z axis as well and subdivides the difference between two programmed Z points
among the various points of the resulting segmented line.

3-40

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

4. LOGICAL MATHEMATICAL
PROGRAMMING
4.1 PARAMETRIC PROGRAMMING
A parameter is a numeric value that can be invoked by means of a code. A parameter code consists of
the letter P followed by a number (from P0 to P199).
Parameters have been increased in 400 (from P0 to P399) in release 1.5 and higher.
Parametric programming makes it possible to assign different numeric values to the same co-ordinate
throughout the program. For instance, by programming X25.5 we assign to X a constant value (25.5
mm), whereas by programming XP5 we assign to X all possible values that may be given to P5 within
the program.
For example, P parameters may be assigned values calculated via mathematical functions.
Besides being used to define axis co-ordinates, P parameters can also be applied to the following
functions:

technological T, S, F, M, H codes
G codes
E codes (geometric elements)
K codes (cutter compensations)
P codes (parameters).

Example:
P10 = 41
GP10

equivalent to G41

P12 = 5
P1 = P12
EP1 = G20 X20 Y20 I55 equivalent to E5 = G20 X20 Y20 I55
P2 = 18
KP2 = 10.5

equivalent to K18 = 10.5

P3 = 24
P3 = 15

equivalent to P24 = 15

User and Programming Manual - Part II

4-1

S4045 S4045P
4. Logical mathematical programming

A parameter value may have the following formats:


P = value
P = expression.
An expression is a coherent set of constants, parameters, operands and brackets.
The free parameters which can be used for parametric programming are conditioned also when
WRITEL and WRITEC functions are used in addition to tool presetting cycles and workpiece
measuring and centring cycles.
When writing parametric programs, the following parameters must not be used as they are used by the
system:
From P90 to P99
From P101 to P108
P199

used in the measuring cycles (G872 and G873) and, for P99, by some
advanced programming functions (G787, G797, G721)
used for storing position of the axes at the end of a CYCLE RESUME or
STORED SEARCH
used for storing the length in millimeters of the tool path.

Free parameters with WRITEL and WRITEC instructions


P0
from P16 to P19
da P23 to P30
P32
from P34 to P41
from P44 to P49
from P52 to P76
from P78 to P87
from P90 to P98
from P110 to P198
from P200 to P399

Free parameters in tool presetting cycles with mechanical feelers (PRES PROGRAM)
P0
P23
P32
P40
from P44 to P46
P50
from P52 to P59
P64
P70
P74
P100
from P110 to P114
P116
P117
from P119 to P187
from P189 to P198
from P200 to P399

4-2

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

Free parameters in tool presetting cycles with laser feelers (PRES PROGRAM)
P0
P16
P19
P32
P40
from P44 to P46
P50
P52
P74
P100
from P110 to P114
P116
P117
from P119 to P187
from P189 to P198
from P200 to P399

Free parameters with feeling and measuring cycles (MEASUREMENT PROGRAM)


P19
P29
from P35 to P38
from P45 to P49
da P55 to P69
P73
P75
P77
from P110 to P198
from P200 to P399

4.1.1 ALLOWABLE MATHEMATICAL OPERANDS


One element operands
SIN
COS
TAN
ASN
ACS
ATN
SQR
ABS
INT
NEI
LOG
LGT
-

sine of an angle in degrees and decimals


cosine of an angle in degrees and decimals
tangent of an angle in degrees and decimals
arc sine in degrees and decimals
arc cosine in degrees and decimals
arc tangent in degrees and decimals
square root
absolute value
truncated integer value
closest integer value
natural logarithm
decimal logarithm
change of sign

User and Programming Manual - Part II

4-3

S4045 S4045P
4. Logical mathematical programming

Two element operands


+
*
/
^

addition
subtraction
multiplication
division
power

In case of power calculations the result has always the same sign as the base, no matter whether the
exponent is an odd or an even number. For instance -2^2 = -4.
Examples:
P8 = -P8
P1 = 3.55
P1 = P1+1
P3 = SQR(P2^2+85.67^2)

changes the sign to parameter P8


assign to P1 the value 3.55
increments the value of P1 by 1
Assigns to P3 a value equal to the hypotenuse of a right triangle whose
sides are P2 and 85.67 (Pythagorean theorem).

A series of assignments can be programmed in the same block with commas , as separators.
Example: P1 = -1.3, P2 = 180.3, P5 = 24.7, P8 = -81.8
A parameter assignment may be followed by a comment.
Example: P10 =5 [throat depth.

4.1.2 P-PARAMETER INITIALIZATION


Other than by assignment or calculation, P parameters can be initialized in several ways.

Reading values stored in E geometric elements with the Pn=Em instruction


The initialization is performed with the instruction Pn = Em. allowing definition of one or more P
parameters according to the type of geometric element.
If Em is a circle, center co-ordinates (abscissa and ordinate) and circle radius will be read into the Pn,
Pn+1 and Pn+2 parameters.
If Em is a point, its abscissa and ordinate will be read into the Pn and Pn+1 parameters.
If Em is a straight line, its distance from the origin and the angle in degrees will be read into the Pn and
Pn+1 parameters.
If the geometric element is a distance, the value of the distance is transferred to the parameter Pn.
If Pn = Em,1 or Pn = Em,2 or Pn = Em,3 is programmed the first second or third value of the Em
element will be read into Pn.
For example, by programming P5 = E12,3 the third parameter defining a circle (i.e. the radius) will be
read into Pn.

4-4

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

Reading date and time from the system clock


Pn = TIME reads into the Pn, Pn+1 and Pn+2 parameters the time (hour, minute and second) read
from the system clock.
Pn = DATE reads into the Pn, Pn+1 and Pn+2 parameters the current year, month and day.
Pn = SECOND reads into Pn the time (in seconds) elapsed since system start-up.
By programming two Pn = SECOND instructions, one at program start and the other at program end,
and a third parameter for the calculation of the difference, it is possible to determine and print the
machining cycle time in the desired unit of measurement.
Example:
P1 = SECOND
...
...
P2 = SECOND
P3 = (P2-P1)/60

[P3 = machining time in minutes

Reading the O, T, S, F - function values


The instructions Pn=O, Pn=T, Pn=S, Pn=F read into the Pn parameter the active origin/tool number
and the values of the programmed S and F functions.

Reading the current axis positions


The instruction Pn = axis name reads into the Pn parameter the current position of the selected axis.
For example, P5=Z reads into P5 the current position of the Z axis.

Values from keyboard


When the control processes a Pn = ? instruction, program execution stops waiting for the operator to
enter the desired value of Pn .
The P = ? green message blinks on the lower right corner of the screen and the current Pn value is
displayed on the lower left corner.
To resume program execution enter the new value (or confirm the old value) and press

If the Pn = ? instruction is followed by a comment this will appear in zone C of the screen.

User and Programming Manual - Part II

4-5

S4045 S4045P
4. Logical mathematical programming

Measuring point co-ordinates with a touch probe


The G872 and G873 functions allow the control to measure the co-ordinates of a point in space and to
store them into the P90 through P95 parameters. Moreover, the control will set the P99 parameter to 1
if the co-ordinates have been measured, and to -1 in case of touch probe missing the part.

Reading a tool offset value


The instructions Pn1 = Km and Pn2 = Tm transfer radius and length values of the m tool, stored in the
tool table, into the parameters Pn1 and Pn2.
The instructions Km = Pn1 and Tm = Pn2 transfer radius and length values of the m tool, stored in the
parameters Pn1 and Pn2, into the tool table.
These instructions can be used in the MDI mode to initialize the tool table. For example, by
programming T15 = 151, K15 = 10.5, the tool 15 will be stored with a length offset of 151 and a radius
offset of 10.5.

Reading PLC values


Instructions such as:
Pn = INP(1)

Pn = INP(8)

Pn = INP(16)

Pn = INP(32)

read into the Pn parameters PLC numerical values representing a state (ON/OFF), or a set of ON/OFF
states for a particular device, or the result of a measurement performed by an external system etc.
On the other hand instructions such as:
OUT(1) = Pn

OUT(8) = Pn

OUT(16) = Pn

OUT(32) = Pn

transfer P parameter values into the PLC.


These instructions are operational on condition that the machine is equipped with devices controlled by
the machine logic program edited by the machine tool manufacturer.

4-6

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

4.2 CONDITIONAL BRANCHES


Program execution is performed block by block, in a sequential way.
The instruction sequence can be changed by programming branch instructions to a block defined by a
label reference.
These branch functions are conditioned by the value of a parameter.
Example:
Pn > Lm
Pn < Lm
{Pm=Pn} Li
{Pm>Pn} Li
{Pm<Pn} Li
{Pm>=Pn} Li
{Pm<=Pn} Li
{Pm<>Pn} Li

Branch to label L=m if Pn > 0


Branch to label L=m if Pn < 0
Branch to label L=i if Pm = Pn
Branch to label L=i if Pm > Pn
Branch to label L=i if Pm < Pn
Branch to label L=i if Pm is greater than or equal to Pn
Branch to label L=i if Pm is less than or equal to Pn
Branch to label L=i if Pm is different from Pn

The second parameter Pn can also be a numeric value.


Example:
{P18<>24}L5

defines a branch to label L5 if P18 is different from 24.

Unconditioned skip is obtained by writing:


{Pm=Pm} Li

always skips to label L=i

Example:
{P1=P1} L99

always skips to label L=99

User and Programming Manual - Part II

4-7

S4045 S4045P
4. Logical mathematical programming

4.3 REPEAT EXECUTION OF A PROGRAM SEQUENCE


L codes make it possible to perform up to 32,767 repeat executions of a program or of a program
sequence.
The program sequence to be repeated must be included between a label reference and the branch
instruction to the label followed by the desired number of repeat executions.
The number of repeats can be defined by a value or by a parameter.

Example:
.....
.....
L=12
.....
.....
.....
L12 K8

definition of label 12

branch 8 times to label 12

Within a repeat cycle it is possible to define up to 8 nesting levels.


Repeat execution of a program sequence is normally associated with incremental or parametric
programming.

4.4 INTERNAL SUBROUTINES


A subroutine is a sequence of blocks that can be called from different points in the main program.
Examples of subroutines are:
A series of points to which a fixed cycle has to be applied (for drilling, tapping, reaming operations etc.)
or a profile that needs to be executed several times at different points or with different cutter
compensations.
To call a subroutine, enter the letter L followed by the subroutine number.
Internal subroutines must be programmed at the end of the main program, after the M30 block.
A subroutine must start with the L=n block and end with the G32 return code.
A subroutine can call another subroutine, with up to 8 nesting levels.

4-8

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

Example:
[center drilling
F200 S1800 M3
G81 Z-5 J2
L2
L3
G80 Z100
[drilling D5
G81 Z-25.5 J2
L2
G80 Z100
[drilling D=8
G81 Z-29 J2
L3
.....
M30
L=2
X120 Y50
X-120
Y-50
X120
G32
L3
.....
G32
Geometric data within a subroutine can also be defined as parameters. The values of these
parameters must be specified in the main program before calling the subroutine.
It is possible to program up to 100 labels, from L0 to L99, to be used both for repeat execution of a
program sequence and for internal subroutines.

4.5 EXTERNAL SUBROUTINES


A subroutine can be stored and recalled by programming the L code followed by the program name
and a colon, if the two programs reside in the same memory (system memory or hard disk).
Example: LPROG1:
External subroutines do not have a code for program start/end. After executing the last subroutine
block the control automatically returns to the main program.
The maximum allowable number of external subroutines depends only on the amount of available
memory.
External subroutines are normally programmed in a parametric form and are used for special
machining cycles.
Parameter values must be specified in the main program before calling an external subroutine.

User and Programming Manual - Part II

4-9

S4045 S4045P
4. Logical mathematical programming

The programs stored in other folders in the main folder D:\S4000\PARTPROG can be recalled by
using the following command format:
L\folder_name\program_name;
e.g.: L\ESEMPI\PROG1;

The command format for recalling the program in a subfolder is:


L\folder_name\subfolder_name\program_name;
e.g.: L\ESEMPI\SELCA\PROG1;

The command format for recalling a program in the previous folder which respect to the folder where
the calling program is stored is:
L..\program_name;
e.g.: L..\PROG2;

The command format for recalling a program whose path is different from that of the calling program is
(the entire path must always be specified):
L\folder_name\program_name;
e.g.: in program PROG1 located in folder D:\S4000\PARTPROG\ESEMPI to recall program PROG2 in
folder D:\S4000\PARTPROG\SELCA:
L\SELCA\PROG2;
Note that the main starting folder is D:\S4000\PARTPROG
The entire path must be specified (the programs cannot be recalled with the simple Lprogram_name
command) if the program to be recalled in a folder contains recalled programs in turn:
e.g.:

in program FIERA stored in the main folder to recall the program DEMO stored in the SELCA
folder, which in turn recalls programs PROG1, PROG2, PROG3, etc. which are also stored in
SELCA:

WARNING !! :

in recall to external subprograms, the program names recalled must not


contain spaces.

Program FIERA

Program DEMO

L\SELCA\DEMO;

L\SELCA\PROG1;
L\SELCA\PROG2;
L\SELCA\PROG3;
.......

4-10

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

4.6 PREDEFINED SEQUENCE CALL


Within a program or subroutine, whether internal or external, it is possible to leave data (or an entire
block) undefined by writing an asterisk ( * ).
During execution the control automatically replaces the asterisk with the last character sequence
enclosed between parenthesis which is found prior to the asterisk.
This feature allows, for example, repeat calls to a subroutine under different conditions or to the same
linking radius within a profile.
Example:
.....
(G21I-5)
G13X0Y0J45
*
G13Y50J0
*
.....
The asterisks will be substituted with the instruction G21 I-5, previously programmed between
parenthesis.
If necessary, it is possible to store up to 9 sequences and recall them several times within the program.
The programming format is:
*n = sequence (with n in the range 1 to 9)
The stored sequence is recalled by programming the * (asterisk) character followed by the number of
the desired sequence.
This feature can be used to recall a linking radius within a profile.
Example:
*1 = G21 I5
*2 = G21 I10
.....
G13 Y50 J180
*1
G13 X-50 J-90
*2
.....
Calls to undefined sequences are ignored.
To disable predefined sequences you must program:
( ), *1=, *2=, *3=, etc.
that is an empty parenthesis followed by asterisks and sequence numbers without any value after the
= (equal) sign

User and Programming Manual - Part II

4-11

S4045 S4045P
4. Logical mathematical programming

4.7 OUTPUTTING P PARAMETERS


System P parameters can be output to a printer, to a program stored in system memory or to a floppy
disk/hard disk file.
The control provides the OPEN, FORMAT, PRINT and CLOSE instructions in order to perform
printing.

OPEN
This instruction defines the name of the program into which the parameters will be stored. The
instruction format is:
OPEN 2, NAME
The program NAME is created in the same environment, memory or hard disk, where the program
containing the instruction OPEN resides.
If the program NAME is already in memory, the system creates a program by adding /A, /B, /C, etc.
characters to the name.
To overwrite the existing program, you must program as follows:
OPEN 3, NAME
To append to the existing program, you must program as follows:
OPEN 4, NAME

FORMAT
Six different print formats can be programmed:
FORMATn = STRING ####.### STRING ####.### STRING ####
where:
n

defines the format number (from 1 to 6) to be specified in the PRINT instruction.

and
STRING
#

4-12

is a sequence of alphanumeric characters.


The # characters define the printing format of the parameter numeric values (Pn).
####.### defines a printing format made of 3 integers and 3 decimals, plus sign.
#### defines a printing format consisting of 3 integers plus sign.

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

PRINT
This instruction enables printing of the parameter list. The instruction format is:
PRINT n, P..., P..., P..., P...
where:
n

is the format number previously defined (1 to 6)

P...

are the parameters to be printed, from P0 to P199, separated by commas.

The PRINT instruction alone will cause a line feed.


If you are outputting parameters to a program, the format used in conjunction with the PRINT
instruction must generate a program block with the proper syntax.
An alphanumeric string must have a [ (open square bracket) as first character.
Blocks with an incorrect syntax are stored in the destination program with a @ as first character.

CLOSE
The CLOSE instruction closes the printing file. It must be programmed alone after the last PRINT
command.

Programming example
OPEN 2, NAME
E1=G20X20Y20I-20
E2=G20X99Y99
E3=G13X50Y0J90
P10=E1
P15=E2
P20=E3
FORMAT1=XCENTER ####.### YCENTER ####.### RADIUS ####.###
FORMAT2=XPOINT ####.### YPOINT ####.###
FORMAT3=DISTANCE ####.### ANGLE ####.###
PRINT 1,P10,P11,P12
PRINT 2,P15,P16
PRINT 3,P20,P21
CLOSE
.........

User and Programming Manual - Part II

4-13

S4045 S4045P
4. Logical mathematical programming

4.7.1 TABLE SAVING EXAMPLE DURING PROGRAM PRINTOUTS


This following examples show how to save three files called ORIGINI (origins), UTENSILI (tools) and
PARAMETRI (parameters) containing the respective tables in the D:\S4000\PARTPROG folder.
After saving, the resulting programs must be run to overwrite the old ORIGIN, TOOL and
PARAMETERS tables.
SAVE ORIGINS
Example of a program for saving the origins of the three main axis XYZ in a file called origins.

OPEN2,ORGINES
FORMAT1=O###=X#####.###Y#####.###Z#####.###K3
P1=0 [Counter
L=1
P1=P1+1
P2=OP1K1
P3=OP1K2
P4=OP1K3
PRINT1,P1,P2,P3,P4
L1K198 [199 origines
CLOSE

SAVE TOOLS
Example of program for saving the tool radius and the tool length for all the table in a file called tools.
OPEN2,TOOLS
FORMAT1=T###=#####.###,K###=#####.###
P1=0 [Counter
L=1
P1=P1+1
P2=TP1
P3=KP1
PRINT1,P1,P2,P1,P3
L1K299 [300 tools
CLOSE

SAVE PARAMETERS
Example of program for saving the program parameters in the respective table in a file called
"parameters". Parameter P199 is used as a counter and its original value is consequently lost.
OPEN2,PARAMETRI
FORMAT1=P###=##########.##########
P199=-1 [Counter
L=1
P199=P199+1
P200=PP199
PRINT1,P199,P200
L1K199 [200 parameters
CLOSE

4-14

User and Programming Manual - Part II

S4045 S4045P
4. Logical mathematical programming

4.8 MESSAGES DISPLAYING


The DISP instruction allows the display of a screen page consisting of 15 lines with up to 63 characters
per line.
The programming format is:
DISP n = character string (with n ranging from 1 to 18).
The DISP -1 instruction allows the screen page to be recalled from program and displayed.
The DISP -2 instruction restore the screen page that was previously selected (LIST or DRAWING).
The DISP 0 instruction cancels all texts currently on the screen.
The screen page can also be displayed by pressing the MESSAGES softkey (

).

The DISP function is used as an operator guide, to indicate the operations to be performed or to
explain the meaning of the P parameters entered from the keyboard with the format Pn = ?.

Programming example
.........
Z100R
G9999
DISP - 1
DISP1 = CHECK TOOL
DISP3 = IF OK PRESS START
DISP5 = IF OK PRESS BREAK
M0
DISP - 2
.........

User and Programming Manual - Part II

4-15

S4045 S4045P
4. Logical mathematical programming

4-16

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

5. ADVANCED PROGRAMMING OR
MACRO INSTRUCTIONS
ADVANCED PROGRAMMING makes use of G codes to define macro instructions.
The following G codes are listed in the order in which they are described in this chapter.
G77
G78
G79
G777
G701
G778
G779
G754
G753
G711
G710
G721
G780
G781
G782
G783
G784
G785
G786
G787
G789
G791
G792
G793
G794
G795
G796
G797
G799
G761
G760
G201
G202
G200
G841
G840
G751

first point of a polygonal pocket.


last point of a polygonal / circular pocket (roughing cycle).
last point of a polygonal / circular pocket (roughing & finish cycle).
opens profiled pocket programming and sets parameters.
defines tool approach to profiled pockets.
profiled pocket (roughing cycle).
profiled pocket (roughing & finish cycle).
profile direction reversal.
cancels G754.
profile storing.
cancels G711.
calculates and stores equidistant points on a profile.
grid / circumference pattern machining repeat: execution.
grid pattern drilling / spot facing supercycle.
grid pattern deep mixed drilling supercycle.
grid pattern deep drilling supercycle.
grid pattern tapping supercycle.
grid pattern reaming supercycle.
grid pattern boring supercycle.
machining repeat supercycle.
grid pattern differentiated drilling supercycle.
circumference pattern drilling / spot facing supercycle.
circumference pattern deep mixed drilling supercycle.
circumference pattern deep drilling supercycle.
circumference pattern tapping supercycle.
circumference pattern reaming supercycle.
circumference pattern boring supercycle.
circumference pattern machining repeat supercycle.
circumference pattern differentiated drilling supercycle.
axis travel delimitation.
cancels G761.
cylindrical programming.
polar programming.
cancels G201 and G202.
tool radius compensation in space.
cancels G841.
rotation/offset in space.

User and Programming Manual - Part II

5-1

S4045 S4045P
5. Advanced programming or macro instructions
G750
G749
G748
G740
G746
G736

cancels G751.
4/5-axis surface machining with 1/2-axis rotary heads (dynamic TCPM).
4/5-axis surface machining with rotary / tilting tables (dynamic TCPM).
cancels G749 and G748.
defers G748 cycle.
surfaces defined by a plane profile and one or more section profiles: plane profile and
parameters.
G737 surfaces defined by a plane profile and one or more section profiles: section profiles.
G738 surfaces defined by a plane profile and one or more section profiles: execution.
G34
opens programming of the profile delimiting the zone of ruled surface to be machined.
G35
closes programming of the profile delimiting the zone of ruled surface to be machined.
G726 ruled surface between two profiles: first profile.
G727 ruled surface between two profiles: second profile.
G728 ruled surface between two profiles: execution.
G735 spiral milling.
G734 spiral milling: execution.
G751 special use of G751 for scaling factors.
G73
subprogram modal recall.
G72
cancels G73.
G4725 planetary milling.
G4724 cancels G4725.

5.1 POCKET MILLING


Four different types of pocket milling cycles are available:

polygonal pockets (3 to 8 sides)


circular pockets
profiled pockets
profiled pockets with internal islands.

5.1.1 POLYGONAL POCKETS


G77 allows programming of 3 to 8 side polygonal pockets by specifying the co-ordinates of the polygon
vertices. G77 must be programmed in conjunction with the G78 / G79 closing code.
The polygon must be a convex polygon, i.e. the internal angles must be less than 180 degrees.
Pocket milling may start either from the center or from the border and is carried out with a series of
concentric cuts.
Milling to the programmed depth may be carried out in one pass or in several passes. When several
passes are programmed the depth increment may be executed on the point programmed before G77
or during the positioning of the tool from the end point of a cut to the start point of the following one, in
the center of the pocket.
It is possible to program a finish stock allowance.
G78 starts/closes the pocket roughing cycle that leaves a finish stock allowance. G79 programs
roughing and finish cycles with a finish cut which removes the stock allowance, if programmed.
When machining is performed with several passes it is possible to program the pocket with tapered
walls.
Pocket milling passes can be clockwise or counter clockwise, depending on how the pocket vertex
points have been programmed.
If points are programmed CW the mill radius must be negative.

5-2

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
G77 will open programming of a polygonal pocket milling cycle.
The programming format is:
G77

X...Y... [I...] [J...] [K...] [D0=...] [D1=...] [D2=...] [D3=...] [D4=...] [D6=...] [D7=...] [D9=...]

where:
X...Y...

first point of the pocket.

I...

finish stock allowance. Removed only if the finishing pass G79 is requested.

J...

distance between passes in mill radius units (J=1.6 default value)

K...

link on pocket edges (K > mill radius). If programmed, it will be applied to all pocket
edges. In case a different linking radius is required for a specific edge, it is necessary to
program the new value of K in the block defining the point. This new radius remains
enabled for the following edge points. Program K0 to cancel it and restore the previous
link value.

D0=...

cutting mode:
D0=0 from border to center, Z increments only.
D0=1 from center to border, Z increments only.
D0=2 from center to border, X, Y, Z increments.
D0=3 specifies special use of function G77 to empty pockets with runs parallel to profile.
By default D0=0.

D1=...

starting depth.

D2=...

pass depth.

D3=...

pocket bottom depth.

D4=...

clearance distance (D4=2 mm by default).

D6=...

wall taper rate (D6=0 by default, i.e. vertical walls).

D7=...

percentage of feedrate (F) variation during depth increment (D7= 1 by default).

D9=

withdrawal value from pocket walls during tool out movement at end of cycle.
D9=0.5 mm by default.

User and Programming Manual - Part II

5-3

S4045 S4045P
5. Advanced programming or macro instructions

4
J
5
3

K
1

G78 (roughing) or G79 (finishing) will close pocket programming and enable cycle execution.
The format of this block is:
G78/G79 X...Y...
X...Y...

last point of the pocket.

With D0=0 and D1=0, the first pass will consist of a tool rapid positioning to the point programmed
before G77, followed by a rapid move down to the depth defined by D4 and by a subsequent move
down to the pass starting depth, at the programmed feedrate. In correspondence of this point a hole for
mill entry must be programmed.
Upon completion of each pass the tool will move up by a distance of D4, it will then execute a rapid
positioning move to the point programmed before G77, followed by the programmed increment at
feedrate.
In case of milling cycles from the board to the center (D0=0), the point programmed before G77 must
be internal to the pocket profile and close to the first point of the profile. If milling is programmed from
the center to the border (D0=1), this point must be at pocket center.
NB If no point is programmed before G77, the depth increment will be performed at the current axis
position.
With D0=2, there is no need for programming the tool position before G77.
In this case, the first pass will consist of a rapid tool positioning to the last point of the pocket, followed
by a rapid move down to a distance of D4 from the pocket starting depth and by a XYZ move to pocket
center at the programmed feedrate.
Upon completion of each pass the tool will execute a XYZ movement to the starting point of the next
pass (pocket center) at the programmed feedrate without withdrawing from the part.

5-4

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
This execution mode does not require programming a hole for mill entry.
If the D1, D2 and D3 parameters are not programmed, pocket milling will be executed at the current
tool depth. At the end of the cycle the tool will remain at the last programmed depth and a tool out
movement must be programmed.
If the D1, D2 and D3 parameters are programmed, at the end of the cycle the tool will automatically
retract to the plane defined by the D1 parameter, or D4 if programmed.
Example:
.....
G49 I5
Z50 R
G77 X50 Y10 K12 D0=2 D1=0 D2=4 D3=-10
X0 Y50
X-50 Y40
Y0
G78 X0 Y-30
Z50 R

define tool radius


block opening
pocket points
last pocket point
tool rapid out

5.1.2 CIRCULAR POCKETS


G78 and G79 permit milling of a circular pocket by specifying its center and diameter.
In a pocket roughing cycle (G78) a finish stock allowance may be programmed. G79 programs a
roughing cycle with a finish cut for removing the stock allowance.
Cutting starts at the center of the pocket and is executed with subsequent concentric circular cuts or by
following a spiral path towards the border.
The milling operation may be carried out in one cut at the current tool depth, or with several passes.
When several passes are programmed, the depth increment may take place in the center of the pocket
or while the tool moves from the end point of a pass to the starting point of the next one.
When machining is performed with several passes, it is possible to program a pocket with tapered
walls.
Pockets are milled CCW. To mill a CW pocket program a negative diameter.
The G78/G79 programming format is as follows:
G78/G79 X... Y... K... [Q...] [I...] [J...] [D0=...] [D1=...] [D2=...] [D3=...] [D4=...] [D5=...] [D6=...] [D7=...]
[D9=...] [D10=...] * [D11=..] * [D12=..] *
* for G78 function only.

User and Programming Manual - Part II

5-5

S4045 S4045P
5. Advanced programming or macro instructions
where:
X...Y...

pocket center coordinates.

K...

pocket diameter (negative for CW pockets).

I...

finish stock allowance (I=0 by default) removed only if G79 requests a finishing pass.

Q...

internal diameter.

J...

distance between passes, in mill radius units (J=1.6 default value).

D0=...

cutting mode:
D0=0 with concentric circles from centre to outside and Z increments only.
D0=1 with spiral path from centre to outside and Z increments only.
D0=-1 with spiral path from outside to centre and Z increments only.
D0=2 spiral path from centre to outside with X, Y, Z increments.
* D0=3 spiral on plane from center to outside Z spiral increments
* D0=-3 spiral on plane from outside to center, Z spiral increments
D0= 0 by default.

D1=...

starting depth.

D2=...

pass depth.

D3=...

pocket bottom depth.

D4=...

clearance distance (D4=2 mm by default).

D5=...
D6=...

radius for tool circular approach/exit in the finish cut (by default, the radius is equal to finish
stock allowance, D5=I).
wall taper rate (D6=0 by default, i.e. vertical walls).

D7=...

percentage of feedrate (F) variation during depth increment (D7=1 by default)

D9=...

withdrawal value from pocket walls during tool out movement at end of cycle.
D9=0.5 mm by default.

* D10=...

repositioned in starting point (for D0=3 and D0= - 3 only):


D10=0 rapid return (default)
D10=1 return to programmed F following a semicircular path.

* D11=...

depth increment (for D0=3 and D0= - 3 only).


D11=0 (D12) = spiral path angle on Z to reach D2 (default)
D11=1 (D12) = rotation increment to reach D2
D11=2 (D12) = number of rotations to achieve D2.

* D12=...

D11 value (for D0=3 and D0= - 3 only) (default D12=3).

* for G78 function only.

5-6

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

D0 = 1
D0 = 2

D0 = 0

With D0=0 and D1=0, the first pass will consist of a rapid positioning move to the pocket center,
followed by a rapid move down to the depth defined by D4 and by a subsequent move down to the
pass starting depth, at the programmed feedrate.
With D0=1 the spiral machining starts from pocket border.
Upon completion of each pass the tool will move up by a distance of D4 and will then execute a rapid
positioning move to the pocket center, followed by the programmed increment at feedrate. In
correspondence of this point a hole for mill entry must be programmed.
If D0=2, the first pass will consist of a rapid tool positioning to the last point of the pocket, followed by a
rapid move down to a distance of D4 from the pocket starting depth and by a helicoidal interpolation
move to the pocket center, at the programmed feedrate..
Upon completion of each pass the tool will execute a helicoidal interpolation move to the starting point
of the next pass (pocket center) at the programmed feedrate without withdrawing from the part.
If the parameters from D1 to D6 are not programmed, pocket milling will be executed at the current tool
depth. At the end of the cycle the tool will remain at the last programmed depth and a tool out
movement must be programmed.
Example:
.....
G49 I5
Z50 R
G78 X10 Y10 K80 D0=2 D1=0 D2=4 D3=-10
Z50 R
.....

User and Programming Manual - Part II

define tool radius


circular pocket cycle
tool rapid out

5-7

S4045 S4045P
5. Advanced programming or macro instructions

5.1.3 PROFILED POCKETS WITH PARALLEL PASSES


This cycle allows milling of a pocket delimited by a closed profile with parallel passes that form a given
angle.
Milling is carried out with several passes and the depth increment is executed at a programmed point.
Starting from the programmed point, each pass consists of a profile contouring followed by the
machining of pocket inside.
The following functions allow to program profiled pockets :
G777
G701
G778
G779

opens profile pocket programming and sets parameters


defines tool approach to profiled pockets
profiled pockets roughing cycle
profiled pockets roughing and finish cycle.

The format of the G777 block is as follows:


G777 Z... J... I... [Q...] [D1=...] [D2=...] [D3=...] [D4=...] [D5=...] [D6=...] [D7=...]
where:
Z...

pocket bottom depth.

J...

starting depth.

I...

pass depth.

Q...
D1=...

clearance height for tool rapid out moves (Q=J+2 by default)


pass angle. (D1=0 by default)

D2=...

finish stock allowance (D2=0 by default) removed only if G779 is programmed.

D3=...

parameter defining the mill path from the last point of a pass to the first point of the next
one.
If the profile section to be covered is equal to or less than D3 times the distance between
the above mentioned points, the mill will follow the profile at the current depth.
In case of longer distance, a rapid tool out move to the Q clearance height and then to the
pass starting point is performed, followed by a rapid move down to the D4 height and by a
feed move down to the first point of the pass.
If D3=0 the positioning to the starting point of the next pass will be carried out at the Q
clearance height.
If D3 is a large value, such as 100, the mill will follow the pocket profile at the current depth.
Default value D3=5.

D4=...

tool clearance distance (D4=2 by default).

D5=...

percentage of feedrate (F) variation during depth increment (D5=1 by default)

D6=...

pass stop distance from the external profile (by default D6=0.2).

D7=...

request of external profile contouring


D7=0 contouring YES
D7=1 contouring NO
By default D7=0.

5-8

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

The format of the G701 block is as follows:


G701 [X...Y...]
with:
X...Y...

profile approach point and point where the pass increment is executed.
The rapid positioning to this point is performed at the Q clearance height.

Pocket profiles can be programmed either with the G10, G11, G13, G20 and G21 PROGET2 codes, or
the G1, G2 and G3 codes.
The pocket profile must be closed, even after the cutter compensation.
When G1 G2 G3 are used, the profile starting point cannot be in correspondence of a pocket edge.
The G778/G779 block format is as follows:
G778/G779 [X...Y...] [J...]
where:
X...Y...

co-ordinates of mill positioning point before starting a cutting pass.


If this point is not programmed, the tool will move to the starting point of the first pass.
Positioning will occur at the rapid rate at the Q clearance height.

J...

distance between passes, in mill radius units (J=1.6 by default, i.e. the distance between
the passes is equal to 1.6 x mill radius).

G778 does not perform finishing. To remove the finish stock allowance, if programmed, it is necessary
to use another tool.
G779 performs a profile finish cycle at each pass, even if no finish stock allowance has been
programmed.
When working on the G18 / G19 machining plane, the pocket depth must be programmed on the Y / X
axis respectively, whereas profile and the positioning movements must be programmed on the ZX / YZ
plane.
Starting from the initial depth (J in G777) n passes with an I depth will be executed. The last pass will
be at the programmed pocket depth Z.
Programming for example Z-10 J0 I4.9, three passes will be executed, at Z-4.9, Z-9.8 and Z-10.
Moves from the Q clearance plane to the D4 height will be performed at the rapid rate. From there
motion to the pass depth will be at the machining feedrate.
To define the start point position for the first pass with a 0-angle (D1=0 or D1 not programmed in
G777), the control calculates a straight line from left to right at a distance of 1.6*mill radius (or J*mill
radius) from the lowest profile point.
The start point of the first pass will be the first intersection point between this straight line and the
pocket profile. The first pass will be executed from left to right. Subsequent passes will be carried out
moving upwards and the cutting direction will be reversed at each pass.
For angles other than zero the control performs similar calculations keeping into account the
programmed D1 angle formed by the straight line.

User and Programming Manual - Part II

5-9

S4045 S4045P
5. Advanced programming or macro instructions
The figures below show the locations of the initial point of the first pass (Pi) and illustrates how the
subsequent passes are executed according to the programmed D1 angle, regardless of the profile
direction.

D1 = 0

D1 = 90

Pi
Pi
D1 = 180
Pi

D1 = -90
Pi

D1 = 30

D1 = 120

Pi
Pi
Pi D1 = 210

D1 = -60
Pi

5-10

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Example:
...
G49 I5
G777 Z-10 I4 J0 D1=30
G701 X0 Y-30
G42 K2
G13 Y-40 J180
G21 I-18
G13 X-50 Y-40 J60
G21
G13 Y45 J0
G21
G13 X50 J-90
G21
G13 Y-40 J180
G40 X0 Y-30 K2
G778
Z50R
.....

defines tool radius


opens cycle programming
defines profile approach

pocket profile

profile end
starts milling cycle
tool rapid out

5.1.4 PROFILED POCKETS WITH INTERNAL ISLANDS (PARALLEL


PASSES)
A profiled pocket that has been programmed with G777, G701, G778/G779 may contain internal
islands.
The programming rules for profiled pockets also apply to island profiles. The program sequence for
each of these islands must begin with a G701 code.
Therefore, the program of a profiled pocket with internal islands will include several G701 blocks, the
first of which will program the external profile while the others will program the profiles of the internal
islands.
The format of the G701 block is as follows:
G701 [X...Y...]
with:
X...Y...

co-ordinates of profile approach point.

At each pass the external profile contouring is first executed, followed by the contouring of the islands
and the machining of the remaining zones.
Positioning moves to contouring and milling start points are performed at rapid rate, at the Q clearance
height.
If the G778/G779 block programs a milling start point different from the start point of the first pass,
make sure that the tool path does not cross an island.
The D3 parameter in the G777 block (defining mill path from the last point of a pass to the first point of
the next one) also allows definition of a mill path that would prevent cutting across islands.

User and Programming Manual - Part II

5-11

S4045 S4045P
5. Advanced programming or macro instructions
If the shortest path around an island is shorter than or equal to D3 times the distance measured along
a straight line, the tool will follow the island profile at the current cutting depth.
If the shortest path is longer than D3 times the above distance, the mill will withdraw from the part and
pass over the island at the Q clearance height.
Example:
...
G49 I5
G777 Z-10 I4 J0 D1=45
G701 X0 Y-25
G42 K2
G13 Y-50 J180
G21 I-10
G13 X-80 J90
G13 X0 Y50 J15
G21
G13 X80 J-90
G21
G13 Y-50 J180
G40 X0 Y-25 K2
G701 X-20 Y0
G42 K2
G20 X-40 Y0 I10
G40 X-20 Y0 K2
G701 X20 Y5
G41 K2
G13 X30 J90
G13 Y20 J0
G13 X50 J-90
G13 Y-5 J180
G13 X30 J90
G40 X20 Y5 K2
G778 X0 Y-25
Z50R
......

defines tool radius


opens cycle programming
defines tool approach to external profile

external pocket profile

defines tool approach to the first island profile


first island profile
defines tool approach to the second island profile

second island profile

starts milling cycle


tool rapid out

5.1.5 PROFILED POCKETS WITH PASSES PARALLEL TO THE


PROFILE
This cycle performs milling of closed profile pockets with subsequent concentric cuts starting at pocket
center towards the border.
The milling operation can be carried out with a single pass, or with several passes by programming the
parameters D1 (pocket start point), D2 (depth increment) and D3 (pocket bottom depth).
The depth increment can be programmed with a Z-axis move in the position defined by the G78/G79
closing function. In correspondence of this point a hole for mill entry must be programmed.
If this point is not programmed, the first pass will consist of a rapid tool positioning to the last point of
the pocket (profile start point), followed by a rapid move down to a distance of D4 from the pocket
starting depth and by a feed move to the pass start point at pocket center.

5-12

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Upon completion of each pass, without withdrawing from the part, the tool performs a feed move to the
start point of the new pass, at pocket center. Therefore, no hole for mill entry is necessary.
A finish stock allowance may be defined.
The G78 function leaves a finish stock allowance, whereas G79 performs a finish cycle and removes
the programmed stock allowance.
The programming format is:
G77 D0=3 [X...] [Y...] [Z...] [J...] [D1=...] [D2=...] [D3=...] [D4=...] [D5=...] [D6=...] [D7=...] [D8=1]
where:
D0=3

defines a special use of G77 for milling a profiled pocket instead of a polygonal pocket

X...Y...

profile approach point. It is only used to calculate the profile start point.
It must coincide with the exit point programmed in G40 (profile end).

I...

defines the stock allowance that will be removed only if a finish pass is programmed.
I=0 by default.

J...

multiplication factor for mill radius for the calculation of the distance between passes.
J=1 by default.

D1=...

pocket starting depth.

D2=...

depth increment.

D3=...

pocket bottom depth.

D4=...

clearance distance (D4=2 by default).

D5=...

radius value for tool automatic approach and exit when the contour finish pass is
performed. Default value D5=I (stock allowance).

D6=...

pocket wall taper rate (D6=0 by default). Taper must be 80.

D7=...

percentage of feedrate (F) variation during depth increment, for example D7=0.5 (D7=1 by
default).

D8=1

machining request for the pocket zones that, because of geometrical reasons, have not
been completely milled (islands). Island milling is performed after the last pass
(programmed profile contouring) with one cut parallel to the profile and several cuts parallel
to the axes.

The pocket profile must be programmed after the G77 function. Either the ISO language (G1, G2, G3)
or the PROGET2 can be used.
In the G41/G42 [K1/K2] function the D0 parameter (collision control) must be programmed to eliminate
the profile elements that, because of profile offset, change direction.
The profile must be closed; the first and the last profile element shall not change direction because of
the various offsets.
G78 without finish pass (or G79 with finish pass) ends the program and enables the cycle.

User and Programming Manual - Part II

5-13

S4045 S4045P
5. Advanced programming or macro instructions
The programming format is:
G78/G79 [X... Y...]
where:
X...Y...

are the co-ordinates of the point where the depth increment is performed. If programmed at
the end of each pass, the tool retracts to the D4 clearance height, moves to the X...Y...
position, descends to the new depth and moves to the pocket center to start milling.
If not programmed, the depth increment is performed during tool repositioning to the pocket
center with a 3-axis move.
In this case the hole for mill entry is not necessary.

Example:
...
G49 I5
G77 D0=3 D1=O D2=5 D3=-20 D8=1 X... Y...
G42 K2 D0=1
...
...
...
G40 K2 X... Y...
G78 X... Y...
...

tool radius definition

pocket external profile

5.2 PROFILE DIRECTION REVERSAL


G754 and G753 allow reversal of the direction of the profile programmed between them. The control
will store the complete profile (with up to 600 elements) and will execute the program sequence from
the last to the first block.
The two functions must be programmed alone in separate blocks.
This feature can be utilized to perform roughing and finishing cycles in which, for technical reasons, the
profile must be roughed in one direction and finished in the opposite direction.
In this case the profile, which is to be programmed as an internal subroutine after M30, will be
referenced for roughing in the programmed direction. It will then be referenced for finishing between
G754 and G753 and executed in the opposite direction.
Example:
T10 [select roughing mill D=16
S1200 M13 F500
G49 I8.5
X0 Y-30 R
Z2 R
L11
Z100 R M5
T11 [select finishing mill D=12

5-14

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
S1200 M13 F300
G49 I6
X0 Y-30 R
G754
L11
G753
Z100 R
M30
[profile definition
L=11
G41 K2
G13 Y-50J0
..............
..............
G40 K2 X0 Y-30
G32
The following codes and cycles cannot be programmed between G754 and G753 : M, S, T codes, fixed
cycles, splines, circular, polygonal and profiled pocket cycles.
Collision control may be on in the profile (D0=1)

5.3 PROFILE STORING


G711 permits storing of profiles that can be used for calculating equidistant points on a profile (G721)
or intersection points between a straight line and a profile.
G711 makes it possible to store up to 10 profiles. Profiles are identified by a letter K, from K31 through
K40.
The programming format is:
G711 K... [X...Y...] [I...]
where:
K...

profile identifier, from 31 to 40 (K31 by default).

I...

cutter compensation (I=0 by default).

X...Y...

profile tool approach point (optional).

The programming sequence must be closed with G710, to be programmed alone in one block.
The profile may be programmed in ISO or PROGET2.
The circle or straight line that defines the tool approach/exit to/from the profile will not be included in
the stored profile.
To store more than one profile program one G711 code for each profile.

User and Programming Manual - Part II

5-15

S4045 S4045P
5. Advanced programming or macro instructions
Example:
G711 K31
G41/G42 [K1][K2]
...
...
...
G40 [K...][X...][Y...]
G710

starts profile storage sequence


defines tool approach
profile
defines tool exit
ends storing sequence.

5.4 CALCULATION OF INTERSECTION POINTS BETWEEN


A PROFILE AND A STRAIGHT LINE
The control can calculate the intersection points between a straight line and a profile. These points can
then be stored as E geometric elements.
The programming format is as follows:
Ep =Er, Epf [K...]
where:
Ep

identifier of the geometric element where the calculated intersection points will be stored
(E1 through E30).

Er

identifier of the geometric element where the straight line has been stored (E1 through
E30).

Epf

identifier of the profile stored with G711 (E31 through E40)

K...

number of the requested intersection points (from 1 to 100, K=1 by default).

The control stores the intersection points in the Ep elements as circles with zero radius.
The first two parameters of the stored elements are the abscissa and the ordinate of the point. The
value of the third parameter is always zero.
If the straight line does not intersect the profile, the control will store -1 in the third parameter to signal
this condition.
The calculated points (Ep) may be used in a program as such. Alternatively, their abscissas and
ordinates may be stored into program parameters with the Pm=En instruction.
For instance, by programming P5=E2 the point coordinates of the E2 element will be stored in the P5
and P6 parameters.
The value 0 or -1, which indicates whether the intersection between the straight line and the profile
exists or not, will be written in the P7 parameter. It is advisable to program the most appropriate
checks on this P7 parameter.

5-16

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Example:
G711 K31 I5
storing of profile 31 with a 5 mm compensation radius
G41
...
...
profile
...
G40
G710
profile storing end
P1=0
first coordinate of straight line
L=10
repeat cycle start
E1=G13 X0 YP1 J0
straight line storing
E2=E1,E31
intersection point calculation
P5=E2
transfer of E2 into P5, P6 and P7
P7<L99
checks if intersection exists
...
if P7=0 intersection exists
...
...
make use of P5 and P6 parameters
...
P1=P1+2
increment of straight line coordinate
P7>L10
branch to L=10
L=99
P7=-1, intersection not found

5.5 CALCULATION OF EQUIDISTANT POINTS ON A


PROFILE
G721 calculates and stores equidistant points on a profile that has been previously stored with G711.
The programming format is as follows:
G721 I... J... K... [Q...] [D0=...]
where:
I...

distance between points (alternative to J).

J...

number of points (alternative to I).

K...

identifier of the profile stored with G711 (from 31 to 40).

Q...

mode of processing the final points of the profile elements:


Q1 final points not stored
Q2 final point stored
(Q=1 by default).

D0=...

mode of processing the final point of the profile:


D0=1 final point not stored
D0=2 final point stored
(D0=1 by default).

For every point the system stores the abscissa, the ordinate and the angle of the tangent to the profile
at that point (from 0 to 360).

User and Programming Manual - Part II

5-17

S4045 S4045P
5. Advanced programming or macro instructions
The number of calculated points is stored in the P99 parameter (max. 32767).
To use the stored points it is necessary to copy them into E elements.
The programming format is as follows:
Ep = Epf K...
where:
Ep

identifier of the geometric element where to store the point (from E1 to E30)

Epf

identifier of the stored profile referenced by G721 (from E31 to E40)

K...

sequence number of the requested point (less than or equal to P99).

The first two parameters of the stored elements are the abscissa and the ordinate of the point. The
value of the third parameter is the angle.
The geometric element parameters must be stored into the P program parameters with the Pn=Em
instruction. For instance, by programming P5=E2 the point coordinates of point 2 will be stored in P5
and P6, and the angle value in P7.
If the number of the requested points (K) is greater than the number of calculated points (stored in the
P99 parameter), -1 will be stored in the third parameter.
Example:
...
G711 K35
G41
...
...
G40
G710
G721 J18 K35
P1=0
L=10
P1=P1+1
E1=E35 KP1
P10=E1
...
...
{P1<P99}L10
...
...

storing of profile 35 without radius compensation


profile

storing sequence end


calculate 18 equidistant points on the profile
set counter
repeat cycle
increment counter
store P1 point into E1
transfer point coordinates into P10 and P11 parameters
make use of calculated coordinates
branch to L=10 if P1<P99
recall all points
continue program.

5.6 FIXED SUPERCYCLES


Supercycles permit the programming in a single block of a number of standard fixed cycles, to be
executed in the different positions of a programmable grid. The grid may have any number of lines and
columns and may be rotated in any way.

5-18

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Fixed supercycles also permit the programming of standard fixed cycles to be executed on a number
of equi-spaced positions on a circumference.
The program codes for these supercycles include:
G781 - G782 - G783 - G784 - G785 - G786 - G789 for executing holes on grid patterns.
G791 - G792 - G793 - G794 - G795 - G796 - G799 for executing holes on circumference patterns.
The correspondence between standard fixed cycles and supercycles is indicated by the rightmost digit
in the cycle code, that is:
G781 = G81; G782 = G82; G783 = G83; G784 = G84; G785 = G85; G786 = G86; G789 = G89;
G791 = G81; G792 = G82; G793 = G83; G794 = G84; G795 = G85; G796 = G86; G799 = G89;
G787 and G797 allow the execution of any machining cycle on grid/circumference patterns.
The program section to be repeated must be programmed after G787 or G797.
The G780 function enables the cycle.

5.6.1 GRID PATTERN DRILLING


The programming format for the functions G781 - G782 - G783 - G784 - G785 - G786 - G789 is as
follows:
G78x

Z... J... [I...] [Q...] [K...] [F...] X... Y... D1=... D2=... [D3=...] [D4=...] [D5=...] [D6=...]

Z, J, I, Q, K, F parameters have the same meaning as in standard fixed cycles. For the other
parameters, the meaning is the following:
X...Y...

coordinates of the first hole.

D1=...

number of holes per line.

D2=...

distance between holes on the lines.

D3=...

angle formed by grid lines and X axis (D3=0 degrees by default).

D4=...

number of holes per column.

D5=...

distance between holes on the columns.

D6=...

angle formed by grid columns and X axis (D6=90 degrees by default).


D6
D2
D4
No. of
holes on
the column

D5

D3

D1

No. of holes
on the line

User and Programming Manual - Part II

5-19

S4045 S4045P
5. Advanced programming or macro instructions

5.6.2 MACHINING CYCLE REPEAT ON GRID PATTERNS


The G787 function permits the execution of any machining cycle on the points of a linear grid pattern.
The programming format is:
G787 X... Y... D1=... D2=... [D3=...] [D4=...] [D5=...] [D6=...] [D7=...]
where:
X... Y...

starting point co-ordinates.

D1=...

number of figures on the line.

D2=...

distance between figures on the line.

D3=...

angle formed by grid lines and X-axis (D3=0 degrees by default).

D4=...

number of figures on the column.

D5=...

distance between figures on the column.

D6=...

angle formed by grid columns and X-axis (D6=90 degrees by default).

D7=...

angle of rotation of the single machining (D7=0 degrees by default).

The machining cycle to be repeated on the grid points must be programmed after the G787 function.
The G780 function enables the cycle.
Example:
G787 X... Y... D1=... D2=...
...
...
...
G780

machining cycle to be repeated


cycle enable

The identifier of the machining to be performed is stored by the control into the P99 parameter.
This parameter can be used not to execute the machining cycle on some of the grid points.

Example:
G787 X... Y... D1=... D2=...
{P99=4} L10
...
...
...
L=10
G780

machining cycle to be repeated

The machining cycle will not be repeated on the fourth point of the grid.

5-20

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

5.6.3 CIRCUMFERENCE PATTERN DRILLING


The programming format for the functions G791 - G792 - G793 - G794 - G795 - G796 - G799 is as
follows:
G79x

Z...J...[I...] [Q...] [K...] [F...] X...Y...D1=...D2=...[D3=...] [D4=...] [D5=...]

The Z, J, I, Q, K, F parameters have the same meaning as in standard fixed cycles. For the other
parameters, the meaning is the following:
X...Y...

circumference center co-ordinates.

D1=...

number of holes.

D2=...

circumference radius (if the radius is positive, holes will be machined CCW; if the radius is
negative, holes will be machined CW).

D3=...

angle formed by the first hole and the X-axis (D3=0 degrees by default).

D4=...

angular distance between holes.


If D4 is omitted, holes will be evenly distributed over a full circle.

D5=...

specifies the displacement mode between two consecutive holes.


Default is D5=0.
D5=0 linear displacement on the clearance plane.
D5=1 circular displacement on the clearance plane.
D5=0

D5=1

D3
D4
Y
D2(+/-)

D1=No. of holes
X

5.6.4 MACHINING CYCLE REPEAT ON CIRCUMFERENCE


PATTERNS
The G797 function permits the execution of any machining cycle on a number of equi-spaced positions
on a circumference.
The programming format is:
G797 X... Y... D1=... D2=... [D3=...] [D4=...] [D5=...]
where:
X...Y...

circumference center co-ordinates.

User and Programming Manual - Part II

5-21

S4045 S4045P
5. Advanced programming or macro instructions

D1=...

number of figures.

D2=...

circumference radius with sign. If the radius is positive, figures will be machined CCW; if
the radius is negative, figures will be machined CW).

D3=...

angle formed by the first figure and the X-axis (D3=0 degrees by default).

D4=...

angular distance between figures.


If D4 is omitted, figures will be evenly distributed over a full circle.

D5=...

discriminator for figure rotation:


D5=0, no rotation
D5=1, the machining will be rotated.

The machining cycle to be repeated on the circumference points must be programmed after the G797
function.
The G780 function enables the cycle.
Example:
G797 X... Y... D1=... D2=...
...
...
...
G780

machining cycle
cycle enable

The identifier of the machining to be performed is stored by the control into the P99 parameter.
This parameter can be used not to execute the machining cycle on some of the programmed points.

5.7 AXIS TRAVEL DELIMITATION


G761 permits the delimitation of axis travel.
The programming format is as follows:
G761 [X...] [Y...] [Z...] [I...] [J...] [K...] [Q...] [F...] [D0=...] [D1=...] [D2=] [D3=] [D4=] [D5=]
where:
X...Y...Z...

lower axis travel limits

I...J...K...

upper axis travel limits, for X, Y and Z respectively

Q...

discriminator (Q0, Q1, Q2).


Specifies the requested control behaviour when an overtravel occurs with respect to the
programmed limits, either during a linear or a circular interpolation movement.
Q0 displays an error signal (ERR 98) and stops execution at the program block
preceding the one that would generate the error.
The programmed axis travel limits become software travel limits referred to part zero.
Q1 projects all the points that are outside the programmed travel limits.
The control will execute the subsequent program blocks by moving only those axes
whose target co-ordinates are within their travel limits. All other axes will stand still on
their limits. If the move starts inside the limits it will be executed up to the programmed
limit(s).

5-22

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Q2 eliminates all points located outside the programmed limits.
The first program block that causes an overtravel situation for one or more axes will be
executed until the travel limit is reached.
If the subsequent block contain points that are outside the limits, they will be ignored and
the tool will stand still on the limit until the control processes a block that moves it back
inside the limits.
With Q1 it is also possible to program a series of additional parameters (F..., D0=..., D1=...) that
delimits a profile section to be executed at feedrate, while the rest of the profile will be executed at a
higher speed.
F...

feedrate to be used for performing those movements that pertain to the profile section
that has to be executed at a higher speed (the default value is the programmed
feedrate).

D0=

specifies the profile section to be executed at the programmed feedrate.


D0 will be subtracted from the upper limits I...J...K... and added to the lower limits
X...Y...Z...
If D0 is not programmed, the entire profile will be executed at the machining feedrate.

D1=

percentage of feedrate variation (the default value is 1).

D2=...

tool withdrawal value outside the band. If not programmed: D2= 1.


The part of the profile external to the band will be offset by D2 [mm].

With Q2 the parameters D3 and D4 can be programmed for the withdrawal of the tool from the part by
moving the spindle axis (Z in G17, Y in G18, X in G19).
After coming put from the part while the machine is working, the machine positions itself on the next
point within the limits and therefore lowers moving the spindle axis until returning to the part.
D3=

incremental or absolute withdrawal height. By default: D3=0.

D4=

discriminator for D3.


D4=0:
D3 = incremental height
D4=1:
D3 = absolute height
If not programmed: D4=0.

D5=...

discriminator for plane movements to detachment position


D5=0 programmed F
D5=1 rapid. Default D5=0.

G760 will cancel G761.

Selecting the Q discriminator


The choice between Q1 and Q2 must be carefully made depending on which axes you want to apply
the travel limits to.
With Q1, only those machine axes that incur an overtravel situation will stop motion. With Q2, all axes
will stop motion even if only one of them hits its travel limit.
Q1 is normally used when only one limit is programmed, Q2 when executing a program between two
limits.

User and Programming Manual - Part II

5-23

S4045 S4045P
5. Advanced programming or macro instructions
It should be noted that by delimiting axis motion with Q2, the programmed tool path will be altered. This
does not happen with Q1.

5.7.1 EXAMPLE OF AXIS TRAVEL DELIMITATION


Profile in XZ with limits in X and Q2 as discriminator
By programming the discriminator Q2, you obtain the cancellation of the outer limit points.

X -200

c
b
a
a
b
c
d
e
f
g

I 400

f
d

e
g

X-650 Z-70
X-400 Z0
X-250 Z110
X50 Z50
X250
X500 Z150
X750 Z-100

To establish X axis travel limits at X-200 and X400 on the XZ profile with Y increments (as shown in
the above figure), it is necessary to eliminate the points outside the limits by programming Q2 as
discriminator:
G761 X-200 I400 Q2 D3=5
As a result, moving from e to f, the tool will stop at the upper limit (X400) and will resume motion only
after the control has processed the return block from f to e.
Moving from d to c, the tool will stop at the lower limit (X-200) and will resume motion only after the
control has processed the return block from c to d.
On the contrary, by programming Q1 the X axis would stop motion at the upper limit (X400) on its way
from e to f, while the Z axis would continue to move up to the Z co-ordinates of the f and g points, thus
damaging the part being cut.
The X-axis would also stop at the lower limit (X-200), whereas Z would reach the programmed coordinates in points c, b and a.

5-24

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

Profile in XZ with limits in Z and Q1 as discriminator


Q1: projection of points that fall outside the programmed axis travel limits.

Z
f

a
Z-5

e
d

a
b
c
d
e
f

X550 Z0
X400 Z-20
X150 Z-34
X-150
X-500 Z-20
X-650 Z0

To limit part cutting at Z-5 in the XZ profile with Y increments (as shown in the above figure) it is
advisable to program Q1:
G761 Z-5 Q1
As a result moving from a to f, the Z axis will stop motion at the -5 limit, while the X axis will keep
moving to the X co-ordinates of points b, c, d and e.
Moving from e to f, the Z axis will resume motion when the Z co-ordinate will fall again within the -5
limit.
By programming Q2 instead, the X axis would start moving from a to b and would then stop when the Z
axis gets its -5 travel limit. X would resume motion when the control processes the block that
programs the movement from e to f. In addition, if the profile below the Z axis limit co-ordinate was
made up of a large number of points, the tool would rest on the part and might cause a dwell mark.

Example:
Roughing of a digitized surface whose data points are stored on disk under the ROUGH name, to be
carried out with 5 mm passes, starting from Z-5. The roughing cuts can be programmed with a repeat
sequence that uses a parameter to set the Z axis limit at each sequence loop.
F1000 S2000 M3
P1=-5
L=1
G761 ZP1
LSGROSS:D
P1=P1-5
L1 K6

User and Programming Manual - Part II

5-25

S4045 S4045P
5. Advanced programming or macro instructions

Profile in YZ with limits in Z and Q1 as discriminator


To limit the passes at Z50 it is advisable to program Q1 (external points projections). In this case, the
additional parameters F... D0=... D1=... have been provided for defining the profile section to be
executed at the feed rate (D0=12), which is one third of the nominal rate (D1=.3)..
Z

D2

Z50

D0=12

O1
T10 M6
S1200 M13 F600
G761 Z50 Q1 F3000 D0=12 D1=.3
...
...
[PROFILE
...
M30
Machining limit is fixed at Z50; at this depth the profile is executed at F600.
The profile section above Z+D0, i.e. above 62, will be contoured at the F feedrate programmed in the
G761 block (F3000) with tool offset by D2 mm to prevent tool marking.
The profile section from Z to Z+D0, (i.e. between 50 and 62) will be contoured at F600*D1 (F180).

5.8 CYLINDRICAL PROGRAMMING


G201 makes it possible to machine any type of profiles on a cylindrical surface, by programming a
rotary and a linear axis, this last coinciding with the cylinder axis.
The profile laid on the cylindrical surface must be linearized, i.e. placed on a Cartesian plane whose
abscissa is the rotary axis and whose ordinate is the linear axis.
The co-ordinates of the rotary axis can be programmed either in degrees or in millimeters.
The cylindrical profile can be programmed either with the G1, G2, G3 or with the G10, G11, G13, G20
and G21 PROGET2 codes.
Radius compensation can also be programmed.
The machining plane must be defined with G17 followed by the names of three axes that represent the
abscissa and the ordinate of the Cartesian plane (i.e. the rotary and linear axes involved in the
machining), and the axis to which the tool length compensation will be applied.

5-26

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Example: G17 A X Z.
Depending on the position of the rotary axis, the possible machining planes are as follows:
AX with tool length compensation along Z or Y
BY with tool length compensation along Z or X
CZ with tool length compensation along X or Y
The programming format is as follows:
G201 J... [K...]
where:
J...
cylinder radius in millimeters.
K...

specifies the unit of measure for the rotary axis co-ordinates


K1 degrees
K2 millimeters
Default value K=1.

Example:
G201 J50
G201 J30 K2
With PROGET2, radii are always to be programmed in millimeters, regardless of the measuring unit
selected for the rotary axis.
Cylindrical programming must be closed with the G200 function to be programmed alone in one block.
Feed rates must be programmed in mm/minute with the F code. The control keeps cutting speed
constant throughout the profile by adjusting the rotary/linear axis speed.
To restore the original machining plane, program G17 at the end of the program.
The scaling factor (G61) and mirroring functions (G54-G59) can be programmed inside function G201.

Example of cylindrical programming

User and Programming Manual - Part II

5-27

S4045 S4045P
5. Advanced programming or macro instructions
[Machining example on a G201
[cylinder
.....
G17 A X Z
G201 J35 K2
Z100 R
A0 X5 Y0 R
Z2 R
Z-1
G42 K2
G13 A-20 X0 I10 J195
G20
G11 A30 X-30
G21 I5
G20 I-30
G21
G13 A30 J90
G21
G13 A-20 X0 I10 J195
G40 K2 A0 X5
Z100 R
G200
G17
M30

5.9 POLAR PROGRAMMING


The G202 function allows profile machining by programming a rotary and a linear axis.
The tool radius compensation can be programmed.
The machining plane is programmed with the G17 function, followed by the name of three axes
representing respectively the abscissa and the ordinate of the Cartesian plane ( rotary and linear axis)
and the axis on which the length compensation is applied.
Example: G17 X C Z
The co-ordinates of the C axis are expressed in millimeters.
The programming format is:
G202
The feedrate F is programmed in mm/min. The control keeps cutting speed constant throughout the
profile by adjusting the rotary/linear axis speed.
The polar programming is closed by the G200 function, to be programmed alone in one block.
At the end of the program restore the normal Z X machining plane by programming the G17 function.

5-28

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
S1000 M13 F500
G17 X C Z
Z50 R
X30 C0 Y0 R
Z2 R
Z-5
G202
G42 K2
G20 X60 C0 I-40
G21 I5
G20 X0 C60 I-40
G21
G20 X-60 C0 I-40
G21
G20 X0 C-60 I-40
G21
G20 X60 C0 I-40
G40 K2 X30 C0
G200
Z50 R
G17

5.10 CUTTER COMPENSATION IN SPACE


Cutter compensation in space allows the adjustment of a programmed path for 3-D machining. This
compensation takes into account three correction factors that are programmed along with each point
and that represent the normal vector to the surface in that point.
Note: The programming of these machining sequences is normally undertaken on automatic 3-D
programming systems.
G841

enables radius compensation in space. It must be programmed alone in one block before any
block that define surface points.

G840

disables radius compensation in space. It must be programmed alone in one block after the
last surface point.

To program the surface points use this format:


X...Y... Z... I... J... K...
where:
X...Y... Z...

point co-ordinates.

I...

radius compensation coefficient for the X axis.

J...

radius compensation coefficient for the Y axis.

K...

radius compensation coefficient for the Z axis.

User and Programming Manual - Part II

5-29

S4045 S4045P
5. Advanced programming or macro instructions
After the compensation has been applied, the X Y Z programmed point becomes Xc Yc Zc.
Xc = X + I * radius
Yc = Y + J * radius
Zc = Z + K * radius.
When applying radius compensation in space the control takes into account the tool shape (spherical
or toroidal) as well as the position of tool zero (tool tip or tool center).
Tool shape, dimensions and zero reference must be programmed with G49.
The G49 code format for spherical mills is as follows:
G49 I... [Q...]
where:
I...
spherical mill radius.
Q...

distance between tool zero and tool tip:


Q=I if tool zero is at tool center
Q=0 if tool zero is on tool tip
Q0 may be omitted.

The G49 code format for toroidal mills is as follows:


G49 I... J... [Q...]
where:
I...

toroidal mill radius.

J...

cutter radius (or insert).

Q...

distance between tool zero and tool tip


Q0 may be omitted.

A cylindrical mill may be considered a toroidal mill with cutter radius J=0.
Example:
G49 I10 Q10
G49 I40 J10 Q10

for a spherical mill


for a toroidal mill

Q
I

I
G49 I...

5-30

I
G49 I... Q...

G49 I... J...

G49 I... J... Q...

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

5.11 ROTATION / OFFSET IN SPACE


G751 allows rotation/offset in space of a figure originally programmed on a plane. This will allow
execution of circles with any orientation in space as well as circles placed on the XY, ZX and YZ
planes.
With G751 it is possible to obtain a body of revolution by simply programming a plane profile and then
rotating it about an axis on its plane. It is also possible to obtain a 3-D surface with a constant section
by offsetting a profile.
In these cases it is advisable to imagine the profile placed on the XY plane and to program it by taking
advantage of the PROGET2 programming feature. Machining can be performed on the XY plane
(G17) with a spherical mill whose length origin is the center of the sphere.
The programming format is:
G751 [TRS X... ] [TRS Y...] [TRS Z...] [ROT X...] [ROT Y...] [ROT Z...]
where:
TRS X...
TRS Y...
TRS Z...
ROT X...
ROT Y...
ROT Z...

X axis offset by a given value


Y axis offset by a given value
Z axis offset by a given value
rotation by a given value about the X axis
rotation by a given value about the Y axis
rotation by a given value about the Z axis

ROT can call up only one axis at a time.


TRS can call up more than one axis. For example: G751 TRS X100 Y100 Z100.
Since the TRS and ROT commands affect each other, they must be programmed in the correct
sequence.
Offset (translation) and rotation values must be absolute. They cannot be incremental. Therefore, in
repeat cycles it is necessary to make use of parametric programming and to increment the offset and
rotation values for each axis.
Each G751 cancels the previous one. However, if the character & is written after G751 (G751&) the
previous G751 will remain enabled.
This feature is useful in case very long G751 instructions (beyond the 70 characters allowed in each
block) requiring additional programming blocks.
Example:
G751 TRS X100 Y100 Z100
G751&ROT Z90 ROT X90
After G751 it is possible to program a rotation/offset function on the plane with G51.
On the contrary, after either a G51 (rotation/offset on the plane) or a G52 (offset on the plane), it is not
possible to program a G751 code.
Both G51 and G52 must be included in the G751 code programming.
After a G751 function the scaling factor (G61) and mirroring functions (G54-G59) can be programmed.

User and Programming Manual - Part II

5-31

S4045 S4045P
5. Advanced programming or macro instructions
G750 cancels the rotation/offset effects and restores the co-ordinate system and the origin previously
enabled.
command.

G751 may also be cancelled by M30 (program end) or by the

Function G751 can always be active in modal format, i.e. even after a BREAK. With this function active
it is possible to set zero all the axis origins, defining any reset value
When the NC is turned off, this function is reset, therefore it will have to be reprogrammed the next
time the system is turned on. To make G751 modal, during System Setup, the following setting is
required ENABLE MODAL G751 = Yes.
WARNING!
After a G751 function, it is always necessary to program in the same block both axes of the
working plane (ex: X...Y... for G17, Z...X... for G18, Y...Z... for G19) to rightly confirm the offset
point.
In case of offset around the abscissa or ordinate axis of the working plane (ex: G751ROTX... or
G751ROTY... for G17, etc...) it is always necessary to program the profile Z0.

5.12 INCLINED SURFACE MACHINING


If used in conjunction with G751 (rotation/offset in space), G749 will allow a machine tool equipped with
a 1/2-axis rotary head to incline the tool axis in order to machine inclined surfaces.
The position of the inclined surface must be programmed with the G751 code for rotation/offset in
space followed by the TRS (offset) and ROT (rotation) parameters which position the surface with
respect to the current part origin.
G749 can be canceled by G740.
Example:
G749 B
G751 TRS X30 ROT Y-12.5
B12.5
G81 Z-10 J2
X10 Y10
X30
Y-30
X-10
G80 Z50 R
G750
G740
M30 (program end ) and the

command cancel G749 and G751.

However, since the last programmed ROT and TRS parameters remain stored in memory, each time a
G751 is invoked by a subsequent block, the last programmed rotation/offset function in space will be
enabled.
This feature is particularly useful for extracting the tool out of an inclined hole in case of cycle interrupt
because of a BREAK command or a power failure. The tool out procedure is as follows. With the
system in MDI mode enter G751 alone, then switch the system to MANUAL mode and move the fixed
cycle axis (Z, for instance) using the handwheel.
The control will automatically move not only the Z, but also the other axis or the other two axes so that
the tool will come out of the part along the inclined hole.

5-32

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

5.13 4-AXES (S4045P AND EXPORT VERSIONS) OR 4/5AXES SURFACE MACHINING (S4045P WITH TCPM4000
OPTION) WITH 1/2-AXIS ROTARY OR DOUBLE TWIST
ROTATING HEADS
For machining a 4/5-axis surface with a 1/2-axis rotary head machine it is necessary to know the
distance between the center of the spherical tool and the center of rotation of the head.
This distance allows the calculation of the new position of the linear axes at each rotary movement so
that the tool remains permanently in contact with the part.
Since the program is usually generated by an automatic programming system that takes this data into
account, the machine must execute the program with the same tool length used by the computer.
Therefore, the program must be re-complied at each tool length variation.
If G749 followed by the name of the rotary axes is programmed in a block, the control keeps the tool in
permanent contact with the surface being machined by compensating each move of the rotary axes
with a displacement of the linear axes. This feature makes it possible to program the tool position
irrespective of the tool length, as though the program did not use rotary axes.
Function G749 can always be active in modal format, i.e. even after a BREAK. With this function active
it is possible to set zero all the axis origins, defining any reset value
When the NC is turned off, this function is reset, therefore it will have to be reprogrammed the next
time the system is turned on. To make G749 modal, during System Setup, the following setting is
required ENABLE MODAL TCPM = Yes.
The system can manage up to 8 heads.
The program format is:

G749 [A] [B] [I...] [J...] [Q...] [K...] [D0=1] [D1=]

where:
A and B

names of the two rotary axes on which the head is mounted.

I... J... Q...

length compensations (positive or negative) that the system adds to the distance between
the center of rotation of the head and the tool tip.
I acts on the spindle axis
J acts on the abscissa axis
Q acts on the ordinate axis
These parameters must be defined when a tool length different from the one considered
by the computer is used.

K...

for heads with opposing spindles:


K0 first spindle
K1 second spindle.

D0=1

operating mode discriminator.


D0=1: the calculations are referred to head zero position, irrespective of the head position
when G749 is programmed.
In absence of D0=1, on the contrary, the calculations are referred to head position when
G749 is programmed (as for S1200 / S3000 NC).
With D0=1, cycle resumption and block search are possible.

D1=

head number (from 1 to 8). By default: D1=1.

G749 can be cancelled with G740.


The programmed machining rate is the tool tip machining rate.
To ensure permanent tool/part contact, the rate at which the control moves the linear axes varies
according to the rotation angles and to the distance between the tool tip and the center of rotation of
the head. F must be assigned a value that prevents the rate at the center of the head from exceeding
the maximum value allowed for the machine.The machine tool builder must ensure that the machine
tool initialization data includes the distance between head centers and spindle nose, as well as the
distance between head centers and spindle axis, in case of non-alignment.

User and Programming Manual - Part II

5-33

S4045 S4045P
5. Advanced programming or macro instructions
Moreover, head zero position must be defined with the HEAD ZERO SETTING procedure.
In zero setting the heads, use parameter K to specify the head number (from 1 to 8).
Example:

A0B0K2

If K is not programmed, head 1 is set to zero.


If the machine is equipped with a rotary head this feature can be used for machining 3-axis surfaces,
either generated by automatic programming systems or stored by S4045 NCs equipped with a copying
option with spherical probe.
If the rotary axis handwheels are enabled, they can be used for keeping the tool perpendicular to the
surface while machining is in progress. This will permit use of shorter tools (refer to chapter 6.3 - G846
function).
WARNING !! : for correct use of function G749 all axes, including rotary ones, must be previously
SET ZERO in the PART ORIGIN used.

5.14 4 AXES (S4045P AND EXPORT VERSIONS) OR 4/5AXES SURFACE MACHINING (S4045P WITH
TCPM4000 OPTION) WITH ROTARY/TILTING TABLES
G749-like functions are utilized on machines equipped with rotary/tilting tables.
If G748 followed by the name of the rotary axes is programmed, the control keeps the tool in
permanent contact with the surface being machined by compensating each move of the rotary axes
with a displacement of the linear axes.
The system is able to manage 4 tables.
The programming format is:

G748 [A] [B] [C] [D0=1] [D1=]

where:
ABC

rotary axis names.

D0=1

operating mode discriminator.


The table always rotate about the tool tip, wherever the tool tip is.

D0=0

(default) the table rotates about the point where the tool tip was when the G748 was
programmed. This point can be moved by programming the X..., Y..., Z... offset values.
For a correct use of G748, the axis of rotation of the tables must be defined by performing
the TABLE ZERO SETTING procedure.

D1=...

table number (From 1 to 4. If not programmed D1=1).

If the D0=1 parameter is not programmed, the table always rotates about the point where the axes
were positioned when G748 was programmed. This point can be offset by programming the X, Y, Z
offset values.
Function G748 can always be active in modal format, i.e. even after a BREAK. With this function active
it is possible to set zero all the axis origins, defining any reset value
When the NC is turned off, this function is reset, therefore it will have to be reprogrammed the next
time the system is turned on. To make G748 modal, during System Setup, the following setting is
required ENABLE MODAL TCPM = Yes.
The programming format is:

G748 [A] [B] [C] [X...] [Y...] [Z...] [D1=...]

This operating mode permits machining execution on cylinders when cylinder axis and table center are
not aligned. Both radial machining and machining on the cylindrical surface are possible.
G748 can be interrupted by programming G746 alone in one block.
G748 can be canceled by programming G740 alone in one block.

5-34

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
The machine tool builder must define the table center coordinates with respect to the center of rotation
of each rotary axes on the plane of rotation.
Besides, when installing and setting up the machine the user must home the rotary axes and then
define the spindle position with respect to the table center with the TABLE ZERO SETTING operation.
During table zero setting, define the table number by K parameter (From 1 to 4).
If K is not programmed, table 1 is zero set.
WARNING !! : for correct use of function G748 all axes, including rotary ones, must be previously
SET ZERO in the PART ORIGIN used.

5.15 3-D PROGRAMMING OF SURFACES DEFINED BY A


PLANE PROFILE AND ONE OR MORE SECTION
PROFILES
This cycle allows the machining of a surface generated by a plane profile moving along up to 10
section profiles by plane or spiral milling.
The machining can be executed with toroidal or spherical tools whose shapes and sizes must be
defined with the G49 code (refer to chapter 5.10).
The G codes to be used for this type of 3-D programming are:
G736
G737
G738

surfaces defined by a plane profile and one or more section profiles: plane profile and
parameters.
surfaces defined by a plane profile and one or more section profiles: section profiles.
surfaces defined by a plane profile and one or more section profiles: execution.

The G736 code programming format is as follows:


G736 I... [X...Y...] [J...] [K...] [Q...] [D0=...] [D1=...] [D2...] [D3=...] [D4=...] [D5=...]
where:
I...

distance between passes on the section profile that contains the K1 parameter (in G737).

X...Y...

tool approach point to plane profile.

J...

stock allowance.

K...

machining mode for the radii in the plane profile, depending on the section profile:
K1 variable radii (default value)
K2 constant radii.

Q...

selects the type of passes for open plane profiles:


Q1 unidirectional passes (default value)
Q2 bi-directional passes

D0=...

selects type of milling;


D0=0 plane milling (default)
D0=2 spiral milling.

D1=...

Z rapid move out coordinate for unidirectional passes.

D2=...

withdrawal/repositioning clearance for unidirectional pass end / start


(default value D2=2).

D3=...

spiral milling cord error used to divide a circumference arch into various segments (default
0.01mm).

User and Programming Manual - Part II

5-35

S4045 S4045P
5. Advanced programming or macro instructions
D4=...

minimum spiral milling cord, i.e. the minimum distance between points (default 0.1mm)

D5=...

maximum spiral milling cord, also used to divide lines into various segments, i.e. the
maximum distance between points (default 2mm).

After a G736 the plane profile can be programmed either in ISO or in PROGET2 language.
If the surface is defined by several section profiles, the first section (Q1) is enabled until a different
section is recalled.
The letter Q (from Q1 to Q10) recalls the section to be applied to the programmed element (straight
line, circle or variable radius).
A section is applied from the beginning of the element and remains active until a new section is
recalled.
G737 permits programming of a section profile.
The programming format is as follows:
G737 [Q...] [K1]
where:
Q...

number of the section profile (from Q1 to Q10), default value: Q=1.

K1

if the section profile contains the K1 parameter, passes are calculated according to the I
distance programmed in G736. If K1 is not programmed passes will be calculated on the first
section profile.

The G737 code must always precede the programming of a section profile. G738 closes the
programming of a section profile and enables the execution.
Programming example:
......
......
G49 I5 Q5
G736 X-30 Y0 I0.3 K2
G42 K2
G13 X-60 J90
G21 I-10
G13 Y40 J0
G21
G13 X80 J-90 Q2
G21
G13 Y-40 J180 Q1
G21
G13 X-60 J90
G40 X-30 Y0 K2
G737 Q1
G41
G13 X0 Y0 J0
G21 I-5
G13 J-60
G21 I5
G13 Y-30 J0
G40
G737 Q2

5-36

defines tool
opens cycle programming
defines tool approach to plane profile
first section (Q1)

recalls section 2
recalls section 1

end of plane profile


defines section profile 1
beginning of section profile 1

end of section profile 1


defines section profile 2

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
G41
G13 X0 Y0 J0
G21 I-5
G13 J-45
G21 I5
G13 Y-30 J0
G40
G738
......

beginning of section profile 2

end of section profile 2


starts cycle execution

For a correct programming of section profiles remember that:


The section profile must be programmed in the same co-ordinate system as the plane profile.
The positive Y axis must coincide with the positive perpendicular axis (Z).
The section profile must be open, i.e. start and end with a point.
G41 and G42, which define the position of the tool with respect to the programmed profile, and
G40, which closes the profile, must be programmed alone in one block without the K... parameter
for tool automatic approach/exit.
If several section profiles are used, all their start/end points must have the same Y co-ordinate after
they have been offset by the tool radius.
This can be obtained by defining the section profiles in PROGET2 and programming the same
horizontal support straight line both at the beginning and at the end of each profile.

G737 Q1
G41
G13 Y0 J0
...
...
G13 X...Y...J...
G13 Y-50 J0
G40

User and Programming Manual - Part II

G737 Q2
G41
G13 Y0 J0
G13 X0 Y0 J-80
...
...
G20 X...Y...I...
G13 Y-50 J0 K2
G40

5-37

S4045 S4045P
5. Advanced programming or macro instructions
For a correct programming of the plane profile remember that it can be any profile, open or closed, with
or without automatic tool approach (K1/K2).
The G41 and G42 codes (plane profile opening) define the position of the section profile with respect to
the plane profile orientation. Program G42 if the positive Y axis of the section profile coincides with the
direction of the plane profile. Otherwise, program G41.

Y+
A-A Section
Section profile

Tool left of part = G41

Profile start
Profile end

X+
Plane profile direction coinciding with the positive
direction of section profile Y-axis: program G42

Y
A
Plane profile direction opposite of
the positive direction of section
profile Y-axis: program G41

A
X

5.15.1 MILLING OF SURFACES DEFINED BY A PLANE PROFILE


AND ONE OR MORE SECTION PROFILES
This cycle allows to perform milling of concave surfaces defined by a plane profile and one or more
section profiles. Milling is performed with passes parallel to the profile from the center towards the
border.
The depth increment, I parameter in the G736 function, may be executed with a Z move on the point
programmed in the G738 function. Therefore, in correspondence of this point a hole for mill entry is
necessary.
If this point is not programmed, the first pass will consist of a rapid tool positioning to the milling end
point (profile start point), followed by a rapid move down to the D2 height and by a feed move to the
pass start point at pocket center.
Upon completion of each pass, without withdrawing from the part, the tool performs a feed move to the
start point of the new pass, at pocket center. Therefore, no hole for mill entry is necessary.
A finish stock allowance may be defined.
The functions to be programmed are the same as in paragraph 5.15:
G736
G737
G738

5-38

surfaces defined by a plane profile and one or more section profiles: plane profile and
parameters.
surfaces defined by a plane profile and one or more section profiles: section profiles.
surfaces defined by a plane profile and one or more section profiles: execution.

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
The G736 code programming format is as follows:
G736 D0=1 I... [X...Y...] [J...] [K...] [D2=...] [D8=1]
where:
D0=1

specifies the special use of G736 for milling purposes and not for surface finishing
purposes.

I...

pass depth.

J...

finish stock allowance.

X...Y...

plane profile approach point.

K...

cutting mode for plane profile linking radii, according to section profile
K1: variable linking radii
K2: constant linking radii
By default K=1.

D2...

clearance distance. By default D2=2.

D8=1

machining request for the pocket zones that, because of geometrical reasons, have not
been completely milled (islands). Island milling is performed after the last pass
(programmed profile contouring) with one cut parallel to the profile and several cuts
parallel to the axes.

G737 defines the different section profiles and must be programmed as described in paragraph 5.15.
The programming format for G738 is:
G738 [J...] [X...Y...]
where:
J...

with D0=1 in function G736, distance between passes in mill radius units.
Default value: J=1.

X...Y...

with D0=1 in function G736, co-ordinate of mill start point. If not programmed, the depth
increment is performed during tool positioning to pocket center with a 3-axis move
coordinate.

5.16 3-D PROGRAMMING OF RULED SURFACES BETWEEN


TWO PROFILES
This feature permits programming of 3-D ruled surfaces between two profiles lying on parallel planes at
a known distance.
The program must start with a G726 block with the following format:
G726 [X...Y...] Z... I... [J...] [D1=...] [D2=...]
where:
X...Y...

starting point of the first profile.

Z...

Z co-ordinate of the first profile.

User and Programming Manual - Part II

5-39

S4045 S4045P
5. Advanced programming or macro instructions
I...

distance between passes (for the first profile).

J...

stock allowance.

D1=...

absolute Z co-ordinate for rapid tool-out with unidirectional passes (if not specified, passes
will be considered bi-directional).

D2=...

incremental Z co-ordinate for tool-out and tool repositioning at feed rate for unidirectional
passes (by default D2=2 mm).

The second profile must be programmed with a G727 code with the following format:
G727 [X...Y...] Z...
with:
X...Y...

starting point of second profile.

Z...

Z co-ordinate of second profile.

Profiles can be programmed either in PROGET2 or ISO language.


The position of the tool with respect to the surface is calculated according to G41/G42 codes in the first
profile (G41 indicates a tool on the left of the profile, G42 indicates a tool on the right of the profile).
The ruled surface will start with the straight line that links the starting points of the two profiles.
If the starting point of each profile is programmed in the G726/G727 block and G41/G42 and G40 are
programmed with automatic tool approach/exit (K1/K2), K1 and K2 serve only the function of defining
the first and last points of the profile.
The execution is enabled by the G728 code followed, if necessary, by the rotation/offset parameters
allowing surface positioning.
The programming format is as follows:
G728 [TRS[X...][Y...][Z...]] [ROTX...] [ROTY...] [ROTZ...]
where:
TRS X...
TRS Y...
TRS Z...
ROT X...
ROT Y...
ROT Z...

X axis offset by a given value


Y axis offset by a given value
Z axis offset by a given value
rotation by a given value about the X axis
rotation by a given value about the Y axis
rotation by a given value about the Z axis.

In order to delimit the surface zone to be machined, it is necessary to program a delimiting profile
between G34 (profile start) and G35 (profile end).
The delimiting profile must be closed and it must be programmed before the G728 code.
The delimitation profile is offset by the active tool radius compensation. If it is required that the tool
center reaches the delimitation profile (tool radius compensation equal to zero) the I0 parameter must
be programmed in the G34 function.

5-40

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Example:
G726 Z... I... [X...Y...] [...
G41/G42 [K1/K2]
....
....
first profile
....
G40 [X...Y...K1/K2]
G727 Z...[X...Y...]
G41/G42 [K1/K2]
....
....
second profile
....
G40 [X...Y...K1/K2]
G34
G41/G42
....
....
profile delimiting the zone to be machined
....
G40
G35
G728 [...
The surface can be machined with spherical or toroidal tools whose shapes and sizes must be defined
with the G49 code (refer to chapter 5.10) only when referred to G17 (tool on Z), G18 (tool on Y) or G19
(tool on X) plane programming. In all other cases, only ball endmills reset in the centre can be used.
If the profile needs to be positioned using the G728 rotation/offset function, only spherical cutters can
be used, zeroed at sphere center.
In unidirectional passes, rapid tool-out moves (D1=...) and positioning moves at machining rate (D2=...)
are always generated along the axis perpendicular to the machining plane: Z axis for the G17 plane, Y
axis for the G18 plane, X axis for the G19 plane.

5.17 CHARACTER STRING ENGRAVING


The WRITEL and WRITEC instructions permit generation of upper and lower case alphanumeric
characters and special characters for string engraving.
These instructions are only active on the G17 working plane. Program axis exchange function G16
(see chapter 2.16) to use other working planes (G18, G19). Alternatively, use rotary movement in
space function G751 (see chapter 5.11) according to the available NC.
The programming format is:
WRITEL= character string (on a straight line)
WRITEC= character string (on a circumference).
The allowed character set includes:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890
*./-:=,;+?!<>&@%#$()[]{}
and SPACE.
If an illegal character is programmed the system will signal an error (E 99).

User and Programming Manual - Part II

5-41

S4045 S4045P
5. Advanced programming or macro instructions
The WRITEL and WRITEC instructions must be preceded by the definition of the character size,
engraving depth, clearance depth, string position and the scaling factor for the feeding speed on the
axis perpendicular to the machining plane (Z for G17). These definitions are to be carried out through
P parameters. Do not use the parameters included in the range from P0 to P99 for correct use of
WRITEL and WRITEC because these parameters are used by the WRITE codes. It is advisable to
insert the G50 code after the last WRITE instruction to cancel G51 used to shift characters within
WRITE code.
P4
Character size:
P1 = base
P2 = height (maximum 2.5xP1)
P3 = pitch
P4 = angle

P2

P1
P3

Clearance and engraving depth:

P5

P5 = clearance depth
P6 = engraving (cutting) depth

P6

0 part Z

Shifting from one letter to another is rapid and not


shown on the CNC screen.

Y
P9

String position (on a straight line):


P7 = X co-ordinate at which the 1st string
character will start
P8 = Y co-ordinate at which the 1st string
character will start
P9 = string angle

P8

0 part

X
P7

Scale factor:
P11 = advancement speed scale factor for axis perpendicular to working plane (Z for G17).
Value between 0 and 1.
Example
P11=0.5 : all mandrel axis movements are carried out with F equal to programmed value divided by 2.

5-42

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Position of circular engraving:
P7 =
P8 =
P9 =
P10 =

X co-ordinate of the circumference center


Y co-ordinate of the circumference center
starting angle
circumference radius (positive or negative)

P9

P7

P10 +

P8

0 part
0 part

P8

X
P7

P10 -

P9

If the radius is positive, the string will be engraved CW on the outer side of the supporting
circumference.
If the radius is negative, the string will be engraved CCW on the inner side of the supporting
circumference.
Example:
P1=6, P2=8, P3=10, P4=20
P5=2, P6=-1
P7=-50, P8=20, P9=0, P11=0.75
WRITEL=WRITING characters 12345 ($%&/)
P7=0, P8=0, P9=135, P10=100
WRITEC=Selca S4045 CNC
G50
The following parameters are free (i.e. not used in WRITEL and WRITEC instructions and therefore
available) for parametric programming:
P0
from P16 to P19
from P23 to P30
P32
from P34 to P41
from a P44 to P49
from P52 to P76
from P78 to P87
from P90 to P98
from P110 to P198
from P200 to P399

User and Programming Manual - Part II

5-43

S4045 S4045P
5. Advanced programming or macro instructions

5.18 PROGRAMMABLE ZONE SCALING


The programmable zone scaling feature lets you specify different scaling factors for three different
zones of the programmed part.
In each zone, a different scaling factor for each machine axes can be specified.
The three programmable zones must be separated by two linkup zones in which the scaling factor will
vary in a linear way.
The scaling factors that are not defined will be set to 1.
The axis along which the three zones are defined can be any one of the three Cartesian axes.

Connection
Zone

First zone
Factors
X, Y, Z

Connection
zone

Second
zone
Factors
D5, D6, D7

D1

D2

Third zone
Factors
D8, D9, D10

D3

D4

The programming format is:


G61 [X...][Y...][Z...]D0=... D1=... D2=... D3=... D4=... [D5=...][D6=...][D7=...][D8=...][D9=...][D10=...]
where:
X...

scaling factor for the X axis in the first zone

Y...

scaling factor for the Y axis in the first zone

Z...

scaling factor for the Z axis in the first zone

D0=...

selection of the axis along which the tree zones are defined
D0=1 X axis
D0=2 Y axis
D0=3 Z axis

D1=...

end co-ordinate of the 1st zone

D2=...

starting co-ordinate of the 2nd zone

D3=...

end co-ordinate of the 2nd zone

D4=...

starting co-ordinate of the 3rd zone

D5=...

scaling factor for X in the 2nd zone

D6=...

scaling factor for Y in the 2nd zone

D7=...

scaling factor for Z in the 2nd zone

5-44

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
D8=...

scaling factor for X in the 3rd zone

D9=...

scaling factor for Y in the 3rd zone

D10=...

scaling factor for Z in the 3rd zone.

If the block is longer than 70 characters it is necessary to divide the line with the > character at the end
of every line.
The D1, D2, D3 and D4 parameters must always be programmed even if you want to work with only
two zones and one linkup zone.
In this case, program D3 and D4 outside the part to be machined and don't program the D8, D9 and
D10 scaling factors.
The parameters D1, D2, D3 and D4 must be programmed in an increasing mode, that is:
D1 < D2 < D3 < D4

User and Programming Manual - Part II

5-45

S4045 S4045P
5. Advanced programming or macro instructions

5.19 SPIRAL MILLING


Function G735 permits the spiral milling of a plane profile programmed in ISO or PROGET2 language.
The tool does not come off the part at all as the increase in depth is executed continuously along the
profile.
This work method improves the finish and cuts down on execution times.
The functions with which to program a spiral milling cycle are as follows:
G735
G734

open cycle
close cycle

The programming format is:


G735 I... [J...] [K...] [Q...] [Z...]
where:
I

increment all along the profile (Q1: default)


increment per mm of profile (Q2)
number of repetitions (Q3)

direction of the increment


J1:
increment on Z- (default)
J2:
increment on Z+

repetition of profile
K1:
profile repeated with constant Z
K2:
profile not repeated. If not programmed: K=1

increment type discriminator


Q1:
all along profile
Q2:
per mm of profile
Q3:
value calculated in relation to Z and I

height at end of work

G734:

execution command

The plane profile must be a closed profile, i.e. the start and end points must coincide.
The spiral milling starts from the Z height programmed before the G735 function.
The linear or circular approach with PROGET2 profiles is executed on this constant Z.
The spiral milling commences on the final point of the approach, i.e. on the profile starting point.
Once the end of work height Z is reached, the cycle is concluded and the profile repeated at
constant Z.
If repetition of the profile is not required, program the parameter K2.
The linear or circular exit of PROGET2 profiles is made on the last profile only.
The spiral milling cycle is concluded at the end of work height Z. Therefore, program an exit on Z after
function G734.

5-46

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Programming example:
G17
O1
T1M6
F1000S1200M3
G49I5
Z100R
X30Y0R
Z2R
Z0
G735 Z-50 I5
G41K2
G13X50J90
G21I10
G13Y30J180
G20X-50Y0I30
G13J0
G21
G13X50J90
G40X30Y0K2
G734
Z100R
M30

5.20

[spiral milling start height


[I = increase in depth

SPECIAL USE OF G751 FOR SCALING FACTORS

The function G751 lets you specify the same or different scaling factors axis by axis on profiles
programmed with straight lines and circles.
The programming format is:
G751 [SCAX] [SCAY] [SCAZ]
where:
SCAX
SCAY
SCAZ

scaling factor for X axis


scaling factor for Y axis
scaling factor for Z axis

Example:
G751 SCAX1.015 SCAY1.03 SCAZ 1.005
Scaling factors of 1.5% on the X axis, 3% on the Y axis and 0.5% on the Z axis are introduced.

User and Programming Manual - Part II

5-47

S4045 S4045P
5. Advanced programming or macro instructions

5.21 SUBPROGRAM MODAL RECALL


The function G73 permits modal recall of internal or external subprograms after rapid positioning on
the points programmed after this function.
The programming format is:
G73 [K] L

where:

workpiece zero translation request


K1: the workpiece zero is translated on the points. The subprogram has its zero on
this point.
K2: the workpiece zero is not translated on the points. The subprogram must
be programmed in incremental. (If not programmed, K=1)

L ..

number of the internal subprogram (from L=0 to L=99) or name of the external
subprogram (LNAME:)

Warning!

The programming order of parameters K and L must be absolutely respected therefore


program always first parameter K and then L.

Function G72 cancels G73.


Example:

G73 L1
XY
XY
XY

G72
M30
L=1

G32

Points on which to repeat the internal subprogram L1

Subprogram of work to be performed on the points programmed between G73 and G72

In the subprogram to be repeated, the functions of the fixed supercycles from G781 to G787 and from
G791 to G797 are not accepted.
The origin shift functions G51 and G52 are accepted.
NOTE: If the points where the machining has to be repeated are stored in an external subprogram,
also the machining has to be stored in an external subprogram:
Example
G73 LPROG:
LPUNTI: [points where the PROG subprogram has to be repeated
G72
If programming:
G73 L1
LPUNTI:
G72
The system shows Error 41: Recall L function not present.

5-48

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions

5.22 PLANETARY MILLING


The G4725 function, present on S4000 CNC units only, exploits the high machine tool speed and
ensures excellent tool wear to rough-out an ISO or PROGET2 programmed profile by means of
circular paths. This process is called "planetary milling" and is indicated for machining extremely hard
materials.

The programming format is:


G4725 [I...] [J...] [Q] [K]
where:
I

radius of the circle in mm of the circular mill path


(if not programmed I=1)

J...

profile increase in mm between circles (if not programmed J=1)

Q...

machining allowance on profile (if not programmed Q=0)

K ...

machining mode selection:


K1= flush machining
K2= not flush machining

This parameter defines the direction of machining i.e. according to the profile path or not. The meaning
of this parameter is better explained in the examples below.
The theoretical profile of the part and the path followed by the machine for planetary milling is shown in
the drawings. As can be seen, the milling is inside the profile and counterclockwise.
Parameter K1 indicates that machining is agreeing and the movement between circles is flush.
Parameter K2 indicates that machining is disagreeing and the movement between circles is opposite
to the flush.

User and Programming Manual - Part II

5-49

S4045 S4045P
5. Advanced programming or macro instructions
Example with K1

Example with K2

5-50

User and Programming Manual - Part II

S4045 S4045P
5. Advanced programming or macro instructions
Function G4724 cancels G4725.
Programming example:
$1M0X-89.1506I60.6506Y-31.5309J49.0309
[PROFILO 1
G17
O1
T1M6
F800S1200M3
G49I5
Z100R
X0Y0R
Z2R
Z-10
G4725I4
G41K2
G13Y-20J0
G21I10
G13X56J90
G21
E1=G20X76Y27,G21I-25.65,G20X28Y45
E1
G21I10
G10X120Y0I-5
G11X-110Y70I-5
G21
G13Y40J180
G21
G13X-73J-90
G21I-10
E2=G21X-58Y-6,G13X-98.5Y0J-45
E2
G21
G13Y-20J0
G40X0Y0K2
G4724
Z100R
M30
The following error E87: radius too big for G4725 function" will appear if the circle radius is too big for
the profile to be made correctly.
The error E70: geometric definition error indicates the presence of perpendicular axis movements (Z
for G17, Y for G18 and X for G19) in functions G4725 - G4724.
Function G761 for limiting the operation field cannot be used in the presence of G4725.

User and Programming Manual - Part II

5-51

S4045 S4045P
5. Advanced programming or macro instructions

5-52

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

6. SPECIAL FUNCTIONS
A number of special functions can be programmed by using the following 3/4 digit G-codes:

G733
G732
G851
G850
G846
G845
G817
G9999
G872
G873
G99
G39
G37
G36
G38
G1001
G1000
G901
G900
G911
G910
G15
G14

high speed milling of profiles defined by points with S speed ramp.


cancels G733.
part origin offset by handwheels.
cancels G851.
manual axis controls by handwheels during machining.
cancels G846.
tool length offset on an axis non-orthogonal to the machining plane.
synchronization of program execution with tool path display.
ON/OFF touch probe measuring cycle in space.
touch/copying probe measuring cycle in space.
drift compensation (compensates for position offsets caused by servo-drives).
opens a file to store actual machine axis path.
enables storing of actual machine axis path.
disables storing of actual machine axis path.
closes the file opened with G39.
graphic execution of a program sequence.
cancels G1001.
disables EDIT and GRAPHIC EXECUTION modes for programs other than the one being
executed on the machine.
cancels G901.
disables travel limit control.
cancels G911.
enables the SLAVE axes to be linked with the respective MASTER axes.
cancels G15.

User and Programming Manual - Part II

6-1

S4045 S4045P
6. Special functions

6.1 HIGH SPEED MILLING OF PROFILES


6.1.1 HIGH-SPEED MILLING OF PROFILES DEFINED BY POINTS
WITH S SPEED RAMP (G733)
For high speed milling with the result of superfinishing of surfaces defined by points, generated by
CAM or digitising systems, a new algorithm with the S-speed ramp has been introduced on the S4045
and S4045P numerical controls, together with careful analysis of the key factors for high speed such as
Feed-Forward, Jerk and Look-Ahead.
The system automatically calculates, on the basis of the limits configured in the SETUP, the optimal
speed in relation to the edges and the radii of curvature of the trajectory.
To this end, for example, a slowing down is introduced at the direction change points so as to avoid
beating on the axes, by reducing the speed to a value at which the Jerk, i.e. the variation of
acceleration with respect to time, is limited to acceptable values: as a result, there is now a speed
ramp with an S profile instead of the trapezoid profile.
With this algorithm, the critical points of a trajectory are also kept under control and the slowing down
must take place before a critical point is reached, because the braking space is determined by the
limitations of acceleration and Jerk.
If the machine SETUP parameters have been optimized by the machine-tool maker, it is sufficient to
program G733 alone without any parameters before the machining program.
Example:
T1M6
S24000F15000M13
G733
LNAME:
Z100R
M30
Where necessary, parameters can be programmed to modify operation of the G733.

The programming format is:


G733 [K] [Q] [D0=] [D1=] [D8=]
where:
K

edge rounding tolerance. To prevent jerks on the axes, geometrical discontinuities are
eliminated by inserting spline type curves on the edges, on the plane or in space.
K represents the maximum error allowed for the resulting continuous trajectory.
(By default: K=0.01 mm).
The higher the value of K, the lower the work execution time.

Q...

work acceleration multiplication factor.


(By default: Q= value configured in the system SETUP).
Must not exceed the machines limit acceleration, normally its rapid rate.
The higher the value of Q, the lower the work time.

6-2

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

D0= request for graphic display of the tool path. (If not programmed, D0=1)
D0=1: display off
D0=0: display on
D1=... geometric filter on the programmed points. All the points whose distance from the theoretical
curve is lower than D1 (maximum two points out of 3) are ignored.
(By default: D1=0.01 : the points are filtered)
D8=...

JERK value (typically between 10% and 50% of the maximum acceleration).
(By default: D8= value configured in the system SETUP).
If D8=0 the system automatically calculates a jerk value according to the acceleration.
The jerk value must offer the best compromise between the softest movement and the
machining time. Small Jerk values lead to softer movement but increased machining times.

Function G733 is disabled by function G732.

6.2 PART ORIGIN OFFSETTING BY HANDWHEEL


Offsetting of part origin, which is normally programmed with G51/G52, may also be performed by
means of handwheels. This feature is useful when the exact offset value cannot be determined.
For example, it could be necessary to restart a 3-D program after an interruption caused by a worn out
tool.
Upon cycle restart, the new tool may cause a cutting depth difference equal to the length difference
between the worn tool and the replacement one.
The G851 code make it possible to offset part zero, for example along the Z axis, until the new tool
reaches the previous machining height.
The programming format is:
G851 AXIS1 AXIS2 ....
where:
AXIS1, AXIS2, etc.

defines the axes to be offset.


Example: if G851Z is programmed, it will be possible to offset only the Z axis
during machining.
Axis displacement/handwheel turn is the same as in Manual Mode.

G850 disables G851.

User and Programming Manual - Part II

6-3

S4045 S4045P
6. Special functions

6.3 MANUAL AXIS CONTROL DURING MACHINING


The G846 code makes it possible to define which axes are to be under NC control. The other axes can
then be moved manually via handwheels if enabled by PLC.
The programming format is:
G846 AXIS1 AXIS2 ...
G845 disables G846.
The G846 XY instruction specifies that X and Y are to be under program control while the Z axis can
be moved manually, even if it has been programmed.
In the presence of G748 and G749, ensuring the contact part/tool during table/head rotation, the G846
X Y Z instruction will allow the system to keep the X Y and Z axes under control, while the rotary axes
can be moved manually, thus allowing all the surfaces to be machined with shorter tools.

6.4 TOOL LENGTH OFFSET ON AN AXIS NONORTHOGONAL TO THE MACHINING PLANE


Tool length offset can be applied to an axis non-orthogonal to the machining plane (Z in G17, Y in G18
and X in G19). This can be achieved by programming G817 followed by the name of the machine axis
to which the compensation is to be applied.
This is useful when profiles defined on the Z X (G18) or YZ (G19) plane are to be machined with a
vertical mill (i.e. mounted parallel to Z).
Activate by programming a T function or G48.

6-4

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

6.5 SYNCHRONIZATION OF PROGRAM EXECUTION WITH


TOOL POSITION
During machining the interpolation calculation is normally ahead of the current tool position. When
machining with graphics enabled, the system will display the path to execute in green and the path
already executed in white.
If for any reason, such as parameter and/or tool compensation data entry, the calculation must be
synchronized with the actual position of the tool, a G9999 shall be programmed.
When processing the G9999 block, the control will stop calculation and wait for the machine axes to
reach the last programmed position before G9999.
To allow for parameter data entry it is necessary to program M0 (program stop) after G9999.

6.6 TOUCH PROBE MEASURING CYCLE


The system can manage an ON/OFF digital touch probe that allows, by means of a G872 code, to
measure the co-ordinates of a point in space.
G872 cycles can be programmed as follows:
G872 X ...Y... Z... I... F... R
With
X ...Y... Z...

expected co-ordinates of the point to be measured

I...

clearance

The touch probe will approach the part at the last programmed feedrate (or in rapid if R is programmed
with G872).
At a distance of I... inches/millimetres from the expected position, axis motion will be slowed down to
the F feedrate programmed in the G872 block until the probe is triggered.
If the function I... is not programmed, the entire move will be executed at the measurement speed F
programmed with the G872 function.
The probe will remain in contact with the part. The move out must be programmed in the block
following G872.

User and Programming Manual - Part II

6-5

S4045 S4045P
6. Special functions

Example:
N123 X ...Y...
N124 G872 X ...Y...
N125 X ...Y...

positioning
executes probing cycle
probe move out instruction.

The measured co-ordinates will be stored into the P90 - P95 parameters in a sequence corresponding
to the defined machine axes.
In a machine with X (first), Y (second) and Z (third) axis, the X co-ordinate of the measured point will
be stored in P90, the Y co-ordinate in P91 and the Z co-ordinate in P92.
The co-ordinates that have not been programmed in the G872 block will not be stored and the
corresponding P parameters will not be updated.
If the probe makes contact with the part P99 will be set to 1.
If the probe does not make contact within I... inches/millimeters from the expected point position, -1 will
be the return value in P99.
The P90 - P95 parameters can either be printed out (by programming the OPEN, PRINT, FORMAT
instructions as described in chapter 4.7) or transferred to other parameters (P1 = P90, P2 = P91, etc.).
This new set of parameters can be utilized for further calculations, such as calculating a circle passing
through three points or a straight line through two points etc.
E10=G10XP1YP2,G20XP3YP4,G11XP5YP6

circle through three points

E11=G10XP20YP21,G11XP23YP24

straight line through two points

P1=SQR((P12-P10)*(P12-P10)+(P13-P11)*(P13-P11))
distance between two points.
Moreover, circle center and radius, straight line angle and distance from zero may be stored with the
Pn = Em instructions into other parameters and then printed out or referenced by subsequent program
blocks to change, for example, the current co-ordinate system origin with G51 or G52.
The touch probe may be a PRESETTING probe of the tool length and radius.
If the measurement is made while the tool is rotating and the transducer is on the spindle, the angular
position of the spindle is stored in parameter P98 (value between 0 and 360 degrees).
G873 measuring cycles can also use copying probes.

6-6

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

6.7 DRIFT COMPENSATION


G99 will program the compensation for any servo-drive drift that may cause axis positioning errors.
G99 must be entered in MDI after the M11 code and a rapid or feed movement.

6.8 DEFINITION OF PART ORIGINS AND TOOL LENGTHS


FROM PROGRAM
Besides being defined with the procedures described in the first part of this manual, part origins and
tool lengths can also be set from the program. The format is:
On = X... Y... Z... A... B...
Tm = ...
Origin number (n), tool offset number (m) and the relevant values can be P parameters.
Example:
P1=0
TP1=X100 YP2
P2=15
TP2=P93
Defining an origin means enabling it.
This feature, combined with the measuring cycles (G872 and G873), permits automatic part centering
and tool presetting.
The Tm=... instruction stores into the m tool length offset either the programmed numeric value or the
value stored in the programmed P parameter without enabling the compensation.
To enable the compensation program T... M6 or G48 K...

User and Programming Manual - Part II

6-7

S4045 S4045P
6. Special functions

Example:
T18=122.54
P9=200.3, P1=1
TP1=P9
The Tm=... K2 instruction is the same as the tool zero setting operation previously described
(see
part I - chapter 2.5). The system calculates the length compensation value, stores it and enables the
compensation.
The Km=... instruction stores into the m tool radius offset either the programmed numeric value or the
value stored in the programmed P parameter.
Example:
K1=10
P1=5, P2=12
KP1=P2
The Tm=... and Km=... instructions can be used for tool table initialization after a tool presetting off the
machine.
The presetting system must prepare a program containing length and radius of the different tools.
Example:
T1=213.24, K1=12
T2=224.67
T3=202.12, K3=10
....
....
Tm=..., Km=...
Store this program and execute it.
The function Tm=Kn (con n=12/13/14/15) permits the writing of values in the USER PARAMETERS
of the tool table.
With n=12/13:

writing of the first and second whole number value (between 32768 and +32767)

With n=14/15:

writing of the first and second decimal value (between 131072 and +131071)

The function Pm=TKn (with n=12/13/14/15) permits the reading in a parameter of the values written
previously in the USER PARAMETERS of the table.
The function Tm= value K11 lets you write column 11 of the tool table (TOOL EXPIRED : YES/NO)
Tm=1K11
Tm=0K11

to write YES in the column (TOOL EXPIRED)


to write NO in the column (TOOL NOT EXPIRED)

The function Pm=TK11 lets you read column 11 of the tool table. A 0 value is written into parameter
Pm if the tool is not expired (NO in the table), a 1 value if the tool is expired (YES in the table).

6-8

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

6.9 WRITING ORIGIN TABLE


Part origin definition from program, as described in the previous chapter, corresponds to the axis zero
setting procedure described in the first part of this manual.
The system calculates for each axis the distance of the origin from machine zero and stores these
values into the origin table.
If these values are known (because they can be read directly on the machine or in the origin table
resulting from a previous zeroing operation) it is possible to write them directly in the table with the
format:
On= X... Y... Z... K...
K2

the programmed values are stored in the table and the n origin is enabled

K3

the programmed values are stored in the table and the n origin is not enabled

The values stored in the origin table can be transferred into P parameters with the format:
Pm=Om K...
where K is the axis number, from 1 to 8, according to machine configuration data (1 normally
corresponds to the X axis, 2 to Y, 3 to Z etc.).
The P99 parameter is set to 1 if the recalled axis had been zeroed and to -1 if the recalled axis had not
been zeroed ( . character in the table).
In this last case the Pm parameter is not initialized.
The values assigned to an origin can be transferred to another origin with the On=Om instruction.
The instruction On = AXIS NAME
states that the On origin is only referred to the specified axes so that, in case of recall, the other axes
will be referred to the previous origin.
Programming, for example, On=XY and recalling then the n origin, the Z axis will be referred to the
previous origin.
For the complete deletion of an origin two blocks shall be programmed:
On=X and On=Y
The On=X instruction cancels all the axes but X, the On=Y instruction cancels also the X axis.

User and Programming Manual - Part II

6-9

S4045 S4045P
6. Special functions

6.10 GRAPHIC EXECUTION OF PROGRAM SECTIONS


During program execution on the machine, the program section defined after a G1001 code will be
executed only in graphic mode.
G1000 cancels G1001 and restores the normal execution.
Example:
....
....
G1001
....
....
....
G1000
....
....

program section to be executed only in graphic mode

6.11 STORING AXIS ACTUAL POSITION


It is possible to store into a program the actual path of machine axes.
The system stores a point at each sampling (every 5 or 2.5 msec).
The G39 code starts the storing operation. The programming format is:
G39 K... LNAME :
where:
K...

storing format
K0 ASCII format
Default value K=0.
Each point takes about 30 bytes in ASCII format and about 6 bytes in binary format.

NAME:

name of the destination program (max. 8 characters, the first of which alphanumeric).
If the program NAME is already in memory, the system creates a program by adding the
characters /A, /B, /C, etcto the name.
If you want to overwrite the existing program, program K10, K11, K12

G37 enables the storing operation.

The programming format is:


G37 [K...]
where:
K...

stores a point every K samplings. (By default: K=1).


Example: assuming the system samples every 2.5sec, if K2 is programmed, a point is
stored every 5sec.

G36 cancels G37.

6-10

User and Programming Manual - Part II

S4045 S4045P
6. Special functions

Both codes can be programmed in different points of the program. This allows storing axis actual
positions only in the desired zones.
The G38 code closes the file opened with the G39 code.
Before G38 a G36 must be programmed.

6.12 DISABLING EDIT AND GRAPHIC EXECUTION MODES


DURING MACHINING
The G901 code disables EDIT and GRAPHIC EXECUTION modes for programs other than the one
being executed on the machine.
When a main program calls various external subprograms using the LNAME: format, a delay time is
inserted when moving from one subprogram to the next while waiting for the new subprogram to be
loaded in the work area.
If function G901 is enabled this delay is not inserted.
The new subprogram is loaded before the old one is completed.
The

command and the G900 code cancel G901.

The G901 I1 function frees memory after recalling a file.

6.13 CHECKING TRAVEL LIMITS


The system checks in advance if a program block contains an instruction that will position whichever
axis beyond its travel limits. An error condition is signalled and machining will be stopped at the end of
the block preceding the one containing the wrong instruction.
The G911 code, programmed alone, disables this control.
The block containing the wrong instruction will be partially executed: machining will be stopped when
the axis reaches its travel limit and an error condition will be displayed.
G911 is cancelled by a

command or a G910 code.

User and Programming Manual - Part II

6-11

S4045 S4045P
6. Special functions

6.14 MASTER SLAVE AXES


Function G15 enables SLAVE axes to be linked with their respective MASTER axes.
The programming format is:
G15 SLAVE MASTER [I]
where
SLAVE

name of SLAVE axis

MASTER name of MASTER axis


I...

scale. (If not programmed: I=1).


I may assume any value, including negative ones, for instance I-1 for mirror machining.
Example: G15 U X I-1

Function G14 disables function G15.


If there are numerous MASTER SLAVE axis couples, numerous G15 functions must be
programmed.
Function G14 cancels them all.
NOTA:

6-12

Performance available only with Master-Slave option.

User and Programming Manual - Part II

S4045 S4045P

PART III

PROGRAMMING
EXAMPLES

User and Programming Manual - Part III

S4045 S4045P

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1. PROGET2 PROGRAMMING
1.1 PROFILE 1

N1
N2
N3
N4
N5
N6
N7
N8
N9

[PROFILE 1
O1
T1 M6
F150S1200M3
G49I5
X0Y100R
Z2R
Z-15
G41K2

N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20

G20X0Y70I-20
G11X25Y30
G21I10
G13J-5
G21I20
G20X100Y20I-20
G13J180
G21I-15
G13X0Y70I-20J65
G20
G40K2X0Y100

N21
N22

Z10RM5
M30

[Recall origin 1
[Recall tool 1
[Set a feed of 150 mm/min and start spindle at 1200 RPM
[Tool data, mill radius = 5mm
[Starting point of circular approach to to profile
[Rapid move to safe distance from cutting depth
[Move down to cutting depth at feed
[Enable cutter compensation and define automatic approach to
[profile with circle tangent to the first element, tool left of profile
[C1
[L1
[C2
[L2
[C3
[C4
[L3
[C5
[L4
[C1
[Disable cutter compensation and end profile with an automatic
[circular exit path.
[Tool rapid out to Z = 10 and spindle off
[Program end

User and Programming Manual - Part III

1-1

S4045 S4045P
1. PROGET2 Programming

1.2 PROFILE 2

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26

1-2

[PROFILE 2
O1
T1 M6
G49I6
F400S1200M3
X0Y-20Z2R
Z-10
G42K2
G13Y-40J180
G21I-18
G10X-50Y-40
G11X-20Y40
G21I7
G20X-20Y40I-18
G21I15
G13Y45J0
G21I-8
G13X50J-90
G21I-8
G20X50Y0I20
G13J-60
G13X40J-90
G13Y-40J180
G40X0Y-20K2
Z100R
M30

[Origin 1
[Call tool 1
[Cutter radius = 6
[Tecnological data
[Rapid positioning
[Feed in
[Circular approach, tool right of L1
[L1
[R-18
[L2
[R7
[C1
[R15
[L3
[R-8
[L4
[R-8
[C2
[L5
[L6
[L1
[Circular exit from profile
[Rapid move out
[Program end

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.3 PROFILE 3

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17

[PROFILO 3
O1
T2 M6
G49I4
F400S1200M3
X-55Y5Z2R
Z-10
G42K1
G13Y20J0
G21I5
G20X-15Y15I-18
G13Y25J0K2
G20X40Y25I15
G13J0
G40X50Y-5K1
Z100R
M30

[Origin 1
[Call tool 2
[Tool radius = 4
[Technological data
[Rapid positioning
[Feed down
[linear approach right of L1
[L1
[R5
[C1
[L2(second intersection L2/C1)
[C2
[L3
[Linear exit
[Rapid move out
[Program end

User and Programming Manual - Part III

1-3

S4045 S4045P
1. PROGET2 Programming

1.4 PROFILE 4

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29

1-4

[PROFILE 4
O1
T3 M6
F400S1100M3
G49I5
X-30Y0Z2R
Z-10R
G42
G13X-50Y10J90
G11X30Y50
G21I-8
G20X-10Y40I18
G21I-8
G10X-50Y10
G11X30Y50
G11X60Y20
G21I-10
G13J-90
G21I-10
G13Y-20J180
G20X0Y-20I14
G13Y-20J180K2
G21I-10
G13X-50Y10J90
G11X30Y50
G40
X-30Y0
Z100R
M30

[Origin 1
[Call tool 3
[Technological data
[Tool radius = 5
[Rapid positioning to entry hole
[Rapid down
[Intersection L5/L1 tool right of profile
[L5 last profile element
[L1 first profile element
[R-8
[C1
[R-8
[L1
[L2
[R-10
[L3
[R-10
[L4
[C2
[L4 (second intersection C2/L4)
[R-10
[L5 last profile element
[L1 first element
[Profile end on intersection L5/L1
[Return to hole
[Rapid move up
[Program end

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.5 PROFILE 5

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20

[PROFILE 5
O1
T4 M6
F400S1000M3
G49I4
X0Y-35Z2R
Z-10
G41K2
G20X0Y0I50
G21I5
G13Y0J180
G21I5
G20X0Y0I-20
G21I5
G13X5J90
G21I5
G20X0Y0I50
G40X0Y-35K2
Z2R
M30

[Origin 1
[Call tool 4
[Technological data
[Tool radius 4
[Rapid positioning
[Feed down
[Circular approach left of C1
[C1
[R5
[L1
[R5
[C2
[R5
[L2
[R5
[C1
[Circular exit
[Rapid up
[Program end

User and Programming Manual - Part III

1-5

S4045 S4045P
1. PROGET2 Programming

1.6 PROFILE 6

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18

1-6

[PROFILE 6
O1
T5 M6
F400S1100M3
G49I5
X20Y-50Z2R
Z-10
G41K1
G13X0Y0I-35J180
G20
G21I-150
G20X0Y50I-20
G21I-150[
G20X0Y0I-35
G13J180
G40X-20Y-50K1
Z2R
M30

[Origin 1
[Call tool 5
[Technological data
[Tool radius = 5
[Rapid positioning
[Feed down
[Linear approach left of L1
[L1
[C1
[R-150
[C2
R-150
[C1
[L1
[Linear exit
[Rapid out
[Program end

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.7 PROFILE 7

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

[PROFILE 7
O1
T1 M6
F400S1100M3
G49I4
X45Y-5Z2R
Z-10
G42K2
G20X45Y-5I-15
G11X0Y0I-20
G20
G11X-70Y-5
G11Y5
G13J0
G10X-50Y5
G11X0Y0I-20
G21I8
G10X0Y0I-20
G11X15Y36I-15
G20
G11X0Y0I-20
G21I7
G13X45Y-5I-15J0
G20
G40X45Y-5K2
Z2R
M30

[Origin 1
[Call tool 1
[Technological data
[Tool radius = 4
[Rapid positioning
[Feed down
[Circular approach right of C1
[C1
[L1
[C2
[L2
[L3
[L4
[L5
[R8
[L6
[C3
[L7
[R7
[L8
[C1
[Circular exit
[Rapid out
[Program end

User and Programming Manual - Part III

1-7

S4045 S4045P
1. PROGET2 Programming

1.8 PROFILE 8

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21

1-8

[PROFILE 8
O1
T7 M6
F300S1100M3
G49I5
X15Y35Z2R
Z-10
G42K2
G20X25Y35I-20
G21I-100
G51X45Y55J30
G20X25Y15I-20
G21I-100
G51X70Y25J-15
G20X20Y13I-20
G50
G21I100
G20X25Y35I-20
G40X15Y35K2
Z2R
M30

[Origin 1
[Call tool 7
[Technological data
[Tool radius = 5
[Rapid positioning
[Feed down
[Circular approach right of C1
[C1
[R-100
[Temporary origin
[C2
[R-100
[new temporary origin
[C3
[Restore original origin
[R100
[C1
[Circular exit
[Rapid out
[Program end

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.9 PROFILE 9

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21

[PROFILE 9
O1
T11 M6
F180S1100M13
X15Y0R
Z2R
Z-10
E1=G20X0Y50I-10
E2=G20X80Y0I-10
E3=G20X0Y-50I-10
E4=E1,G21I-120,E2
E5=E2,G21I-120,E3
E6=E5Q30
E7=E3,G21I180,E1
G49I3
G42K2
E7
E1
E4
G21I6
G13Y50J0

User and Programming Manual - Part III

N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40

G21I-4
G13X65J-90
G21I6
E4
E2
E5
G21I6
G13X0Y0I-10J-45
G21I-4
E6
G21I-4
G13X0Y0I-10J135
G21I6
E5
E3
E7
G40X15Y0K2
Z100R
M30

1-9

S4045 S4045P
1. PROGET2 Programming

1.10 PROFILE 10

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

1-10

[PROFILE 10
O1
T6 M6
F200S1200M3
G49I4
E1=G51X65Y-20J45
E2=E1,G20X-20Y20I10
E3=G13E2J180
E4=E3,G13X-15Y0J90
E5=E4,G21I-80,G20X-15Y45
X0Y15R
Z2R
Z-10
G42K2
E5
G13Y45J0
G21I5
E6=G51X40Y35J30
E7=E6,G20X0Y32I-10
E8=E6,G20X40Y10I10
E9=E6,G20X70Y10
G13E7J90
E7
G13J-60
G21I5
G13E9J30
G21I-5
E8

N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47
N48
N49
N50
N51
N52
N53
N54

G21I-5
G13E9J30
G21I-5
G13E9J-60
G21I5
G13Y55J0
G21I-5
G13X130J-90
G21I-9
E10=E1,G13X0Y-20J180
E11=E1,G13X35Y-12J135
E12=E1,G13X0Y-12J180
E13=E1,G13X10Y-12J-135
E10
E11
E12
E13
E10
G21I-9
G13E2J90
E2
E3
E5K2
G40X0Y15K2
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.11 PROFILE 11

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24

[PROFILE 11
O1
T6 M6
F250S1200M13
X-10Y-25R
Z2R
Z-10
E1=G51X20Y-60J-30,G20X25Y15I-10
E2=G10E1,G11X-58Y-14
E3=G20X-58Y-14,G21I-40,G20X-50Y25
E5=G51X0Y0J30,G20X30Y30I-15
E4=G20X-50Y25,G21I100,E5
G49I5
G42K2
E2
E3K2
E4
E5
G21I200
E1
E2
G40K2X-10Y-25
Z100R
M30

User and Programming Manual - Part III

[Origin 1
[Call tool 6
[Technological data
[Rapid positioning
[Feed down
[Circle E1
[Line E2
[Circle E3
[Circle E5
[Circle E4
[Tool radius 5
[Circular approach
[Line E2
[Circle E3
[Circle E4
[Circle E5
[Radius
[Circle E1
[Line E2
[Circular exit
[Rapid up
[Program end

1-11

S4045 S4045P
1. PROGET2 Programming

1.12 CLOSED CURVE DEFINED BY POINTS

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30

1-12

[CURVE DEFINED BY POINTS


O1
T8 M6
[mill D=8
F500S1000M13
G49I4
X100Y0R
Z2R
Z-10
G76
G42
G27X80Y-20 D1=1
Y-10
Y0
X76Y15
X66.5Y30
X57Y45
X53Y60
X57Y75
X66.5Y90
X76Y105
X80.4Y120
X79.2Y135
X77.1Y150
X74.2Y165
X71.3Y180
X69.2Y195
X68.4Y210
X70Y225
X74Y240
X78Y255

N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41

X80Y270
Y-80
Y-70
Y-60
Y-50
Y-40
G29Y-30
G40
X100Y0R
Z200R
M30

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.13 OPEN CURVE DEFINED BY POINTS

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18

[OPEN CURVE DEFINED BY POINTS


O1
[Origin 1
T8 M6
[Call tool 8
F300S1100M3
[Technological data
G49I5
[Tool radius = 5
X-60Y-15Z2R
[Rapid positioning
Z-10
[Feed down
G41
[Tool to the left of the part
G27X-50Y-25
[First curve point
X-30Y-12
X-10Y1
X10Y12
[Curve points
X30Y23
X50Y33
G29X70Y40
[Last curve point
G40
[Cancel tool comp.
Z2R
[Rapid out
M30
[Program end

User and Programming Manual - Part III

1-13

S4045 S4045P
1. PROGET2 Programming

1.14 ANTICOLLISION

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

1-14

G17
O1
T1
F1000S1200M3
G49I6
X0Y50R
G41K2D0=1
G20X25Y40I-15
G13Y45J0K2
G20X0Y0I85K2
G13Y60J180
G13X40J90
G20X0Y0I85K2
G13X5J90K2
G20X0Y0I-90K2
G13X10J90K2
G20X0Y0I95K2
G13X-10J-90
G20X0Y0I-90
G13X-5J-90
G20X0Y0I85
G13X0Y0I5J135K2
G20X0Y0I95K2
G13X0Y0I5J-45
G20X0Y0I85
G13Y40J0
G13X-45J-90

N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43

G13Y30J180
G13X-55J-90
G13Y20J0
G13X-45J-90
G13Y5J0
G20X-30Y0I-5
G13J-135
G13Y-15J0
G13X-20J90
G21I-5
G13Y20J0
G20X0Y15I6
G13Y20J0K2
G13X25J90
G20X25Y40I-15
G40K2X0Y50

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

1.15 MIRROR MACHINING

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19

[MIRROR MACHINING
O1
T11 M6
F400S1100M3
L1
G54L1
G55L1
G57L1
M30
[
[
L=1
X90Y20Z2R
Z-10
X40F300
G2Y60I40J40
X90
Z2R
G32

[Origin 1
[Call tool 11
[Technological data
[Call subroutine 1
[Mirror X
[Mirror Y
[Mirror X Y
[Program end

[Start of subroutine
[Rapid position
[Feed down
[contouring
[Rapid up
[End of subroutine

User and Programming Manual - Part III

1-15

S4045 S4045P
1. PROGET2 Programming

1.16 XZ-PROFILE MACHINING

1-16

User and Programming Manual - Part III

S4045 S4045P
1. PROGET2 Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41

[MACHINING A PROFILE XZ
G17XZY
[Axis swap
O1
T3
[Spherical tool D=12
F500S1000M3
[Technological data
X-82Y-20Z10R
[Move to start point
G49I6
[Declare tool radius
L=1
[Repeat cycle with passes in Y
Y-15
[Y position first pass
G41
G20X-75Z0
[Profile start
G13Z0J0
G21I8
G13X-45J90
G13X0Z20I-25J30
G20
G13J-30
G13X45J-90
G21
G13Z0J0
G20X75Z0
G40
Y-13.5
[increment in Y for return pass
[profilo di ritorno
G42
G20X75Z0
G13J180
G21I-8
G13X45J90
G13X0Z20I25J150
G20
G13J210
G13X-45J-90
G21
G13Z0J180
G20X-75Z0
G40
[Cancel tool comp.
G51Y3I
[Incremental offset for subsequent passes
L1K10
[Repeat cycle ten times
Z100R
M30

User and Programming Manual - Part III

1-17

S4045 S4045P
1. PROGET2 Programming

1-18

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2. LOGICAL MATHEMATICAL PROGRAMMING


2.1 ANGULAR REPEAT OF A PROFILE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N22
N23

[PROFILE REPEATED EVERY 45 DEGREES


O1
[Origin 1
T19 M6
[Call tool 19
G49I3
[Tool radius = 3
F300S1100M3
[Technological data
[parametro P1=0
P1=0
[Initialize parameter
L=1
[label 1, start of repeat cycle
G51JP1
[Temporary origin rotated by P1 degrees
X61Y0Z2R
[Rapid move to start point
Z-10
[Feed down
G41K2
[Circular approach left of C1
G20X60Y0I10
[C1
G11X30Y0I5
[L1
G20
[C2
G11X60Y0I10
[L2
G20
[C1
G40X61Y0K2
[Circular exit
Z2R
[Rapid up
P1=P1+45
[incrementing parameter P1
L1K7
[Jump to L1 7 times
M30
[Program end

User and Programming Manual - Part III

2-1

S4045 S4045P
2. Logical mathematical programming

2.2 LINEAR REPEAT OF A PROFILE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

2-2

[LINEAR REPEAT OF A PROFILE


O1
[Origin 1
T11 M6
[Call tool 11
G49I3
[Tool radius = 3
F400S1200M3
[Technological data
P1=10
[Initialize parameter
L1=1
[Define label, start of repeat cycle
G51XP1Y10
[Temporary origin
X10Y20Z2R
[Rapid positioning
Z-10
[Feed down
G42K2
[Circular approach right of L1
G13X0J90
[L1
G21I-5
[R-5
G13Y40J0
[L2
G21I-5
[R-5
G13X30J-90
[L3
G20X30Y20I7
[C1
G13X30J-90K2
[L3 (second intersection L3/C1)
G21I-5
[R-5
G13Y0J180
[L4
G21I-5
[R-5
G13X0J90
[L2
G40X10Y20K2
[Circular exit
Z2R
[Rapid up
P1=P1+50
[Increment P1
L1K2
[Jump to label 1 2 times
M30
[Program end

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.3 PROFILE ROTATION/OFFSET

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33

[PROFILE ROTATION/OFFSET
O1
[Origin 1
T11 M6
[Call tool 11
G49I4
[Tool radius = 4
F400S2000M3
[Technological data
L1
[Call profile subroutine
G51X30Y35J45
[Temporary origin
L1
[Call profile subroutine
G51X-50Y50J-45
[New temporary orign
L1
[Call profile subroutine
G50
X0Y0R
[Return to X0 Y0
M30
[Program end
[
[
L=1
[Profile subroutine label
X0Y15Z2R
[Rapid positioning
Z-10
[Feed down
G41K2
[Circular approach left of L1
G13Y20J180
[L1
G21I5
[R5
G13X0Y0I10J-90
[L2
G20
[C1
G11X30Y0I5
[L3
G20
[C2
G11X0Y0I10
[L4
G21I-2
[R-2
G13X0Y0I10J90
[L5
G21I5
[R5
G13Y20J180
[L1
G40X0Y15K2
[Circular exit
Z2R
[Rapid up
G32
[End of subroutine

User and Programming Manual - Part III

2-3

S4045 S4045P
2. Logical mathematical programming

2.4 ANGULAR REPEAT OF PART OF A PROFILE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25

2-4

[PROFILE REPEAT ON A CIRCUMFERENCE


O1
[Origin 1
T12 M6
[Call tool 12
F400S1100M3
[Technological data
X40Y0Z2R
[Rapid positioning
Z-10
[Feed down
G49I2
[Tool radius = 2
P1=0
[Initialize parameter P
G41K2
[Circular approach left of C1
L=1
[label 1, start of repeat cycle
G51JP1
[Temporary origin rotated P1 degrees
G20X0Y0I50
[C1
G21I3
[R3
G13X0Y10J180
[L1
G21I-3
[R-3
G13X0Y0I10J45
[L2
G21I3
[R3
[incremento del parametro P1
P1=P1+45
L1K7
[Jump to label 1 seven times
G50
[Return to the initial origin
G20X0Y0I50
[C1
G40X40Y0K2
[Circular exit
Z2R
[Rapid up
M30
[Program end

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.5 LINEAR REPEAT OF PART OF A PROFILE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34

[LINEAR PROFILE REPEAT


O1
T11 M6
F400S2000M3
G49I2
X0Y-30Z2R
Z-10R
G41K2
G13Y-20J180
G21I-10
G13X-60J90
G21I-5
[parameter P1=60
P1=-60
L=1
G51XP1Y20
G13Y0J0
G13X10J90
G21I-2
G13Y10J0
G21I-2
G13X20J-90
[Increment parameter P1
P1=P1+20
L1K4
G50
G13Y20J0
G21I-5
G13X50J-90
G21I-10
G13Y-20J180
G40X0Y-30K2
Z2R
M30

[Origin 1
[Call tool 11
[Technological data
[Tool radius = 2
[Rapid positioning
[Feed down
[Circular approach left of L1
[L1
[R10
[L2
[R-5

[Label 1, start of repeat cycle


[Temporary origin
[L3
[L4
[R-2
[L5
[R-2
[L6

[Jump to label 1 four times


[Restore main origin
[L3
[R-5
[L7
[R-10
[L1
[Circular exit
[Rapid up
[Program end

User and Programming Manual - Part III

2-5

S4045 S4045P
2. Logical mathematical programming

2.6 CALLING A SUBPROFILE WITHIN A PROFILE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33

2-6

[CALLING A SUBROUTINE WITHIN A PROFILE


O1
[Origin 1
T11 M6
[Call tool 11
G49J1.5
[Tool radius = 1.5
X0Y80Z2R
[Rapid positioning
Z-10
[Feed down
G41K1
[Linear approach to left of L1
G13Y70J0
[L1
G51X30Y80
[Set temporary origin
L1
[Call subroutine
G50
[Restore main origin O1
G13Y70J0
[L1
G21I-5
[R-5
G13X60J-90
[L2
G51X70Y40J-90
[Set temporary origin
L1
[Call subroutine
G50
[Restore main origin O1
G13X60J-90
[L2
G21I5
[R5
G13Y10J0
[L3
G51X105Y20
[Set temporary origin
L1
[Call subroutine
G50
[Restore main origin O1
G13Y10J0
[L3
G40X150Y20K1
[Linear exit
Z2R
[Rapid up
M30
[Program end
[
[
L=1
[Label and define subroutine
G21I2
[R2
G13X-15J90
[L5
G21I-1
[R-1

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44

G13Y0J0
G21I-1
G13X0Y-15J-60
G21I2
G13X0Y-15J60
G21I-1
G13Y0J0
G21I-1[
G13X15J-90
G21I2
G32

[L6
[R-1
[L7
[R2
[L8
[R-1
[L6
R-1
[L9
[R2
[End of subroutine

User and Programming Manual - Part III

2-7

S4045 S4045P
2. Logical mathematical programming

2.7 REPEATING A PROFILE AT DIFFERENT DEPTHS

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

2-8

[REPEATING A PROFILE AT DIFFERENT DEPTHS


O1
T1 M6
F300S700M13
G49I10
[Tool radius = 10
X130Y0R
Z2R
Z0
L=1
Z-5I
[Incremental feed down of 5 mm
G42K2
G20X0Y0I80
G21I-40
G13X0J90
G21I-40
G13Y300J0
G21I-40
G13X300J-90
G21I-40
G13Y-300J180
G21I-40
G13X0J90
G21I-40
G20X0Y0I80
G40X130Y0K2
L1K4
[Repeat L1 four times
Z100RM5
M30

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.8 TAPERED PROFILE WITH SHOULDER

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32

[TAPERED PROFILE WITH VERTICAL WALL


O1
T2 M6
[Tool D=20
F300S500M13
P1=20
P2=45
P3=1.8
[P1=total depth, P2=angle, P3=pass increment
P5=INT(P1/P3)+1
P3=P1/P5
P5=P5-1
P4=P3*TANP2
P10=10
[P5=N. repeats, P10=tool radius, P4=shift
P30=0
P12=300
X130Y0Z2R
Z0
L=1
P30=P30-P3
ZP30
P10=P10+P4
G49IP10
[fictitious tool radius (variable)
G42K2
G20X0Y0I80
G21I-40
G13X0J90
G21I-40
G13Y300J0
G21I-40
P12=P12+P4
[return to start point
G13XP12J-90

User and Programming Manual - Part III

N33 G21I-40
N34 G13Y-300J180
N35 G21I-40
N36 G13X0J90
N37 G21I-40
N38 G20X0Y0I80
N39 G40X130Y0K2
N40 L1KP5
N41 Z100RM5
N42 M30

2-9

S4045 S4045P
2. Logical mathematical programming

2.9 SPHERICAL SURFACE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16

2-10

[SPHERICAL SURFACE
[P1=radius of sphere
[P2= initial angle
[P3=final angle
[P4=angular increment
P1=100,P2=0,P3=60,P4=3
X0Y0Z0
L=1
P7=P1*COSP2
P8=P1*SINP2
XP7Y0Z-P8
G3I0J0
P2=P2+P4
{P3>P2}L1
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.10 ELLIPSE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18

[ELLIPSE
[P1=major semi axis
[P2=minor semi axis
[P3=initial angle
[P4=final angle
[P5=angular increment
P1=230,P2=160,P3=0,P4=360,P5=2
X0Y0
Z-5
G41
L=10
P8=P1*COSP3
P9=P2*SINP3
XP8YP9
P3=P3+P5
{P4>=P3}L10
G40
M30

User and Programming Manual - Part III

2-11

S4045 S4045P
2. Logical mathematical programming

2.11 ARCHIMEDES SPIRAL

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

2-12

[ARCHIMEDES SPIRAL
[P1 P2=initial and final radius
P1=50
P2=100
[P3 P4= initial and final angle
P3=0
P4=765
[P5=angular increment P6=mill radius
P5=5
P6=5
[calculation start
P11=P1+P6
P12=P2+P6
P13=P4-P3
P13=P13/P5
P14=P2-P1
P14=P14/P13
[P14=increment radius
L=1
G76XP11YP3
P11=P11+P14
P3=P3+P5
P20=P4-P3
P20>L1
XP12YP4
G75X300Y0Z100RM5
M30

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.12 CONVEX PARABOLOID

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

[CONVEX PARABOLOID
[P0=spherical tool radius
P0=5
[P31=focus
[P32=increment in Z
[P33=Z initial
[P34=Z final
P31=18
P32=3
P33=-1
P34=-60
Z20R
G49I0
L=11
P33=P33-P32
P35=2*SQR(P31*ABS(P33))
P50=ATN(2*P31/P35)
P51=P33+P0*SINP50
P52=P35+P0*COSP50
P53=P52+2*P0
XP53Y0
ZP51
G42K2
G20X0Y0IP52
G40XP53Y0K2
P50=P34-P33
P50<L11
M30

User and Programming Manual - Part III

2-13

S4045 S4045P
2. Logical mathematical programming

2.13 CONCAVE PARABOLOID

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29

2-14

[CONCAVE PARABOLOID
[P0=spherical tool radius
P0=-5
[P31=focus
[P32=increment in Z
[P33=Z initial
[P34=Z final
P31=18
P32=3
P33=0
P34=-60
Z20R
G49I0
L=11
P33=P33-P32
P43=P34-P33
P35=2*SQR(P31*ABS(P43))
P50=ATN(2*P31/P35)
P51=P34-P43-P0*SINP50
P52=P35+P0*COSP50
P53=P52+2*P0
XP53Y0
ZP51
G42K2
G20X0Y0IP52
G40XP53Y0K2
P50=P43+P32
P50<L11
M30

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.14 REPEATING AN ELLIPSE WITH INCREMENTS IN Z

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34

[REPEATING AN ELLIPSE WITH INCREMENTS IN Z


O1
T10 M6
F1000S1000M13
G49I5
[P1 P2 semi axes major and minor
P1=230
P2=160
[P3=initial angle, P4=final angle
P3=0
P4=360
[P5=angular increment
P5=5
[P20=increment in Z
P20=5
X180Y0R
[positioning
Z2R
Z0
L=1
Z-P20I
G41
L=10
P8=P1*COSP3
XP8YP9
P3=P3+5
P10=P4-P3
P10>L10
G40
X180Y0
P3=0
L1K5
Z50R
M30

User and Programming Manual - Part III

2-15

S4045 S4045P
2. Logical mathematical programming

2.15 SPHERICAL POCKET

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21

2-16

[SPHERICAL POCKET
O1
T10 M6
[tool D=30
F500S1200M13
[P0=tool radius
P0=15
[P1 P2 = X Y sphere center, P3=sphere radius
P1=0,P2=0,P3=90
[P4=total depth, P5=depth of each pass
P4=60,P5=5
[P6=stock allowance
P6=1
[
[
P11=P0+P6+.1
P14=SQR(P3*P3-P11*P11)
{P4<=P14}L1
P4=P14
L=1
P4=ABSP4
P5=ABSP5

N22
N23
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37

P7=INT(P4/P5)+1
P5=P4/P7N24 P7=P7-1
P8=0
G49IP0
L=2
P8=P8-P5
P9=SQR(P3*P3-P8*P8)*2
XP1YP2ZP8
G78XP1YP2IP6KP9
P10=P8+1
ZP10R
XP1YP2R
L2KP7
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
2. Logical mathematical programming

2.16 TAPERED PROFILED POCKET

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

[TAPERED PROFILED POCKET


O1
T10 M6
F2000S3000M3
Z20R
G49I10
[tool D=20
[P1=Z initial, P2=Z final, P3=pass depth
P1=0
P2=-60
P3=12
[P4=stock allowance, P5=taper angle
P4=1
P5=30
[
P6=ABSP2-ABSP1
P7=INT(P6/ABSP3)+1
P3=P6/P7
P8=P3*TANP5
P7=P7-1
L=2
P9=P1-P3
P4=P4+P8
G777ZP9IP3JP1D1=45D2=P4
G701X0Y0
L1
G778X0Y0
P1=P1-P3

User and Programming Manual - Part III

N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44

L2KP7
Z100R
M30
[pocket profile
L=1
G41K2
G13Y-100J0
G21I50
G13X200J90
G21
G20X0Y500I-400
G21
G13X-200Y0J-75
G21
G13Y-100J0
G40X0Y0K2
G32

2-17

S4045 S4045P
2. Logical mathematical programming

2-18

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

3. ADVANCED PROGRAMMING
3.1 POCKET MILLING CYCLES
Polygonal pocket in several passes

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19

[POLYGONAL POCKET IN SEVERAL PASSES


[Machining starting from center out
[Increment Z in a starter hole at X10Y10
$1M0X-200I200Y-128J128
O1
T15M6
[Call tool 5
F500S1000M13
G49I8
[Tool radius 8
Z50R
X10Y10R
[Position over starter hole
[D1=Z initial, D2=pass depth, D3=Z final
G77X96Y-90D0=1D1=0D2=5D3=-15
[First vertex point and pocket parameters
X110Y10
X96Y110
[Intermediate vertex points
X-76
X-90Y10
G78X-76Y-90
[Last vertex point
Z50RM5
M30

User and Programming Manual - Part III

3-1

S4045 S4045P
3. Advanced Programming

Tapered polygonal pocket

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18

3-2

[TAPERED POLYGONAL POCKET


[Machining starting from center out
[Increment Z in a starter hole at X50Y25
$1M0X-234I236Y-106J194
O1
T1M6
F600S1300M13
Z20R
G49I20
[Tool radius 20
Z50R
X50Y25
[Position over starter hole
[D1=Z initial D2=pass depth, D3=Z final D6=taper angle
G77X0Y-100J1.2D0=1D1=0D2=12D3=-60D6=15 [first point and parameters
X200
Y100
[Intermediate points
X0Y180
G78X-200Y100
[Last point
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Circular pocket in several passes

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14

[CIRCULAR POCKET IN SEVERAL PASSES


[Machining with spiral passes
[Increment Z in a central starter hole
$1M0X-121I223Y-61J159
O2
T1M6
F1500S1000M3
G49I10
[Tool radius 10
Z50R
X50Y50R
[Position over starter hole
[K=diam D1=Z initial D2=pass depth D3=Z final
G78X50Y50K200D0=1D1=0D2=5D3=-15
Z50RM5
M30

User and Programming Manual - Part III

3-3

S4045 S4045P
3. Advanced Programming

Tapered circular pocket

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14

3-4

[TAPERED CIRCULAR POCKET


[Machining with spiral passes
[Increment Z in a central starter hole
$2X-139I142Y-47J132K45.Q40.
O2
T1M6
F500S1000M13
G49I15
[Tool radius 15
Z50R
X50Y50R
[Position over starter hole
[K=diam.D1=Z initial D2=pass depth D3=Z final D6=taper angle
G78X50Y50K200D0=1D1=0D2=5D3=-35D6=15
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Circular pocket with spiral passes and finish pass

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14

[CIRCULAR POCKET WITH SPIRAL PASSES AND FINISHING PASS


[Machining with spiral passes
[Increment Z in a central starter hole
$1M0X-144I200Y-55J165
O2
T1M6
F1500S1000M3
G49I10
[Tool radius 10
Z50R
X50Y50R
[Position over starter hole
[K=diam. I=stock allowance D1=Z initial D2=pass depth D3=Z final
G79X50Y50K200I3D0=1D1=0D2=5D3=-15
Z50RM5
M30

User and Programming Manual - Part III

3-5

S4045 S4045P
3. Advanced Programming

Profiled pocket

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

3-6

[PROFILED POCKET
O1
T11M6
F500S1200M13
G49I3
G777Z-10I5J0 D1=30
G701X0Y-30
G42K2
G13Y-40J180
G21I-18
G10X-50Y-40
G11X-20Y40
G21I7
G20I-18
G21I15
G13Y45J0
G21I-8
G13X50J-90
G21
G20X50Y0I20
G13J-60
G13X40J-90
G13Y-40J180
G40X0Y-30K2
G778X0Y-20
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Profiled pocket with internal islands

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

[PROFILED POCKET WITH ISLANDS


O1
T11M6
F500S1200M13
G49I3
G777Z-10I5J0 D1=0
G701X0Y-25
G42K2
G13Y-40J180
G21I-18
G10X-50Y-40
G11X-20Y40
G21I7
G20I-18
G21I15
G13Y45J0
G21I-8
G13X50J-90
G21
G20X50Y0I20
G13J-60
G13X40J-90
G13Y-40J180
G40X0Y-25K2
G701X0Y10
G42K2
G13X0Y25I5J0

User and Programming Manual - Part III

N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47

G13J45
G13J135
G13J180
G13J225
G13J-45
G13J0
G40X0Y10K2
G701X0Y10
G41K2
G13X0Y-5I-5J0
G21I-2
G13J-120
G21
G13J120
G21
G13J0
G40X0Y10K2
G778X0Y-25
Z100R
M30

3-7

S4045 S4045P
3. Advanced Programming

Profiled pocket with passes parallel to the profile


Example 1

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

3-8

[PROFILED POCKET WITH PASSES PARALLEL


[TO THE PROFILE
G17
O1
T1
F1000S1200M3
G49I10
Z100R
X200Y0R
Z10R
G77D0=3D1=0D2=5D3=-20D8=1
G42K2D0=1
G13X250J-90
G21I-30
G13Y-100J180
G21
G20X0Y-100I50
G13J-70
G21
G13Y-200J180
G21
G13X0Y0I-200J135
G21
G13J90
G21
G13J45
G13X-150J-90

N28
N29
N30
N31
N32
N33
N34
N35
N36
N37

G13Y20J0
G13X-130J90
G13X0Y0J-45
G13Y80J0
G21I-20
G13X250J-90
G40X200Y0K2
G78
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Example 2

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

[PROFILED POCKET WITH PASSES PARALLEL TO THE PROFILE


G17
O1
T1
F1000S1000M3
E1=G20X0Y0I50,G21I-400,G20X300Y0I50
G49I14
Z100R
X130Y150R
Z10R
G77D0=3X130Y150 D1=0D2=15D3=-50D8=1
G41K2D0=1
E1
G20X300Y0I50
G13J120
G13X300J90
G13X300Y300I50J60
G20
G21I-400
G20X0Y300I50
G13J225
G21I40
G20X-100Y150I-60
G21
G13X0Y0I50J-45K2
G20
E1
G40X130Y150K2

User and Programming Manual - Part III

N29
N30
N31

G78
Z100R
M30

3-9

S4045 S4045P
3. Advanced Programming

3.2 STORING PROFILES


Line / profile intersection for constant pitch groove machining

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

3-10

[LINE / PROFILE INTERSECTION FOR CONSTANT


[PITCH GROOVE MACHINING
$1M0X-73I51Y-36J42
S1300M13F600
G711X20Y0K31
[profile 31 storing
G41K2
G20X0Y0I30
G13J180
G21I15
G13X-40J-90
G21
G13X0Y0I30J0
G20
G40X20Y0K2
G710
[storing end
E1=G13X0Y0I30J45
[starting line
P1=2
[pitch
L=10
E2=E1QP1
[parallel line at P1 distance
E3=E2,E31
[1st intersection
P5=E3
[P5 =X P6=Y
P7<L99
[control of intersection existence
Z2R
XP5YP6R
Z-2
E3=E2,E31K2
[2nd intersection
P8=E3
[P8=X P9=Y
XP8YP9

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

N29
N30
N31
N32
N33
N34
N35

Z2R
XP5YP6R
P1=P1+2
P1>L10
L=99
Z50RM5
M30

[increment distance
[intersection not found : program end

User and Programming Manual - Part III

3-11

S4045 S4045P
3. Advanced Programming

Equidistant points on a profile for the application of a drilling fixed cycle

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

3-12

[EQUIDISTANT POINTS ON A PROFILE


[FOR FIXED CYCLE DRILLING
$1M0X-78I50Y-40J40
G17
S1400M13F600
G711X30Y0K31
[Store profile 31
G41K2
G20X0Y0I30
G13J180
G21I15
G13X-40J-90
G21
G13X0Y0I30J0
G20
G40X30Y0K2
G710
[Finish storing
G721J40K31
[Calculate 40 equidistant points
P1=0
[Point counter
G81Z-10J2
[Define fixed cycle
L=10
[Repeat cycle label
P1=P1+1
[Increment counter
E1=E31KP1
P10=E1
[P10=X P11=Y
XP10YP11
L10K39
[Jump to L=10 (39 times)
G80Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Equidistant points on a profile for the application of a rotated/offset profile

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32

[EQUIDISTANT POINTS ON A PROFILE FOR THE


[APPLICATION OF A ROTATED/OFFSET PROFILE
$2X-123I126Y-50J109K40Q40
P20=4
[Distance between points
F600S1000M3
Z50R
G711K31
[Store profile 31
G41
G20X100Y0
G13J90
G21I80
G13Y100J180
G20X0Y100
G40
G710
[Finish storing
G721K31IP20 D0=2
[Calc. equidistant points P20
P9=P99-1
[N. repeats = N. points - 1
P1=0
[Point counter
L=10
[Cycle repeat label
P1=P1+1
[Increment counter
E1=E31KP1
[P10=X P11=Y P12=Angle
P10=E1
P12=P12-90
[Rotate profile
G751 TRSXP10YP11 ROTX90 ROTYP12
L51
[Recall profile
G750
L10KP9
[Jump to L=10 (P9 times)
Z50R
M30
L=51
[Profile applied to points

User and Programming Manual - Part III

N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45

X-50Z0R
Y-40R
G41K2
G13Y-50J0
G21I20
G13X0Y-15I-15J70
G21I-20
G13Y0J0
G40
Y10R
X-50R
Y-40R
G32

3-13

S4045 S4045P
3. Advanced Programming

Profile equidistant point function to realize a variable cross section


semicircular tube

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31

3-14

[VARIABLE SECTION SEMICIRCULAR TUBE


[OBTAINED USING EQUIDISTANT POINTS ON A PROFILE
$2X-46I266Y-92J108K-20Q40
F800S1400M13
P1=45
[Initial radius
P2=20
[Final radius
P3=150
[Number of points
P4=(P1-P2)/P3
[Radius variation
P50=1
[Forward / reverse path discriminator
Z50R
X45Y0R
Z10R
G711K32
[Store profile 32
G41
G20X0Y0
G13J90
G21I-80
G13X0Y80J30
G21
G13Y150J0
G20X200Y150
G40
G710
[Finish storing
G721K32JP3D0=2
[Calculate equidistant points on profile 32
P9=P99-1
[No. of repeats = No. of points -1
P0=0
[Point counter
L=10
[Repeat cycle label
P0=P0+1
[Increment counter
E1=E32KP0
P10=E1
[P10=X P11=Y P12=Angle

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47
N48
N49
N50
N51
N52
N53
N54
N55
N56
N57

P12=P12-90
[rotate profile section
G751 TRSXP10YP11 ROTX90 ROTYP12
L51
[Recall profile
G750
P1=P1-P4
[Decrement section radius
L10KP9
Z50R
M30
L=51
[Semicircular profile parameter R=P1
P50<L52
G42
[Forward profile
G20XP1Y0Z0
G20X0Y0I-P1
G20X-P1Y0
G40
P4>L53
L=52
G41
[Reverse profile
G20X-P1Y0Z0
G20X0Y0IP1
G20XP1Y0
G40
L=53
P50=-P50
G32

User and Programming Manual - Part III

3-15

S4045 S4045P
3. Advanced Programming

3.3 FIXED SUPER CYCLES


Grid pattern drilling

N1
N2
N3
N4
N5
N6
N7
N8

3-16

[GRID PATTERN DRILLING


[20 holes D=8 on a 4 line-5 column grid
O2
T13 M6
[drill D=8
F650S800M13
G781Z-10J0Q2X20Y20 D1=5 D2=15 D3=10 D4=4 D5=12 D6=75
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Linear grid pattern tapping

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12

[LINEAR GRID TAPPING


[No.6 M10-holes on a linear grid at a -30-angle and 22 mm-distance
O3
T12 M6
[Center drill
F200S1200M13
G781Z-2J2X-40Y30 D1=6 D2=22 D3=-30
T11
[Drill D=8.2
G781Z-14J2X-40Y30 D1=6 D2=22 D3=-30
T12
[M10 tap
G784Z-17J6X-40Y30 F1500 D1=6 D2=22 D3=-30
Z50RM5
M30

User and Programming Manual - Part III

3-17

S4045 S4045P
3. Advanced Programming

Circumference pattern drilling

N1
N2
N3
N4
N5
N6
N7
N8
N9

3-18

[CIRCUMFERENCE PATTERN DRILLING


[8 equidistant holes distributed over a 50 mm radius circumference
[with linear moves between holes
O1
T12 M6
[Drill D=8
F700S800M13
G791Z-10J0Q2X90Y70 D1=8 D2=50
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Arc pattern drilling

N1
N2
N3
N4
N5
N6
N7
N8
N9

[ARC PATTERN DRILLING


[10 holes : 20 degrees angular distance on a 80 mm radius circumference
[starting angle 20 degrees - tool moves between holes along the circumference
O1
T5 M6
[Drill D=6
F1000S600M13
G791X-100Y90Z-10J0Q2 D1=10 D2=80 D3=25 D4=20 D5=1
Z50RM5
M30

User and Programming Manual - Part III

3-19

S4045 S4045P
3. Advanced Programming

Machining repeat on a grid pattern

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22

3-20

[MACHINING REPEAT ON A GRID PATTERN


[D1=No. of figures in X D2=pitch D3=angle
[D4= No. of figures in Y D5=pitch D6=angle
G787X0Y0 D1=13 D2=50 D3=0 D4=8 D5=50 D6=90
{P99=6}L55
{P99=21}L55
{P99=34}L55
{P99=45}L55
L1
L=55
G780
Z100R
M30
L=1
X0Y0R
Z2R
Z-1
G42K2
G20X0Y0I-20
G40K2X0Y0
Z2R
G32

[grid parameters
[figures not to be executed

[machining recall

[machining

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Machining repeat on a circumference pattern


Example 1

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25

[MACHINING REPEAT ON A CIRCUMFERENCE PATTERN


[D1=No. of figures D2=radius D5=1 : the figure rotates
G797X0Y0 D1=12 D2=100 D5=1
{P99=4}L2
{P99=8}L2
[figures not to be executed
L1
[machining recall
L=2
G780
M30
L=1
[machining
X0Y0R
Z2R
Z-5
G41K2
G13Y-15J0
G21I4
G13X20Y0J135
G13J45
G21
G13X-20Y0I15J180
G20
G13J0
G40X0Y0K2
Z2R
G32

User and Programming Manual - Part III

3-21

S4045 S4045P
3. Advanced Programming

Example 2

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17

3-22

[POCKET REPEAT ON A CIRCUMFERENCE PATTERN


[D1=No. of pockets D2=circumference radius
G797X0Y0 D1=12 D2=100
{P99=4}L2
{P99=8}L2
[pocket not to be executed
L1
[pocket recall
L=2
G780
M30
L=1
[pocket
G49I3
G77X20Y20 D0=2 D1=0 D2=2 D3=-4
X-20
Y-20
G78X20
Z2R
G32

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

3.4 CYLINDRICAL PROGRAMMING


Open profile (cam)

User and Programming Manual - Part III

3-23

S4045 S4045P
3. Advanced Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33

3-24

[OPEN PROFILE (CAM)


[Cylinder radius 30, tool dia. 6
[to cut an 8 mm seat
[three passes, one central, one at +1, one at -1
O1
T2 M6
[tool d=6
F3500S1000M13
G17AXZ
G49I0
L1
G49I-1
L1
G49I1
L1
Z30R
M30
L=1
Z10R
X12A0R
Z2R
Z-4
G201J30
G41K2
G10X12A0
G11A150
G11X23A240
G21I-20
G11X12A360
G40X12A360K2
G200
Z10R
X12A0R
G32

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Closed profile

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25

[CLOSED PROFILE
[cylinder radius 30
O1
T3 M6
F400S1200M13
G49I3
G17AXZ
G201J30
X0A150
Z2R
Z-2
G42K2
G20X0A160I-10
G21I5
G20X10A180I-10
G21
G20X0A200I-10
G21
G20X-10A180I-10
G21
G20X0A160I-10
G40X0A150K2
G200
Z20R
M30

User and Programming Manual - Part III

3-25

S4045 S4045P
3. Advanced Programming

3.5 ROTATION/OFFSET IN SPACE


Spherical surface

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19

3-26

[SPHERICAL SURFACE
[obtained by rotating a semicircle in ZX
O3
T1 M6
F1000S1200M13
X50Y0Z10R
P1=0
L=1
G751 ROTZP1
X50Y0Z0
G3X0Z-50I0K0
P1=P1+5
G751 ROTZP1
G2X50Z0I0K0
P1=P1+5
L1K36
G750
Z50R
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Profile programmed in XY and machined in ZX

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27

[PROFILE PROGRAMMED IN XY AND MACHINED IN ZX


[bi-directional passes
O2
T4 M6
F2000S1200M13
G49I5
Z50R
X-70Y-80R
P1=-80
[P1=Y start point
L=1
[Repeat cycle label
G751 TRSYP1 ROTX90 [Rotation/offset function
L10
[Profile recall
P1=P1+10
G751 TRSYP1 ROTX90 [Rotation/offset function
G754
[Profile direction reversal
L10
G753
P1=P1+10
L1K8
[Repeat cycle 8 times
G750
[Cancels rotation/offset
Z50R
M30
L=10
X-70Y10Z0R
G41K1
G13Y0J0
G21I-10

User and Programming Manual - Part III

N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40

G13X-50Y0J-60
G21I6
G13Y-20J0
G21I6
G20X10Y-20I-10
G13J0
G21I6
G13X50Y0J45
G21I-10
G13Y0J0
G40X70Y10K1R
X70Y10Z0
G32

3-27

S4045 S4045P
3. Advanced Programming

Solid of revolution (vase)

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26

3-28

[SOLID OF REVOLUTION (VASE)


[Solid defined by rotating the section profile about the Z axis
[6 degree pitch bi-directional passes
O1
T1 M6
F1000S1200M13
G49I5
Z50R
X100Y0R
P1=0
L=1
G751 ROTZP1 ROTX90
L10
P1=P1+6
G751 ROTZP1 ROTX90
G754
L10
G753
P1=P1+6
L1K16
G750
Z50R
M30
L=10
X100Y10Z0R
G42K1

N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42

G13Y0J180
G21I20
G13X80Y0J-135
G21I-10
G13Y-20J180
G21I-10
G20X0Y-20I15
G21I-10
G13Y-20J180
G21I-10
G13X-80Y0J135
G21I20
G13Y0J180
G40X-100Y10K1
X-100Y10Z0
G32

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Solid of revolution (bottle)

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20

[SOLID OF REVOLUTION (BOTTLE)


[Solid defined by rotating the section profile about the X axis
[bi-directional passes at 5 degrees pitch
O1
T4 M6
F1000S1200M13
G49I5
Z50R
P1=0
L=1
G751 ROTXP1
L10
P1=P1-5
G751 ROTXP1
G754
L10
G753
P1=P1-5
L1K18
G750

User and Programming Manual - Part III

N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37

Z50R
M30
L=10
G42
G20X0Y0Z0
G13J90
G21I-6
G13Y10J0
G21I10
G13X20Y0J30
G21I-20
G13Y20J0
G21I-10
G13X120Y0J-90
G20
G40
G32

3-29

S4045 S4045P
3. Advanced Programming

3.6 INCLINED SURFACE MACHINING


Pockets and fixed cycles on inclined surfaces

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

3-30

[POCKETS / FIXED CYCLES ON INCLINED SURFACES


O1
T1 M6
[drill d=6
F1000S1200M13
B0R
G749B
G81Z-11.7J2
X0Y-40
Y40
G80Z100R
B10
G751 TRSX-20 ROTY-10
G81Z-11.7J2
X-10Y-40
Y0
Y20
X-40
Y0
Y-40
G80Z100R
B-15
G751 TRSX20 ROTY15
Z100R
G81Z-6.7J2
G51X30Y0
G76X10Y0
L=1
Y45I

N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47
N48
N49
N50
N51
N52
N53
N54
N55
N56

L1K6
G75
G50
G80Z100R
G750
G740
B0R
T2
[tool d=4
F500S1000M13
G49I2
B0
G749B
B10
G751 TRSX-20 ROTY-10
Z10R
X-24Y15R
Z2R
Z0
L=2
Z-1I
G77X-15Y0
Y30
X-32
G78Y0
L2K4
Z10R
B0
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

3.7 PROGRAMMING 3-D SURFACES DEFINED BY A PLANE


PROFILE AND A SECTION PROFILE
Bottom die defined by a plane profile and a section profile

constant profile link radii

User and Programming Manual - Part III

3-31

S4045 S4045P
3. Advanced Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38

3-32

[BOTTOM DIE DEFINED BY A PLANE PROFILE AND A SECTION PROFILE


O1
T2M6
F1000S1200M13
G49I7.5Q7.5
[7.5 mm radius spherical tool
X0Y5R
Z0R
G736X0Y5I2K2
[Opens 3D programming
G42K2
[Starts plane profile
G13Y30J180
G21I10
G13X-70J-90
G21
G13Y-30J0
G21I-10
G13X-30J-90
G21I10
G13Y-70J0
G21
G13X20Y-70J60
G21I-10
G13Y-30J0
G21I10
G13X70J90
G21
G13Y30J180
G40X0Y5K2
[Ends plane profile
G737
[Defines section profile
G42
G13X0Y0J180
G21I10
G13X0Y0J-105
G21I-15
G13Y-25J180
G40
G738
[Starts cycle
Z10RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Punch defined by a plane profile and two section profiles

50

10
30

10

50

10

15

50
100

100

10

User and Programming Manual - Part III

3-33

S4045 S4045P
3. Advanced Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41

3-34

G17
[PUNCH DEFINED BY A PLANE PROFILE AND TWO SECTION PROFILES
$2X-144I230Y-138J100K15.Q40.
O1
T2M6
F1000S1000M13
Z10R
G49I0J0
[7.5 mm radius spherical tool
X160Y0R
Z10R
G736X160Y0I3K2
[Opens cycle
G42K2
[Plane profile
G13X100J90
G21I15
G13Y50J180Q2
[Recalls section 2
G21
G13X-100J-90
G21
G13Y-50J0
G21
G13X100J90Q1
[Recalls section 1
G40X160Y0K2
[Ends plane profile
G737Q1
[Section profile 1
G41
G13X0Y0J0
G21I-10
G13X0Y0J-60
G21I10
G13X0Y-50J0
G40
[Ends section profile 1
G737Q2
[Section profile 2
G41
G13X0Y0J0
G21I-10
G13X0Y0J-85
G21I10
G13X0Y-50J0
G40
G738
[Executes cycle
Z10RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Solid defined by an open plane profile and a semicircular section

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32

[SOLID DEFINED BY AN OPEN PLANE PROFILE


[AND A SEMICIRCULAR SECTION
O1
T2 M6
[Spherical tool D=8
F900S850M13
Z50R
X0Y0R
Z0R
G49I4Q4
[Definition of tool type
G736I1Q2
L1
[Recalls plane profile
G737
L2
[Recalls section profile
G738
Z50RM5
M30
L=1
[Plane profile
G42
G20X0Y0
G13J90
G21I-50
G13Y100J0
G20X80Y100
G40
G32
L=2
[Section profile
G41
G20X-10Y0
G20X0Y0I10
G20X10Y0
G40
G32

User and Programming Manual - Part III

3-35

S4045 S4045P
3. Advanced Programming

Solid defined by an open plane profile and a section profile

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32

3-36

[SOLID DEFINED BY AN OPEN PLANE PROFILE


[AND A SECTION PROFILE
G17
O1
T1 M6
[Spherical tool D=12
Z50R
X-380Y0R
Z10R
G49I6Q6
[Definition of tool type
G736I5Q2
[Opens cycle
G42
[Plane profile
G20X-350Y0
G13X-350J90
G21I-60
G13Y350J0
G21
G13X350J-90
G20X350Y0
G40
G737
G41
[Section profile
G20X-50Y0
G13J-90
G21I10
G20X0Y70I100
G21
G13X50J90
G20X50Y0
G40
G738
[Executes cycle
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

XZ-plane machining of a solid defined by an open plane profile and a


semicircular section

User and Programming Manual - Part III

3-37

S4045 S4045P
3. Advanced Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23

3-38

[XZ-PLANE MACHINING OF A SOLID DEFINED BY AN OPEN PLANE PROFILE AND A


[SEMICIRCULAR SECTION
F2000
G49I2.5Q2.5
[Define spherical tool with zero at tool center
G17XZY
Z70R
X-70Y-20R
G736I3Q2
G42
[Plane profile in PROGET2
G20X-70Z50
G13X-70Z50J-45
G21I50
G13X70Z38J30
G20X70Z38
G40
[Plane profile end
G737
G41
[Section profile in ISO
X0Z-15
G2Z15I0J0
G40
[Section profile end
G738
[cycle execution
Z70RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

YZ-plane machining of a solid defined by an open plane profile and a


semicircular section

User and Programming Manual - Part III

3-39

S4045 S4045P
3. Advanced Programming

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

3-40

[YZ PLANE MACHINING OF A SOLID DEFINED BY AN OPEN PLANE PROFILE AND A


[SEMICIRCULAR SECTION
F2000
G49I2.5Q2.5
[Define spherical tool with zero at tool center
G19
Z80R
X-30Y-80R
G736I3Q2
G42
[Plane profile in PROGET2
E1=G20Y0Z55I55
E2=G13E1J-45
E3=G13Y-80Z0J-90,E2
E3
E2
E1
E4=G13E1J35
E4
E5=G13Y85Z0J90,E4
E5
G40
[Plane profile end
G737
G41
[Section profile in ISO
Y0Z-15
G2Z15J0K0
G40
[Section profile end
G738
[Cycle execution
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

Milling of a bottom die defined by a plane profile and two section profiles

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31

[MILLING OF A BOTTOM DIE DEFINED BY A PLANE


[PROFILE AND TWO SECTION PROFILES
G17
O1
T1
F1000S1200M3
G49I12J0Q0
Z50R
X100Y0R
Z2R
G736I6K2D0=1
G42
G20X100Y0Q1
G13X0Y0I100J90
G21I20
G13J135Q2
G21
G13J180
G21
G13J-135
G21Q1
G13J-90
G20X0Y-50I100
G13J90
G20X100Y0
G40
G737Q1
G42
G13Y0J180
G21I10
G13X0Y0J-100

User and Programming Manual - Part III

N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44

G21I-30
G13Y-40J180
G40
G737Q2
G42
G13Y0J180
G21I10
G20X-40Y0I-40
G13J180
G40
G738X0Y0
Z50R
M30

3-41

S4045 S4045P
3. Advanced Programming

3.8 3-D PROGRAMMING OF RULED SURFACES BETWEEN TWO


PROFILES
Ruled surface without profile offset/rotation

3-42

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

N1
N2
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33

[RULED SURFACE WITHOUT


[PROFILE OFFSET/ROTATION
O1
T1 M6
[ Spherical tool D=15
F1000S900M3
Z50R
X60Y0R
Z10R
G49I7.5Q7.5
[Definition of tool R=7.5
G726X70Y0Z0I2
[Profile above Z0
G42K1
G20X25Y0I25
G13Y25J180
G20X-25Y0I25
G13Y-25J0
G20X25Y0I25
G40X70Y0K1
G727X120Y0Z-30
[Profile below Z-30
G42K1
G13X100J90
G21I15
G13Y50J180
G21
G13X-100J-90
G21
G13Y-50J0
G21
G13X100J90
G40X120Y0K1
G728
[Cycle execution block
Z50RM5
M30

User and Programming Manual - Part III

3-43

S4045 S4045P
3. Advanced Programming

Ruled surface with profile offset/rotation

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31

3-44

[RULED SURFACE WITH


[PROFILE OFFSET/ROTATION
O2
T7 M6
[Spherical tool D=10
F1000S950M3
G49I5Q5
Z40R
X70Y-105R
[Positioning
Z5R
G726Z100I2
[Opens ruled surface programming
G42
[First profile
G20X60Y0
G20X50Y0I10
G20X30Y0I-10
G20X10Y0I10
G20X-10Y0I-10
G20X-30Y0I10
G20X-50Y0I-10
G20X-60Y0
G40
[First profile end
G727Z0
[Second profile positioning
G42
[Second profile
G20X70Y0
G20X50Y0I20
G13Y20J180
G20X-50Y0I20
G20X-70Y0
G40
[Second profile end
G728 ROTX90
[Positioning and ruled surface machining
Z50RM5
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

3.9 DELIMITATION OF MACHINING AREA


Roughing a profile with several passes in Z

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

[ROUGHING A PROFILE WITH SEVERAL PASSES IN Z


G19
O1
T6 M6
F1000S3000M3
G49I5
P2=-10
L=3
G761ZP2Q1F5000 D0=12 D1=.5
Z100R
X0Y0R
Z20R
P1=0
L=1
XP1
L10
P1=P1+5
XP1
G754
L10
G753
P1=P1+5
L1K1
Z100RM5
P2=P2-10
L3K3
M30
L=10

User and Programming Manual - Part III

N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47
N48
N49
N50

G41
G20Y0Z-60
G13J0
G21I6
G13Y70Z0J60
G21I-6
G13Z0J0
G21
G13Y100J-90
G21I6
G13Z-50J0
G21
G13Y180Z-10J45
G21I-6
G13Z-10J0
G21
G13Y200J-90
G21I6
G13Z-60J0
G20Y250Z-60
G40
G32

3-45

S4045 S4045P
3. Advanced Programming

3.10 SPIRAL MILLING


Example of spiral milling on a profile

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25

3-46

[EXAMPLE OF SPIRAL MILLING ON A PROFILE


G17
O1
T1M6
F1500S3000M3
G49I5
Z100R
X70Y0R
Z2R
Z0
[Z for start of spiral milling
G735Z-30I4.5
G41K2
G13X95J90
G21I10
G13Y40J180
G21I-20
G20X-40Y0I80
G21
G13Y-40J0
G21I10
G13X95J90
G40X70Y0K2
G734
Z100R
M30

User and Programming Manual - Part III

S4045 S4045P
3. Advanced Programming

3.11 SUBPROGRAM MODAL RECALL


Examples of subprogram modal recall

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N21
N22
N23
N24
N25
N26
N27
N28

T1[M6
S4000M3F2000
G81Z-10J2
L2
G80Z50R
T2[M6
S4000M3F2000
G73 L1
L2
G72
M30
[
L=1
Z2R
X0Y0R
Z-5
G41K2
G20X0Y0I20
G40K2X0Y0
Z2R
G32
[
L=2
X50Y50
X-50
Y-50
X50
G32

[bit D8
[drill D8 on the points of L=2

[mill D6
[recall subprogram L=1 on the points of L=2
[close G73

[machining subprogram

[points on which to repeat subprogram L=1

User and Programming Manual - Part III

3-47

S4045 S4045P
3. Advanced Programming

3-48

User and Programming Manual - Part III

S4045 S4045P
4. Complete Programming Example

4. COMPLETE PROGRAMMING EXAMPLE

N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20

[COMPLETE PROGRAMMING EXAMPLE


O1
[Origin 1
T1 M6
[Call tool 1
[Punta da centro D=3
F200S1100M3
[Technological data
G81Z-3J2
[Define fixed cycle
L2
[Center drill 10H7 holes
L3
[Center drill holes D=6
L1
[Center drill M8 holes
G80Z100R
[Rapid move up for tool change
[Drill D=6
T2 M6
[Call tool 2
F180S1400M3
[Technological data
G81Z-18J2
[Define fixed cycle
L3
[Call subroutine 3
G80Z100R
[tool change
[Drill D=6.7 for M8 holes
T3 M6
[Call tool 3
F170S1350M3
[Technological data
G81Z-18.5J2
[Define fixed cycle

User and Programming Manual - Part III

4-1

S4045 S4045P
4. Complete Programming Example

N21
N22
N23
N24
N25
N26
N27
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
N38
N39
N40
N41
N42
N43
N44
N45
N46
N47
N48
N49
N50
N51
N52
N53
N54
N55
N56
N57
N58
N59
N60
N61
N62
N63
N64
N65
N66
N67
N68
N69
N70
N71
N72
N73
N74

4-2

L1
G80Z100R
[Punta D=9.5 per fori 10H7
T4 M6
F200S1200M3
G81Z-19.5J2
L2
G80Z100R
[Bareno D=9.8 per fori 10H7
T5 M6
F210S1400M3
G86Z-17J2
L2
G80Z100R
[alesatore D=10 per fori 10H7
T6 M6
F120S550M3
G85Z-17J2
L2
G80Z100R
[maschio M8
T7 M6
S260M3
G84Z-23J6F1250
L1
G80Z100R
[Fresa D=12
T8 M6
F200S1100M3
X-42Y-40Z2R
Z-17R
G49K8
G41K1
G13Y-50J0
G21I10
G10X0Y0
G11X15Y80
G21I-5
G20X0Y0I30
G21I-5
G10X0Y0
G11X15Y80
G40X5Y85K1
Z100R
M30
[
[
L=1
G51X70Y50
X10Y-15
Y30I
X-20I
Y-30I
G50

[Call subroutine
[Rapid move up for tool change
[Call tool 4
[Technological data
[Define fixed cycle
[Call subroutine 2
[Rapid move up for tool change
[Call tool 5
[Technological data
[Define fixed cycle
[Call subroutine 2
[Rapid move up for tool change
[Call tool 6
[Technological data
[Define fixed cycle
[Call subroutine 2
[Rapid move up for tool change
[Call tool 7
[Technological data
[Define fixed cycle
[Call subroutine 1
[Rapid move up for tool change
[Call tool 8
[Technological data
[Rapid positioning
[Feed down
[Apply tool radius compensation (8)
[Linear approach to the right of L1
[L1
[R10
[L2
[R-5
[C1
[R-5
[L2
[Linear exit
[Rapid up
[Program end

[Subroutine 1 for M8 holes


[temporary origin

[Cancel temporary origin

User and Programming Manual - Part III

S4045 S4045P
4. Complete Programming Example

N75
N76
N77
N78
N79
N80
N81
N82
N83
N87
N88
N89
N90
N91
N92
N93
N94
N95

G32
[
[
L=2
G51X-20Y-65
X0Y0
L=52
X20I
L52K4
[
L=3
P1=-60
L=53
G76X40YP1
P1=P1+30
L53K4
G75
G32

[End subroutine 1

[Subroutine 2 for 10H7 holes


[temporary origin
[Start position
[label L52 start of repeat cycle
[Incremental move
[Jump to label 52 (4 times)
[Subroutine 3 for three holes D=6
[label L53 start of repeat cycle
[Polar coordinates r=40 ang=P1
[Jump to label 53 (4 times)
[Cartesian coordinates
[End subroutine 3

User and Programming Manual - Part III

4-3

S4045 S4045P
4. Complete Programming Example

4-4

User and Programming Manual - Part III

S4045 S4045P

APPENDICES

User and Programming Manual - Appendices

S4045 S4045P

User and Programming Manual - Appendices

S4045 S4045P
Appendix A - General list of the G-functions

APPENDIX A G00
G01
G02
G03
G04
G09
G10
G11
G13
G14
G15
G16
G17
G18
G19
G20
G21
G25
G26
G27
G28
G29
G30
G31
G32
G34
G35
G36
G37
G38
G39
G40
G41
G42
G43

GENERAL LIST OF
THE G-FUNCTIONS

axis rapid positioning.


linear interpolation.
clockwise circular/helical interpolation.
counterclockwise circular/helical interpolation.
timed dwell (pause time is specified by the K parameter in units of tenths
of a second).
deceleration at block end.
first point (or circle) that defines a straight line.
second point (or circle) that defines a straight line.
straight line at a known angle, through a point or tangent to a circle.
cancels G15.
enables SLAVE axes to be linked with their respective MASTER axes.
axis exchange.
plane selection (XY is the machining plane and Z is the perpendicular axis).
plane selection (ZX is the machining plane and Y is the perpendicular axis).
plane selection (YZ is the machining plane and X is the perpendicular axis).
circle of known center and radius.
linking radius or chamfer.
cancels G26. Must be programmed when machining igitised surfaces.
axis reversal compensation (the compensation value is a machine parameter).
first point of a SPLINE curve.
cusp point of a SPLINE curve.
last point of a SPLINE curve.
cancels G31 and re-establishes deceleration at block end.
continuous motion mode with automatic feed adjustment.
end of internal subroutine and return to the main program.
opens programming of the profile delimiting the zone of ruled surface
to be machined.
ends programming of the profile delimiting the zone of ruled surface
to be machined.
disables storing of actual machine axis path.
enables storing of actual machine axis path.
closes the file opened with G39
opens a file to store actual machine axis path.
cancels G41 and G42. Exit from profile and cutter compensation disable.
enables tool radius compensation, tool left of profile.
enables tool radius compensation, tool right of profile.
paraxial radius compensation (compensation is added to the coordinate).

User and Programming Manual - Appendices

Page 2-10 Part II


Page 2-10 Part II
Page 2-10 Part II
Page 2-12 Part II
Page 2-3 Part II
Page 2-15 Part II
Page 3-5 Part II
Page 3-5 Part II
Page 3-7 Part II
Page 6-11 Part II
Page 6-11 Part II
Page 2-31 Part II
Page 2-6 Part II
Page 2-6 Part II
Page 2-7 Part II
Page 3-1 Part II
Page 3-9 Part II

Page 3-37 Part II


Page 3-38 Part II
Page 3-38 Part II
Page 2-15 Part II
Page 2-15 Part II
Page 4-6 Part II
Page 5-40 Part II
Page 5-40 Part II
Page 6-10 Part II
Page 6-10 Part II
Page 6-10 Part II
Page 6-10 Part II
Page 2-14 Part II
Page 2-13 Part II
Page 2-13 Part II

A-1

S4045 S4045P
Appendix A - General list of the G-functions

G44
G48
G49
G50
G51
G52
G53
G54
G55
G56
G57
G58
G59
G60
G61
G62
G67
G68
G69
G70
G71
G72
G73
G74
G75
G76
G77
G78
G79
G80
G81
G82
G83
G84
G85
G86
G88
G89
G90
G91
G92
G93
G94
G95
G98
G99
G200
G201
G202
G666
G701
G710
G711
G721

A-2

paraxial radius compensation (compensation is subtracted from


the coordinate).
recalls and enables tool length compensation.
defines tool for radius compensation.
cancels G51 and disables the secondary origin defined by the last G51.
offset/rotation of the coordinate system on the plane.
offset of the coordinate system on the plane.
cancels mirror machining.
X-mirror machining.
Y-mirror machining.
Z-mirror machining.
XY-mirror machining.
ZX-mirror machining.
YZ-mirror machining.
cancels G61.
scaling factor.
type of coordinates for the definition of circle center in G2/G3.
cancels G68/G69.
static TCPM for rotary tables.
static TCPM for rotary heads.
inch system programming with CNC metric configuration.
metric system programming with CNC inch configuration.
cancels G73.
subprogram modal recall.
rounding off in the 180 range for rotary axes.
cartesian coordinate programming.
polar coordinate programming.
first point of a polygonal pocket.
last point of a polygonal/circular pocket (roughing cycle).
last point of a polygonal/circular pocket (roughing & finish cycle).
cancels fixed cycles.
drilling/spot-facing fixed cycle.
deep mixed drilling cycle.
deep drilling fixed cycle.
tapping fixed cycle.
reaming fixed cycle.
boring fixed cycle.
spaced plane drilling fixed cycle.
differentiated drilling fixed cycle.
absolute coordinate programming.
incremental coordinate programming.
F-feed rate override.
F-feedrate defined as inverse of block execution time.
F-feedrate in mm/minute or inches/minute (enabled at machine start up).
F-feedrate in mm/revolution or inches/revolution.
cancels G99.
drift compensation (compensates for position offsets caused by servodrives).
cancels G201 and G202.
cylindrical programming.
polar programming.
storing profile elements that have not been machined using the collision control
defines tool approach to profiled pockets.
cancels G711.
profile storing.
calculates and stores equidistant points on a profile.

Page 2-6 Part II


Page 2-13 Part II
Page 2-16 Part II
Page 2-16 Part II
Page 2-18 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-19 Part II
Page 2-18 Part II
Page 2-18 Part II
Page 2-11 Part II
Page 2-33 Part II
Page 2-33 Part II
Page 2-32 Part II
Page 2-31 Part II
Page 2-31 Part II
Page 5-48 Part II
Page 5-48 Part II
Page 2-9 Part II
Page 2-9 Part II
Page 5-3 Part II
Page 5-5 Part II
Page 5-5 Part II
Page 2-20 Part II
Page 2-21 Part II
Page 2-22 Part II
Page 2-23 Part II
Page 2-24 Part II
Page 2-25 Part II
Page 2-25 Part II
Page 2-26 Part II
Page 2-27 Part II
Page 2-8 Part II
Page 2-8 Part II
Page 2-3 Part II
Page 2-3 Part II
Page 2-3 Part II
Page 2-3 Part II
Page 6-7 Part II
Page 6-7 Part II
Page 5-27 Part II
Page 5-26 Part II
Page 5-28 Part II
Page 3-14 Part II
Page 5-9 Part II
Page 5-15 Part II
Page 5-15 Part II
Page 5-17 Part II

User and Programming Manual - Appendices

S4045 S4045P
Appendix A - General list of the G-functions

G726
G727
G728
G732
G733
G734
G735
G736
G737
G738
G740
G746
G748
G749
G750
G751
G751
G753
G754
G760
G761
G777
G778
G779
G780
G781
G782
G783
G784
G785
G786
G787
G789
G791
G792
G793
G794
G795
G796
G797
G799
G817
G840
G841
G845
G846
G850
G851
G872
G873
G900
G901

ruled surfaces between two profiles: first profile.


ruled surfaces between two profiles: second profile.
ruled surfaces between two profiles: execution.
cancels G733.
high speed milling of profiles defined by points with S speed ramp.
close cycle G735.
open cycle of spiral milling.
surfaces defined by a plane profile and one or more section profiles:
plane profile and parameters.
surfaces defined by a plane profile and one or more section profiles:
section profiles.
surfaces defined by a plane profile and one or more section profiles:
execution.
cancels G749 and G748.
defers G748 cycle.
4/5-axis surface machining with rotary/tilting tables (dynamic TCPM).
4/5-axis surface machining with 1/2-axis rotary heads (dynamic TCPM).
cancels G751.
rotation/offset in space.
special use of G751 for scaling factors.
cancels G754.
profile direction reversal.
cancels G761.
axis travel delimitation.
opens profiled pocket programming and sets parameters.
profiled pocket roughing cycle.
profiled pocket roughing & finish cycle.
grid/circumference pattern machining repeat: execution.
grid pattern drilling/spot facing supercycle.
grid pattern deep mixe drilling supercycle.
grid pattern deep drilling supercycle.
grid pattern tapping supercycle.
grid pattern reaming supercycle.
grid pattern boring supercycle.
grid pattern machining repeat supercycle.
grid pattern differentiated drilling supercycle.
circumference pattern drilling/spot facing supercycle.
circumference pattern deep mixed drilling.
circumference pattern deep drilling supercycle.
circumference pattern tapping supercycle.
circumference pattern reaming supercycle.
circumference pattern boring supercycle.
circumference pattern machining repeat supercycle.
circumference pattern differentiated drilling supercycle.
tool length offset on an axis nonorthogonal to the machining plane.
cancels G841.
tool radius compensation in space.
cancels G846.
manual axis by handwheels during machining.
cancels G851.
part origin offset by handwheels.
ON/OFF touch probe measuring cycle in space.
touch/copying probe measuring cycle in space.
cancels G901.
edit and graphic execution disabling during machining.

User and Programming Manual - Appendices

Page 5-40 Part II


Page 5-40 Part II
Page 5-41 Part II
Page 6-3 Part II
Page 6-2 Part II
Page 5-46 Part II
Page 5-46 Part II
Page 5-35 Part II
Page 5-36 Part II
Page 5-39 Part II
Page 5-32 Part II
Page 5-34 Part II
Page 5-34 Part II
Page 5-33 Part II
Page 5-32 Part II
Page 5-31 Part II
Page 5-47 Part II
Page 5-14 Part II
Page 5-14 Part II
Page 5-23 Part II
Page 5-22 Part II
Page 5-8 Part II
Page 5-9 Part II
Page 5-9 Part II
Page 5-20 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-19 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 5-21 Part II
Page 6-5 Part II
Page 5-29 Part II
Page 5-29 Part II
Page 6-4 Part II
Page 6-4 Part II
Page 6-4 Part II
Page 6-3 Part II
Page 6-5 Part II
Page 6-6 Part II
Page 6-11 Part II
Page 6-11 Part II

A-3

S4045 S4045P
Appendix A - General list of the G-functions

G910
G911
G1000
G1001
G9999
G4724
G4725

A-4

cancels G911.
disables travel limit control.
cancels G1001.
graphic execution of a program sequence.
synchronization of program execution with tool path display.
cancel G4725.
planetary milling.

Page 6-11 Part II


Page 6-11 Part II
Page 6-9 Part II
Page 6-9 Part II
Page 6-5 Part II
Page 5-51 Part II
Page 5-49 Part II

User and Programming Manual - Appendices

S4045 S4045P
Appendix B - Diagnostic messages

APPENDIX B - DIAGNOSTIC
MESSAGES
Programming errors and alarms for system faulty conditions are displayed on the screen with the
message ERR. followed by a number, a short description of the failure and, in some cases, by the
number of the system module or program instructions that is responsible for the malfunction.
Diagnostic messages are subdivided according to the type of malfunction and the involved system
environment and system components.
Additional messages appear on the screen, without any identification number, providing useful
information on program/system state. They are listed below:

B.1 MESSAGES
Program execution in progress...
Program execution completed
Execution interrupted by the operator (break)
Single block execution in progress
Single block execution completed
Wait for a start command
Machine tool power off because of an emergency condition
Travel limit for axis...
State transition impossible
Program simulation in progress
Program simulation completed
Syntax error

User and Programming Manual - Appendices

B-1

S4045 S4045P
Appendix B - Diagnostic messages

B.2 ERRORS
Programming errors
E 18:
E 19:
E 20:
E 21:
E 22:
E 23:
E 24:
E 25:
E 26:
E 27:
E 28:
E 29:
E 30:
E 31:
E 32:
E 33:
E 34:
E 35:
E 36:
E 37:
E 38:
E 39:
E 40:
E 41:
E 42:
E 43:
E 44:
E 45:
E 46:
E 47:
E 48:
E 49:
E 50:
E 51:
E 52:
E 53:
E 54:
E 55:
E 59:
E 60:
E 62:
E 63:
E 64:
E 65:
E 66:
E 67:
E 68:
E 69:

B-2

number of tool different from T spindle


correction value too big ( > 2 mm )
illegal tool or origin number
I-parameter (depth increment) missing
plane selection (G17/18/19) followed by inconsistent code
paraxial compensations applied to polar coordinates
0-code incompatible with S1200 tool change
two G-codes
two coordinates
two L-codes
two P-codes
two R-codes
two S-codes
two F-codes
two M-codes
feature not available
minimum distance to centre in G202 missing
macro definition: X-coordinate missing
macro definition: Y-coordinate missing
number of loops missing in fixed supercycles programming
distance missing in fixed supercycles programming
circle radius missing in fixed supercycles programming
branch instruct. not allowed in execution from peripheral
duplicate label (Lxx), or label not found
predefined sequence (*) not found
L-code not allowed in MDI
L-code invoked in a file larger than 32K
compiling or digitizing data storage full
code not allowed between G754 and G753
points overlapping or outside machining plane in pocket
macro opening/closing codes missing
tool length or origin number not found
G32 programmed in a repeat cycle
more than 8 subroutine nesting levels
more than 8 repeat cycle nesting levels
points overlapping in the definition of spline curve
subdivision error in vertical profile
profile not closed
parity error or line error
program reading error
program not found in system memory
fixed cycle not executable with parameter data: S,F,J,Z
M-code for Spindle ON not programmed in fixed cycle
probe not qualified
block not found in AUTO SEARCH
starting hole depth J missing in fixed cycle programming
G88 code followed by other than spindle axis coordinates
pocket with too many passes ( > 65535 )

User and Programming Manual - Appendices

S4045 S4045P
Appendix B - Diagnostic messages

E 70:
E 71:
E 72:
E 73:
E 74:
E 75:
E 76:
E 77:
E 78:
E 79:
E 80:
E 81:
E 82:
E 83:
E 84:
E 85:
E 86:
E 88:
E 89:
E 90:
E 91:
E 92:
E 93:
E 94:
E 95:
E 96:
E 97:
E 98:
E 99:
E 300:
E 301:
E 400:
E 401:
E 402:
E 403:
E 404:
E 405:
E 406:
E 407:
E 408:
E 409:
E 410:
E 411:
E 412:
E 413:
E 414:
E 415:
E 416:
E 417:
E 418:
E 419:
E 420:
E 421:
E 422:

error in geometric definition


in the detection of tool/part collisions
too many points or elements
less than 3 points in polygonal pocket
pockets programmed without tool radius definition
parallel straight lines: no intersection
in the roughing between a plane profile and section profiles
no intersection between straight line and circle
profiled pockets with passes parallel to the profile
control of the islands internal to profiled pockets
length is too great ( > 131071 mm )
concentric circles
external circles
overlapping circles
tangent circles
internal circles
error in the definition of geometric elements (E...)
division by zero
square root of a negative number
value resulting from operation with P-parameters too large
error in the definition of parameters
axes out of place
Axis at end of stroke
quota negativa non ammessa
reversal of the direction on a profile element
illegal value or missing segment for corner rounding
syntax error in block copied from peripheral
move outside of working limits
syntax error in programmed block
locking between not referred axes
locking between locked axes
illegal parameters in macro programming
illegal block sequence within macro
not enough memory to execute macro
macro parameters missing
illegal parameters in macro call
illegal profile invoked by macro
profile cannot be machined with selected tool
too many thread cuts
too few thread cuts (less than 4)
circle threading
nonmonotonous profile along feed axis
illegal cut depth (nil or negative)
stock allowance generates interference between cuts
max diameter of finished profile > then part diameter
profile elements not linked
intersection between profile elements
illegal groove profile
groove width smaller than tool width
illegal number of thread cuts (nil or negative)
orientation and tool angles missing
profile approach and machining direction inconsistent
profile inconsistent with the defined parameters
not enough memory for shadow zones

User and Programming Manual - Appendices

B-3

S4045 S4045P
Appendix B - Diagnostic messages

E 423:
E 424:
E 425:
E 426:
E 427:
E 428:
E 429:
E 430:
E 431:
E 432:
E 433:
E 434:
E 435:
E 437:
E 438:
E 439:
E 440:
E 441:
E 442:
E 443:
E 444:
E 445:
E 446:

number of elements too large


insufficient profile length
profiles lying on the same plane
concave profile of border zone
island external to profile
macro does not find elements in profile
finished profile defined only with horizontal elements
minimum profile diameter greater than blank diameter
chamfers and radii cannot be defined together
illegal inclination of first/last groove element
groove profile undercut
zero circle radius in groove profile
final length greater than thread length
tool radius without orientation
tool orientation inconsistent with machining direction
shadow zone control with illegal orientation
shadow zone control with illegal tool angles
tool radius value not standard
illegal tool orientation
tool length missing
max tool depth nil or negative
inconsistent tool size and radius
start/end pts of finished & rough profile do not overlap

Tool change cycle errors


E 500:
E 501:
E 502:
E 503:
E 504:
E 505:
E 506:
E 507:
E 508:
E 509:
E 510:
E 511:
E 512:
E 513:
E 514:
E 515:
E 516:
E 518:
E 519:
E 520:
E 521:
E 522:

B-4

tool present in holder and magazine also..


tool present in intermediate station and magazine also..
tool present in spindle and magazine also..
tool pocket already occupied by tool..
previous tool pockets can't accomodate size of tool..
subsequent tool pockets can't accomodate size of tool..
dimension not consistent with planar: tool..
selected tool not found in tool table..
tool not enabled..
tool to be unloaded not found in tool table..
tool to be unloaded not found in magazine
tool to be loaded already in magazine
no room in magazine for loading tool from spindle..
no room in magazine for loading tool per programmed T..
no room for loading tool from intermediate station
no room in magazine for loading tool from tool holder..
tool change cycle interrupted by MT power off
inconsistent tool table parameter..
illegal position assigned to tool..
manual loading of tool in magazine also
impossible loading/unloading T0 tool
impossible random-fix loading:tool..

User and Programming Manual - Appendices

S4045 S4045P
Appendix B - Diagnostic messages

Compensation cam management errors


E 951:
E 990:
E 991:
E 992:
E 993:

error in DDI Command Procedure


syntax error in correction CAM file: line..
illegal table number in correction CAM file: line..
too many values in correction CAM file: line..
too few values in correction CAM file: line..

B.3 PROBE AND COPY OPTION


Programming errors and alarms in copying, digitizing and measuring cycles
E 200:
E 201:
E 202:
E 206:
E 207:
E 208:
E 209:
E 210:
E 211:
E 212:
E 213:
E 253:
E 254:
E 255:

probe out of digitizing limits


probe collision during digitizing
probe lost contact during digitizing
hardware failure of digital probe
digital probe disconnected
digital probe beyond hardware travel limits
deflection of digitizing probe on max limits
collision of ON/OFF probe during measuring
starting measure with probe deflected
axes position below set plateau position
deflexion of the tool zero-setting device at limit
write error in digitizing file
G877-code missing for digitizing limit opening
G879-code missing for digitizing limit closing

B.4 ALARMS
Axis feedback transducers
E 300:
E 301:
E 1001:
E 1002:
E 1003:
E 1004:
E 1005:
E 1006:
E 1007:
E 1008:
E 1009:
E 1010:
E 1011:
E 1012:
E 1013:

locking between not referred axes


locking between locked axes
Gray-code feedback error from absolute transducer: axis
analog feedback signal too high: axis..
analog feedback signal too low: axis..
feedback discontinuity: axis..
servodrive error: axis..
illegal of pulses from incremental transducer: axis
feedback device malfunction: axis..
positioning out of tolerance: axis..
no contact between drilling head and board
error in drilling destination plane
drilling coordinates outside work area
comand sz combination not allowed
quik value greater than security distance programmed

User and Programming Manual - Appendices

B-5

S4045 S4045P
Appendix B - Diagnostic messages

Spindle feedback transducer


E 1032:
E 1033:
E 1034:
E 1036:
E 1037:

analog feedback signal too high from spindle


analog feedback signal too low from spindle
spindle feedback discontinuity
illegal # of pulses from spindle incremental transducer
malfunction of spindle feedback device

Point to point axis feedback transducers


E 1061:
E 1062:
E 1063:
E 1064:
E 1065:
E 1066:
E 1067:
E 1068:
E 1069:
E 1070:
E 1080:

Gray-code error from absolute transducer: PLC axis..


feedback signal too high:PLC axis..
feedback signal too low: PLC axis..
feedback discontinuity: PLC axis..
servo error in point to point axis..
illegal number of pulses from feedback device: PLC axis
feedback device malfunction: PLC axis..
secondary feedback signal too high from PLC axis..
secondary feedback signal too low from PLC axis..
secondary feedback device malfunction: PLC axis..
potenziometer device malfunction:comparator..

Inductosyn position feedback module


E 1108:
E 1113:
E 1116:
E 1130:

interpolator overrun: next block not ready


ROM memory error in Inductosyn board
RAM memory error in Inductosyn board
not enough time for all the Inductosyn axes

Temperature control module


E 1158:
E 1159:
E 1160:
E 1161:
E 1162:
E 1163:
E 1164:
E 1165:

error in thermocouple control


thermocouple signal interrupted
thermistor sensor signal too high
thermistor sensor signal too low
thermistor sensor malfunction
cold junction signal too high
cold junction signal too low
cold junction sensor malfunction

CPU Master module


E 1200:
E 1202:
E 1204:
E 1206:
E 1208:
E 1210:
E 1212:

B-6

master CPU overrun: machining simulation


master CPU overrun: coordinate display
master CPU overrun: secondary sampling
master CPU overrun: primary sampling
master CPU overrun: system clock
master CPU overrun: PLC debugger
master CPU overrun: PLC axes

User and Programming Manual - Appendices

S4045 S4045P
Appendix B - Diagnostic messages

E 1214:
E 1216:
E 1218:
E 1220:
E 1222:
E 1224:
E 1226:

master CPU overrun: temperature feedback controls


master CPU overrun: interpolator
overrun MODIND
fast cycle too long: PLC line..
ultrafast cycle too long: PLC line..
too many writes in tool table
too many writes in tool table, PLC line...

I/O MIX module


E 1300:
E 1302:
E 1304:
E 1306:
E 1310:
E 1312:
E 1314:
E 1316:
E 1318:
E 1320:
E 1322:
E 1324:

malfunction of I/O MIX board..


Watchdog alarm digital expansion for I/O MIX board..
Watchdog alarm on I/O MIX board..
overrun of I/O MIX board..
I/O MIX digital output error: byte..
+24V power down: I/O MIX board..
+24V power down: I/O MIX expansion board..
waiting for digital I/O +24V power up
encoder +5V power down: I/O MIX board..
handwheel +15V power down: I/O MIX board..
15V external power down: I/O MIX board..
potentiometer power down: I/O MIX board..

Errors caused by PLC program anomalies


E 1994:
E 2000:
E 2001:
E 2002:
E 2004:
E 2006:
E 2008:
E 2010:
E 2012:
E 2014:
E 2016:
E 2018:
E 2019:
E 2020:
E 2021:
E 2022:
E 2024:
E 2026:
E 2028:
E 2030:
E 2032:
E 2034:
E 2040:
E 2041:
E 2042:
E 2043:
E 2044:

access to absent component, PLC line..


stack overflow: PLC line..
CCL too big: PLC line..
too many nested CALLs: PLC line..
RTS out of sequence: PLC line..
too many nested EXECs: PLC line..
ENDE out of sequence: PLC line..
PLC not running
PLC cannot be executed
illegal parameter in DEF SEQCU(n): PLC line..
illegal a,b sequence DEF SEQCU(n)=a,b: PLC line..
missing parameters in DEF SEQCU(n)=a,b: PLC line..
a.t.c. NOT config.:DEF SEQCU impossible PLC line..
no pockets defined for automated tool change config.
inconsistent tool life parameters..
illegal tool change mode: SELECU=..
tool change sequence not provided by PLC: NSEQCU=..
too many characters in string: PLC line..
DISPL on nonexisting line: PLC line..
CLR on nonexisting line: PLC line..
nonexisting string: PLC line..
wrong index variable in PLC line..
branch/set unordered condition: PLC line..
not a number float.point: PLC line..
float.point operand error: PLC line..
float.point overflow: PLC line..
float.point underflow: PLC line..

User and Programming Manual - Appendices

B-7

S4045 S4045P
Appendix B - Diagnostic messages

E 2045:
E 2046:
E 2047:
E 2048:

float.point division by zero: PLC line..


fpu inexact operation: PLC line..
fpu inexact decimal input: PLC line..
PLC error in use of FPERMK mask

Errors caused by robot program anomalies


E 2000: stack overflow: PLC line..
E 2001: CCL too big: PLC line..

PLC programming errors


E 2500:
E 2501:
E 2502:
E 2503:
E 2504:
E 2505:
E 2506:
E 2507:
E 2508:
E 2509:
E 2510:
E 2511:
E 2512:
E 2513:
E 2514:
E 2515:
E 2516:
E 2517:
E 2518:
E 2519:
E 2525:
E 2526:
E 2530:
E 2532:
E 2534:
E 2560:
E 2562:
E 2563:
E 2564:
E 2570:
E 2571:
E 2572:
E 2580:
E 2581:
E 2590:
E 2591:

B-8

expression cannot be compiled


syntax error
illegal operand
too many characters in variable name
illegal operator
label not defined
reference to label from a different section
too many operators in logical expression
reserved symbol
symbol already defined
section already defined
misaligned addresses in variable definition sequence
undefined symbol
dimension error
too many I/O channels on module
no further PULSE functions available
no further TIMER functions available
no further COUNTER functions available
no further SOFTKEY functions available
no further HARDKEY functions available
too many HARDKEY fields in menu
referenced HARDKEY menu does not exists
too many variables defined
code not generated
fatal error:impossible operation
expression too complex
inconsistent operands
wrong bracket sequence
illegal use of a variable
too many nested EXECs
EXEC without ENDE
ENDE without EXEC
too many numeric variables to be displayed
too many string variables to be displayed
too many digital signals to be visualized
too many analog signals to be visualized

User and Programming Manual - Appendices

S4045 S4045P
Appendix B - Diagnostic messages

DDI Module
E 1421: DDI C1D Error,drive #,IDN000BH=H,IDN0081HH
E 1422: DDI C2D Error,drive #,IDN000CH=H,IDN00B5H=H
E 1450: DDI error,drive#,SRCERM=H,SRCERR=H

RIO Module
E 32102: M.T. OFF owing to PC communication interruption
E 10000: Time-out of answer waited from #board
E 10001: Master RIO error, #board
E 10002: BINary file to manage #board missing
E 10004: No Slave noticed on Master RIO, #board
E 10010: Malfunction Slave RIO, #board, #slave address
E 10011: Slave type RIO unknown, #board, #slave address
E 10015: Watch-dog slave RIO, #board, #slave address
E 10016: RIO reception error, #board, #slave address
E 10017: Slave RIO no response, #board, #slave address
E 10018: RIO output error,board #,slave #,octet #
E 10020: RIO 24v power error,board #,slave #,base
E 10021: RIO 24v power error,board #,slave #,expansion #

Errors caused by anomalies in programs with more axis groups


E32013: Execution over on GRP #
E32014: Simulation over on GRP #
E32015: The semiautomatic execution must start from the main axis group
E32016: Execution interrupted on semaphore
E32017: Running a GRP on a GDA taken by a previous execution
E32018: Transiction state allowed for main axes group only
E32019: Wrong state on semaphore

CCU Module
E10003: Waiting time-out answer from CCU board #...
E10005: Waiting time-out CCU parameters loading board #...
E10006: CCU setup updating error
E03000: CCU configurata su piastra errata, piastra #...
E03000: CCU with configuration on wrong board, board #...
E03001: Wrong sample for CCU management, board #...
E03002: Missing drive on CCU, board #..., drive #...
E03003: Required drive enable #... without configuration
E03004: CCU Data Base Code not found, board #..., drive #...
E03005: Sercos Data Base Code not found, drive #...
E03028: CCU message,board #...,code #...H,drive #...
E03029: CCU message,board #...,code #...H
E03030: CCU error without reset,board #...,code #...H,drive #...
E03031: CCU error with reset,board #...,code #...H,drive #...
E03032: CCU error without reset,board #...,code #...H
E03033: CCU error with reset,board #...,code #...H
E03034: 2 CCU messages,board #...,code #...H,drive #...,previous #...H

User and Programming Manual - Appendices

B-9

S4045 S4045P
Appendix B - Diagnostic messages

E03035: 2 CCU messages,board #...,code #...H,previous #...H


E03036: 2 CCU errors without reset,board #...,code #...H,drive #...,previous #...H
E03037: 2 CCU errors with reset,board #...,code #...H,drive #...,previous #...H
E03038: 2 CCU errors without reset,board #...,code #...H,previous #...H
E03039: 2 CCU errors with reset,board #...,code #...H, previous #...H

B-10

User and Programming Manual - Appendices

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

APPENDIX C - SYSTEM MALFUNCTIONS


AND REMEDIES
In this appendix some diagnostic messages are taken from the list of Appendix B in order to
supplement them with useful information on malfunctions sources and corresponding remedies.

C.1 AXIS FEEDBACK TRANSDUCERS


Code
1001

Displayed message
Gray-code feedback error
from absolute transducer:
axis ...

1002

analog feedback signal too


high: axis ...

1003

analog feedback signal too


low: axis ...

1004

feedback discontinuity:
axis ...

1005

servodrive error: axis ...

Possible sources
transducer not parallel to
axis travel
transducer amplifier
breakdown
insufficient air gap
transducer amplifier
breakdown
transducer not parallel to
axis travel
cable interrupt or in short
electric noise
collisions or excessive
acceleration

Remedies
check transducer fastening
replace transducer
check transducer fastening
replace transducer
check transducer fastening
check connection cables

check shielding of
signal/motor cables
check transmission
members
axis motor does not follow check fuses, drive unit and
the NC
motor
tool not cutting
check tool and spindle
velocity
insufficient lubrication
check brake
brake locking
check program
programming error
set-up parameter too small check programming of an
instruction block
illegal number of pulses
increase servoerror
per revolution
threshold
defective transducer

correct parameter
electric noise
replace transducer
check shielding of
signal/motor cables

User and Programming Manual - Appendices

C-1

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

Code
1006

Displayed message
illegal # of pulses from
incremental transducer:
axis ...

1007

feedback device
malfunction: axis ...

1008

positioning out of tolerance:


axis ...

Possible sources
illegal number of pulses
per revolution
defective transducer
electric noise
cable interrupt or
disconnection
defective transducer
feed drive reference offset
axis overload
control position threshold
too narrow
unbalanced vertical axis

Remedies
modify parameter
replace transducer
check shielding of
signal/motor cables
check
replace
check ground connections
and zero balance
check lubrications and
moving parts
modify parameter
check compensation or
balance weight

C.2 INDUCTOSYN POSITION FEEDBACK MODULE


Code
1108

Displayed message
interpolator overrun: next
block not ready

Possible sources
wrong NC configuration
CPU Master breakdown

1113

ROM memory error in


Inductosyn board

component breakdown

1116

RAM memory error in


Inductosyn board

component breakdown

1130

not enough time for all the


Inductosyn axes

insufficient sampling time

Remedies
correct configuration
call technical service to
have CPU master board
replaced
call technical service to
have Inductosyn board
replaced
call technical service to
have Inductosyn board
replaced
increase parameter

C.3 SPINDLE FEEDBACK TRANSDUCER


Code
1032

Displayed message
spindle analog feedback
signal too high

1033

spindle analog feedback


signal too low

1034

spindle feedback signal


discontinuity

C-2

Possible sources
insufficient air gap
transducer amplifier
breakdown
insufficient air gap
transducer amplifier
breakdown
electric noise
collision or excessive
acceleration

Remedies
check transducer fastening
replace transducer
check transducer fastening
replace transducer
check shielding of
signal/motor cables
check transmission
members

User and Programming Manual - Appendices

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

Code
1036

Displayed message
illegal # of pulses from
spindle incremental
transducer

1037

malfunction of spindle
feedback device

Possible sources
illegal number of pulses per
revolution
defective transducer
electric noise
cable interrupt or
disconnection
transducer breakdown

Remedies
modify parameter
replace transducer
check shielding of
signal/motor cables
check
replace

C.4 I/O MIX MODULE


Code
1300

Displayed message
malfunction of I/O MIX
board ...

Possible sources
the I/O MIX board signals an
internal anomaly to the system

Remedies
replace I/O MIX board

1302

Watchdog alarm digital


expansion for I/O MIX
board ...
Watchdog alarm on I/O MIX
board ...

the dialogue between the I/O


MIX board and the I/OD
expansions is not correct
the I/O MIX board does not
communicate with the Master
board
anomalies on the connections
of PLC outputs such as
overload or short circuit

replace I/OD expansion

1304

1310

I/O MIX digital output error:


byte ...

1312

+24V power down: I/O MIX


board ...
+24V power down: I/O MIX
expansion board ...
waiting for digital I/O +24V
power up

1314
1316

1318

encoder +5V power down:


I/O MIX board ...

1320

handwheel +15V power


down: I/O MIX board ...
15V external power down:
I/O MIX board ...

1322

1324

potentiometer power down:


I/O MIX board ...

I/O MIX module 24V external


power supply interrupt
I/OD ... module 24V external
power supply interrupt
I/O MIX module 24V power
supply missing
I/OD module 24V power
supply missing
power supply anomalies for
encoder or optical transducers
from I/O MIX module
handwheel power supply
anomalies
power supply anomalies on I/O
MIX module 15V outputs

anomalies on the connections


of I/O MIX board
potentiometers

User and Programming Manual - Appendices

replace I/O MIX board


check output loads
check external short
circuits
check cable path
check 24V power supply for
the I/O MIX board
check 24V power supply for
the I/OD ... board
check 24V power supply

search for short circuit on


encoder/optical transducer
power supply
search for short circuit on
handwheels
search for short circuits or
electric noise on the A1
analog cable at 15V
outputs
search for short circuits or
overloads on potentiometer
power supply

C-3

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

C.5 CPU MASTER MODULE


Code
1202

1204

1206

1208

1210

1212

1216

1220

1222

1226

C-4

Displayed message
CPU master overrun:
coordinate display

Possible sources
insufficient CPU Master
resources with respect to the
set sampling during
dimension reading
CPU master overrun:
insufficient CPU Master
secondary sampling
resources with respect to the
set sampling during PLC
execution
CPU master overrun:
insufficient CPU Master
primary sampling
resources with respect to the
set sampling during NC
execution
CPU master overrun:
insufficient CPU Master
system clock
resources with respect to the
set sampling during timer
updating
CPU master overrun: PLC
insufficient CPU Master
debugger
resources with respect to the
set sampling during PLC
debugging
CPU master overrun: PLC
insufficient CPU Master
axes
resources with respect to the
set sampling during the
control of PLC axes
CPU master overrun:
insufficient CPU Master
interpolator
resources with respect to the
set sampling during the
interpolation
fast cycles too long:
insufficient CPU Master
PLC line ...
resources with respect to the
set sampling in the 10 ms
PLC partition
ultrafast cycles too long:
insufficient CPU Master
PLC line ...
resources with respect to the
set sampling in the PLC
partition synchronous with the
sampling
too many writes in tool table, wrong sequence inside PLC
PLC line ...
program

Remedies
check axis configuration
parameters and sampling
time*
check Master board
check axis configuration
parameters and sampling
time*
check Master board
check axis configuration
parameters and sampling
time*
check Master board
check axis configuration
parameters and sampling
time*
check Master board
check number and complexity
of the variables simultaneously recalled in debug
check axis configuration
parameters and sampling
time*
check Master board
check axis configuration
parameters and sampling
time*
check Master board
check PLC program
dimension in fast area
check Master board
check PLC program
dimension in ultrafast area

check the line of PLC


program indicated by the error
message

The sampling time depends on the speed of the Master board and on the complexity of the NC
configuration. Barring exceptions to be considered case by case, a 25-MHz CPU Master module
provides a sampling time of 5 msec, while a 40-MHz CPU module will ensure a sampling time of
2.5 msec.

User and Programming Manual - Appendices

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

C.6 POINT-TO-POINT AXIS TRANSDUCERS


Code
1061

Displayed message
Gray-code error from
absolute transducer: PLC
axis ...

1062

feedback signal too high:


PLC axis ...

1063

feedback signal too low:


PLC axis ...

1064

feedback discontinuity: PLC


axis ...

1066

illegal number of pulses


from feedback device: PLC
axis ...

1067

feedback device
malfunction: PLC axis ...

1068

secondary feedback signal


too high from PLC axis ...

1069

secondary feedback signal


too low from PLC axis ...

1070

secondary feedback device


malfunction: PLC axis ...

Possible sources
transducer not parallel to
axis travel
transducer amplifier
breakdown
insufficient air gap
transducer amplifier
breakdown
transducer not parallel to
axis travel
cable interrupt or in short
electric noise
collisions or excessive
acceleration

Remedies
check transducer fastening
replace transducer
check transducer fastening
replace transducer
check transducer fastening
check connection cables

check shielding of
signal/motor cables
check transmission
members
illegal number of pulses per modify parameter
revolution
replace transducer
defective transducer
check shielding of
electric noise
signal/motor cables
cable interrupt/
check
disconnection
replace
transducer breakdown
insufficient air gap
check transducer fastening
transducer amplifier
replace transducer
breakdown
transducer not parallel to
check transducer fastening
axis travel
check connection cables
cable interrupt or in short
cable interrupt or
check
disconnection
replace
transducer breakdown

C.7 COPY AND PROBE OPTION


Code
206

207
208

Displayed message
Possible source
hardware failure of digital one of the digitizing probe
probe
signals is outside the minimum
or maximum admitted limits
digital probe disconnected
no signal on the cable
connecting the probe to the NC
digital probe beyond
digitizing probe deflection
hardware travel limits
beyond mechanical limits

User and Programming Manual - Appendices

Remedy
replace digitizing probe
check connection cable
check digitizing board
connect cable

move probe away from


model
check connection cable
check digitizing board

C-5

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

Code
209

Displayed messages
deflection of digitizing probe
at max. limits

Possible sources
digitizing probe deflection
beyond set limits

210

collision of ON/OFF probe


during measuring cycle

touch probe triggered outside


the programmed range

Remedies
move probe away from
model
check digitizing probe
check digitizing board
check connection cable
check possible collisions
or probe rod vibrations
check dimensions of
measuring program

C.8 CPU MASTER AND PC MODULES


Code
32100

32101

32102

C-6

Possible sources
system anomaly owing to the internal operation of the
Master board.
May be caused by operations or situations not
provided for by the software.
Master board watchdog owing to absence of dialogue
with PC board.
May be caused by operations or situations not
provided for by the software
PC board watchdog owing to absence of dialogue
with Master board.
May be caused by operations or situations not
provided for by the software

Remedies
replace Master board
Check the installed software
version and the situation that
generated the problem
replace Master board
Check the installed software
version and the situation that
generated the problem
replace Master board
Check the installed software
version and the situation that
generated the problem

User and Programming Manual - Appendices

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

C.9 SDD SERIES DIGITAL DRIVE FOR AXIS AND SPINDLE


Code
1400

1401

1402

Message

Cause

drive #.. configured on wrong DDI In the DDI configuration of the


board
indicated drive the parameter
Master board No. is incorrect.
DDI drive address .. configured In the DDI configuration for
with an address already assigned
parameter Address drive the same
value has been used for more than
one drive
DDI drive address .. wrong, In the DDI configuration for
available...
parameter Address drive a value
not
included
among
those
configured on the DCM board
switches has been used

1405

DDI CP#..,board #.., S.C.


err (SRCERM)= ,
error (SRCERR) =

General error in the optical fiber


communication loop

1406

DDI CP#..,drive #.., IDN ,S.C.


err (SRCERM)= ,
error (SRCERR) =

General error in the optical fiber


communication loop

1407

CP2->CP3 not allowed,


drive #.. IDN 0015H = ...,

General error in the optical fiber


communication loop

1408

CP3->CP4 not allowed,


drive #.. IDN0016H =...,

General error in the optical fiber


communication loop

1410

S.C. read, drive #..,


IDN...,
S.C.err(SRCERM)=...,
error(SRCERR)=...

General error in the optical fiber


communication loop

1411

Drive #,
IDN...,
S.C.err(SRCERM)=...,
error(SRCERR)=...

General error in the optical fiber


communication loop

1412

S.C. write, drive #..,


IDN...,
S.C.err(SRCERM)=....,
error(SRCERR)=...

General error in the optical fiber


communication loop

1421

DDI CID Error, drive #..,


IDN 000BH =xxxxH,
IDN 0081H =xxxxH

1422

DDI C2D Error, drive #..,


IDN 000CH =xxxxH,
IDN 00B5H =xxxxH

1450

DDI error, board #..,


SRCERM ,
SRCERR

Class 1 diagnostic error on the


drive indicated.
The cause may be ascertained by
analyzing the contents of the IDN
000BH and 0081H listed later in
the text of the message.
Class 1 diagnostic error on the
drive indicated.
The cause may be ascertained by
analyzing the contents of the IDN
000CH and 00B5H listed later in
the text of the message.
Optical fiber communication is not
active

User and Programming Manual - Appendices

Corrective action
Modify the value of the parameter
Master board No. In the DDI
configuration.
In the DDI configuration utilize for
parameter Address drive a different
value for each single drive
Check correspondence between
configured
Address
drive
parameter values and those
recognized
by
the
system
(indicated in the message after
available)
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off
Check correctness of configuration.
Check the hardware
Depends on the type of error that
has occurred

Depends on the type of error that


has occurred

Drives are not on


Check functionality of the optical
fiber connection: all red LEDs (O.L.
KO) must be off

C-7

S4045 S4045P
Appendix C - System malfunctions and corresponding remedies

C-8

User and Programming Manual - Appendices

Vous aimerez peut-être aussi