Académique Documents
Professionnel Documents
Culture Documents
S4045 S4045P
General
REVISIONS
Rev. # Rev. Date.
00
03/08/2001
Pages Revised
Emission
CMA44501080E
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
S4045 S4045P
General
REVISIONS
Rev. # Rev. Date.
07
Sept. 2006
Pages Revised
Eighth Edition
CMA44506097E
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.
The Numerical Controls S4000, Export Version E excluded, are subject to export controls according
to Appendix I of the EU-Dual Use regulation.
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.
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
System configuration
Provides a summary of the screen structure and describes the keyboard key functions.
Chap. 2
Chap. 3
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.
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
Chap. 5
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
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.
, etc.)
S4045 S4045P
General
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
S4045 S4045P
General
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
S4045 S4045P
General
11
S4045 S4045P
General
12
S4045 S4045P
General
13
S4045 S4045P
General
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
S4045 S4045P
General
15
S4045 S4045P
General
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
S4045 S4045P
General
17
S4045 S4045P
General
18
S4045 S4045P
PART I
CONTROL
OPERATION
S4045 S4045P
S4045 S4045P
1. System Configuration
1. SYSTEM CONFIGURATION
The following two basic components comprise the CNC system:
-
CENTRAL UNIT
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:
-
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.
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
S4045 S4045P
1. System Configuration
396.0
36.0
FACE
PLANE
364.0
361.0
130.0
83.0
7.0
275.5
61.5
103.0
18.0
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
LED Green
LED Green
Network present
Active output
S4045 S4045P
1. System Configuration
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.
1-5
S4045 S4045P
1. System Configuration
3. Confirm by pressing YES, then wait for the message Now you can shutdown the CNC and take
off the feed.
1-6
S4045 S4045P
1. System Configuration
WARNING!!
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
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.
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).
Displaying axis dimensions data, auxiliary functions and technological functions, origins, program
and drawing data.
B.
C.
D.
B
C
1-8
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.
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.
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 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-10
S4045 S4045P
1. System Configuration
on the
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.
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.
1-12
S4045 S4045P
2. Machine preset commands
2-1
S4045 S4045P
2. Machine preset commands
2-2
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.
Press START on the external console or with the PLC buttons (D area of the video, if provided by
the manufacturer).
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.
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
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.
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-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
S4045 S4045P
2. Machine preset commands
2-7
S4045 S4045P
2. Machine preset commands
T5 TOOL
T5 TOOL
T5 TOOL
PIECE
PIECE
PIECE
2-8
S4045 S4045P
2. Machine preset commands
PIECE
MACHINE
MACHINE
ZERO PIECE
2-9
S4045 S4045P
2. Machine preset commands
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
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
S4045 S4045P
2. Machine preset commands
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.
2-11
S4045 S4045P
2. Machine preset commands
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).
2-12
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
RETURN
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.
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
S4045 S4045P
2. Machine preset commands
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:
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
S4045 S4045P
2. Machine preset commands
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 INHIBIT
SPECIAL
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
FATHER
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
WORD #2
FLOAT #1
FLOAT #2
DESCRIPTION
2-17
S4045 S4045P
2. Machine preset commands
2.8
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
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
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:
2-19
S4045 S4045P
2. Machine preset commands
3.
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)
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
2-21
S4045 S4045P
2. Machine preset commands
3. Press the PROGRAM PARAMS Soft key. A screen page similar to the following will appear:
2-22
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.
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.
2-23
S4045 S4045P
2. Machine preset commands
2-24
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:
Abscise
for points:
For circles:
For lines:
Ordinal
for points:
For circles:
For lines:
Distance
for points:
For circles:
For lines:
For distances:
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
S4045 S4045P
3. Programming and editing operations
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
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:
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
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.
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
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.
and
Programs in random order in the list can be selected as follows: select the programs with the mouse or
touch screen holding the button
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
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:
The same window will appear also by clicking the yellow folder icon in the top right of the video:
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:
3-6
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:
D:\S4000\Partprog
A:\
G:\
F:\ or H:\
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.
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
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:
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.
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
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
Enter the correct file or folder name to be sought. It will be automatically shown in the list. Otherwise,
the following will appear:
3-11
S4045 S4045P
3. Programming and editing operations
2. Press the EDIT PROGRAM soft key. A screen page similar to the one below will appear:
3-12
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
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.
3-13
S4045 S4045P
3. Programming and editing operations
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
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
).
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
S4045 S4045P
3. Programming and editing operations
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
TWO SHEETS
To copy blocks
CLIPBOARD
To paste blocks
ARROW BACK
To undo operations
ARROW FORWARD
To undo "undo"
3-15
S4045 S4045P
3. Programming and editing operations
BINOCULARS
To find a string
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
PRINTER
To print the program list
+N12
-N12
To renumber a program
3-16
S4045 S4045P
3. Programming and editing operations
1. Press the ADVANCED FUNCTIONS soft key. The following menu will appear:
3-17
S4045 S4045P
3. Programming and editing operations
3-18
S4045 S4045P
3. Programming and editing operations
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).
START DRAWING
STOP DRAWING
SAVE IMAGE
3-20
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.
3-21
S4045 S4045P
3. Programming and editing operations
3-22
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-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.
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
3-24
S4045 S4045P
3. Programming and editing operations
2. Press the GRAPHIC EXECUT soft key. A screen page like the one below will appear:
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
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
S4045 S4045P
3. Programming and editing operations
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.
3-27
S4045 S4045P
3. Programming and editing operations
3-28
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:
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.
3-29
S4045 S4045P
3. Programming and editing operations
3-30
Available window menu. Press the button. The following window will appear:
S4045 S4045P
3. Programming and editing operations
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 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).
3-31
S4045 S4045P
3. Programming and editing operations
3-32
S4045 S4045P
3. Programming and editing operations
Press NEW. Enter the required program name (e.g. CONV) and press OK.
The menu will appear:
3-33
S4045 S4045P
3. Programming and editing operations
3-34
S4045 S4045P
3. Programming and editing operations
Enter the required part origin number (e.g.: 1) and press OK. The following line will appear in the
program:
O1
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).
3-36
S4045 S4045P
3. Programming and editing operations
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:
3-37
S4045 S4045P
3. Programming and editing operations
The following
softkeys will appear :
3-38
S4045 S4045P
3. Programming and editing operations
Select the type of fixed cycle (drilling, mixed deep drilling, deep drilling, tapping, boring, etc.).
Enter the required parameters. The OK key cannot be pressed to continue until all the yellow fields
have been filled in.
Example:
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:
3-40
S4045 S4045P
3. Programming and editing operations
3-41
S4045 S4045P
3. Programming and editing operations
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
S4045 S4045P
3. Programming and editing operations
Set the Z release values, the X and Y positions and the Z part approach.
Example:
Press OK.
3-43
S4045 S4045P
3. Programming and editing operations
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.
3-44
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:
3-45
S4045 S4045P
3. Programming and editing operations
Enter the value in the required position. The other field will go out.
3-46
S4045 S4045P
3. Programming and editing operations
Enter the value in the required position. The other fields will go out.
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:
3-48
S4045 S4045P
3. Programming and editing operations
Enter the X and Y co-ordinate of the profile detachment point and the type of output (linear or circular).
3-49
S4045 S4045P
3. Programming and editing operations
Press OK.
The following will appear in the program:
Z200 R
3-50
S4045 S4045P
3. Programming and editing operations
3-51
S4045 S4045P
3. Programming and editing operations
2. Press EDIT PROGRAM. A window similar to the one below will appear:
3-52
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.
5.
3-53
S4045 S4045P
3. Programming and editing operations
6.
3-54
S4045 S4045P
3. Programming and editing operations
2.
3.
4.
Go to the program or folder to be archived with the touch screen, mouse or up/down arrows.
Example:
5.
6.
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
S4045 S4045P
3. Programming and editing operations
9.
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:
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:
3-58
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.
3-59
S4045 S4045P
3. Programming and editing operations
7.
Press Select all. All programs will appear blue and reversed:
8.
3-60
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.
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
S4045 S4045P
3. Programming and editing operations
8.
This window will appear if the last diskette is actually inserted. Otherwise, the following window will
appear:
Select the program and press Extract. Then press OK. The following window will appear:
3-63
S4045 S4045P
3. Programming and editing operations
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
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.
3-65
S4045 S4045P
3. Programming and editing operations
2.
3-66
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.
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
S4045 S4045P
3. Programming and editing operations
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
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
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
S4045 S4045P
3. Programming and editing operations
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.
3-71
S4045 S4045P
3. Programming and editing operations
3.11.3
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
S4045 S4045P
3. Programming and editing operations
REMOTE DISK
This window contains information on the programs stored on the external PC.
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.
3-73
S4045 S4045P
3. Programming and editing operations
LOCAL DISK
This window contains information on the programs on the S4000 HDD.
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
S4045 S4045P
3. Programming and editing operations
The message OPTION NOT ENABLED. CONTACT SELCA will appear if either of the two softkeys
are pressed and the optional features are not installed.
3-75
S4045 S4045P
3. Programming and editing operations
3-76
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:
4-1
S4045 S4045P
4. Execution commands
2. Enter the block to run and press START (external console or PLC function buttons, area D in the
video, where fitted).
Press
4-2
or click the rotating "Selca" icon to quit and return to MACHINE TOOL environment.
S4045 S4045P
4. Execution commands
1.
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.
4-3
S4045 S4045P
4. Execution commands
4-4
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.
Press START. If the axes have not been correctly repositioned the control
will signal an error condition:
E92: axis off position
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).
4-5
S4045 S4045P
4. Execution commands
2. Select the required program with the touch screen, the mouse or buttons
and
4-6
S4045 S4045P
4. Execution commands
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 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
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-9
S4045 S4045P
4. Execution commands
4-10
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:
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:
4-12
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.
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-14
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-15
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:
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
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.
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
S4045 S4045P
4. Execution commands
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
S4045 S4045P
4. Execution commands
4.
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.
S4045 S4045P
PART II
PROGRAMMING
S4045 S4045P
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.
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
1-2
S4045 S4045P
1. General
X or Y
+-
(+) 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.
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.
1-3
S4045 S4045P
1. General
1-4
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:
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
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.
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=
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.
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
S4045 S4045P
2. Basic programming
M45
M46
M48
M49
CODE
PROGRAMMED
AT BLOCK
BEGINNING
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.
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.
G18:
2-6
S4045 S4045P
2. Basic programming
G19:
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-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.
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-8
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
2-9
S4045 S4045P
2. Basic programming
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
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-11
S4045 S4045P
2. Basic programming
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
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)
P1
P1
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.
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
S4045 S4045P
2. Basic programming
minimum speed
Q...
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.
2-15
S4045 S4045P
2. Basic programming
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...
G50 disables the secondary origin and restores the primary part origin.
2-16
S4045 S4045P
2. Basic programming
Examples:
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...
2-17
S4045 S4045P
2. Basic programming
co-ordinates of the new co-ordinate system origin measured from the current origin.
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
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).
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).
2-19
S4045 S4045P
2. Basic programming
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
S4045 S4045P
2. Basic programming
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
2-21
S4045 S4045P
2. Basic programming
2.15.2
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
3.
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).
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.
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).
2-23
S4045 S4045P
2. Basic programming
XY
Q
J
Restoring previous
spindle rotation
G84
Z...J...F...[Q...][K...][I][X...Y...][D8=]
[D9=1]
Spindle reversal
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
S4045 S4045P
2. Basic programming
XY
Q
G85
Z...J...[Q...][K...][F...] [X...Y....][D9=1][D8=]
Dwell K
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.
2-25
S4045 S4045P
2. Basic programming
ZR
G88 X...Y...Z...J...[K...][F...][D8=]
J
Z
J1
2-26
S4045 S4045P
2. Basic programming
M30
L1
G88 J2 Z-12
J-18 Z-32
J-38 Z-52
G80 Z2 R
G32
G89
ZJ[I][K][Q][F]
[S][XY][D9=1][D10=]
[D14=][D15=][D16=]
[D17=][D18=][D19=]
[D20=][D21=]
[D22=][D23=]
2-27
S4045 S4045P
2. Basic programming
G89
XY
Default
Z/Y/X
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=
D20=
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=
2-28
Q=J
0
S4045 S4045P
2. Basic programming
2.
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).
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
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
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
S4045 S4045P
2. Basic programming
2.18
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.
2-31
S4045 S4045P
2. Basic programming
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=
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
S4045 S4045P
2. Basic programming
Example:
G751 TRS X-25 ROT Y-45
G751 TRS X30 ROT Y90
D1=...
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.
2-33
S4045 S4045P
2. Basic programming
Press UTILITY
2-34
S4045 S4045P
2. Basic programming
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.
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.
2-36
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
3-1
S4045 S4045P
3. PROGET2 programming
K1
second circle
left
K1
right
K2
first circle
C1
P1
15
3-2
27
S4045 S4045P
3. PROGET2 programming
Clockwise circle
Y
C1
P1
20
12
24
Y
P2
L1
P1
21
15
C1
K1 may be omitted.
To start the circular path in P2:
G20 X25 Y21 I-15 K2
25
P1
23
13
C2
13
P2
15
29
3-3
S4045 S4045P
3. PROGET2 programming
L1
T1
P
C1
T2
L2
L1
T1
C1
L2
T2
L4
T2
L1
C2
L3
T1
C1
L2
3-4
S4045 S4045P
3. PROGET2 programming
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...
25
P2
10
G11 X8 Y10
L1
35
3-5
S4045 S4045P
3. PROGET2 programming
G10 X8 Y12
P2
30
L1
P3
20
L2
12
P1
31
45
G10 X9 Y34
P1
34
28
C1
G20
15
L2
G11 X31 Y6
P2
6
0
31
40
Y
L1
C2
34
15
L3
C1
20
Straight line L2
G10 X18 Y20 I10
G11 X57 Y34 I15
Straight line L3
G10 X57 Y34 I-15
G11 X18 Y20 I10
Straight line L4
G10 X18 Y20 I10
G11 X57 Y34 I-15
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
S4045 S4045P
3. PROGET2 programming
40
P4
P3
24
15
P2
20
C1
P1
55
30
Y
L1
40
P4
P3
P2
24
15
20
P1
C1
30
55
Angle (in degrees) formed by the X-axis and the oriented straight line (as shown in the
examples).
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.
15
Lx
35
0
30
15
or
35
0
X
35
-145
17
3-8
15
26
S4045 S4045P
3. PROGET2 programming
15
17
or
15
Lx
-165
0
26
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
25
30
3-9
S4045 S4045P
3. PROGET2 programming
25
10
40
3-10
45
30
S4045 S4045P
3. PROGET2 programming
10
22
150
40
30
30
17
130
30
33
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
3-11
S4045 S4045P
3. PROGET2 programming
Y
15
10
21
12
32
6
12
27
10
23
5
40
22
18
17
13
6
12
7
3-12
20
30
S4045 S4045P
3. PROGET2 programming
G42
K...
I1
Convex edges automatic rounding off with a linking radius equal to mill radius
Q...
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
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).
S4045 S4045P
3. PROGET2 programming
X55 Y45
G41
G20 X20 Y35
G13 J-45
45
[P1
[L1
35
P1
L1
45
0
55
20
Y
L2
X15 Y10
G42
G13 X0 Y32 J-20 [L1
G13 X34 Y0 J-70 [L2
70
32
20
P1
L1
10
0
15
34
X34 Y37
G41 K1
G20 X17 Y16 I-12 [C1
37
C1
12
16
17
34
3-15
S4045 S4045P
3. PROGET2 programming
X34 Y37
G41 K2
G20 X17 Y16 I-12
37
C1
12
16
17
34
X26 Y38
G41 K2
G13 X37 Y0 J-45
38
L1
45
0
26
37
3-16
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.
L2
G13 X0 Y32 J-20
G13 X34 Y0 J-70
G40
X15 Y10
70
32
20
[L1]
[L2]
P1
L1
10
0
15
34
30
L1
20
10
0
P1
40
70
3-17
S4045 S4045P
3. PROGET2 programming
45
P1
23
Profile exit along the straight line
perpendicular to L1 in the point P1.
L1
37
P1
24
L1
37
3-18
S4045 S4045P
3. PROGET2 programming
Examples:
1. Perpendicular axis motion during an automatic approach:
G41 K1 Z-5
G41 K2 Z-5
G42
G20 X...Y...Z-5
G13 X...Y...J...
G13 X...Y...J...
Z-5
G13 X...Y...J...
G42
G20 X...Y...
Z-5
G13 X...Y...J...
G20 X...Y...I...Z-5
G21 I...Z-12
3-19
S4045 S4045P
3. PROGET2 programming
G20 X...Y...I...
Z-5
G21 I...
Z-12
G40 K2 X...Y...Z10
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.
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
S4045 S4045P
3. PROGET2 programming
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-21
S4045 S4045P
3. PROGET2 programming
Examples:
Y
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
20
E6
40
15
5
0
3-22
15
S4045 S4045P
3. PROGET2 programming
Y
E8
E9
E10=E8, E9
E1
0
Y
E2
E1
E3
E3=E1, E2
E4=E1, E2 K2
E4
3-23
S4045 S4045P
3. PROGET2 programming
E3
E4
E3=E1, E2
E4=E1, E2 K2
E2
Y
E4 = E3 I0
E3
E4
3-24
S4045 S4045P
3. PROGET2 programming
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
E7
E6
12
45
0
30
3-25
S4045 S4045P
3. PROGET2 programming
E12
E10
15
60
0
15
33
E5
E1
9
E6
15
38
E4
E2
10
24
E1
13
3-26
14
46
S4045 S4045P
3. PROGET2 programming
32
E8
E9
20
10
45
15
E9
E7
20
E8
15
45
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
E2 = - E1
E2
3-28
S4045 S4045P
3. PROGET2 programming
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-29
S4045 S4045P
3. PROGET2 programming
Example:
Ec = G20 Ep I...
Y
E4
9
17
19
E1
11
30
E2
26
11
E3
E7
E2
3-30
7
X
S4045 S4045P
3. PROGET2 programming
E1
E3
E3
E1
E2
10
E5
3-31
S4045 S4045P
3. PROGET2 programming
10
E6
10
E4
E5
E6
E2
E3
3-32
S4045 S4045P
3. PROGET2 programming
E4
E5
E6 = G21 E5, E4
E6
E5
E6 = G21 E5, E4
E4
Y
E6
E5
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
E1
E2
E2 = - E1
3-34
S4045 S4045P
3. PROGET2 programming
E4 = E1, E2, E3
E1
E1 = G13 X0 Y20 J0
E2 = G20 X40 Y20 I15
E3 = E1, G20 X18 Y20, E3
E1
E2
E3
Eo = G51 X...Y...J...
Indirect definition
Eo = G51 Ep J...
3-35
S4045 S4045P
3. PROGET2 programming
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
3-36
S4045 S4045P
3. PROGET2 programming
E1
2.
E3=G20XY,G20XY
E3=E1,E2
+ E2
E3
E1
+
E2
E3=G20XY,G13XYJ
E3=E1,E2
E3
3.
E3=G13XYJ,G13XXJ
E3=E1,E2
E1
E2
E3
The distance value is read in the parameters wth the format Pn=Em
3-37
S4045 S4045P
3. PROGET2 programming
3-38
S4045 S4045P
3. PROGET2 programming
The program must be closed by a G29 code with the following format:
G29 X...Y...[Q...]
where:
X...Y...
Q...
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
subsequent points.
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.
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
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
P3 = 24
P3 = 15
equivalent to P24 = 15
4-1
S4045 S4045P
4. Logical mathematical programming
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 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
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
4-3
S4045 S4045P
4. Logical mathematical programming
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)
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-4
S4045 S4045P
4. Logical mathematical programming
If the Pn = ? instruction is followed by a comment this will appear in zone C of the screen.
4-5
S4045 S4045P
4. Logical mathematical programming
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
4-6
S4045 S4045P
4. Logical mathematical programming
Example:
{P1=P1} L99
4-7
S4045 S4045P
4. Logical mathematical programming
Example:
.....
.....
L=12
.....
.....
.....
L12 K8
definition of label 12
4-8
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-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 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 !! :
Program FIERA
Program DEMO
L\SELCA\DEMO;
L\SELCA\PROG1;
L\SELCA\PROG2;
L\SELCA\PROG3;
.......
4-10
S4045 S4045P
4. Logical mathematical programming
4-11
S4045 S4045P
4. Logical mathematical programming
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
and
STRING
#
4-12
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
P...
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
.........
4-13
S4045 S4045P
4. Logical mathematical programming
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
S4045 S4045P
4. Logical mathematical programming
).
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
.........
4-15
S4045 S4045P
4. Logical mathematical programming
4-16
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
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-2
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...
I...
finish stock allowance. Removed only if the finishing pass G79 is requested.
J...
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=...
D4=...
D6=...
D7=...
D9=
withdrawal value from pocket walls during tool out movement at end of cycle.
D9=0.5 mm by default.
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...
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
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
5-5
S4045 S4045P
5. Advanced programming or macro instructions
where:
X...Y...
K...
I...
finish stock allowance (I=0 by default) removed only if G79 requests a finishing pass.
Q...
internal diameter.
J...
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=...
D4=...
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=...
D9=...
withdrawal value from pocket walls during tool out movement at end of cycle.
D9=0.5 mm by default.
* D10=...
* D11=...
* D12=...
5-6
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
.....
5-7
S4045 S4045P
5. Advanced programming or macro instructions
J...
starting depth.
I...
pass depth.
Q...
D1=...
D2=...
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=...
D5=...
D6=...
pass stop distance from the external profile (by default D6=0.2).
D7=...
5-8
S4045 S4045P
5. Advanced programming or macro instructions
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...
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.
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
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
.....
pocket profile
profile end
starts milling cycle
tool rapid out
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.
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
......
5-12
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=...
D2=...
depth increment.
D3=...
D4=...
D5=...
radius value for tool automatic approach and exit when the contour finish pass is
performed. Default value D5=I (stock allowance).
D6=...
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.
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...
...
5-14
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)
I...
X...Y...
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.
5-15
S4045 S4045P
5. Advanced programming or macro instructions
Example:
G711 K31
G41/G42 [K1][K2]
...
...
...
G40 [K...][X...][Y...]
G710
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
K...
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
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
J...
K...
Q...
D0=...
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).
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
K...
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
...
...
5-18
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.
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...
D1=...
D2=...
D3=...
D4=...
D5=...
D6=...
D5
D3
D1
No. of holes
on the line
5-19
S4045 S4045P
5. Advanced programming or macro instructions
D1=...
D2=...
D3=...
D4=...
D5=...
D6=...
D7=...
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
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
The machining cycle will not be repeated on the fourth point of the grid.
5-20
S4045 S4045P
5. Advanced programming or macro instructions
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...
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=...
D5=...
D5=1
D3
D4
Y
D2(+/-)
D1=No. of holes
X
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=...
D5=...
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.
I...J...K...
Q...
5-22
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=
D1=
D2=...
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=
D4=
D5=...
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.
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
S4045 S4045P
5. Advanced programming or macro instructions
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
5-25
S4045 S4045P
5. Advanced programming or macro instructions
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-26
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...
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.
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-28
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
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.
point co-ordinates.
I...
J...
K...
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...
J...
Q...
A cylindrical mill may be considered a toroidal mill with cutter radius J=0.
Example:
G49 I10 Q10
G49 I40 J10 Q10
Q
I
I
G49 I...
5-30
I
G49 I... Q...
S4045 S4045P
5. Advanced programming or macro instructions
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.
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.
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
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:
where:
A and B
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...
D0=1
D1=
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
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:
where:
ABC
D0=1
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=...
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:
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
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.
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.
distance between passes on the section profile that contains the K1 parameter (in G737).
X...Y...
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...
D0=...
D1=...
D2=...
D3=...
spiral milling cord error used to divide a circumference arch into various segments (default
0.01mm).
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...
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
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
......
G737 Q1
G41
G13 Y0 J0
...
...
G13 X...Y...J...
G13 Y-50 J0
G40
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
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-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.
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...
X...Y...
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...
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.
Z...
5-39
S4045 S4045P
5. Advanced programming or macro instructions
I...
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...
Z...
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
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-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
P5
P5 = clearance depth
P6 = engraving (cutting) depth
P6
0 part Z
Y
P9
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
S4045 S4045P
5. Advanced programming or macro instructions
Position of circular engraving:
P7 =
P8 =
P9 =
P10 =
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
5-43
S4045 S4045P
5. Advanced programming or macro instructions
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
Y...
Z...
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=...
D2=...
D3=...
D4=...
D5=...
D6=...
D7=...
5-44
S4045 S4045P
5. Advanced programming or macro instructions
D8=...
D9=...
D10=...
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
5-45
S4045 S4045P
5. Advanced programming or macro instructions
open cycle
close cycle
repetition of profile
K1:
profile repeated with constant Z
K2:
profile not repeated. If not programmed: K=1
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
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
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
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.
5-47
S4045 S4045P
5. Advanced programming or macro instructions
where:
L ..
number of the internal subprogram (from L=0 to L=99) or name of the external
subprogram (LNAME:)
Warning!
G73 L1
XY
XY
XY
G72
M30
L=1
G32
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
S4045 S4045P
5. Advanced programming or macro instructions
J...
Q...
K ...
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.
5-49
S4045 S4045P
5. Advanced programming or macro instructions
Example with K1
Example with K2
5-50
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.
5-51
S4045 S4045P
5. Advanced programming or macro instructions
5-52
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
6-1
S4045 S4045P
6. Special functions
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...
6-2
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.
6-3
S4045 S4045P
6. Special functions
6-4
S4045 S4045P
6. Special functions
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.
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
E11=G10XP20YP21,G11XP23YP24
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
S4045 S4045P
6. Special functions
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
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
S4045 S4045P
6. Special functions
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.
6-9
S4045 S4045P
6. Special functions
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
6-10
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-11
S4045 S4045P
6. Special functions
6-12
S4045 S4045P
PART III
PROGRAMMING
EXAMPLES
S4045 S4045P
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
S4045 S4045P
1. PROGET2 Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
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
S4045 S4045P
1. PROGET2 Programming
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
1-15
S4045 S4045P
1. PROGET2 Programming
1-16
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
1-17
S4045 S4045P
1. PROGET2 Programming
1-18
S4045 S4045P
2. Logical mathematical programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
N22
N23
2-1
S4045 S4045P
2. Logical mathematical 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
2-2
S4045 S4045P
2. Logical mathematical 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
[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
2-3
S4045 S4045P
2. Logical mathematical 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
2-4
S4045 S4045P
2. Logical mathematical 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
[Origin 1
[Call tool 11
[Technological data
[Tool radius = 2
[Rapid positioning
[Feed down
[Circular approach left of L1
[L1
[R10
[L2
[R-5
2-5
S4045 S4045P
2. Logical mathematical 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
2-6
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
2-7
S4045 S4045P
2. Logical mathematical 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
2-8
S4045 S4045P
2. Logical mathematical 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 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
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
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
2-11
S4045 S4045P
2. Logical mathematical 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
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
S4045 S4045P
2. Logical mathematical 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
[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
2-13
S4045 S4045P
2. Logical mathematical 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
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
S4045 S4045P
2. Logical mathematical programming
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
2-15
S4045 S4045P
2. Logical mathematical programming
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
S4045 S4045P
2. Logical mathematical 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
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
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
3-1
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
3-2
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
3-3
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
3-4
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
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
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
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
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
N28
N29
N30
N31
N32
N33
N34
N35
N36
N37
G13Y20J0
G13X-130J90
G13X0Y0J-45
G13Y80J0
G21I-20
G13X250J-90
G40X200Y0K2
G78
Z100R
M30
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
N29
N30
N31
G78
Z100R
M30
3-9
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-10
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
3-11
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
3-12
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
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
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
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
3-15
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
3-16
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
3-17
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
3-18
S4045 S4045P
3. Advanced Programming
N1
N2
N3
N4
N5
N6
N7
N8
N9
3-19
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
3-20
[grid parameters
[figures not to be executed
[machining recall
[machining
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
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
S4045 S4045P
3. Advanced Programming
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
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
3-25
S4045 S4045P
3. Advanced Programming
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
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
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
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
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
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
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
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
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
S4045 S4045P
3. Advanced Programming
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
S4045 S4045P
3. Advanced Programming
50
10
30
10
50
10
15
50
100
100
10
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
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
3-35
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
3-36
S4045 S4045P
3. Advanced Programming
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
S4045 S4045P
3. Advanced Programming
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
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
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-42
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
3-43
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
3-44
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
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
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
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
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
3-47
S4045 S4045P
3. Advanced Programming
3-48
S4045 S4045P
4. Complete Programming Example
N1
N2
N3
N4
N5
N6
N7
N8
N9
N10
N11
N12
N13
N14
N15
N16
N17
N18
N19
N20
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
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
4-3
S4045 S4045P
4. Complete Programming Example
4-4
S4045 S4045P
APPENDICES
S4045 S4045P
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
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
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
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.
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
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
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:
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:
B-4
S4045 S4045P
Appendix B - Diagnostic messages
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:
B-5
S4045 S4045P
Appendix B - Diagnostic messages
B-6
S4045 S4045P
Appendix B - Diagnostic messages
E 1214:
E 1216:
E 1218:
E 1220:
E 1222:
E 1224:
E 1226:
B-7
S4045 S4045P
Appendix B - Diagnostic messages
E 2045:
E 2046:
E 2047:
E 2048:
B-8
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 #
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
B-9
S4045 S4045P
Appendix B - Diagnostic messages
B-10
S4045 S4045P
Appendix C - System malfunctions and corresponding remedies
Displayed message
Gray-code feedback error
from absolute transducer:
axis ...
1002
1003
1004
feedback discontinuity:
axis ...
1005
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
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
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
Displayed message
interpolator overrun: next
block not ready
Possible sources
wrong NC configuration
CPU Master breakdown
1113
component breakdown
1116
component breakdown
1130
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
Displayed message
spindle analog feedback
signal too high
1033
1034
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
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
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
1304
1310
1312
1314
1316
1318
1320
1322
1324
C-3
S4045 S4045P
Appendix C - System malfunctions and corresponding remedies
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
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.
S4045 S4045P
Appendix C - System malfunctions and corresponding remedies
Displayed message
Gray-code error from
absolute transducer: PLC
axis ...
1062
1063
1064
1066
1067
feedback device
malfunction: PLC axis ...
1068
1069
1070
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
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
Remedy
replace digitizing probe
check connection cable
check digitizing board
connect cable
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
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
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
S4045 S4045P
Appendix C - System malfunctions and corresponding remedies
1401
1402
Message
Cause
1405
1406
1407
1408
1410
1411
Drive #,
IDN...,
S.C.err(SRCERM)=...,
error(SRCERR)=...
1412
1421
1422
1450
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
C-7
S4045 S4045P
Appendix C - System malfunctions and corresponding remedies
C-8