Вы находитесь на странице: 1из 52

KSE 5V

KSE PCA

ISO 6983 programming


language for the KSE CNCs

Reference Manual

Know-how for the industries


ISO 6983 Programming Language for the KSE CNCs
Reference Manual 2.1
ISO6983REFMANKSECNC
® 2.1/2015

Feb 2015

All rights reserved. For the most recent version of this manual please visit:
http://www.kse.it/manuals.html

KSE S.r.l
Via Sabbionara, 14/D
36045 Alonte (VI)
Tel. 0444.834077
mail: kse@kse.it – web: www.kse.it
Notices: The information in this document is subject to change without
notice. NO WARRANTY OF ANY KIND IS MADE WITH REGARD TO
THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. No liability is assumed for errors
contained herein or for incidental or consequential damages in connection
with the furnishing, performance, or use of this material. This document
contains proprietary information that is protected by copyright. All rights
are reserved. No part of this document may be photocopied, reproduced, or
translated into another language without prior written consent.

Printing History
Edition 2.1, #022015, All rights reserved.
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to
prevent damage to property. The notices referring to your personal safety are highlighted in the manual by
a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices
shown below are graded according to the degree of danger.

 DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

 WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not
taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not
taken.

NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.

If more than one degree of danger is present, the warning notice representing the highest degree of
danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a
warning relating to property damage.

Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning
and operation of a device/system may only be performed by qualified personnel. Within the context of the
safety notes in this documentation qualified persons are defined as persons who are authorized to
commission, ground and label devices, systems and circuits in accordance with established safety
practices and standards

Proper use of KSE products


Note the following:

WARNING
KSE products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be
recommended or approved by KSE. Proper transport, storage, installation, assembly, commissioning,
operation and maintenance are required to ensure that the products operate safely and without any
problems. The permissible ambient conditions must be adhered to. The information in the relevant
documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of the KSE S.r.l. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of
the owner.

Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However,
the information in this publication is reviewed regularly and any necessary corrections are included in
subsequent editions.

KSE S.r.l. ISO6983REFMANKSECNC Copyright © KSE S.r.l.


Via Sabbionara, 14/D ® 2.1/022015 Technical data subject to change
36045 Alonte (VI)
ITALY
Preface

Purpose
This manual is your guide to creating user programs using the ISO 6983 language.
The manual also includes a reference section that describes the syntax and
functions of the language elements of the ISO 6983 programming language.
Basic Knowledge Required

The manual is intended for CNC programmers, operators, and maintenance/


service personnel. In order to understand this manual, general knowledge of
automation technology is required. In addition to, computer literacy and the
knowledge of other working equipment similar to the PC (e.g. programming
devices) under the operating systems MS Windows XP, MS Windows Server 2003
or MS Windows 7 are required.
Scope of the Manual
This manual is valid for the following CNCs of KSE: KSE-5V, KSE-PCA.
Compliance with Standards

ISO 6983 programming language corresponds to the ISO 6983 standard.

Documentation

Updated publications with respective available languages can be found in the


Internet under:
http://www.kse.it/download
General information can be found in internet under:
http://www.kse.it/contacts
Target group
This publication is intended for:

 Project engineers
 Technologists (from machine manufacturers)
 System startup engineers (Systems/Machines)
 Programmers
Standard version
This documentation only describes the functionality of the standard version.
Extensions or changes made by the machine tool manufacturer are documented
by the machine tool manufacturer.

Reference Manual 1
Other functions not described in this documentation might be executable in the
control. This does not, however, represents an obligation to supply such functions
with a new control or when servicing.
Further, for the sake of simplicity, this documentation does not contain all detailed
information about all types of the product and cannot cover every conceivable case
of installation, operation or maintenance.
Technical Support

If you have any technical questions, please contact our hotline:

 Phone +39 0444 834077


 Internet http://www.kse.it
 E--Mail mailto:kse@kse.it
Questions about the manual

If you have any queries (suggestions, corrections) in relation to this documentation,


please e--mail to the following address:
E--Mail mailto: kse@kse.it
KSE Internet address : http://www.kse.it

Reference Manual 2
Table of Contents

1 Overview ............................................................................................................. 1
1.1 The ISO programming language ................................................................ 1
1.2 Programming fundamentals ....................................................................... 1
2 Axes functions .................................................................................................... 5
3 Spindle functions................................................................................................. 6
4 Preparatory functions ......................................................................................... 8
4.1 Rapid traverse .......................................................................................... 10
4.2 Linear interpolation ................................................................................... 11
4.3 Circular interpolation................................................................................. 12
4.4 Dwell time ................................................................................................. 14
4.5 Work plane selection ................................................................................ 15
4.6 Constant pitch threading .......................................................................... 16
4.7 Select zero offset ...................................................................................... 19
4.8 Absolute and Incremental programming .................................................. 22
4.9 Rigid Tapping ........................................................................................... 23
4.10 Origin offset definition ............................................................................. 24
5 Miscellaneous Functions .................................................................................. 25
6 Subroutine ........................................................................................................ 27
7 R Data ............................................................................................................... 30
8 Tools offset ....................................................................................................... 32
9 Special functions............................................................................................... 34

Reference Manual 3
ISO 6983 language for the KSE CNCs

1 Overview

1.1 The ISO programming language

The ISO 6983, also called "ISO code" or "G code", is a standard language for CNC
programming. Although many dialects exist, they all refer to the ISO 6983 standard
which defines the core elements of the language.
The ISO code is a generic language, suitable for programming milling machines,
turning machines and machine tools of manufacturers from all over the world.
The standard language ISO 6983 is not, however, a requirement for use by
manufacturers and other standards are in use, e.g. DIN 66025 and PN-73M-55256
and PN-93/M-55251.
The ISO code easily lends itself to automatic resolution of the geometry of the
plane, programming with virtual entities, parametric programming, tool offset
management with rotating tables/heads, etc.
This manual refers to the KSE-ISO dialect as implemented with the KSE-PCA and
KSE-5V CNCs. For the KSE-3A CNC a reduced set of the ISO functions is also
available.

1.2 Programming fundamentals

P rog r am st ru ct u r e The program structure is based on ISO 6983. A program comprises a complete
sequence of blocks which define the sequence of operations of a machining
process on a numerically controlled machine tool.
A program comprises:
• The character for beginning of program (%)
• A number of blocks
• The end of program block.
The character for beginning of program (%) precedes the first block in the part
program. The character for end of program is contained in the last block of the part
program. Subroutines and cycles can be components of the program. These can
be created either by the machine manufacturer or by KSE.
The ISO interpreter of the CNC reads the entire program and executes a block at a
time, from the Begin to the End of program.

Reference Manual 1
ISO 6983 language for the KSE CNCs

A program can be edited either directly on the CNC or more frequently using a text
editor on a PC. In this case, the program needs to be transferred to the CNC.
Moreover, many CAD programs generate ISO-code that can be directly executed
by the CNC.
Program example:
N00 %100 (Start block)
N05 G0 X0 Y0 Z0 (First block)
N10 G01 X100 Y100 S1000 F250 M03 (Second block)
N15 Z100 (Third block)
N20 G0 Z0 (Fourth block)
M30 (End block)

Blo c k fo r mat A block contains all data required to execute a working step. The block comprises
several functions and the ”Line Feed” character for “end of block”. The block length
is max. 120 characters. The block in its entirety can span over several screen lines.
Blocks can be numbered using the address N followed by number (Nnn) or with the
“:” character. Programming without a block number is possible, but the jump
function can be implemented only by means of block numbers.
Each block must be terminated with the “Line Feed” end-of-block character. This
character does not appear on the screen.
Each block is executed in one single step.
Block example:
N10 G01 F250 X100 Y100 S1000 M03
Com me nts The blocks in a program can be explained by means of comments. Comments
document a program block and are not displayed. A comment must be enclosed in
round brackets "(..)". If the ")" is missing, the comment reaches the end of the
block. No percentage characters ”%” or additional brackets ”( )” are permitted
within the comment. Comments must not be located between the address and a
digit or between a function and the associated value.
Funct ion s A function is an element of a block. It comprises a key character and a string of
digits. The key character is a letter. The string of digits can include signs and
decimal points. A sign is written between the address letters and the string of
digits. A positive sign can be omitted
Function example:

G01 G = Function address


01 = Function value

The effective order of execution of the functions within a block is established at


run-time by the ISO interpreter.
M odal fun ct ion s Functions can be modal and non-modal. The effects of modal functions remain
valid during and after the execution of the current block. To alter or stop a modal
function, a new command of the same type is required.
Non-modal functions remain valid only for the duration of the current block. No
further commands are required to modify or stop a non-modal function.

Reference Manual 2
ISO 6983 language for the KSE CNCs

IS O - Co de The following table lists the functions address used in the KSE ISO-Code
f unct ion s ad dr e ss

Address Description
% Start/end of program
( Comment
= R parameters assignment
* R parameters multiplication
/ R parameters division
+ R parameters sum
- R parameters subtraction
A Not assigned
B B Axis position (absolute/incremental)
C C Axis position (absolute/incremental)
D Tool offset
E Not assigned
F Feed rate
G Preparatory command
H Not assigned
I X axis arc centre for G02/G03 commands
J Y axis arc centre for G02/G03 commands
K Z axis arc centre for G02/G03 commands
L Subroutine call
M Miscellaneous function
N Block number
O Zero offset
P Subroutine iteration
Q Q Axis position
R R Axis position
S Spindle speed/Stop position
T Tool number
U Circular interpolation radius
V V Axis position (absolute/incremental)
W W Axis position (absolute/incremental)
X X Axis position (absolute/incremental)/dwell time
Y Y Axis position (absolute/incremental)/dwell time
Z Z Axis position (absolute/incremental)/dwell time
@ KSE special function

Reference Manual 3
ISO 6983 language for the KSE CNCs

IS O - Co de fun ct ion Functions are grouped as: Position, Preparatory, Miscellaneous and Special. Each
grou ps function is detailed in the next pages.

Group Address Description


X, Y, Z, B, C Define Axis position and speed; Tools
Position
Q, V, W, F, T, D offsets
Define the details of commands
(linear/circular interpolation, spindle
Preparatory G
synchronization, work plane,
absolute/incremental position)
All other functions
(conditional/unconditional stop, end of
Miscellaneous M program), spindle functions,
machine/tool functions (tool change,
coolant…).
KSE special functions. Program
Special @ branch, Mathematical functions,
Special process

Reference Manual 4
ISO 6983 language for the KSE CNCs

2 Axes functions

Functions for axes movement require the following parameters:

 Axis to move (defined by function address)


 Axis target position (defined by function value)
 Axis speed (defined by other functions)
Functions address. Each function address is axis-specific:

 X X axis
 Y Y Axis
 Z Z Axis
 B B Axis
 C C Axis
 Q Q Axis
 W W Axis
The function value defines the target position (absolute/incremental). Values can
be expressed as integers (positive and negative) and floating point values.
E xa mpl e: X200 Y55.787 Z-80

Positions are expressed in mm for linear axes, and degrees for rotating axes.
The axis speed is defined with the F function, and can only be positive. Speed is
expressed as mm/min for linear axes, and as rpm for rotating axes.
E xa mpl e: F1000, F550.

The X, Y, …, W and F functions do not define the motion mode (linear/circular


interpolation, spindle synchronization). The motion mode is defined using the G
preparatory functions.
The X, Y, …, W functions are non-modal.
The F function is modal, i.e. once defined, the speed remains in use also in the
following blocks.
Not es: With KSE CNCs, the programmed speed can be overridden using the control panel
commands.

Reference Manual 5
ISO 6983 language for the KSE CNCs

3 Spindle functions

Spindle functions start and stop the spindle, define the spindle speed and change
the spindle position.
Starting a spindle requires the following data:

 direction of rotation (clockwise/counterclockwise)


 speed of rotation (in rpm)
Moving the spindle (changing the spindle orientation) requires a specific command
(M19).
Functions:

 M3 rotate spindle clockwise


 M4 rotate spindle counterclockwise
 M5 stop the spindle
 M19 move the spindle
The spindle speed is programmed with the S function. With the M3 and M4
functions, the S function value can assume only positive integers (in rpm).
E xa mpl e: S500, S1000, S3000

Sp ind le po si t io n: The spindle position is programmed with the M19 function. With the M19 function,
the S function defines the new spindle orientation in degrees. In this case, the
function values can be both integers (positive and negative) and floating point.
E xa mpl e: S200, S90, S-45.50.

The M3, M4, M5 functions are modal and each cancels the others.
The S function is modal, both for speed and orientation.
The M19 function is non-modal. After an M19 function, the spindle always stops
(the M5 function is not required). The M19 default speed is defined within the
System Data, and cannot be changed by the program. The M19 function can be
called both when the spindle is idle and when it is spinning. Calling the M19
function with a spinning spindle is called an oriented stop.
Not es: The change in the spindle orientation is available only for machines equipped with
a dedicated encoder. The change of spindle orientation is required for tools change
and rigid tapping.

With the KSE CNCs, the M19 speed can be overridden using specific control panel
commands.
E xa mpl e: N10 M3 S200 (Start clockwise rotation, speed 200 rpm)
N20 M4 (Invert rotation, maintain speed of 200 rpm)

Reference Manual 6
ISO 6983 language for the KSE CNCs

N30 M19 S45 (Stop spindle with an 45° angle)


N40 M3 (Start clockwise rotation, 200 rpm speed)
N50 S500 (Change speed to 500 rpm)
N60 M5 (Stop spindle)
N70 M19 (Change spindle orientation 45° angle)
N70 M4 (Start clockwise rotation, 500 rpm speed)
N80 M19 S90 (Oriented stop with 90° orientation)

Au x il i ar y sp ind l es The KSE-ISO can manage up to four spindles. The first spindle is also called the
main spindle; all others spindles are called auxiliary or secondary spindles. The
following functions have been introduced for the management of auxiliary spindles.
M2=3 2nd spindle clockwise start
M2=4 2nd spindle counterclockwise start
M2=5 Stop the 2nd spindle
M2=19 Move the 2ns spindle
S2=… Set the new speed/angle of the 2nd spindle
M3=3 3rd spindle clockwise start
M3=4 3rd spindle counterclockwise start
M3=5 Stop the 3rd spindle
M3=19 Move the 3rd spindle
S3=… Set the speed/angle of the 3rd spindle
M4=3 4th spindle clockwise start
M4=4 4th spindle counterclockwise start
M4=5 Stop the 4th spindle
M4=19 Move the 4th spindle
S4=… Set the new speed/angle of the 4th spindle

Note: The Mx and Sx functions can also be used with the main spindle:
M1=3 Main spindle clockwise start
M1=4 Main spindle counterclockwise start
M1=5 Stop the main spindle
M1=19 Move the main spindle
S1=… Set the speed/angle of the main spindle

Reference Manual 7
ISO 6983 language for the KSE CNCs

4 Preparatory functions

Preparatory functions (G functions) specify the details of other commands, as axes


motion (linear/circular interpolation, spindle synchronization…), work plane,
position change (absolute/incremental).
Within a block, only one G function is allowed. G functions can be both modal and
non-modal. For each group of G functions, a default modal function is defined and
active in a program.
The following table lists the KSE-ISO G functions. Default functions are highlighted
in red. Details of each G function are given in the next pages.
G rou p 1: M oda l
ax e s p os iti on

Function Description
G00 Rapid traverse
G01 Linear interpolation
G02 Circular interpolation, clockwise
G03 Circular interpolation, counterclockwise
G33 Constant pitch threading
G331 Rigid tapping
G332 Uncoupling after rigid tapping

G rou p 2: Non -
mod al dw el l t im e

Function Description
G04 Dwell time for spindle

G rou p 4: M oda l
w ork pl an e
se l ect ion

Function Description
G16 Default work plane (defined within the machine data)
G17 XY plane
G18 ZX plane
G19 YZ plane

Reference Manual 8
ISO 6983 language for the KSE CNCs

G rou p 8: Non
mod al z e ro of f s et
re s et

Function Description
G53 Reset the zero offset (G54, G55, G56, …)

G rou p 9: M oda l
z er o o ffs et
se l ect ion

Function Description
G54 Select zero offset
G55 Select zero offset
G56 Select zero offset
G57 Select zero offset
G254 Select zero offset
G255 Select zero offset
G256 Select zero offset
G257 Select zero offset
G454 Programmed zero offset
G455 Programmed zero offset
G456 Programmed zero offset
G457 Programmed zero offset

G rou p 1 0: Non -
mod al z e ro of f s et

Function Description
G58 Select zero offset
G59 Select zero offset
G354 Select zero offset with G454
G355 Select zero offset with G455
G356 Select zero offset with G454
G357 Select zero offset with G455

G rou p 1 5: M odal
dim en si on s et t i ng

Function Description
G90 Absolute programming
G91 Incremental programming

Reference Manual 9
ISO 6983 language for the KSE CNCs

4.1 Rapid traverse

The G00 function defines the tool's rapid traverse and is used to move the tool to a
given position. The target position is the function value. The target position can be
either absolute or incremental (see G90, G91 functions).
The tool is moved at the fastest speed, moving the axis/axes in a straight line. No
work is executed during the G00 command.
The rapid traverse can be programmed on multiple axes (1 to 8 for the KSE PCA,
and 1 to 5 for the KSE 5V). In this case, the slowest axis sets the overall speed
(see also G01: Linear motion).
With the G00 command, the F command is suspended, and is restored when the
G00 function is cancelled (e.g. with the G01 command).

E xa mp le : Rapid traverse to target position X30, Y20.

N10 G00 G90 X30 Y20


N20 ....

Reference Manual 10
ISO 6983 language for the KSE CNCs

4.2 Linear interpolation

The tool's movements in a straight line (linear interpolation) are programmed with
the G01 function. The target position is the function value. Target position can be
either absolute or incremental (see G90, G91 functions).
The axes for the linear interpolation are defined in the target position. For instance:
G01 X20 Y30 interpolate the X e Y axes, G01 Y50 Z80 B15 interpolates the Y, Z, e
B axes.
The KSE-PCA can interpolate up to 8 axes. The KSE 5V can interpolate up to 5
axes.
The speed v is defined with the F function; v is the magnitude of the axes velocity:

v = √𝑣𝑥2 + 𝑣𝑦2 + ⋯ + 𝑣𝑤2 , 𝑣𝑥 = x-axis velocity,…

E xa mpl e 1: Parallel axes milling (single axis linear interpolation)


Prog. 1
N5 G00 G90 X70 Y25 Z1 S800 M3 (Rapid traverse. Clockwise)
(spindle insertion.)
N10 Z-5 (Z moved to -5mm)
N15 G01 X20 F150 (Tool moved to 20mm, working)
N20 G00 Z100 (Fast uncoupling)
N25 X-25 Y50 (Fast uncoupling)
N30 M30 (End of program)
E xa mpl e: 3-axes linear interpolation
Prog. 2
N5 G00 G90 X40 Y60 Z2 S5000 M3 (Rapid traverse. Clockwise)
(spindle insertion)
N10 G01 Z-12 F100 (Z moved to -12mm
N15 X20 Y10 Z-10 (Tool moved to position X20
(Y10 Z-10, working)
N20 G00 Z100 (Fast uncoupling
N25 X-20 Y80 (Fast uncoupling
N30 M30 (End of program

Reference Manual 11
ISO 6983 language for the KSE CNCs

4.3 Circular interpolation

Circular interpolation is programmed with the G02 and G03 functions. Circular
interpolation defines the tool movements on a arc of a circle. The following data are
required:

 Direction (clockwise/counterclockwise)
 Target position
 Circle radius
 Speed
The direction is defined with the following functions:

 G02 clockwise
 G03 counterclockwise
The target position is assigned for each pair of the required axes (XY, ZX, YZ, XB,
BC, …).
The circle radius r is defined with the U function. To define the desired circle, the
following rule applies:

 radius r > 0: shortest arc (angle < 180°)


 radius r < 0: longest arc (angle > 180°).
When start position = end position, no interpolation is performed. In order to obtain
a full circle, two interpolations of half circle each are required.
The speed v is defined with the F function; v is the magnitude of the axes velocity.
E xa mpl e 1: Circular interpolation with positive radius.

N5 G00 X10 Y25 Z1 S1250 M3 (Rapid traverse)


N10 G01 Z-5 F100 (Z moved to -5mm)

Reference Manual 12
ISO 6983 language for the KSE CNCs

N15 G02 X31.667 Y25 U9,5 F125 (Tool follows a clockwise)


(arc (G02), working)
N20 G00 Z100 M5 (Fast uncoupling)
N25 X35 (Fast uncoupling)
N30 M30 (End of program)

E xa mpl e: Circular interpolation with negative radius.

N5 G00 X10 Y25 Z1 S1250 M3 (Rapid traverse)


N10 G01 Z-5 F100 (Z moved to -5mm)
N15 G02 X31.667 Y25 -U9,5 F125 (Tool follows a clockwise)
(arc (G02), working)
N20 G00 Z100 M5 (Fast uncoupling)
N25 X35 (Fast uncoupling)
N30 M30 (End of program)

Reference Manual 13
ISO 6983 language for the KSE CNCs

4.4 Dwell time

The dwell time is programmed with the G04 function, and requires the X or F
functions for the effective dwell time definition.
Dwell time is defined:

 with the X function for values in the 0.001s to 99999.999s range


 with the F function for values in the 0.001s to 99.999s range
The G04 function is non-modal. No other functions are allowed within the block
containing the G04 function.
E xa mpl e: N10 G04 X11,5 Dwell time 11.5 seconds

N100 G04 F2 Dwell time 2 seconds

Reference Manual 14
ISO 6983 language for the KSE CNCs

4.5 Work plane selection

The work plane is programmed with the G16..G19 functions. Tool radius and
length depend on the selected work plane. The work plane selection is defined by:

 G16 default work plane (as defined in system data


 G17 XY plane
 G18 ZX plane
 G19 YZ plane
The tool radius adjustment is defined on the working plane axes, while the tool
length adjustment is defined on the axis perpendicular to the work plane.

Plane Radius adjustment Length adjustment


XY (G17) X+Y Z
ZX (G18) Z+X Y
YZ (G19) Y+Z X

The default work plane is given by the G16 function and is defined within the
System Data. The work plane can be defined with the X, Y, and Z axis only.

Reference Manual 15
ISO 6983 language for the KSE CNCs

4.6 Constant pitch threading

Not e: Threading requires a position encoder in order to control the spindle speed.

Threading is programmed with the G33 function. The following thread types are
available:

 Cylinder thread (1)


 Radial thread (2)
 Cone thread (3)

The starting/ending positions and the threading pitch depend on the thread type
and on the work plane.

Cylinder threading
Axis Ending point on Thread pitch on
X X I
Y Y J
Z Z K

Reference Manual 16
ISO 6983 language for the KSE CNCs

Cone threading with angle α


Plane End point on Thread step on
XY X+Y I if α  45°; J if α ≥ 45°
ZX X+K K if α  45°; I if α ≥ 45°
YZ Z+J J if α  45°; K if α ≥ 45°

Before using the G33 function, the tool needs to be moved to the starting point,
and the spindle needs to be started with the M3/M4 functions. The spindle speed is
set with the S function. Axis and spindle zero offsets are coupled with the G33
function.
The G33 function is modal, and is cancelled by another G-group function (G0, G1,
G2, G3,...).
Cut di r ect ion The threading direction is defined with the M3 (clockwise) and M4
(counterclockwise) functions. The spindle speed is defined with the S function.
Ax i s spe ed The axis speed depends on the spindle speed and on the thread pitch. The F
function is ignored, but remains in memory. An alarm is raised if the maximum
speed defined within the System Data is exceeded.
E xa mpl e 1: Cylinder thread with pitch 4 along the Z axis.
N10 G1 X99 Z10 S500 F100 M3 (Tool moved to the starting
(point, spindle started)
N20 G33 Z-100 K4 (Cylinder thread with pitch
(4, ending point on Z axis)
N30 G0 X102 (Return to the starting point)
N70 G0 X110 (Uncouple the tool)

Reference Manual 17
ISO 6983 language for the KSE CNCs

E xa mpl e 2: Cone thread on the ZX plane with angle < 45°.


N10 G1 X50 Z0 S500 F100 M3 (Tool moved to the
(starting point, spindle
(started)
N20 G33 X110 Z-60 K4 (Cone thread with pitch 4
(and ending point on the
(XZ plane: (thread pitch
(defined with K, since
(angle < 45°).

Reference Manual 18
ISO 6983 language for the KSE CNCs

4.7 Select zero offset

A workpiece's offset is programmed with the G54…G57 functions; a workpiece's


offset is always related to the system's origin.
Using the zero offset functions, the same program can be used on different
workpieces without the need to duplicate program parts (different offsets can be
required for different blocking tools).

For each axis, 8 zero offsets values can be defined:

 G54 coarse
 G254 fine
 G55 coarse
 G255 fine
 G56 coarse
 G256 fine
 G57 coarse
 G257 fine
And 2 absolute zero offsets

 G58 coarse
 G59 fine
The values for the G54..G57 and G254..G255 functions are defined in the System
Data tables (see example below). The G58 e G59 functions default values are
loaded at the beginning of the program and can be changed at run-time.

Reference Manual 19
ISO 6983 language for the KSE CNCs

Axes X/Y/…/W
G54 0.000 G254 0.000
G55 200.000 G255 1.5
G56 2300.000 G256 2.780
G57 590.000 G257 4.560
G58 420.000
G59 1.250

Programming G54..G57, G254..G257 within the program blocks gives the following
final zero offsets:

 G54  G54 + G58 + G59


 G254  G254 + G58 + G59
 G55  G55 + G58 + G59
 G255  G55 + G58 + G59
 G56  G56 + G58 + G59
 G256  G256 + G58 + G59
 G57  G57 + G58 + G59
 G257  G257 + G58 + G59
E xa mpl e: 3 workpieces are placed on a pallet with zero offset values given by the G54.. G56
functions; the pieces are processed one by one. The work sequence is defined in
the L47 subroutine.

N10 G0 G90 X10 Y10 F500 T1 (Rapid traverse)


N20 G54 S1000 M3 (Recall the first zero)
(offset, clockwise spindle
N30 L47 P1 (Recall the L47 subroutine
N40 G55 G0 Z200 (Recall the 2nd zero offset
(Z beyond obstruction)

Reference Manual 20
ISO 6983 language for the KSE CNCs

N50 L47 P1 (Recall the L47 subroutine)


N60 G56 (Recall the 3rd zero offset
N70 L47 P1 (Recall the L47 subroutine)

Ze ro off set The G54 function usually is always defined. No function can override the zero
supp r e ss ion offset for the whole program or up to a new setting of the G54..G57, G254..G257
functions. The G53 function can be used to delete the zero offset position block by
block.
Ab s olu te off se t The default values for the absolute offset functions G58 e G59 are defined within
the System Data. These values can be changed at run-time for each axis. Once
changed, the default values cannot be reloaded in the same program.
E xa mpl e: Let 200 and 15 be the G58 and G59 default values for the X axis. The following
program sets the new values as 30 and 20.

N10 G54 Recall the first home position. Set the X zero offset position
as G54+200+15

N100 G58 X30 Define the G58 X-axis translation. Set the X zero offset
position as G54+30+15.

N100 G59 X20 Define the G59 X-axis translation. Set the X-axis zero
offset position as G54+30+20.

N200 G55 Recall the 2nd home position. Set the X-axis zero offset
position as G55+30+20.

Reference Manual 21
ISO 6983 language for the KSE CNCs

4.8 Absolute and Incremental programming

ISO programs are often based on CAD/CAM files where dimensions can be:

 absolute
 incremental
With absolute dimensions, the tool's new position is relative to the system's origin.
With incremental dimensions, the tool's new position is relative to the tool's
previous position.
The G90 and G91 functions can be used to process CAD/CAM files without any
preliminary adjustment:

 G90 dimensions are processed as absolute values


 G91 dimensions are processed as incremental values

G90 e G91 are modal functions and mutually exclusive. G90 is the default function
(absolute dimensions).
E xa mpl e: The PROG1 program works with absolute positions, while the PROG2 program
works with incremental positions.
PROG1
N10 G90 G0 X100 Z100 (Rapid traverse (absolute position)
N20 G1 F500 M3 S500 Set work speed, start the spindle
N30 X200 (Processing)
N40 Z200 (Processing)
N50 X100 (Processing)
N60 Z100 (Processing)
M30

PROG2
N10 G90 G0 X100 Z100 (Rapid traverse (absolute
(position)
N20 G1 F500 M3 S500 (Set work speed, start the)
(spindle)
N25 G91 (Incremental position)
N30 X100 (Processing)
N40 Z100 (Processing)
N50 X-100 (Processing)
N60 Z-100 (Processing)
M30

Reference Manual 22
ISO 6983 language for the KSE CNCs

4.9 Rigid Tapping

Not e: Rigid tapping requires a position encoder in order to control the spindle speed.
Rigid tapping can be programmed with the G331/G332 functions. Rigid tapping
depends on spindle and axis dynamics. The G331 function defines the tapping, the
G332 function reverses the direction of rotation (uncoupling).
The hole depth is programmed with the tool's axis (X, Y, or Z); the thread pitch is
programmed with the I, J or K axes. With the G332 function, the same thread pitch
of the G331 is programmed. The inversion of direction is automatic.
The spindle's speed of rotation is programmed with the S function, without the
M3/M4 functions.
Before calling the G331/G332 commands, the spindle needs to be moved with the
M19 S... functions..
Clo c kw is e/ cou nt e r The thread pitch defines the spindle rotation:
clo c kw is e t hr e ad
cutt ing:  positive: clockwise rotation (as in M3)
 negative: counterclockwise rotation (as in M4).
Ax e s sp ee d: With the G331/G332 functions, the axis speed depends on the spindle speed and
on the thread lead.
The F function is ignored and remains in memory. If the speed defined within the
system's data is exceed, an alarm is raised.

Example: Rigid tapping with metric 5, thread lead according to the table: 0,8
mm/round; the piece has been drilled in advance.

N5 G54 G0 G90 X10 Y10 Z5 (Rapid traverse)


N10 M19 S0 (Spindle moved to starting)
(position
N20 G331 Z-25 K0.8 S600 (Tapping, positive K = clockwise)
(rotation)
(end position Z=-25 mm)
N40 G332 Z5 K0.8 (Uncoupling
N50 G0 X... Y... Z...

Reference Manual 23
ISO 6983 language for the KSE CNCs

4.10 Origin offset definition

The zero offset values for the G54..G57 and G254..G257 functions are defined
within the System Data; the following functions are available to programmatically
change the zero offset values at run-time:

 G354
 G355
 G356
 G357
Usage is the same as with the G58 e G59 functions. The default values for each
function is zero.
The zero offset values can be recalled with the G454..G457 functions. Usage is the
same as with the G54..G57 e G254..G257 functions.
E xa mpl e: 3 workpieces placed on a pallet with the zero offset values defined by the G454,
G455 and G456 functions; the pieces are processed one by one. The work
sequence is defined in the L47 subroutine.

N01 G354 X100 Y50 (First zero offset (G454) X + Y)


N02 G355 X100 Y400 (Second zero offset (G455) X + Y)
N03 G356 X500 Y50 (Third zero offset (G456) X + Y)
N10 G0 G90 X10 Y10 F500 T1 (Rapid traverse)
N20 G454 S1000 M3 (First programmed zero offset)
(clockwise spindle)
N30 L47 P1 (Subroutine)
N40 G455 G0 Z200 (Second programmed zero offset, Z
(beyond obstruction)
N50 L47 P1 (Subroutine)
N60 G456 (Third programmed zero offset)
N70 L47 P1 (Subroutine)

Reference Manual 24
ISO 6983 language for the KSE CNCs

5 Miscellaneous Functions

Some of the Miscellaneous Functions (M functions) are defined by ISO6983/DIN


66025 part 2, while others can be defined by the machine manufacturers. M
functions are used in conjunction with a PLC to manage the machine's processes
not handled by other ISO functions (G, F, S…). All M functions are notified to the
PLC before the axes are moved.
The KSE-ISO lists 100 M functions: M00÷M99. The following M functions are
defined by the KSE-ISO code; all other functions are available for implementation
by the manufacturer.
M00: Unconditioned Machine Stop

The M00 function stops the program. The program can be restarted pressing the
CYCLE START button of the control panel. All programmed data are retained. The
M00 function is effective in any automatic mode. According to the interface setup,
the M00 can also stop spindle and other devices (e.g. coolant). Details are
provided with the machine documentation.
M01: Conditioned Stop
M01 stops the program only when the related softkey and/or PLC interface is
activated.
M02: End of Program

M02 ends the program and is usually written in the last program block, alone or
with other functions. After this function is called, the CNC returns to its default
conditions.
M03: Start clockwise spindle rotation
M04: Start counterclockwise spindle rotation
M05: Stop spindle rotation
M19: Move spindle
See Spindle functions
M17: End of Subroutine

M17 is used in the last block of the subroutine. No subroutine call can be placed in
the same block of an M17 function. See Subroutines.
M30: End of Program
See M02.
M80: Load R Data

Reference Manual 25
ISO 6983 language for the KSE CNCs

The M80 function loads data from the System's work table into the R Data. When
not implemented, the function is available to the user. See also the R Data section.
M98: Copy the PLC cells FB200÷FB255 to the R data R100÷R155

The M98 function copies data from the PLC to the R Data to make them available
to the ISO interpreter. In the KSE CNCs, the PLC cells FB200÷FB255 and the R
data R100÷R155 are reserved for data transfer to and from the PLC and the ISO
interpreter.
M99: Copy the R Data R100÷R155 to the PLC cells FB200÷FB255

As with the M98 function, the M99 copies data from the ISO interpreter R Data to
the PLC cells. NOTE: Floating point value contained in the R Data are byte-
truncated (0…255); See also the R Data section.
Available M Functions

All the M functions not directly managed by the KSE-ISO are available to the
programmer and can be used for the implementation of custom functions. For
instance, the M60 e M61 functions can be used to open/close the clamps blocking
the workpiece. All M functions are notified to the PLC before axes movement.
E xa mpl e: M60/M61 usage to open/close clamps
N90 …
N100 G01 X10 Y20 Z100 F500 S300 M3 (Tool transfer, Spindle)
(insertion)
N110 M61 (Close clamps)
N120 L10 P1 (Subroutine)
N130 G00 X0 Y0 Z0 (Uncoupling)
N140 M60 (Open clamps)
N150 …

Reference Manual 26
ISO 6983 language for the KSE CNCs

6 Subroutine

Us ag e Command sequences can be grouped in subroutines which can then be called


from within the program or using the control panel. If a subroutine contains no
parameter, movements defined within the subroutine are usually considered as
incremental. Before the subroutine's call for the processing of a workpiece, the tool
must be selected and moved to the starting point. The same sequence can be
repeated for different workpiece's positions without changing the dimensions within
the program.
St ru ctu re A subroutine is made of:

 Subroutine's beginning
 One or more blocks
 Subroutine's end
The beginning of a subroutine is given with the L function. The function's value n is
unique for each subroutine and must be n < 1000. The end of a subroutine is
signalled with the M17 function. All subroutines are placed after the main program.
Within a subroutine, blocks numbers can be reassigned.
Example:
%100 (Main program's name)
N10 (Main program's first block)
N20 (Main program's second block)
….
M30 (End of the main program)

L230 (Subroutine's name)


N100 G1 X20 Y20 F40 (Subroutine's first block)
N110 X40 20 (Subroutine 's second block)

N200 M17 (End of the L230 subroutine)

Ca ll of a A subroutine is recalled from the main program using the subroutine name. If the
Sub ro utin e same subroutine needs to be called in a loop, the number of iteration is defined
with the P function. The P function value defines the number n of iterations. If n =1,
the P function can be omitted.
E xa mpl e: The subroutine L1234 is called 1 and then 3 times.

N100 L1234 P1

N200 L1234 P3
Not es A subroutine call cannot be placed within the same block with the M02, M03 or

Reference Manual 27
ISO 6983 language for the KSE CNCs

M17 functions.

A subroutine call placed in the same block of other functions is called after all other
functions have been executed.
Ne sti ng A subroutine can be called from other subroutine (nested calls). The maximum
allowed levels of nesting is 10.
E xa mpl e 1: 3-levels nesting. The main program calls the L1 subroutine. The L1 subroutine
calls the L2 subroutine and the L2 subroutine calls the L3 subroutine.

%100 main program


...
N20 L1 P10 recall L1 with 10 iterations

N100 M30

L1 L1 subroutine definition

N100 L2 P50 recall L2 with 50 iterations

N200 M17

L2 L2 subroutine definition

N100 L3 P6 recall L3 with 6 iteration

N200 M17

L3 L3 definition

N200 M17

E xa mpl e 2: Drilling of 2 lines x 4 columns of 20mm deep holes, spaced 10mm apart. The main
program %100 moves the tool to the first hole of the 1st and 2nd row; the L1
subroutine calls the L2 subroutine which drills the hole, and then moves the tool to
the next hole.

Reference Manual 28
ISO 6983 language for the KSE CNCs

%100 (Main program)


N10 G0 X10 Y10 Z0 (Fast traverse)
N20 G91 G1 F500 M3 S1000 (Incremental dimensions, speed)
(definition, spindle insertion)
N30 L1 P4 (Recall L1 4 times (1st row)
(holes)
N40 G90 G0 X10 Y20 Z0 (Move tool to the second row)
N50 G91 L1 P4 (Recall L1 4 times (2nd row)
(holes)
N60 G0 X0 Y0 Z0 (Uncoupling)
N70 M30

L1 (L1: move tool to holes position)


N110 L2 P1 (Recall L2 for 1 hole)
N110 X10 (Move tool to the next hole)
N130 M17

L2 (L2: drill a 20mm deep hole)


N210 Z-20 (Drill)
N220 Z20 (Uncoupling)
N230 M17

Reference Manual 29
ISO 6983 language for the KSE CNCs

7 R Data

P rog r amm ing w it h The R Data give the programmer the option to use a variable as function value. All
pa ra me te r s functions, except the G, M and N functions, can use R Data as their value. The
content of an R Data is assigned with the “=” operator. An R data can contain both
integer and floating point values. The “=” operator is used also to assign the R Data
to the function value.
E xa mpl e: Z=R50

Using the R data, the same program can be used for different applications
changing the R data content (e.g. spindle movements and speed with different
materials, different workcycles etc…).
In the KSE CNCs the R data R0 to R299 are available (300 R Data) to the
programmer. The R100÷R155 R Data are used to exchange data with the
machine's PLC using the M98 e M99 functions.
The value of all R data is retained when the machine is turned off.
E xa mpl e s: R50=100
R20=-32.754
R100=2500.33

P ar am et r ic al R Data can also be used to evaluate the basic mathematical operations (sum,
pro c es si ng subtraction, multiplication and division). Within a block, operations are processed
strictly following the order in which they are written. The usual arithmetic priorities
do not apply. Brackets are not available.

Operations Operators Result in


Definition R1=100 R1
Assignment R1=R2 R1
Negation R1=-R2 R2
Sum R2=R2+R3 R2
Subtraction R2=R2-R3 R2
Multiplication R2=R2*R3 R2
Division R2=R2/R3 R2

Other mathematical functions (sin, cosin, square root, etc.) are available in the
Special Functions section.
E xa mpl e: The previous program (nested subroutines) is modified to drill n holes with step p
and depth l on m rows and distance d (drilling lattice).

Reference Manual 30
ISO 6983 language for the KSE CNCs

%100 (Main program)


R0=4 (R0=holes in each row (n)
R1=10 (R1=step (p)
R2=20 (R2=depth (l)
R3=2 (R3=number of rows (m)
R4=10 (R4=row distance (d)
R10=10 R11=10 R12=0 (R10, R11, R12 = first hole
(position X, Y, Z)
R20=500 R21=1000 (R20=position, R21=spindle speed)
N10 G0 X=R10 Y=R11 Z=R12 (Rapid traverse)
N20 M3 S=R21 (Spindle insertion)
N30 L0 P=R3 (Recall L0 R3 times to drill on m
(rows)
N40 M30

L0 (L0: drill holes on all rows)


N010 G1 F=R20 G91 (Work speed; incremental)
(dimensions)
N020 L1 P=R0 (Recall L1 R0 times to drill the)
(n holes of the row)
N030 G90 R11=R11+R4 (Update the Y value for the next)
(row; absolute dimensions)
N040 G0 X=R10 Y=R11 Z=R12 (Fast traverse to the first hole,
(next row)
N060 M17

L1 (L1: drill hole on one row)


N110 L2 P1 (Recall L2 once to drill)
N110 X=R1 (Next hole position)
N130 M17

L2 (L2: drill with depth l)


N210 Z=-R2 (Drill)
N220 Z=R2 (uncoupling)
N230 M17

Reference Manual 31
ISO 6983 language for the KSE CNCs

8 Tools offset

T ool nu mb er T The tool reference number is defined with the T function: T1, T2...
T ool d ata Tool's geometry are inserted in the Tool's correction blocks, and contain:

 Tool type drill tool, cutter…


 Length +/- 9999,999
 Radius
A correction block is called with the D function (D1, D2, …). In standard CNCs,
each correction block is presented as a 10 columns table, with columns numbered
from P0 to P9. The effective structure of a correction block is defined by the tool
type, given in P1. There are 99 correction blocks (D1…D99) for each tool.
T ool t ype cod e 0 tool not defined
( P 1)
10 drill tool with length correction
In the KSE ISO, only the D1 (tool length) correction block is available.

E xa mpl e: Tool table for the KSE-PCA

T – Tool D1 - Length
Lifetime available available
number offset
1 200.2 100
2 45.0 120
3 203.7 Off
4 12.4 Off

Reference Manual 32
ISO 6983 language for the KSE CNCs

5 11.4 Off
6 23.5 Off
7 120.0 Off

47 0.0 Off
48 0.0 Off

The tool table for the KSE-5V contains the length offset only.
T ool c or r e ctio n The tool correction requires the tool number (Tn) and the selected correction block
(Dm)
T1 D1,
T1 D2,
T2 D5,

The tool correction requires also:

 Workplane radius correction


 Correction of length on the axis orthogonal to the workplane (tool axis)
The tool correction requires the definition of the workplane or of the tool's axis.

Workplane Radius correction on Length correction on


XY (G17) XeY Z
ZX (G18) ZeX Y
YZ (G19) YeZ X

The default tool is T0, with no correction. T0 can also be used to reset any tool
correction within a program. When no correction block is used, the default
correction block (D1) is used (T2 is the same as T2 D1). Since the KSE CNCs
manage the type 10 tools and the D1 correction block only, any correction block
different from D1 loads the D1 correction block (T2 D5 is the same as T2 D1).

Reference Manual 33
ISO 6983 language for the KSE CNCs

9 Special functions

The @ address identifies the KSE ISO special functions.

@202: Swap values


@202 R100 R102

Swap the content of R100 and R102.


E xa mpl e: Content before the call
R100 = 200
R102 = 120

Content after the call


R100 = 120
R102 = 200

@610: Absolute value


@610 R50 R60

Write in R50 the absolute value of R50.


E xa mpl e: Content before the call
R50 = -23

Content after the call


R60 = 23

@613: Square root


@613 R130 R132

Write R132 the square root of R130:

R132 = √𝑅130

@614: Square root of the sum of 2 square numbers


@614 R100 R102 R104

Write in R104 the square root of the sum of R100 and R102:

R104 = √𝑅1002 + 𝑅1022

@620: Increase
@620 R50
Increase the operand.

Reference Manual 34
ISO 6983 language for the KSE CNCs

E xa mpl e: Content before the call:


R50 = 20

Content after the call


R50 = 21

@621: Decrease
@621 R50
Decrease the operand.
E xa mpl e: Content before the call
R50 = 20

Content after the call


R50 = 19

@622: Truncation
@622 R56

Return the integer part of the operand.


E xa mpl e . Content before the call:
R56 = 22.45

Content after the call


R56 = 22

@629: Point of a circle


@629 R20 R21 R22 R23 R24 R25

Return the coordinates of a point of a circle, where:

 R20 and R21: circle centre


 R22: circle radius
 R23: angle of the required point, from zero

Reference Manual 35
ISO 6983 language for the KSE CNCs

 R24 and R25: point coordinates:


R24 = R20+R22·cos(R23) R25 = R21+R22·sin(R23)
@630: Sin
@630 R50 R52
Return the value of the sine of the given angle (in degrees).
R52 = sin(R50).
E xa mpl e: Content before the call:
R50 = 45 (angle in degrees)
Content after the call
R52 = 0,7071 (= sin(45°)
@631: Cosin
@631 R50 R52
Return the value of the cosine of the given angle (in degrees).
R52 = cosin(R50).
E xa mpl e: Content before the call:
R50 = 30 (angle in degrees)
Content after the call
R52 = 0,866 (= cosin(30°)
@670: Write 1
@670 R50

Write 1 into the operand.


E xa mpl e: Content before the call
R50 = 30

Content after the call


R50 = 1

@671: Equal (=)


@671 R50 R51 R52
Write 1 into R52 if R50 = R51, 0 otherwise.
E xa mpl e: Content before the call
R50 = 30
R51 = 30

Content after the call


R52 = 1

@672: Not equal (<>)


@672 R50 R51 R52

Reference Manual 36
ISO 6983 language for the KSE CNCs

Write 1 into R52 if R50 ≠ R51, 0 otherwise.


E xa mpl e: Content before the call
R50 = 30
R51 = 32

Content after the call:


R52 = 1

@673: Greater than (>)


@673 R50 R51 R52

Write 1 into if R50 > R51, 0 otherwise.


E xa mpl e 1: Content before the call:
R50 = 50
R51 = 32

Content after the call


R52 = 1

E xa mpl e 2: Content before the call


R50 = 50
R51 = 32

Content after the call:


R52 = 0

@674: Greater or equal than (>=)


@674 R50 R51 R52

Write 1 into R52 if R50 ≥ R51, 0 otherwise.


E xa mpl e 1: Content before the call:
R50 = 32
R51 = 32

Content after the call:


R52 = 1

E xa mpl e 2: Content before the call


R50 = 42
R51 = 32

Content after the call


R52 = 1

E xa mpl e 3: Content before the call:


R50 = 12
R51 = 32

Content after the call:


R52 = 0

Reference Manual 37
ISO 6983 language for the KSE CNCs

@675: Less than (<)


@675 R50 R51 R52

Write 1 into R52 if R50 < R51, 0 otherwise.


E xa mpl e: Content before the call
R50 = 12
R51 = 32

Content after the call:


R52 = 1

@676: Less equal than (<=)


@676 R50 R51 R52

Write 1 into R52 if R50  R51, 0 otherwise.


E xa mpl e 1: Content before the call:
R50 = 32
R51 = 32

Content after the call


R52 = 1

E xa mpl e 2: Content before the call:


R50 = 12
R51 = 32

Content after the call:


R52 = 1

E xa mpl e 3: Content before the call:


R50 = 42
R51 = 32

Content after the call


R52 = 0

@680: Skip next line


@680
With this function, the ISO interpreter skip the next line e call the following one.
E xa mpl e: N10 G00 X100 Y20
N20 G04 X20
N30 @680
N40 G01 X-10 F100
N50 G02 X20 Y20 U20 F400

The line N40 is not executed.


@681: Skip next if equal
@681 R50 R51

Reference Manual 38
ISO 6983 language for the KSE CNCs

If R50 = R51, the ISO interpreter skip the next line, and execute the following one.
E xa mpl e: N10 G00 X100 Y20
N20 R50 = 3
N30 R51 = 3
N40 G04 X20
N50 @681 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.


@682: Skip next line if not equal
@682 R50 R51
If R50 ≠ R51, the ISO interpreter skip the next line and execute the following one.
E xa mpl e: N10 G00 X20 Y20
N20 R50 = 1
N30 R51 = 3
N40 G04 X20
N50 @682 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.


@683: Skip next line if greater than
@683 R50 R51
If R50 > R51, the ISO interpreter skip the next line and execute the following one.
E xa mpl e: N10 G00 X20 Y20
N20 R50 = 5
N30 R51 = 3
N40 G04 X20
N50 @683 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.


@684: Skip next line if greater equal than
@684 R50 R51
If R50 ≥ R51, the ISO interpreter skip the next line and execute the following one.
E xa mpl e 1: N10 G00 X20 Y20
N20 R50 = 5
N30 R51 = 3
N40 G04 X20
N50 @684 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.

Reference Manual 39
ISO 6983 language for the KSE CNCs

E xa mpl e 2: N10 G00 X20 Y20


N20 R50 = 1
N30 R51 = 3
N40 G04 X20
N50 @684 R50 R51
N60 G01 X-10 F100
N70 G00 X120 Y120

The line N60 is executed.


@685: Skip next line if less than
@685 R50 R51

If R50 < R51, the ISO interpreter skip the next line and execute the following one.
E xa mpl e 1: N10 G00 X20 Y20
N20 R50 = 1
N30 R51 = 3
N40 G04 X20
N50 @685 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.


E xa mpl e 2: N10 G00 X20 Y20
N20 R50 = 3
N30 R51 = 3
N40 G04 X20
N50 @685 R50 R51
N60 G01 X-10 F100
N70 G00 X120 Y120

The line N60 is executed.


@686: Skip next line if less equal than

@686 R50 R51

If R50  R51, the ISO interpreter skip the next line and execute the following one..
E xa mpl e 1: N10 G00 X20 Y20
N20 R50 = 1
N30 R51 = 3
N40 G04 X20
N50 @686 R50 R51
N60 G01 X-10 F100
N70 G02 X20 Y20 U20 F400

The line N60 is not executed.


E xa mpl e 2: N10 G00 X20 Y20
N20 R50 = 3
N30 R51 = 3
N40 G04 X20
N50 @686 R50 R51
N60 G01 X-10 F100

Reference Manual 40
ISO 6983 language for the KSE CNCs

N70 G00 X120 Y120

The line N60 is not executed.


@896: Spiral interpolation on XY plane
@896 R51 R52 R53 R54 R55 R56
Define a spiral interpolation on the XY plane:
R51: spiral start
R52 spiral start angle (in degrees)
R53 spiral end angle (in degrees)
R54 speed (in mm/min)
R55 spiral final radius
R56 spiral step (in mm/round)
E xa mpl e N10 G0 X0 Y0 (Rapid traverse)
N40 R51 = 0 (Start radius)
N50 R52 = 0 (Start angle)
N60 R53 = 0 (End angle)
N70 R54 = 500 (Speed)
N80 R55 = 50 (End radius)
N90 R56 = 10 (Step)
N110 @896 R51 R52 R53 R54 R55 R56 (process the spiral)
N120 ....

@897: Spiral interpolation on the ZX plane


@897 R51 R52 R53 R54 R55 R56
As with @896.

Reference Manual 41
ISO 6983 language for the KSE CNCs

@898: Spiral interpolation on the YZ plane


@898 R51 R52 R53 R54 R55 R56

As with @896.
@996: Circular interpolation on pipe
@996 R51 R52 R53 R54 R55 R56

Define a circular interpolation on the XY plane using the Z plane to follow the pipe
profile to a max fall position:

 R51 Radius of circular interpolation


 R52 Start angle (in degrees)
 R53 Amplitude (in degrees)
 R54 Speed (F)
 R55 Pipe radius
 R56 Max Z fall
Example:

N10 G0 X22 Y0 (Rapid traverse)


N20 G01 Z30 F1000
N40 R51 = 22 (Circular)
(interpolation radius
N50 R52 = 0 (Start angle)
N60 R53 = 135 (Amplitude)
N70 R54 = 500 (Speed (F in mm/min)

Reference Manual 42
ISO 6983 language for the KSE CNCs

N80 R55 = 30 (Pipe radius (in mm)


N90 R56 = 12 (Max Z fall)
N110 @996 R51 R52 R53 R54 R55 R56
N120 ....

Note: If Z fall = 0 (R56=0) the @996 function defines a normal circular interpolation
on the XY plane (as the G02 e G03 functions) and can be used to define a full
circle
@997: Circular interpolation on pipe
@997 R51 R52 R53 R54 R55 R56
As with @996. The circular interpolation is on the ZX plane and fall on the Y axis.
@998: Circular interpolation on pipe
@998 R51 R52 R53 R54 R55 R56

As with @996. The circular interpolation is on the YZ plane and fall on the X axis.
@986: Circular interpolation on pipe, with offset
@986 R51 R52 R53 R54 R55 R56 R57

The @986 function defines a circular interpolation as with the @996 function on
the XY plane using the Z axis to follow the pipe profile to a max fall position. With
the @986, the circle can have an offset in the Y direction:

Reference Manual 43
ISO 6983 language for the KSE CNCs

 R51 circular interpolation radius


 R52 start angle (in degrees)
 R53 amplitude of interpolation (in degrees)
 R54 speed (F)
 R55 pipe radius
 R56 max Z fall
 R57 offset.
E xa mpl e N10 G0 X22 Y-8 (Rapid traverse)
N20 G01 Z30 F1000
N40 R51 = 22 (Radius of circular interpolation)
N50 R52 = 0 (Start angle)
N60 R53 = 135 (Amplitude)
N70 R54 = 500 (F in mm/min)
N80 R55 = 30 (Pipe radius (in mm)
N90 R56 = 12 (Max Z fall)
N100 R57 = -8 (Offset)
N110 @986 R51 R52 R53 R54 R55 R56 R57
N120 ....

@987: Circular interpolation on pipe, with offset


@987 R51 R52 R53 R54 R55 R56 R57
AS with @997. The circular interpolation is on the ZX plane with fall on Y axis, and
offset along the X axis.
@988: Circular interpolation on pipe, with offset
@988 R51 R52 R53 R54 R55 R56 R57
As with the @988. The circular interpolation is on the YZ plane with fall on X axis,
and offset along the Z axis.

Reference Manual 44
Printed in Italy
ISO6983REFMANKSECNC
® 2.1/022013

Вам также может понравиться