Any product names mentioned may be trademarks or product designations of Siemens or their
suppliers, whose use by third parties for their own purposes may infringe the rights of the
trademark owners.
Exclusion of liability
We have checked the contents of the documentation for consistency with the hardware and software
described. Since deviations cannot be precluded entirely, we cannot guarantee complete conformance.
The information in this document is regularly checked and necessary corrections are included in reprints.
Suggestions for improvement are also welcome.
The SINUMERIK documentation is organized in 3 parts:
S General documentation
S User documentation
S Manufacturer/service documentation
A monthly updated publications overview with respective available languages can
be found in the Internet under:
http://www
Select the menu items ”Support” --> ”Technical Documentation” -->¨ ”Overview of
Publications”.
The Internet version of DOConCD (DOConWEB) is available under:
http://www
Information about training courses and FAQs (Frequently Asked Questions) can be
found in internet under:
http://www.siemens.com/motioncontrol
Target group
This publication is intended for:
S Project engineers
S Technologists (from machine manufacturers)
S System startup engineers (Systems/Machines)
S Programmers
Standard version
.siemens.com/motioncontrol
.automation.siemens.com/doconweb
under menu option ”Support”
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.
Other functions not described in this documentation might be executable in the
control. This does not, however, represent 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.
Country specific telephone numbers for technical support are provided under the
following Internet address:
03.07
Europe / AfricaAsia / AustraliaAmerica
htpp://www
.siemens.com/automation/service&support
Questions about the manual
If you have any queries (suggestions, corrections) in relation to this documentation,
please send a fax or e--mail to the following address:
Fax+49 9131 98 63315
E--Mailmailto:motioncontrol.docu@siemens.com
A fax form is available at the end of this document.
SINUMERIK Internet address
http://www.siemens.com/sinumerik
Safety Guidelines
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.
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.
This device may only be used for the applications described in the catalog or the
technical description and only in connection with devices or components from
other manufacturers which have been approved or recommended by Siemens.
Correct, reliable operation of the product requires proper transport, storage,
positioning and assembly as well as careful operation and maintenance.
Further notes
Note
03.07
Is an important item of information about the product, handling of the product or
section of the documentation which requires particular attention.
Machine manufacturer
This pictorial symbol always appears in this document to indicate that the
machine manufacturer can affect or modify the function described. Never
ignore information provided by the machine manufacturer!
Parts programs can be read in from external CNC systems, and can then be edited
and executed.
This manual describes the startup measures and procedures necessary to run NC
programs created on an external CNC system. Functional differences are also
explained.
Note
For a detailed description of the external programming functions, please refer to
the original documentation of the external CNC system.
Terms used
The following terms are defined for this manual:
1
S ISO Dialect M is similar to the G code of the “Fanuc16 Milling” control
S ISO Dialect T is similar to the G code of the “Fanuc16 Turning” control
System B
S ISO Dialect Original is equivalent to the original Fanuc16 control
Machine data 18800 $MN_EXTERN_LANGUAGE is used to activate the external
language. The language type, ISO Dialect-M or T is selected with machine data
10880 $MN_EXTERN_CNC_SYSTEM.
The external language can be activated separately for each channel. For example,
channel 1 can operate in ISO mode but channel 2 is active in Siemens mode.
Switchover
The following two G commands from Group 47 are used to switch between
Siemens mode and ISO Dialect mode:
S G290 Siemens NC programming language active
S G291 ISO Dialect NC programming language active
2
The active tool, tool offsets and zero offsets remain active here (see
Subsection 2.2.4 and Section 2.4).
G290 and G291 must be programmed in a separate NC program block.
Siemens mode
The following conditions apply when Siemens mode is active:
S Siemens G commands are interpreted on the control by default.
S It is not possible to extend the Siemens programming system with ISO Dialect
S Downloadable MD files can be used to switch the control to ISO Dialect mode.
functions because some of the G functions have different meanings.
In this case, the user sees the ISO Dialect mode by default.
The following conditions apply when ISO Dialect mode is active:
S Only ISO Dialect G codes can be programmed, not Siemens G codes.
S It is not possible to use a mixture of ISO Dialect code and Siemens code in the
same NC block.
S It is not possible to switch between ISO Dialect M and ISO Dialect T via
G command
S If further Siemens functions are to be used, it is necessary to switch to Siemens
mode first (exception: program branches and subprogram calls, see
Subsection 2.3.2)
Power ON/Reset
Table 10-1 shows the possible combinations of machine data $MN_EXTERN_
CNC_SYSTEM and $MC_GCODE_RESET_VALUE. This specifies the Power
ON/Reset response.
03.07
Table 2-1Activation of functions
After Power ON/Reset...
Siemens mode active, switchover to ISO Dialect M possible
Siemens mode active,
switch-over to ISO Dialect T
possible
ISO Dialect M active, switchover
to Siemens mode possible
ISO Dialect T active, switchover
to Siemens mode possible
Modal G commands
Modal G commands which have the same function in both systems (Siemens and
ISO Dialect) are treated as follows.
When these G codes are programmed in one language, the equivalent G code in
the other language is determined and activated. The following G codes are
affected.
ISO programs which have been read in are stored in the NC data management
system as main programs in the default path:
_N_WKS_DIR/_N_SHOPMILL_WPD.
You can change the entry by editing the file DINO.INI in the USER directory. You
will find further information in the publication
References: /IAM/, IM4: Installation and Startup Guide, Section 3.1.
2.1.1Switchover from ISO mode to Siemens mode
G290/291
G commands 290/291 can be used from the parts program to change mode.
On switchover, the display of current G codes also changes.
Programming
G65/66
Non-modal and modal macro:
The programmed subprogram is called. Switchover to Siemens mode only takes
place when the PROC instruction is used in the first line of the subprogram.
If a program of this type is terminated with M17 or RET, when the subprogram
returns, the mode is switched back to ISO mode.
The G codes of ISO Dialect T refer to G code system B (see also 4.1.5).
The active G codes in ISO mode can be read using system variable
$P_EXTGG[...]. The numbers alongside the G code specify the respective value in
$P_EXTGG[...]. Machine data 20154 EXTERN_GCODE_RESET_VALUES[n]:
0, ..., 30 is used to specify the G codes that are effective on start-up when the NC
channel is not operating in Siemens mode.
Programming
2.2 G commands
Table 2-2The default setting is indicated by
ISO Dialect TISO Dialect MDescription840D sl 802D sl
Group 1
G001)1G001)1
G01 2G01 2Linear motionxx
G023G023Circle/helix, clockwisexx
G02.26Involute, clockwisexx
G034G034Circle/helix, counterclockwisexx
G03.27Involute, counterclockwisexx
G335G335Thread cutting with constant leadxx
G349Thread cutting with variable leadxx
G776Longitudinal turning cyclexx
G787Thread cutting cyclexx
G798Face turning cyclexx
Group 2
1)
G17
G182ZX planexx
G193YZ planexx
G961Constant cutting rate ONxx
1)
G97
Group 3
G90
G912G912Incremental programmingxx
Group 4
G681Double turret/slide onxx
G69
2
1)
1G90
1)
2
1)
G221Working area limitation, protection zone 3 ONxx
Table 2-3G commands are functionally identic al in Siemens mode and in ISO Dialect mode
03.07
G commands in Siemens
mode
Group 15:G94
G95
G96
G961
G97
G971
Note
If individual G codes of the groups in T able 2-3 cannot be mapped, the default
setting in machine data
20154: $MC_EXTERN_GCODE_RESET_VALUES and/or
20152: $MC_GCODE_RESET_VALUES
is activated.
Example: ISO mode
N5G00 X100. Y100.
N10 G90;Activate G90 in ISO mode Group 3
Corresponding G commands
in ISO Dialect T
Group 5: G94 Group 2: G97
Group 5: G95 Group 2: G97
Group 5: G95 Group 2: G96
Group 5: G94 Group 2: G96
Group 5: G95 Group 2: G97
Group 5: G94 Group 2: G97
;In Siemens mode Group 14
Corresponding G commands in
ISO Dialect M
Group 5: G94 Group 13: G97
Group 5: G95 Group 13: G97
Group 5: G95 Group 13: G96
Group 5: G94 Group 13: G96
Group 5: G95 Group 13: G97
Group 5: G94 Group 13: G97
N15 G290;Switch over to Siemens, G90 is active
N20 G91;Activate G91 in ISO mode Group 3
N25 G291;Switch over to ISO mode
N30 G291;G91 is active
2.2.1G code display
In the G code display, the G codes for the currently active language are displayed.
G290/G291 also causes the G code display to switch over.
Example:
The Siemens standard cycles are called up using some of the ISO Dialect mode G
functions (e.g. G28). DISPLOF is programmed at the start of the cycle, with the
result that the ISO Dialect G commands remain active for the display.
S External main program calls Siemens shell cycle.
Siemens mode is selected implicitly on the shell cycle call.
S DISPLOF freezes the block display at the call block;
the G code display remains in external mode. This display is refreshed while the
Siemens cycle is running.
2.2.2Display of non-modal G codes
As of SW 6.4 the external non-modal G codes (group 18) will no longer be reset on
block change if these G codes call up subprograms. The G codes remain visible on
the display until the next jump out of this subprogram.
Switching to external language mode in the subprogram and programming another
G code from group 18 overwrites the previous value and the new value is retained
until the return jump.
The behavior of G group transfer to PLC is described in machine data
$MC_GCODE_GROUPS_TO_PLC_MODE.
The previous behavior was for the G group to be the array index of a 64 byte field
(DBB 208 -- DBB 271). That way, up to the 64th G group can be reached. Only the
G groups of the standard or external language can be displayed.
The new behavior is for the data storage in the PLC to be up to 8 bytes (DBB 208
22515: $MC_GCODE_GROUPS_TO_PLC[ ] or
22512: $MC_EXTERN_GCODE_GROUPS_TO_PLC[ ]
equal to the array index of the data storage in the PLC (DBB 208 -- DBB215).
The G code group from MD $MC_GCODE_GROUPS_TO_PLC[ ] is output in
DBB 208.
The advantage is that Siemens mode and ISO mode G codes can be output
simultaneously.
Because only the G code of one language can be output in a DBB2xx, each index
(0 --7) can only be set on one of the two machine data, and the value 0 must be
entered in the other MD. Errors are signaled with Alarm 4045.
The following G codes are then available on the PLC
DBB 208 = group 03 Siemens
DBB 209 = group 03 ISO dialect
DBB 210 = group 18 ISO dialect
DBB 211 = group 01 ISO dialect
DBB 212 = group 01 Siemens
DBB 213 = group 02 Siemens
DBB 214 = group 06 ISO dialect
DBB 215 = group 31 ISO dialect
The zero offsets that are available in ISO mode are mapped onto the existing
Siemens frames. No separate frames exist for ISO mode. Active zero offsets are
incorporated in both language modes.
Changes in ISO mode have an immediate effect in Siemens mode and vice-versa.
Zero offsets exist in both ISO Dialect T and ISO Dialect M:
S G52 is a programmable, additive ZO that remains active until the end of the
program or a reset
S G54 to G59 are settable zero offsets
S G54 P1...P100 are additional settable zero offsets
S G54 P0 is an “external ZO” extOffset
03.07
2.2.5Uncoupling the frames b etween the Siemens and the ISO modes
(with powerline 7.04.02 or solution line 1.4 and higher)
In the ISO mode, various G codes occupied the programmable frame $P_FRAME,
the settable frame $P_UIFR and three base frame $P_CHBFRAME[ ]. If you
switch from the ISO mode to the Siemens mode, these frames will not be available
to the user of the Siemens language. This pertains to:
G52 Programmable zero offset --> progr. frame $P_PFRAME
G51 Scaling --> progr. frame $P_BFRAME SCALE
G54--G59 Zero offset --> settable frame $P_UIFR
G54 P1..100 Zero offset --> settable frame $P_UIFR
G68 3D rotation --> base frame $P_CHBFRAME[3]
G68 2D rotation --> base frame $P_CHBFRAME[2]
G51.1 Mirroring --> base frame $P_CHBFRAME[1]
G92 Set actual value--> base frame $P_CHBFRAME[0]S
G10L2P0Ext.zerooffset-->baseframe$P_CHBFRAME[0]S
To uncouple the concerned frames between the Siemens and the ISO modes, four
new system frames are provided: $P_ISO1FRAME to $P_ISO4FRAME. The frames are created with the machine data 28082: $MC_MM_SYSTEM_FRAME_MASK, bits 7 to 10. The reset behavior is set using the machine
data 24006: $MC_CHSFRAME_RESET_MASK, bits 7 to 10.
2-26
Fig. 2-2 shows the G codes in the ISO mode and the assignment of the frames if
the system frames $P_ISO1FRAME to $P_ISO4FRAME, $P_SETFRAME and
$P_EXTFRAME are created.
Fig. 2-2Mapping of the ISO functions to the ISO frames and Siemens frames
Note
If the new frames are created, the ISO G codes will write to these frames; if they
are not created, the frames are written as described in Section 2.2.4.
The tables on the following pages illustrate which G codes write to which frames,
how they are created and how the reset behavior of the frames must be set to
achieve a compatible behavior to the ISO mode original. The reset behavior can be
set deviating from the ISO mode original using the MDs mentioned above. This
can be necessary when switching from the ISO mode to the Siemens mode.
If all frames are created, it is no longer necessary for the ISO mode that the frames are configured using the FINE component. The machine data 18600:
$MN_MM_FRAME_FINE_TRANS need not be set to ”1”. If you switch from the
ISO mode to the Siemens mode and if the Siemens mode uses a function which
requires a fine offset (e.g. G58, G59), $MN_MM_FRAME_FINE_TRANS must remain ”1”.
G54.1 Pxx is provided as an alternative notation to G54 Pxx. The functionality is
identical. With G54.1 the P address must always be programmed in the block. If P
is not programmed, alarm 12080 (syntax error) is produced.
Previously, it was not possible to program G54.1 P.. in ISO dialect T . G code group
14 in ISO dialect T has now been extended with G code G54.1 and G54.1 is now
displayed by default if P is programmed.
Previously, when programming G54 Pxx or G54.1 Pxx, G54.1 was displayed in the
G code display in ISO dialect M.
MD $MC_EXTERN_FUNCTION_MASK bit 11 can now be used to activate the
display of the programmed P after the point in the G code display.
03.07
Programmed
G54 P1Display G54P1G54.1
G54 P28Display G54P28G54.1
G54.1 P28Display G54P28G54.1
G54 P48Display G54P48G54.1
G54.1 P48Display G54P48G54.1
2.2.6Writing a zero offset with G10
G10 can be used from the parts program to write the zero offsets.
G10 L2 P1...P6 X.. Y..; G54.. G59
G10 L20 P1...P100; Additional, settable ZO
G10 L2 P0External ZO extOffset
These zero offsets are mapped onto the same frames as the zero offsets that
already exist in ISO Dialect M.
Note
Bit 11 = 1Bit 11 = 0
2-30
There are no additional zero offsets with the 802D sl.
G10.6 <AxisPosition> is used to activate a retraction position for the rapid lifting of
a tool (e.g., in the event of a tool break). The retraction motion itself is started with
a digital signal. The second NC fast input is used as the start signal.
Machine data $MN_EXTERN_INTERRUPT_NUM_RETRAC is used to select a
different fast input (1 -- 8).
In Siemens mode, the activation of the retraction motion comprises a number of
part program commands.
G10.6 is used to group these part program commands internally in a command
set.
In order to activate an interrupt input (SETINT(2)), an interrupt program (ASUP)
must also be defined. If one has not been programmed, the part program will not
be able to continue as it will be interrupted with a reset alarm once the retraction
motion is complete. The interrupt program (ASUP) CYCLE3106.spf is always used
for fast retraction with G10.6. If the part program memory does not contain
program CYCLE3106.spf, alarm 14011 “Program CYCLE3106 not available or not
enabled for processing” is output in a part program set with G10.6.
The behavior of the control following fast retraction is specified in ASUP
CYCLE3106.spf. If the axes and spindle are to be stopped following fast retraction,
M0 and M5 must be programmed accordingly in CYCLE3106.spf.
If CYCLE3106.spf is a dummy program, which only contains M17, the part
program will continue uninterrupted following fast retraction.
If G10.6 <AxisPosition> is programmed to activate fast retraction, when the input
signal of the second NC fast input changes from 0 to 1, the motion currently in
progress is interrupted and the position programmed in set G10.6 is approached at
rapid traverse. The positions are approached absolutely or incrementally according
to the program settings in set G10.6.
The function is deactivated with G10.6 (without positional data). Fast retraction by
means of the input signal of the second NC fast input is disabled.
Siemens
To some extent, the fast retraction function with G10.6 can be achieved using
function POLF[<AxisName>] = <RetractionPosition>. This function will also retract
the tool to the programmed position. However, it does not support the remainder of
the ISO dialect original functionality. If the interrupt point cannot be approached
directly, obstructions must be bypassed manually.
03.07
Restrictions
References:/PGA/, Programming Guide Advanced,
Chapter “Extended Stop and Retract”
Only one axis can be programmed for fast retraction.
Syntax G33 X.. Z.. F.. Q.. is used to program multiple threads in ISO dialect T and
M mode, whereby:
X.. Z..= Thread end position
F..= Lead
Q..= Initial angle
Threads with offset slides are programmed by entering starting points, which are
offset from one another, in set G33. The starting point offset is entered at address
“Q” as an absolute angular position. The corresponding setting data
($SD_THREAD_START_ANGLE) is changed accordingly.
Example:Q45000 means: Start offset 45.000 degrees
Range of values: 0.0000 to 359.999 degrees
The initial angle must always be programmed as an integer value. The input
resolution for angular data is 0.001 degrees.
Programming
2.2 G commands
Example:
N200 X50 Z80 G01 F.8 G95 S500 M3
N300 G33 Z40 F2 Q180000
This produces a thread with a lead of 2 mm and a starting point
offset of 180 degrees.
2.2.10Threads with variable lead (G34)
Syntax G34 X.. Z.. F.. K.. is used to program threads with variable lead in ISO
dialect T and M mode, whereby
X.. Z..=Thread end position
F..=Lead
K..=Lead increase (positive value)/
lead decrease (negative value)
G34 is used to increment or decrement the lead by the value programmed at
address K on each spindle revolution.
Example:
N200 X50 Z80 G01 F.8 G95 S500 M3
N300 G91 G34 Z25.5 F2 K0.1
The programmed distance of 25.5 mm corresponds to 10 spindle revolutions.
MD 20734: $MC_EXTERN_FUNCTION_MASK, bit 2 defines how the programmed
dwell time will be interpreted in a G04 block. The hold time can be programmed
using G04 X U or P .
Bit 2 =0:Dwell time is always interpreted in [s].
Bit 2 =1:If G95 is active, dwell time is interpreted in spindle
revolutions.
In the case of standard notation, X and U values without a decimal point are
converted into internal units depending on IS-B or IS-C. P is always interpreted in
internal units.
2.2.12Scaling and mirroring: G51, G51.1 (ISO Dialect M)
G51 selects scaling and mirroring, G51.1.
There are two scaling modes:
S Axial scaling with parameters I, J, K
If I, J, K is not programmed in the G51 block, the default value from the setting
data is effective.
Negative axial scaling factors have the additional effect of mirroring.
S Scaling in all axes with scale factor P
If P is not programmed in the G51 block, the default value from the setting data is
effective. Negative P values are not possible.
The scale factors are multiplied by either 0.001 or 0.00001.
Note
If a factor other than “1” is programmed for parameters I, J, K or if the address is
missing (default value is active for I, J, K), the contour is also scaled.
Axial scaling is not possible when MD $MC_AXES_SCALE_ENABLE = 0.
The reference point during scaling is always the workpiece zero; it is not possible
to program a reference point.
Mirroring
G51.1 selects mirroring.
Mirroring is performed around a mirror axis that runs parallel to X, Y or Z and
whose position is programmed with X, Y or Z. G51.1 X0 is used to mirror about the
X axis and G51.1 X10 is used to mirror about an axis that runs parallel to the X
axis at a distance of 10 mm.
All axes in the channel and not just the geometry axes can be mirrored.
G51.1 functions additively, i.e. following N5 G51.1 X10 and N10 G51.1 Y10,
mirroring in X and V is active.
Example:G51.1 X80.
Mirroring is performed around a mirror axis that runs parallel to Y and that crosses
the X axis at position 80.
03.07
Y
Mirrored
G51.1 X80
60
Fig. 2-4Mirroring around a mirror axis parallel to Y
80
Original
100
X
If the standard notation is active (see Subsection 2.2.7), the axis positions without
a decimal point are interpreted in internal units.
Mirroring is deselected with G50.1 X0 Y0. It can also be deselected for individual
axes. Following G50.1 X0, mirroring is only deselected for the X axis; mirroring
around all other axes remains active.
G51.1 and G50.1 must be in a block of their own.
G51.1 is mapped onto channel-specific base frame [1]. For this purpose,
MD 28081 $MC_MM_NUM_BASE_FRAMES >=2 must be set.
When base frame[1] is changed in Siemens mode, it directly affects the function in
ISO mode.
If the frame is deleted in every frame component, this corresponds to a G50.1 X0
Y0.. in all axes.
2-38
G51.1 is deselected on a Reset.
Note
For uncoupling the frames between the Siemens and the ISO modes (solution
line), see Section 2.2.5.
G60 is used in the ISO dialect original for backlash compensation. With Sinumerik,
it is achieved using the internal backlash compensation; therefore, there is no G
function in the Siemens mode, which corresponds to G60 in the ISO dialect original.
It is not possible to replace G60 by a G macro call, since it is not possible to execute two subroutine calls in one NC block. Since the oriented positioning (backlash) must be performed before executing the NC block, the call of a G macro at
the end of the block would be too late.
Since G60 is used for backlash compensation and this function can be activated
via the axial machine data $MA_BACKLASH[ ], G60 is skipped in the ISO mode
without triggering a reaction.
If the programmed G60 is to be taken into account when running envelope cycles,
this information is provided to the cycle variable $C_G60_PROG. If G60 is programmed, $C_G60_PROG = 1 is set; $C_G60_PROG is canceled with return to
the subroutine. If you require, in addition, the information in a block whether the
cycle call is also programmed, you can take this information from the cycle variable
$C_G_PROG. The information from these two system variables can be used to
add a G60 functionality to the envelope cycles. The information whether a modal
cycle is active can also be obtained from the system variable $P_MC ($P_MC = 1
--> a modal subroutine is active).
Programming
2.2 G commands
$C_G60_PROG is only set to ”1” if G60 is programmed in an NC block such as if
G60 were a modal G function.
The coordinate system is rotated about the vertical axis of the selected plane.
Programming
G68 X.. Y.. R..
X.. Y ..:Coordinates of the pivot point related to the current
workpiece zero. If a coordinate is not programmed, the
pivot point is taken from the actual value memory.
The value is always interpreted as an absolute value.
R:The angle of rotation is interpreted as an absolute or
incremental value depending on G90/G91. If an angle is not
programmed, the angle from setting data
$SA_DEFAUL T_ROT_FACTOR_R is active.
G68mustbeinablockofitsown.
03.07
G69Rotation Off; Additional codes can be programmed
G68 is mapped onto channel-specific base frame 2. For this purpose, machine
data MD 28081: $MC_MM_NUM_BASE_FRAMES >= 3 must be set.
A programmed angle R is not entered in setting data
42150: $SA_DEFAULT_ROT_FACTOR_R. This setting data can only be written
manually and is effective provided that no R has been programmed in the G68
block.
Note
For uncoupling the frames between the Siemens and the ISO modes (solution
line), see Section 2.2.5.
3D rotation
G code G68 has been expanded for 3D rotation.
Programming
in this block.
2-40
G68 X.. Y.. Z.. I.. J.. K.. R..
X.. Y .. Z..:Coordinates of the pivot point related to the current
workpiece zero. If a coordinate is not programmed
the pivot point is at the workpiece zero. The value is always
interpreted as an absolute value. The coordinates of the pivot
point act like a zero offset. A G90/91 in the block has no effect
I.. J.. K..:Vector in the pivot point. The coordinate system is rotated
about this vector by the angle R.
R:Angle of rotation, always interpreted as an absolute value.
If an angle is not programmed, the angle from setting
data 42150 $SA_DEFAULT_ROT_FACTOR_R is active.
G68mustbeinablockofitsown.
The distinction between 2D and 3D rotation is determined solely by programming
the vector I, J, K. If no vector exists in the block, G68 2DRot is selected. If a vector
exists in the block, G68 3DRot is selected.
If a vector of length 0 (I0, Y0, K0) is programmed, the alarm 12560 “Programmed
value lies outside the permissible limits” is output.
With G68, two rotations can be connected in series. If a G68 is not already active
in a block containing G68, the rotation is written into channel-specific base frame 2.
If G68 is already active, the rotation is written in channel-specific base frame 3.
This means that both rotations are activated in sequence.
Note
For uncoupling the frames between the Siemens and the ISO modes (solution
line), see Section 2.2.5.
With G69, 3D rotation is terminated. If two rotations are active, they are both
deactivated with G69. G69 does not have to be in a block of its own.
2.2.15Double-slide or double-turret machining G68 / G69
Does not work with SINUMERIK 802D sl.
Function G68/G69 is used to control the two-sided machining of turned parts (both
machining with a double slide in two channels and machining in one channel with
two tools with a fixed connection at a distance x).
MD $MN_EXTERN_DOUBLE_TURRET_ON is used to define whether machining
in the two channels is synchronized (= FALSE) or if one of two fixed-connection
tools is used alternately for machining (= TRUE).
On fixed-connection tools, G68 is used to activate the distance x entered in MD
42162: $SC_EXTERN_DOUBLE_TURRET_DIST as an additive zero offset in the
X axis. As the second tool machines the opposite side of the turned part, G68 also
activates mirroring about the Z axis (directional reversal of the X axis). The next
set with axis motions activates the zero offset and mirroring for the second tool.
G69 disables zero offset and machining continues with the first tool.
G68 and G69 must only be programmed in the set.
03.07
The sign of the offset must be taken into account for tool length offset in the X axis
for the second tool. The sign must be entered as if the X axis was not mirrored or
setting data $SC_MIRROR_TOOL_LENGTH (mirror tool length offset) and
$SC_MIRROR_TOOL_WEAR (mirror tool length offset wear values) must be set.
Machine data $MN_MIRROR_REF_AX must = 0 or = 1 in order to always mirror
the X or first axis.
Programming G68 when G68 is already active will read over the G function. The
same is true of G69.
The example below illustrates machining with two fixed-connection tools. In order
for the function to be effective, machine data $MN_EXTERN_
DOUBLE_TURRET_ON must be set to TRUE.
If setting data 42162: $SC_EXTERN_DOUBLE_TURRET_DIST = 0, alarm “12728
Distance for double turret not set” will be output.
Programming
120
Tool offset
ToolT1
80 φ
Tool offset
ToolT2
X
60
180
120 φ
Fig. 2-5Machining with 2 fixed-connection tools
Example:
φ
40
220
Z
N100 X40. Z180. G1 F1 G95 S1000 M3 T1
N110 G68
; Activate mirroring about Z and additive zero offset (220 mm)
Setting $MN_EXTERN_DOUBLE_TURRET_ON to FALSE activates channel
synchronization with G68. If G68 is programmed in one channel, machining will
cease until G68 is detected in the second channel. This function is used to
synchronize the first and second channels. No other synchronizations are
performed. In order for both tools to be synchronized during subsequent
machining, the motions and feeds programmed in the two channels must be
identical.
Wait mark 1 is used for G68 and wait mark 2 for G69 in order to synchronize the
first 2 channels. Therefore, the first two M functions may not be used
simultaneously for channel synchronization in the same part program (see
Subsection 4.1.10).
G68 is only effective in the first two channels. If G68 is programmed in another
channel and machine data $MN_EXTERN_DOUBLE_TURRET_ON = FALSE,
G68 is read over.
The function is used to produce thin turned parts. The two tools should therefore
execute the same motion on the respective opposite side of the turned part,
mirroring about the Z axis. For this purpose, the same traversing motions and
feeds must be programmed in both channels.
03.07
Example of synchronous machining with two channels.
In ISO Dialect mode, NC program sections programmed with polar coordinates
must commence with start command G16. Until the end command G15 is reached,
the coordinates of the end points are interpreted as the polar coordinate values for
radius and angle in the current plane.
The first axis of the plane is the polar radius, the second axis is the polar angle, i.e.
X is the radius and Y is the angle for G17.
After G16 a new pole is set in each block up to G15, with the result as follows for
G17:
S G90 XThe pole is at the workpiece zero
S G91 XThe pole is at the current position
S No X in the blockThe pole is at the workpiece zero
If the pole is moved from the current position to the workpiece zero, the radius is
calculated as the distance from the current position to the workpiece zero.
03.07
Example:
G1 F200feed
N5 G17 G90 X0 Y0
N10 G16 X100. Y45.
N15 G91 X100 G90 Y0Pole is the current position, position X 170,711
N20 Y90.No X in block, pole is at workpiece zero,
The polar radius is always traversed as an absolute distance; the polar angle can
be interpreted as an absolute or incremental value.
Programmed angle
In the case of active polar coordinate programming, the programmed angle can be
read via the system variable $P_AP.
This variable is inserted in the shell cycle. Before the new pole is set, with
incremental programming, the angle must be stored because the angle will be
deleted.
Polar programming is terminated by G15. The polar radius is set to 0.
Polar coordinates ON, pole is the workpiece zero,
Position X 70,711 Y 70,711 in the Cartesian
coordinate system
G12.1 and G13.1 are used to switch on and switch off an interpolation in the
processing level between an axis of rotation and a linear axis. A second linear axis
passes vertically through this plane. This function corresponds to the Transmit
function in Siemens mode. In Siemens mode, two Transmit transformations can be
parameterized. For G12.1 the first TRANSMIT data block is always the one which
must correspond to the second transformation record.
Note
For a detailed description of the TRANSMIT function please refer to the following
documentation:
/FB2/Description of Functions, Extended Functions, Chapter M1 and
Geo axis exchange (parallel axes with G17 (G18, G19)) must not be active.
2.2.18Cylindrical in terpolation G07.1 (G107)
Function G07.1 (cylindrical interpolation) can be used to mill any kind of grooving
on cylindrical bodies. The path of the grooving is programmed by reference to the
developed, level surface of the cylinder barrel. Cylindrical interpolation is started in
function G07.1 by specifying the cylindrical radius G07.1 C<cylindrical radius> and
ended with G07.1 C0 (radius = 0).
Note
The function is mapped internally onto the Siemens functionality TRACYL. In ISO
Dialect mode, G07.1 always activates the first TRACYL transformation and the
first transformation record. The second TRACYL function cannot be activated in
ISO Dialect mode. For a detailed description and the parameter setting for the first
TRACYL function, please refer to the following documentation:
/FB2/Description of Functions, Extended Functions, Chapter M1 and
In Siemens mode the axis of rotation for cylindrical interpolation must be defined in
machine data.
In ISO Dialect mode the axis of rotation for cylindrical interpolation is defined by
programming G07.1 <axis of rotation>... .
C
Radius
Z
Z
mm
N05
120
N10
90
70
50
0
30
Fig. 2-8Example of cylindrical interpolation G07.1
Programming example in Siemens mode: The Y axis is assigned to the axis of
rotation as a linear axis.
%0001
N05 G00 G90 Z100 C0
N10 G01 G91 G18 Z0 C0;
N20 TRACYL(114.598)
N30 G90 G01 G42 Z120 D01 F250
N40 Y30
N50 G02 Z90 Y60 RND=30
N60 G01 Z70
N70 G03 Z60.0 Y70 RND=10
N80 G01 Y150
N90 G03 Z70 Y190 RND=75
N100 G01 Z110 Y230
N110 G02 Z120 Y270 RND=75
N120 G01 Y360
N130 G40 Z100
N140 TRAFOOF
N150 M30 ;
03.07
;Deselect cylindrical interpolation
;Select cylindrical interpolation with
; radius 57.299 mm
;Deselect cylindrical interpolation
2.2.19Interrupt program with M96 / M97 (ASUB)
M96
A subprogram can be defined as an interrupt routine with M96 P <program
number>.
This program is started by an external signal. The first high-speed NC input of the
8 inputs available in Siemens mode is always used to start the interrupt routine.
Machine data $MN_EXTERN_INTERRUPT_NUM_ASUP lets you select an other
fast input (1 -- 8).
The function is mapped onto standard syntax: SETINT(x) <CYCLE396> [PRIO=1].
In shell cycle CYCLE396, the interrupt program programmed with Pxxxx is called
in ISO mode. The program number is in $C_PI. At the end of the shell cycle,
machine data
10808: $MN_EXTERN_INTERRUPT_BITS_M96 BIT1 is evaluated, resulting
either in positioning at the interruption point with REPOSA or in continuation with
the next block. The new cycle variable $C_PI contains the value programmed with
“P” without leading zeroes. These must be added to fill out to four digits in the shell
cycle before the subprogram is called.
Example: N0020 M96 P5
Call in shell cycle
progName = “000” << $C_PI
ISOCALLprogName
See treatment of 8-digit program numbers, if MD
$MC_EXTERN_FUNCTION_MASK, bit 6 is set.
M97 is used to suppress starting of the interrupt routine. The interrupt routine can
then only be started by the external signal following activation with M96.
This corresponds to Standard syntax: ENABLE(x).
x = content of $MN_EXTERN_INTERRUPT_NUM_ASUP
If the interrupt program programmed with M96 Pxx is called up directly with the
interrupt signal (without the intermediate step with CYCLE396), machine data
20734: $MC_EXTERN_FUNCTION_MASK BIT10 must be set. The subprogram
programmed with Pxx is then called on a 0 --> 1 signal transition in Siemens mode.
The M function numbers for the interrupt function are set via machine data. With
machine data 10804: $MN_EXTERN_M_NO_SET_INT , the M number is used to
activate an interrupt routine and with MD 10806:
$MN_EXTERN_M_NO_DISABLE_INT the M number is used to suppress an
interrupt routine.
Only non-standard M functions are permitted to be set. M functions M96 and M97
are set as defaults. To activate the function, bit 0 must be set in machine data
10808: $MN_EXTERN_INTERRUPT_BITS_M96. These M functions will not be
output to the PLC in this case. If bit 0 is not set, the M functions will be interpreted
as conventional auxiliary functions.
On completion of the “Interrupt” program, the end position of the parts program
block that follows the interruption block is approached. If processing of the parts
program has to continue starting from the interruption point, there must be a
REPOS instruction at the end of the “Interrupt” program, e.g. REPOSA.
For this purpose the interrupt program must be written in Siemens mode.
The M functions for activating and deactivating an interrupt program must be in a
block of their own. If further addresses other than “M” and “P” are programmed in
the block, alarm 12080 (syntax error) is output.
Note about machining cycles
For ISO dialect original, you can set whether a machining cycle will be interrupted
by an interrupt routine immediately or not until the end. The shell cycles must
evaluate machine data
10808: $MN_INTERRUPT_BITS_M96 bit 3 for that purpose. If bit=1, the interrupt
must be disabled at the beginning of the cycle with DISABLE(1) and reactivated at
the end of the cycle with ENABLE(1) to avoid interrupting the machining cycle.
Because the interrupt program is only started on a 0/1 signal transition, the
interrupt input must be monitored with a disabled interrupt during the cycle runtime
with a synchronized action in the shell cycle. If the interrupt signal switches from 0
to 1, the interrupt signal after the ENABLE(1) must be set once again at the end of
the shell cycle, so that the interrupt program will then start. To permit writing to the
interrupt input in the shell cycle, the machine data
10361: $MN_FASTO_DIG_SHORT_CIRCUIT[1] must be parameterized.
03.07
Machine data
MD $MN_EXTERN_INTERRUPT_BITS_M96:
Bit 0:= 0: Interrupt program is not possible, M96/M97 are conventional
Bit 1:= 0: Execution of parts program continues from the final position
Bit 2:= 0: The interrupt signal interrupts the current block immediately and
Bit 3:= 0: The machining cycle is interrupted on an interrupt signal
Bit 3 must be evaluated in the shell cycles and the cycle sequence must be
adapted accordingly.
M functions
= 1: Activation of an interrupt program with M96/M97 permitted
of the next block after the interruption block
= 1: Continue parts program as from interruption position
(evaluated in interrupt program (ASUB), return with/without
REPOSL)
starts the interrupt routine
= 1: The interrupt routine is not started until the block has been
completed.
= 1: The interrupt program is not started until the machining cycle
has been completed.
(evaluated in the shell cycles)
2-52
Bit 1 must be evaluated in the interrupt program. If bit 1 = TRUE, on completion of
the program, REPOSL must be used to reposition at the interruption point.
N1000 M96 P1234; Activate ASUB 1234.spf in the case of a rising
“
“
N3000 M97; Deactivate the ASUB
Rapid lifting (LIFTFAST) is not performed before the interrupt program is called.
On the rising flank of the interrupt signal, depending on machine data MD 10808:
$MN_EXTERN_INTERRUPT_BITS_M96, the interrupt program is started
immediately.
Limitations in Siemens mode
The interrupt routine is handled like a conventional subprogram. This means that in
order to execute the interrupt routine, at least one subprogram level must be free.
(12 program levels are available in Siemens mode, there are 5 in ISO Dialect
mode.)
Programming
2.2 G commands
; edge on the first high-speed input, program 1234.spf
; is activated
The interrupt routine is only started on a signal transition of the interrupt signal
from 0 to 1. If the interrupt signal remains permanently set to 1, the interrupt
routine will not be restarted.
Limitations in ISO Dialect mode
One program level is reserved for the interrupt routine so that all permissible
program levels can be reserved before the interrupt program is called.
Depending on the machine data, the interrupt program will also be started when
the signal is permanently on.
In ISO dialect mode, round brackets are interpreted as comment characters.
In Siemens mode, “;” is interpreted as a comment. To simplify matters, “;” is also
interpreted as a comment in ISO dialect model.
If the comment start character “(” is used again within a comment, the comment
will not be terminated until all open brackets have been closed again.
In blocks N5 and N10 X100 Y100 is executed, in block N15 only Y100, as the first
bracket is closed only after X100. Everything up to this position is interpreted as a
comment.
03.07
2.2.21Block skip
The skip character “/” can be anywhere within the block, even in the middle. If the
programmed skip level is active at the moment of compiling, the block will not be
compiled from this position to the end of the block. An active skip level therefore
has the same effect as an end of block.
Example:
N5 G00 X100. /3 YY100----> Alarm 12080,
N5 G00 X100. /3 YY100----> No alarm when skip level 3 is active
Skip characters within a comment are not interpreted as skip characters.
Example:
N5 G00 X100. ( /3 part1 ) Y100 ;even when skip level 3 is active, the
The skip level can be /1 to /9. Skip values <1 >9 give rise to alarm 14060
The function is mapped onto the existing Siemens skip levels. In contrast to ISO
Dialect Original, / and /1 are separate skip levels and therefore have to be
activated separately.
M functions are output to the PLC as auxiliary functions. Only M98 and M99 are
exceptions. All other predefined M functions are transferred to the PLC as auxiliary
functions.
The following are predefined M functions:
M17, M40, M41, M42, M43, M44, M45, M70, M96, M97, M98, M99.
Spindle axis changeover using M29
In ISO Dialect mode the spindle is switched to axis operation with the aid of M29.
The M function number can also be set variably with machine data.
MD 20095 $MC_EXTERN_RIGID_TAPPING_M_NR is used to preset the
M function number. The machine data is only effective in external language mode
and is initialized with M29. It may only be assigned M function numbers which are
not used as default M functions. M function numbers M0-M5, M30, M98, M99 are
not allowed.
The same function is executed in Siemens mode with M70.
MD 20094 $MC_SPIND_RIGID_TAPPING_M_NR is used to preset the M function
number. The machine data is only effective in Siemens mode and is initialized with
M70. This allows an M function other than M70 to be used for the spindle
switchover in Siemens mode. The machine data may only be assigned M function
numbers which are not used as default M functions. The following are not allowed:
M0--M5, M17, M19, M30, M40--M45.
Programming
2.2 G commands
H
All H functions are output to the PLC as auxiliary functions with ISO Dialect M. In
ISO Dialect T, G code system A, H is the incremental distance of the 4th axis
provided that a 4th axis exists.
T
T functions are output to the PLC as auxiliary functions. T has the additional
meaning of a tool selection.
D
Die The D function is output to the PLC as an auxiliary function. With ISO Dialect
M, tool length compensation is activated with address D.
If B is not an axis, the B function is output to the PLC as an auxiliary function with
address extension H1=.
Example: B1234 is output as H1=1234.
2.2.23Align first reference po in t : G28
CYCLE328 is called up automatically when ISO Dialect command “G28 <Axis>” is
read in. <Axis> specifies the intermediate position (incremental or absolute) via
which the reference point is to be approached. The intermediate position and the
reference position are then approached in positioning mode.
The cycle is only valid for the axes supported by ISO Dialect:
S ISO Dialect M:X, Y , Z (A, B, C, U, V, W)
S ISO Dialect T:X, Z, Y (C)
03.07
The cycle always runs with radius programming (DIAMOF). When the cycle is
terminated, the G commands that were active before the cycle was called are
effective again.
Before the 1st reference point is approached, various machine data must be set,
see Chapter 4 “Start-Up”.
2.2.24Enable/disable feed-forward control using G08 P..
Does not work with SINUMERIK 802D sl.
Feed-forward control reduces speed-related overtravel during contouring to
virtually nil. Traversing with feed-forward control enables higher contouring
precision and thus better finished results.
Note
Machine data is used to define the type of feed-forward control and which path
axes are to be traversed under pilot actuation.
Default: Speed-dependent feed-forward control.
Option:Acceleration-dependent feed-forward control.
If G08 is programmed without “P”, alarm 12470 is produced.
To make it more convenient to use G08 P1 to activate other functions such as
SOFT, BRISK etc., G08 P.. is used to call the CYCLE308.spf cycle.
G08 P1 has to be in a block of its own.
2.2.25Compressor in ISO dialect mode
The commands COMPON, COMPCURV, COMPCAD are commands in the
Siemens language and activate a compressor function grouping several linear
blocks to form one machining section.
It is now possible to compress linear blocks, too, in ISO dialect mode with this
function, if this function is activated in Siemens mode.
The blocks must consist of only the following commands:
S Block number
S G01, modal or in the block
Programming
2.2 G commands
S Axis assignments
S Feedrate
S Comments
If a block contains other commands (e.g. aux. functions, other G codes, etc.),
compression is not performed.
Value assignments with $x for G, axes, and feedrate are possible, as is the Skip
function.
At inside corners with active tool radius compensation it is often better to reduce
the feedrate.
G62 only acts at inside corners with active tool radius compensation and active
continuous-path operation. It only takes account of corners whose inside angle is
smaller than $SC_CORNER_SLOWDOWN_CRIT. The inside angle is determined
from the bend in the contour.
The feedrate is reduced by factor $SC_CORNER_SLOWDOWN_OVR:
traveled feedrate =
F * $SC_CORNER_SLOWDOWN_OVR * feedrate override.
The feedrate override is now composed of the multiplied feedrate override from the
machine control panel and the override from synchronized actions.
The feedrate reduction is started at distance 42520:
$SC_CORNER_SLOWDOWN_START before the corner. It ends at distance
42522: $SC_CORNER_SLOWDOWN_END after the corner (see Fig. 2-9). An
appropriate path is used at curved contours.
03.07
Y
Layer to be milled off
Tool center point path
$SC_CORNER_SLOWDOWN_START
$SC_CORNER_SLOWDOWN_END
Inside angle $SC_CORNER_SLOWDOWN_CRIT
Path velocity v
F
F * $SC_CORNER_SLOWDOWN_OVR
$SC_CORNER_SLOWDOWN_START
$SC_CORNER_SLOWDOWN_END
Workpiece
Feedrate reduction at corners
Path s
X
2-58
Fig. 2-9Parameterization of feedrate reduction G62, example of a 90_ corner
S If $SC_CORNER_SLOWDOWN_CRIT == 0, the corner deceleration will only
take effect at reversing points.
S If $SC_CORNER_SLOWDOWN_START and
$SC_CORNER_SLOWDOWN_END are equal to 0, the feedrate reduction will
be approached with the permissible dynamic response.
S If $SC_CORNER_SLOWDOWN_OVR == 0, a brief stop will be inserted.
S $SC_CORNER_SLOWDOWN_CRIT refers to geometry axes with G62. It
defines the maximum inside angle in the current machining plane up to which
the corner deceleration will be applied. -- G62 is not active on rapid traverse.
Programming
2.2 G commands
Activation
The function is activated with G62 or G621. The G code is activated either with the
corresponding parts program command or with
$MC_GCODE_RESET_VALUES[56].
Subprogram calls are programmed with M98 in ISO Dialect.
For the program syntax, see Fig. 2-10.
M98 P xxxxyyyy
Program number (max. 4 digits)
Number of repetitions (max. 4 digits)
Fig. 2-10Description of parameters allowed
Programming
The program syntax M98 Pxxxxyyyy is used to call a subprogram with the number
yyyy and repeat it xxxx times. If the xxxx is not programmed, the subprogram is
executed only once. The subprogram name always consists of 4 digits or is
extended to 4 digits by adding 0’s.
For example, if M98 P21 is programmed, the parts program memory is searched
for program name 0021.spf and the subprogram is executed once. To execute the
subprogram 3 times, program M98 P30021.
SW 6 upwards
Until now the number of program executions (number of repeats) has been
programmed in ISO Dialect M/T in conjunction with the subprogram number at
address “P”.
As an alternative, the number of subprogram executions can now also be
programmed at address “L”. The number of the subprogram is still programmed as
Pxxxx. If the number of executions is programmed at both addresses, the number
of executions programmed at address “L” is valid. The number of subprogram
executions lies between 1 and 9999.
Example:
N20 M98 P20123;Subprogram 123.spf will be executed twice
N40 M98 P55 L4;Subprogram 55.spf will be executed four times
N60 M98 P30077 L2;Subprogram 77.spf will be executed twice
;The number of executions programmed
;at address “P” =3 is ignored
M99 terminates the subprogram.
If M99 Pxxxx is programmed, execution resumes at block number Nxxxx on the
return jump to the main program. The block number must always begin with “N”.
The system initially searches forwards for the block number (from the subprogram
call towards the end of the program). If a matching block number is not found, the
parts program is then scanned backwards (towards the start of the program).
If M99 appears without a block number (Pxxxx) in a subprogram, the subprogram
is terminated and the processor jumps back to the main program to the block
following the subprogram call.
If M99 appears without a block number (Pxxxx) in a main program, the processor
jumps back to the start of the main program and runs the program again.
These M commands are not output to the PLC.
Subprogram return jump with “RET”
03.07
Valid only for ISO Dialect T.
In the Siemens shell cycles for stock removal (as in ISO Dialect), it is necessary
after roughing to resume program execution in the main program after the contour
definition. To achieve this, the shell cycle must contain a subprogram return jump
to the block after the end of the contour definition. The RET command has been
extended with two optional parameters for skipping the blocks with the contour
definition in the stock removal cycles after the subprogram call (with G71--G73).
The command RET (STRING: <block number/label>) is used to resume program
execution in the calling program (main program) at the block with
<blocknumber/label>.
If program execution is to be resumed at the next block after <block
number/label>, the 2nd parameter in the RET command must be > 0; RET (
<block number/label>, 1). If a value > 1 is programmed for the 2nd parameter, the
subprogram also jumps back to the block after the block with <block
number/label>.
In G70--G73 cycles, the contour to be machined is stored in the main program. The
extended RET command is required in order to resume execution after the contour
definition in the main program at the end of G70 (finish cut via contour with stock
removal cycle). To jump to the next NC block after the contour definition at the end
of the shell cycle for G70, the shell cycle must be terminated with the following
return syntax:
The search direction for <block number/label> is always forwards first (towards the
end of the program) and then backwards (towards the start of the program).
N10 X10. Y20.
N20 G71 P30 Q60 U1 W1 F1000 S1500
N10 ...;Shell cycle for stock removal cycle
N20 DEF STRING[6]BACK
N30 ...
N90
N100 RET (”N”<<$C_Q, 1);Return jump to block after
;contour def. -> N70
N30 X50. Z20.
N40 X60.
N50 Z55.
N60 X100. Z70.
N70 G70 P30 Q60
N80 G0 X150. Z200.
N90 M30
Note
M30 in Siemens mode: is interpreted as a return jump in a subprogram.
M30 in ISO Dialect mode: is also interpreted as the end of the parts program in a
subprogram.
2.3.2Siemens language commands in ISO Dialect mode
Certain Siemens language commands are also required in ISO Dialect mode for
Shopmill. These commands are executed in ISO Dialect mode. They include
subprogram calls with and without passed parameters (not calls with Lxx, because
address L has a different meaning for ISO Dialect), program section repetition and
control structures. All other Siemens language commands are denied with an
alarm in ISO Dialect mode.
The following Siemens language commands can be programmed when ISO
Dialect mode is active:
2.3.3Extending the subprogram call for contour preparation
with CONTPRON
In ISO Dialect, the contour definition for stock removal cycles G70 -- G73 is not
stored separately in a subprogram (as in SINUMERIK), but appears in the parts
program (main program). When the cycles are called, the contour definition section
is defined by a start and end block number. The cycles receive this block number
as a passed parameter. The indirect subprogram call has been extended for
Siemens adaptation cycles.
Previously, subprograms were called indirectly with CALL <program name>.
The indirect subprogram call has been extended as follows for access to the
contour definition in the main program:
CALL [<program name>] BLOCK <start label> TO <end label>
If no program name or an empty string is specified as the program name, i.e. CALL
BLOCK <start label> TO <end label>, the search for the program section (start/end
label) is made in the program which is currently selected. The search for the labels
is also performed in the selected program with MDA, ASUB etc. (i.e. in the case of
MDA, the search for the labels is performed not in the MDA buffer but in the
program with the selected program name). Programming this syntax directly in a
main program has the same effect as repeating a program section in a loop with
REPEA T <start label> <end label>, i.e. the search for the start and end label is
performed in the program containing the CALL BLOCK ... command.
Programming
If a program name is specified, e.g. CALL <progName> BLOCK <start label> TO
<end label>, the system searches for the program section (surrounded by the
start/end label) in subprogram “progName”.
Nxxx RET (”N”<<$C_Q, 1);Return jump to the next block after
N1120 ....
03.07
; shell cycle CYCLE395.spf
;Stock removal cycle with additional
; parameters for start and end label
endelab)
; Read contour definition or
;call the contour program
; the contour definition
Nxxx M30
Note
The actual CONTPRON and EXECUTE calls do not have to be modified.
Search for start block number
Does not work with SINUMERIK 802D sl.
The start block number (start label) of the contour definition is always searched
first toward the end of the program (forward) and then toward the start of the
program (backward).
If the same block number is programmed more than once, the next block number
(label) after the current block in the program in which the contour definition is
contained, is recognized as the start of the contour definition (see example). The
current block is usually the block in which the stock removal cycle (shell cycle) was
called in the main program.
In stock removal cycle CYCLE395, the contour definition which appears between
blocks N10 - N30 in the main program is to be used (with CALL BLOCK N10TO N30 in CYCLE395). N40 is the current program line in the main program.
The contour definition block is printed in bold lettering in the example.
N5 G1 F500
N10 X10. Y20.
N20 X30.
N30 Y10.
N40 G71 P10 Q30...
;Call shell cycle for stock removal cycle
...;(In the stock removal cycle
...;“CALL BLOCK N10 TO N30” is programmed)
...;The contour definition is found in the
;lines printed in bold
N50 G90 G54
N60 F1000 G94
N10 X50. Y10.
N20 X33. Y11.
N30 X10.
N50 ....
N.. .....
N800 G71 P10 Q30
;Call shell cycle for stock removal cycle
...;(In the stock removal cycle, “CALL BLOCK N10 TO
;N30” is programmed)
...;The contour definition is found in
...;the lines printed in italics
In ISO Dialect mode, macros are called in the parts program with G65 Pxx, G66
Pxx. A macro is a set of parts program blocks that are terminated with M17.
When the subprogram is called, the mode is switched from ISO mode to Siemens
mode.
The following commands are used for selection and deselection:
S G65 Macro call, non-modal
S G66 Macro call, modal
S G67 Deselect modal macro call
Siemens
03.07
G commands G65 Pxx and G66 Pxx are used to start macro xx. G65 calls
subprogram Pxx once. G66 activates the Pxx subprogram call modally, and the
subprogram is then executed in every block containing axis movements (same as
MCALL xx). G67 deactivates the modal subprogram call again (equivalent to G80
for cycle calls).
In a parts program block with G65 or G66, the address Pxx is interpreted as the
program number of the subprogram containing the macro functionality. Address
Lxx can be used to define the number of passes of the macro. If a number of
passes is not programmed in the calling block, the macro is executed once. All
further addresses in this parts program block are interpreted (as in ISO Dialect
“Macro B”) as passed parameters, and their programmed values are saved in
system variables $C_A--$C_Z. These system variables can be read in the
subprograms and evaluated for the macro functionality. If further macros are called
with parameters within a macro (subprogram), the passed parameters must be
saved in internal variables in the subprogram before the new macro call.
As in the case of the machining cycles, the language mode is switched implicitly to
Siemens mode to allow the definition of internal variables. Therefore, if a further
macro call appears in the subprogram, ISO Dialect mode must be selected again
first.
Because addresses I, J, and K can be programmed up to ten times in a block by
macro call, an array index must be used to access the system variables for these
addresses. The syntax for these three system variables is then $C_I[..], $C_J[..],
$C_K[..]. The values are stored in the array in the order programmed. The number
of addresses I, J, K programmed in the block is stored in variables $C_I_NUM,
$C_J_NUM, $C_K_NUM.
The passed parameters I, J, K for macro calls are treated as one block, even if
individual addresses are not programmed. If a parameter is programmed again or
a following parameter has been programmed with reference to the sequence I, J,
K, it belongs to the next block.
To recognize the programming sequence in ISO mode, system variables
$C_I_ORDER, $C_J_ORDER, $C_K_ORDER are set. These are identical arrays
to $C_I, $C_K and contain the associated number of parameters.
Note
Programming
2.3 Subprogram and macro technology
The transfer parameters can only be read in the subroutine.
In ISO dialect 0 mode, the programmed values can be evaluated differently
depending on the programming method (integer or real value). The different
evaluation is activated via machine data.
If the MD is set, the control will behave as in the following example:
X100.;X axis is traveled 100 mm (100. with point => real value
Y200;Y axis is traveled 0.2 mm (200 without point => integer value
If the addresses programmed in the block are passed as parameters for cycles,
the programmed values are always real values in the $C_x variables. In the case
of integer values, the cycles do not indicate the programming method (real/integer)
and therefore no evaluation of the programmed value with the correct conversion
factor.
To indicate whether REAL or INTEGER has been programmed, there is the system
variable $C_TYP_PROG. $C_TYP_PROG has the same structure as
$C_ALL_PROG and $C_INC_PROG. For each address (A--Z) there is one bit. If
the value is programmed as an INTEGER, the bit is set to 0, for REAL it is set to 1.
If the value is programmed in variable $<number>, bit 2 = 1 is set.
03.07
Example:
P1234 A100. X100 --> $C_TYP_PROG == 1.
Only bit 0 is set because only A is programmed as a REAL.
P1234 A100. C20. X100 --> $C_TYP_PROG == 5.
Only bits 1 and 3 are set (A and C).
Restrictions:
Up to ten I, J, K parameters can be programmed in each block. Variable
$C_TYP_PROG only contains one bit each for I, J, K. For that reason bit 2 is
always set to 0 for I, J, and K in $C_TYP_PROG. It is therefore not possible to
ascertain whether I, J or K have been programmed as REAL or INTEGER.
Parameters P, L, O, N can only be programmed as integers. A real value
generates an NC alarm. For that reason the bit in $C_TYP_PROG is always 0.
Modal macro calls
With modal macro calls, the programmed addresses are only copied into the
system variables in the block containing the call (block with G66). The macro is
then executed in every block with an axis movement until it is deselected by G67
or a new macro call is programmed with G66. Only the macro parameters are
passed in the block containing the call (= block with G66) for modal macros. The
macro is executed for the first time in the next block containing an axis movement.
(Same procedure as MCALL xx in Siemens mode)
Until now, automatic switchover to Siemens mode was performed for macro calls
with G65/G66.
The user now has the choice whether switchover to Siemens mode takes place
when the macro starts or not. Switchover to Siemens mode only takes place when
the PROC<program name> instruction is used in the first line of the macro
program. If this instruction is missing, ISO mode will remain active during
execution of the macro program.
Programming
The user can therefore decide whether to create local variables (with DEF...) for
the purpose of storing transfer variables. It is necessary to switch to Siemens
mode to do this using the PROC instruction. The user can also specify that the
macro program (e.g. an existing ISO Dialect M/T macro) is executed in ISO mode.
A macro can be called using M numbers in the same way as G65 (see 2.3.5).
10 M function substitutions are configured with machine data
10814: $MN_EXTERN_M_NO_MAC_CYCLE and
10815: $MN_EXTERN_M_NO_MAC_CYCLE_NAME.
Parameter transfer is executed in exactly the same way as with G65. Repetitions
can be programmed with address L.
Only one M function substitution (and/or only one subprogram call) can be
executed in each line of a parts program. Conflicts with other subprogram calls are
output with alarm 12722. No further M function substitutions are made in the
replaced subprogram.
Otherwise, the same restrictions apply as for G65
Conflicts with predefined and other defined M numbers are rejected with an alarm.
A macro can be called using G numbers in the same way as G65 (see 2.3.5).
50 G function substitutions are configured with machine data
10816: $MN_EXTERN_G_NO_MAC_CYCLE and
10817: $MN_EXTERN_G_NO_MAC_CYCLE_NAME.
The parameters programmed in the block are saved in the $C_ variables. Address
L is used to define the number of times a macro is repeated. The number of the
programmed G_macro is stored in variable $C_G. All other G functions
programmed in the block are treated like normal G functions. The sequence in
which addresses and G functions are programmed in the block is irrelevant and
has no effect on the functionality.
All ISO G codes, even G codes with a decimal point (= real value) can be replaced
by a macro call.
G functions that are replaced by a macro do not exist in the control and can be
redefined with
10822: $MN_NC_USER_EXTERN_GCODES_TAB[ ].
03.07
Restrictions
Only one G/M function substitution (and/or only one subprogram call) can be
executed in each line of a parts program. Conflicts with other subprogram calls,
e.g. when a modal subprogram call is active, are signaled with alarm 12722.
If a G macro is active no more G/M macros or M subprograms are called. M
macros/subprograms are then executed as M functions, and G macros as G
functions if the relevant G function exists. Otherwise alarm 12470 is output.
N2010 G123;alarm 12470 because G123 is not a G function
N4000 label_end: G290
N4010 M17
03.07
;and a macro cannot be called when a macro is
;active. Exception: the macro was called as
;a subprogram with CALL G123_MACRO.
2.3.8High-speed cycle cutting G05 P..
G05 P.. high-speed cycle cutting takes the form of a subprogram call.
ProgrammingG05 P.. L..
PxxxxxSubprogram number, max. 10 characters
When called it is not necessary to fill with zeros as is the case
with M98.
LxxxxNumber of passes. If L is not programmed, L1 is assumed.
Example:
G05 P10123 L310123.mpf is passed through three times.
This call can be used to fetch any subprogram. This subprogram can be a
precompiled program, but does not have to be. However, only a Siemens parts
program can be precompiled.
There is not equivalent of ISO Dialect function G05 in Siemens mode. CYCLE305
enables users to program their own functionality in the context of the Siemens
functionality.
CYCLE305.spf is called when programming G05 in the following cases:
S G05 without P in the block is skipped without an alarm.
S G05.1 with and without P is skipped without an alarm.
2-76
S G05 P0 or P01 are reserved for high-speed remote buffer B. This function is not
supported.
In the cases mentioned, all addresses programmed in the block are defined in
cycle parameter $C_xx. When CYCLE305 is called there is no automatic change
of mode from ISO to Siemens. If it is intended to process CYCLE305.spf in
Siemens mode, the first program line must contain a PROC instruction as in the
case of macro calls with G65/G66.
All functions programmed in the block are executed, as previously mentioned in
the case of programming G05, that is to say, programmed axes are traversed,
auxiliary functions are produced, etc. The programmed addresses are defined in
the cycle parameters only for the purpose of supplementary information.
If G05 and a subprogram call (M98 P..) are programmed in the same block, alarm
12722 is produced.
2.3.9Switchover modes for DryRun and skip levels
Switching over the skip levels (DB21.DBB2) always meant intervening in the
program run which until now resulted in a momentary drop in velocity along the
path. The same applies when the dry run mode DryRunOff (DryRun = dry-run
feedrate DB21.DBB0.BIT6) it switched to DryRunOn and vice versa.
This drop in voltage can now be avoided with a new switchover mode which has a
restricted functionality.
Programming
With machine data assignment $MN_SLASH_MASK==2 a drop in voltage is no
longer necessary when switching skip levels (i.e. a new value in PLC-->NCK-Chan
interface DB21.DBB2).
Note
The NCK processes blocks in two stages, preliminary or preprocessing and main
processing. The result of preprocessing is put into the preprocessing memory. The
main processing stage takes the oldest block from the pre--processing memory
and traverses its geometry.
Attention
With machine data assignment $MN_SLASH_MASK==2, preprocessing is
switched over when the skip levels are switched! All blocks in the preprocessing
memory are executed with the old skip level. As a rule, the user has no influence
over the level of the preprocessing memory. The user observes the following: The
new skip level can take effect at any time after switchover!
The parts program command STOPRE empties the preprocessing memory. If the
skip level is switched over before STOPRE, it is certain that all blocks after
STOPRE will be switched over. The same applies to an implicit STOPRE.
Switching over DryRun mode results in the same restrictions.
With machine data assignment 10704: $MN_DRYRUN_MASK==2 no drop in
velocity is necessary when DryRun mode is changed. However, here too, only
preprocessing is switched over, which results in the above restrictions.
Analogously the following applies: Caution DryRun mode can become active
any time after switchover!
2.3.10Eight-digit program numbers
03.07
Eight-digit program number selection is activated with machine data
$MC_EXTERN_FUNCTION_MASK, bit6=1. This function has an effect on M98
(see Subsection 2.3.1), G65/66 (see Subsection 2.3.5), and M96 see Subsection
2.2.19).
y: Number of program runs
x : Program number
Subprogram call M98
$MC_EXTERN_FUNCTION_MASK, bit 6 = 0
M98 Pyyyyxxxx or
M98 Pxxxx Lyyyy
Program number max. four digits
Extension of program number always to four digits with 0
E.g.:M98 P20012calls 0012.mpf 2 passes
$MC_EXTERN_FUNCTION_MASK, bit 6 = 1
M98 Pxxxxxxxx Lyyyy
No extension with 0 even if the program number is less than four digits long.
It is not possible to program the number of passes and program number in P
(Pyyyyxxxxx),
the number of passes must always be programmed with L!
E.g.:M98 P123calls 123.mpf 1 pass
M98 P20012calls 20012.mpf 1 pass,
Caution: This is no longer compatible with the ISO dialect original
$MC_EXTERN_FUNCTION_MASK, bit6 = 0
G65 Pxxxx Lyyyy
Extension of program number always to four digits with 0. Program number with
more than four digits triggers an alarm.
$MC_EXTERN_FUNCTION_MASK, bit6 = 1
G65 Pxxxxxxxx Lyyyy
No extension with 0 even if the program number is less than four digits long.
Program number with more than eight digits triggers an alarm.
Interrupt M96
Does not work with SINUMERIK 802D sl.
$MC_EXTERN_FUNCTION_MASK, bit6 = 0
M96 Pxxxx
Extension of program number always to four digits with 0
Programming
2.3 Subprogram and macro technology
$MC_EXTERN_FUNCTION_MASK, bit6 = 1
M96 Pxxxx
No extension with 0 even if the program number is less than four digits long.
Program number with more than eight digits triggers an alarm.
In standard mode, the current program level is displayed in system variable
$P_STACK. Every subroutine call and return affects this variable. However, there
are subroutine calls in ISO mode for which the current user variable level does not
change. The implementation of level-specific variables using GUDs requires
knowledge of the current program level in ISO mode. System variable
$P_IPO_STACK supplies the current program level in ISO dialect mode.
Table 2-6 shows all possible subroutine and macro calls in ISO mode and how they
affect the current program level.
Calls in ISO mode are mapped to calls in standard mode so that variable
$P_STACK contains the same information as before even in ISO mode.
The maximum possible number of subroutine calls remains unchanged.
System variable $P_IPO_STACK is always incremented when a subroutine
programmed in ISO mode as a macro call with G65, G66, G code or M macro
starts. On return from this type of ISO macro, $P_IPO_STACK is decremented
again. If no ISO macros are active, $P_IPO_STACK = 0. $P_IPO_STACK
therefore supplies the number of currently active ISO macros.
03.07
When a subroutine defined with M96 Pxx is called, variable $P_IPO_STACK is
also incremented on the basis of MD $MC_EXTERN_FUNCTION_MASK bit 11.
If $MC_EXTERN_FUNCTION_MASK
bit 12 = 0, $P_IPO_STACK is not modified by the interrupt program.
If bit 12 = 1, $P_IPO_STACK is incremented by the interrupt program.
Cycle calls with e.g., G81, G77 etc. or functions implemented internally with cycles,
e.g., G05, G72.1, etc. and subroutine calls with M98 Pxx have no effect on
$P_IPO_STACK.
Example:Subroutine calls in ISO and standard mode.
M98 indicates subroutine calls without level incrementation.
G65 P indicates macro calls with level incrementation.
M98 does not increment the levels. O1111.mpf and O2222.mpf work with the same $P_ISO_STACK
content, G65 does increment the levels, so that the content seen by O3333.mpf is different. $P_STACK
continues to display the levels in standard mode.
M macro subst
10814: EXTERN_M_NO_MAC_CYCLELevel incremented
M Up subst.
0715: M_NO_FCT_CYCLELevel does not change
T subst
10717: T_NO_FCT_CYCLE_NAMELevel does not change
G subst
10816: EXTERN_G_NO_MAC_CYCLELevel incremented
M96Interrupt ASUPLevel changes depending on
$MC_EXTERN_FUNCTION_MASK, bit12
03.07
Shell cycles:Level is not incremented
G code cycles:
G22 G23 G27 G28 G30 G30.1 G72.1 G50Level is not incremented
G code cycles, Shell cycles:
$P_ISO_STACK has no relevance for the user as write access is not supported for
these cycles.
Depending on machine data $MC_EXTERN_FUNCTION_MASK, bit 12, variable
$P_ISO_STACK is incremented when an interrupt program (ASUP) is called.
Bit12 = 0Variable $P_ISO_STACK does not change when an interrupt
program defined with M96 Pxx is called
Bit12 = 1Variable $P_ISO_STACK is incremented when an interrupt
As Siemens and ISO dialect programs are intended to run alternately in the control
they must be implemented with the Siemens tool data memory.
In each offset memory that exists for a tool, the length, geometry and wear in each
case are specified.
In Siemens mode, the offset memory is addressed with T (tool number) and D
(cutting edge number), or T/D number for short.
In ISO Dialect M programs, the offset memory is addressed with D (radius) or H
(length). This is referred to below as the H number.
In order to establish a unique assignment between this H number and a T/D
number, an element $TC_DPH[t,d] has been added to the offset data set. The H
number of the ISO Dialect is entered in this element.
Programming
2.4 Tool change and tool offsets
Table 2-7Example: Tool offset data set
T
1110
1211
1312100.00250.00
2113
2214
2315
D/cutting edgeH number
$TC_DPH
RadiusLength
Example:
Siemens programISO Dialect program
N5T1N5T1
N10 G41 D3N10G41 H12 or G41 D12
When the H value is programmed in the ISO dialect M program, the system
searches for and activates the matching $TC_DPH in the active T after the
correction block.
If the correction block does not contain an H number, the compensation cannot be
activated in ISO Dialect mode.
If an H is programmed but a correction block with the corresponding H number is
not found or the associated tool T is not selected, an alarm is output.
H0 is a correction with the compensation value 0. If H0 is programmed while
G43/G44 is active, G43/G44 remains active, but with tool length 0. H0 must not,
however, be programmed while G41/G42 is active.
H = unique
An H number in a TO unit must exist only once otherwise clear addressing of the
compensation block is not possible. In case an H number has been allocated for a
second time, alarm “17183 channel %1 block %2 H number already exists in
T= %3 with D=%4” is given when writing from the program,. The alarm is
compensation block compatible with NC Start clear.
Example:
03.07
N5$TC_DPH[1,1] = 5
N10$TC_DPH[2,1] = 5
An attempt to allocate an H number twice via OPI (HMI, PLC) will lead to a
negative acknowledgment when writing.
Changing the offset memory
Existing tool offsets can be overwritten with G10. New tool offsets are not created
by G10.
P specifies the H number of the compensation memory and R specifies the value.
L1 can be programmed instead of L11.
Active plane
Setting data $SC_TOOL_LENGTH_CONST must be assigned value 17 if the
assignment of tool length offsets to geometry axes is to be independent of plane
selection. Length 1 is then always assigned to the Z axis.
The tool length and the tool radius are always programmed with D or H.
Example:
Programming
2.4 Tool change and tool offsets
TD/cutting edgeH number
$TC_DPH
2341015
RadiusLength
ISO Dialect M:
T2
G43 H4 or D4;Length selection
G42 D4 or H4;Radius selection
The offset value must be entered twice for ISO Dialect M programs which are
programmed with different D and H numbers.
Example:
TD/cutting edgeH number
$TC_DPH
2341015
2451015
RadiusLength
ISO Dialect M:
T2
G43 H4;Length offset from T2 D3
G42 D5;Radius and length offset from T2 D4
Flat D number
If flat D numbers are active, the T is programmed independently of the H number.
The H number is no longer checked for compatibility with the selected tool.
An H number must be assigned to every offset memory, even with flat D numbers.
Tool management
If tool management is active, replacement tools have the same H number. Duplo
numbers are used in order to differentiate.
Offset D1 is activated for the currently selected tool on H99 with active toolmanagement.
In ISO Dialect M, only numerical expressions are permitted as tool identifiers.
Strings are no longer permitted as identifiers.
Example: T = “2”, selection with T2.
Tool length offsets can be activated on multiple axes. However, the resulting tool
length compensation cannot be displayed.
The Siemens T and D numbers appear in the display for active T and D numbers.
New OPI variables which can be displayed are available for the active ISO Dialect
H and D number.
Machine data 22220: $MC_AUXFU_T_SYNC_TYPE is used to define whether the
output to PLC takes place during or after the movement.
Machine data 20110: $MC_RESET_MODE_MASK, bit 6 can be used to activate
tool length compensation beyond a reset.
MD 20156: $MC_EXTERN_RESET_GCODE_MODE[7] defines whether the G
code of group 8 (G43, G44, G49) is maintained after reset or whether the settings
defined in MD 20254 $MC_EXTERN_RESET_GCODE[7] become effective after
reset.
Both machine data are set by default such that G49 is active and the length compensation is deselected after reset.
03.07
Example: Tool selection in ISO dialect M:
; (Fanuc 0 M tool offset with T, cutting edge number
Machine data 20382: $MC_TOOL_CORR_MOVE_MODE defines whether the
compensation is applied in the block containing the selection or the next time the
axis is programmed.
Tool data are stored in the Siemens tool data memory.
Every tool comprises four entries, one each for the X axis, Z axis, radius and
cutting edge position. The range of values for tool length and radius offset is
¦ 999.999 mm. The range of values for the cutting edge position is 0 -- 9, where 0
and 9 are identical.
The meaning is equivalent to the tool point direction on Siemens turning tools.
T is used for selection. T contains the tool number and offset number.
The offset is addressed either with the Siemens cut number D or with the H
number from $TC_DPH. Addressing with D is only possible for “flat D numbers”. If
tool management is used, H is always used for addressing.
Txxxxyyyy:xxxx=Tool number, yyyy=offset number
Machine data 10890: $MN_EXTERN_TOOLPROG_MODE, bit 0 defines how the
T value is interpreted.
The number of digits in the tool number is defined in machine data 10888:
$MN_EXTERN_DIGITS_TOOL_NO. The digits are counted from left to right.
Subsequent digits indicate the offset number.
03.07
Bit 0=1 in MD 10890 sets the offset number to the same value as the tool number.
Example:
$MN_EXTERN_TOOLPROG_MODE=0
$MN_EXTERN_DIGITS_TOOL_NO=2
T1234;Auxiliary function T1234 on PLC
;Tool number 12
;Offset selection D34/H34
T123;Auxiliary function T123 on PLC
;Tool number 12
;Offset selection D3/H3
$MN_EXTERN_TOOLPROG_MODE, Bit 0=1
T12;Auxiliary function T12 on PLC
;Tool number 12
;Offset selection 12
Machine data 20382: $MC_TOOL_CORR_MOVE_MODE is used to select when
the offset is applied: immediately when the set is selected or not until the axis is
programmed.
MD 20110: $MC_RESET_MODE_MASK, bit 6 is used to define whether the offset
is maintained in the event of a rest or deselected.
2-88
MD 20360: $MC_TOOL_PARAMETER_DEF_MASK, Bit 0 is used to activate the
calculation of the wear value for the transverse axis as a diameter value. The
geometry offset is always applied as a radius.
Although existing tool offsets can be overwritten with G10, new tool offsets are not
created with G10.
G10 P<100 / 10000 X Y R QGeometry
G10 P>100 / 10000 X Y R QWear
P100/10000 ;MD 20734: EXTERN_FUNCTION_MASK, bit 1 is used to select
;whether a differentiation is made on the basis of geometry or
;wear if P<100 or 10000.
X Y Z;Absolute or incremental offset values, depending on G90/91
U V W;Incremental offset values
R;Radius
Q;Cutting position
Tool offset selection with $TC_DPH
Previously, the “flat D number” function was always active for ISO dialect T.
D numbers are unique and command Txxyy or G10 Pyy is used to address the
Siemens cut number with yy. In order to use tool management, structured D
numbers must be addressed in ISO dialect T. Exactly as in ISO dialect M, every
cut is assigned a parameter $TC_DPH[ ], which enables a cut to be addressed
uniquely within a TO unit.
The function is switched on by setting MD 10890:
$MN_EXTERN_TOOLPROG_ MODE bit 2=1.
When the function is active, the tool offset must always be addressed with the H
number in ISO dialect T. Programs, which address the cut number, no longer run.
Parameter $TC_DPH[ ] is only created if $MN_EXTERN_TOOLPROG_MODE bit
2=1. H numbers must be assigned uniquely within a TO in order to prevent alarms.
There are 3 options:
$MN_MM_TYPE_OF_CUTTING_EDGE=1Flat D number
1. Flat D number + $MN_EXTERN_TOOLPROG_MODE bit 2=0
The offset is always addressed with cut D.
G290
N605 $TC_DP1[1]= 500
N615 $TC_DP1[2]= 500
N625 $TC_DP1[3]= 500
N635 $TC_DP1[4]= 500
MD 10717 T_NO_FCT_CYCLE_NAME is used to assign a subprogram to the T
command. Every block that contains a T command is executed and the
subprogram is subsequently called up. The T value is not output; the T command
must be programmed again in the cycle.
System variable $C_T_PROG or $C_D_PROG can be used in the subprogram to
check whether the T or D command was programmed. The values can be read out
with system variable $C_T or $C_D. If another T command is programmed in the
subprogram, no substitution takes place, but the T word is output to the PLC.
The machine data 10715 M_NO_FCT_CYCLE and 10716:
M_NO_FCT_CYCLE_NAME can be used to assign a subprogram to an
M function (e.g. M06).
The mapping of M and T programming onto cycle calls has the same effect in ISO
Dialect mode as in Siemens mode.
03.07
If T and M6 are programmed in the same block, the programmed T number can be
scanned with $P_TOOL in the cycle called by M6. The M/T call is also mapped
onto the cycle call in the block search. The start of the change cycle after the end
of the search run must be initiated by the PLC.
Sequence:
N20 T1234
N30 M6;Change tool
N40 H3 G43;Activate tool length compensation in T1234
3.1Calling cycles in the external CNC system using G
commands
General description
The functionality of the ISO Dialect cycles is implemented in the standard
Siemens cycles:
A shell cycle is called from the ISO Dialect program. All addresses programmed in
the block are passed to this shell cycle in the form of system variables. The shell
cycle matches the data to the standard Siemens cycle and calls it by name.
Machine manufacturers can replace these shell cycles with their own cycles.
Cycle parameters
3
V a rious cycle parameters in channel-specific GUD (Global User Data) must be
initialized for the machining cycles. The names and meanings of the GUD are
listed in Section 3.2.
3.1 Calling cycles in the external CNC system using G commands
Shell cycle
The modifications required due to the ISO Dialect programming syntax are made in
the shell cycle. This means that the existing SINUMERIK cycles do not have to be
changed. The name of the shell cycle is permanently defined.
Procedure:
1. The cycle (e.g. G81) is programmed in I SO Dialect mode
2. Siemens mode is activated automatically and the associated shell cycle is
called (see Fig. 3-2)
3. The shell cycle calls the associated Siemens standard cycle
It is not necessary to program G290. The external CNC system is automatically
activated on the return jump.
Important
The cycles must only be called with G commands.
This ensures that the appropriate cycle parameters are passed to the shell cycle.
03.07
The shell cycle must not be activated directly with CALL CYCLE3xx!
Modal cycles
If a modal cycle is active, the shell cycle is called in every NC block. If no axis
positions (X, Y or Z) are programmed in the NC block, the Siemens standard cycle
is not called.
Addresses programmed in the block (F etc.) are activated via the shell cycle. If no
feedrate was programmed, for example, the current feedrate is used as the path
feed.
Cycle parameters can be programmed in the following blocks while a modal cycle
is active. These parameters are copied into the system variables so that the shell
cycle uses the modified parameters.
Modal cycles are, in contrast to modal macros, already executed in the calling
block (e.g. block with G81 etc.).
Deselecting the cycle:
Deselection is performed with G80 or with a function of the 1st G group.
3.1 Calling cycles in the external CNC system using G commands
Example:
N10 G81 X10. Y20. Z-15. R5 F1000
Drilling position X10mm, Y20mm
Drilling depth Z-15mm
Reference plane 5mm
Drilling feed F.. (mm/min or mm/rev)
N20 X50. Y30. R10Drilling position X50mm, Y30mm,
New reference plane 10mm
N30 G80Delete cycle G81
Write cycle variable depending on addresses programmed in set
Previously, if modal cycles were active, all programmed addresses in the set were
always written to the cycle variables. During the cycle, the variables are evaluated
and decisions are made about how the variables must be used on the basis of the
cycle logic.
In some cases, this means that the cycle parameters will be written even if they
may not be interpreted as cycle parameters on the basis of the programming
syntax.
Therefore, for the following functions, none or only some of the programmed
addresses are written to the cycle parameters:
M98 P3 L2 X10 Y20Addresses Pxx and Lxx are not written
to the cycle parameters.
G05 P5 L2 X10 Y20Addresses Pxx and Lxx are not written
to the cycle parameters.
G05 P1 L2 X10 Y20If a modal cycle is active, alarm 12722
will be output because the call is for the
modal cycle for which the programmed
values are actually intended.
G54 P10 X10 Y20 M44Address Pxx is not written to the cycle
parameters.
G31 P98 X30 F100Addresses Pxx, Fxx and the axis values are
not written to the cycle parameters.
G31 P1 X30 Y20 F100None of the programmed addresses are written
to the cycle parameters.
G51 P1000 I2 J3 K2 X30 Y40 None of the programmed addresses are written
to the cycle parameters.
G50 P10000 X10 Y30All parameters are written to the cycle
Fig. 3-2Assignment of the cycle call in ISO Dialect M mode via shell cycle for Siemens
standard cycle
Shell cycle
CYCLE381M
CYCLE383M
CYCLE384M
CYCLE387M
Siemens
standard cycle
CYCLE82
CYCLE85
CYCLE88
CYCLE83
CYCLE3841
CYCLE86
CYCLE861
Example: ISO Dialect M
N10 G81 X100. Z-50. R20 F100
G81 automatically calls the shell cycle CYCLE381M.
The calculations are performed in the shell cycle and the standard drilling cycle
CYCLE81 is then called.
Parameter description
G7V or
G8V X.. Y.. Z.. R.. P.. Q.. F.. K..
Drill-hole
position
Number of repetitions
If K was not programmed, the cycle is
executed once
Machining feed
Const. single drilling depth for G73, G83
Lift-off distance for G76
Dwell time at drill-hole depth
for G82, G84, G76, G89
Reference plane
Drill-hole depth
3-100
Fig. 3-3Description of parameters allowed for G17 (X/Y plane)