828D/840D sl
Sinumerik Oper
a
te
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
Operating and Programming
Documentation
Milling
Training Manual
Edition 2011.9
SINUMERIK 828D
840D sl SINUMERIK Operate
Operating and Programming
Manual for Milling machines
Valid for:
Sinumerik 828D
840D sl Sinumerik Operate
Start
End
B551 General Technology basics B552 Geometry Basics B553 Simple Contour Elements B554 Mathematical Principles B555 Zero offset andReference Points B556 Program Structure B557 Cutting Edge Radius Correction B558 Program of Subroutines B559 Loops, Jumps, and Repetitions B560 Mirror - offset - rotate - scale when milling B565 Basics B566 Operating Elements B567 Switching on the Machine B568 Basic Operations B569 Operating Area MACHINE B570 Operating Mode JOG B571 Operating Mode MDA B572 Operating Mode AUTO B573 Operating Area PARAMETER B574 Operating Area Program B575 Operating Area Program Manager B576 Operating Area Diagnostics B577 Operating Area Start-Up B604 Basics of Programming with programGUIDE B609 Drilling programGUIDE B616 Milling programGUIDE B624 Contour Milling programGUIDE B656 Measure Milling programGUIDE B600 Basics of Programming with Shopmill B608 Drilling Shopmill B615 Milling Shopmill B623 Contour Milling Shopmill
Contents
B639 Straight Circle Shopmill B655 Measure Milling Shopmill B500 Cycles B700 Drawings of programming ExamplesThis document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B551
B551
828D/840Dsl SINUMERIK Operate
General technology basics
1 Brief description
Objective of the module:
Working through this module you become familiar with the most important technological aspects and machine functions.
Description of the module:
This module explains the general layout of a program, with respect to the technological commands as per DIN 66025 for turning and milling.
B551
Content:
Layout of a CNC-program
Programming of the technology data Switching commands
Programmable presettings Summary
B551
B551
Page 2 828D/840Dsl SINUMERIK OperateGeneral geometry basics: Description
This module explains the general layout of a pro-gram, with respect to the technological commands as per DIN 66025 for turning and milling.
General technological basics: START General technological basics: END Notes
828D/840Dsl SINUMERIK Operate Page 3
B551
B551
Switching commands Programming of the techno-logy data Layout of a CNC-program Programmable presettings Summary
B551
B551
Page 4 828D/840Dsl SINUMERIK OperateNotes
Section 2
The block number is a program-technical assignment, which is not evalu-ated by the control unit as a command. It is usually programmed to go up in steps of 10 and serves the user only for a better oversight. It has no effect on the program execution.
The geometrical data include all instructions that clearly define mathemati-cally the motion of the tool or the axes.
The technological data are used for instance to activate the required tool and to pre-select the necessary cutting parameters feed rate and spindle speed. Miscellaneous functions can control for example such things as di-rection of rotation and auxiliary appliances.
Programming example: …. N80 T1; Roughing tool N90 M6 N100 G54 F0.2 S180 M4 N110 G00 X20 Y0 Z2 D1 N120 ….
In order to improve the overview within a program, comments can be op-tionally added at the end of a block. These must be preceded by a semi-colon; Any characters that follow thereafter will not be taken account of by the control unit.
A CNC-program, also known as part program, consists of a logical se-quence of commands, which are executed step-by-step by the control unit after the program has been started.
The manufacturers of control units recognize and apply the guidelines as per DIN 66025.
Each program is compiled and stored under a program name in the con-trol unit. The name can contain letters as well as numbers.
A block starts with a block number followed by the commands.
Each command consists of command words, which in turn consist of an
address letter (A-Z) and an associated numerical value (both upper or
lower case characters are permissible). Program layout:
Geometrical data Block
Nr..
Departure information Switching information
Auxil-iary com-mand
Coordinate axes Interpolation
para-meter Feed Speed Tool
Misc. func-tion N G X Y Z I J K F S T M Technological data
Layout of a CNC-program
828D/840Dsl SINUMERIK Operate Page 5
B551
B551
NotesSection 3
Programming of the technology data
Before every technological working step in a CNC-Program the respective tool must be selected by means of the addresses “T” and “D”.
The address “T” is followed by the name of the tool, which may be stated either with numbers or letters (here only the variant using numbers will be dealt with).
All applicable tool data (e.g. tool type, length, radius, etc.) are activated in the program with the address “D”.
Here a complete set of data “D“ is referred to as “Cutting edge”.
Several cutting edge numbers (D1 … D9) may be generated for each tool.
Programming example: Explanation:
N10 T17 ; Drill Block 10, call-up of tool 17,
Commentary to the tool
N20 M6 Tool change,
N30 … D1 The cutting edge D... must be activated in the block with the first axis movement.
After the call-up of the tool, follows the selection of the optimum cutting values with the addresses “F” and “S”.
The feed rate vf with the address “F” can be entered either as feed per min
(in mm/min) or as feed per revolution (in mm/rev).
The Cutting speed vc with the address “S” can be entered either as spindle
speed in revolutions per minute (rev/min) or direct as cutting speed in me-ters per minute (m/min).
Default status of the machines when they are powered up are as follows:
Milling machines with feed rate “F” in mm/min Code G94 Turning machines with feed per revolution “F” in mm/rev Code G95 Selection of cutting speed:
Constant cutting speed “S” in m/min Code G96 (Relative to workpiece Ø)
Deactivate constant cutting speed “S” Code G97 spindle speed in rev/min (default)
Programming example 1: Explanation:
N10 T20 ; Endmill N20 M6
N30 G94 F200 S1000 M3 D1 vf = 200 mm/min, n = 1000 min-1 N40 ….
Programming example 2: Explanation:
N10 T2; Turning tool, finishing
N20 G96 F0.1 S200 M4 D1 vf = 0,1 mm/rev , vc = 200 m/min N30 ….
B551
B551
Page 6 828D/840Dsl SINUMERIK OperateNotes
Switching commands
There are different commands to control the direction of rotation of the work spindle.
Additional auxiliary functions can for example control cooling circuits, clamping devices, auxiliary functions and running of the program. But the presence of these additional functions depends entirely on the technology and the machine design.
The following list should be only considered as an example of commands:
Instruction Meaning
M00 Programmed Stop
M03 Work spindle ON, clockwise
M04 Work spindle ON, anti-clockwise
M05 Work spindle Stop (however, the program continues)
M06 Tool change
M08 Coolant ON
M09 Coolant OFF
M30 End of program; jump back to the start of the program
Programming example: Explanation:
N10 T1; Face mill
N20 M6 Tool change
N30 G94 G97 F600 S2500 D1 vf = 600 mm/min, n = 2500 min-1 N40 M3 M8 Spindle ON clockwise, coolant ON
…..
N90 M30 End of program
(Note: Further functions can be found in the annexure of this manual)
Effect of the switching commands M3 and M4
Example Milling Example Turning
M3 M4 Viewing direction M4 M3
Section 4
828D/840Dsl SINUMERIK Operate Page 7
B551
B551
NotesProgrammable presettings
When starting a part program the basic settings as defined by the manu-facturer will be activated. These depend on the individual machine specifi-cation and apply thereafter for the whole of the program run (modal) unless they are changed by the operator in the program.
This section describes just a few of the possible selections for turning- and milling machines that deserve highlighting.
Note: Codes that have already been dealt with are no longer included
Continuous path behaviour:
Exact stop Code G09 block-by-block Code G60 * modal
In order to reach the final position precisely the path velocity is reduced at the end of the block towards zero. This is useful, for instance, to obtain relatively sharp edges when machining around contour corners.
However, it must be borne in mind that, if there are too many positioning sequences, it will result in increased machining time and cannot be ne-glected.
Continuous control operation Code G64
In this case the tool moves as much as possible with constant velocity without deceleration at the end of a block. Hence the machining time is less than under the continuous path status “Exact stop“.
The corners of contours are machined without any relief and therefore the corners are not so sharply defined.
With this function the control works with a speed control taking into ac-count several blocks ahead (Look Ahead).
The even speed in this instance results in better cutting conditions and also a better surface quality.
The following image compares the frequent braking and accelerating se-quences between the individual blocks in case of G60 and the constant speed in case of G64.
*
Usual preset starting status
G64 Continuous path mode with Look Ahead
G60 Exact stop Programmed feed rate
Feed rate
Block path
B551
B551
Page 8 828D/840Dsl SINUMERIK OperateNotes
Section 5
Programmable presettings
The continuous path behaviour “Exact stop“ with the Codes G09 or G60 respectively does not entirely ensure dimension-wise as to how precisely a corner point between two positioning blocks is attained.
If an exact stop has been activated in a program, the codes described be-low can be used to specify a very precise braking behaviour at the end of blocks. By this it is possible to determine as to how precisely the pro-grammed corner point will be attained.
Change-over when the positioning window “fine” is reached Code G601
The tool motion changes to the next block when the tool has reached the fine positioning window.
Sharp contour corners result at the programmed destination points.
Change-over when the positioning window “coarse” is reached Code G602
This code can be used to obtain a defined rounding of the programmed contour corners. The block change-over occurs already at the coarse posi-tioning window.
A dimensional definition of the positioning windows “coarse” and “fine” is preset by means of machine data.
Please find out the values preset on your machine by the machine manu-facturer from his operation manual if you are going to use the described codes.
Tool
Destination point of the pro-grammed path
Block change-over
Actual tool paths depending on the positioning window
G60
828D/840Dsl SINUMERIK Operate Page 9
B551
B551
NotesSection 5
Programmable presettings
There is yet another means of influencing the continuous path behaviour by changing over to the next positioning block depending on the pro-grammed path velocity of the tool.
Change-over when the setpoint position is reached: Code G603
The block change-over is initiated as soon as the control has calculated the setpoint speed for all axes to be equal to zero.
Since the physical tool position lags behind the calculated value by a cer-tain amount, the effect in this case is that the axis changes direction before the end of the interpolation is reached.
The greater the feed rate, the greater is also the lag of the tool behind the evaluated value and therefore the rounding radius.
This permits the contour corners to be formed in dependence on the path velocity.
Hint:
The rounding radius depends on the programmed path velocity as swell as the drive dynamics of the machine.
The codes G601, G602 and G603 are modal.
They only have an effect in conjunction with active exact stop with G09 or G60.
Destination point of the
pro-grammed path (Interpolation ends)
Actual tool path with smaller feed rates
Actual tool path with greater feed rates
B551
B551
Page 10 828D/840Dsl SINUMERIK OperateNotes
Section 6
Summary
Address Meaning T D F S Tool numberCutting edge (tool data) Feed/Feed rate
Speed/Cutting speed
Path information/departure commands Instruction Meaning G09 G60 G64 G601 G602 G603
Exact stop, operative block-by-block Exact stop, modal function
Continuous path control
Change-over when positioning window “fine” is reached Change-over when positioning window “coarse” is reached Change-over when the interpolation end is reached
G70 G71
Input system in inches Input system metrical G94
G95
Linear feed in mm/min * Feed per revolution in mm ** G96
G97
Constant cutting speed in m/min ** Spindle speed in min-1 *
* Switching-ON status for milling machines ** Switching-ON status for turning machines
Switching information Instruction Meaning M00 Programmed stop M03 M04 M05
Work spindle ON, clockwise Work spindle ON, anti-clockwise Work spindle Stop
M06 Tool change M08 M09 Coolant ON Coolant OFF M17 M18 End of subprogram
End of program, jump back to the beginning of program All instructions (except G09) mentioned above are modal, until they are pro-grammed to deactivate with different set of instructions.
Furthermore there are instructions that are operative only block-by-block, e.g. G09. These are automatically reset by the control unit with the succeed-ing block.
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B552
B552
828D/840Dsl SINUMERIK Operate
General geometry basics
1 Brief description
Objective of the module:
Working through this module you learn to understand the programming planes and also how to specify points in a DIN conforming coordinate system.
Description of the module:
This module explains the assignment of the axis and plane descriptions to the coordinate system of the machine and also teaches the definition of points in relation to the work space.
B552
Content:
Right hand rule
Explanation of the axis assignments Points and distances in the work space Programming planes
B552
B552
Page 2 828D/840Dsl SINUMERIK OperateNotes
828D/840Dsl SINUMERIK Operate Page 3
B552
B552
General geometry basics: Description
This module explains the assignment of the axis and plane descriptions to the coordinate system of the machine and also teaches the definition of points in relation to the work space.
General geometry basics: START Right hand rule Explanation of the axis
as-signments Points and distances in the work space Programming planes General geometry basics: END
B552
B552
Page 4 828D/840Dsl SINUMERIK OperateNotes
Section 2
Right hand rule
Definition of axis according to DIN-standard:
Z-Axis: Is aligned parallel to the working spindle or coincides with it.
The positive direction points away from the work piece. In case of more than one spindle, one of them will be declared as the main spindle.
X-Axis: Is aligned parallel to the set-up plane or coincides with it. If the
Z-axis is vertical, the positive X-axis is directed towards the right. If the Z-axis is horizontal, the positive X-axis is directed towards the left.
Y-Axis: Is perpendicular to the X- and Z-axis, in such a way that a
spa-tial cartesian coordinate system results.
The direction “FROM” the work piece “TO” the tool is “PLUS” The tool movement is “ALWAYS” to be programmed!
Explanation:
According to DIN standard the various axes of motion within work space of CNC machines are addressed by alphabets. The rules for the assignment of the axes are determined in this DIN-standard.
The machine coordinate system that is derived from the DIN-standard is the base for the geometrical description of work pieces which allows us to clearly determine the points in a plane or in space.
The cartesian (rectangular) spatial coordinate system can be best de-scribed with the “Right hand rule”. Here the fingers of the right hand rep-resent the axes: “X” (thumb), “Y” (first finger) and “Z” (middle finger). The finger tips point in the positive direction.
The position of the machine coordinate system is specified by the machine manufacturer keeping the following in mind:
828D/840Dsl SINUMERIK Operate Page 5
B552
B552
NotesSection 3
Defining of axis within a workspace
Explanation as per DIN 66217 or ISO 841:However defining only three axes is not enough on modern machine tools. For instance if the milling head of a milling machine is to be swivelled by a certain angle or the quill of a tailstock is to be moved, a further definition of these axes is required.
The DIN standard provides the following variants for such cases.
Here the rotational axes A/B/C are associated with the X/Y/Z axes.
Looking in the positive direc-tion of the linear axis, a clock-wise rotation equals a positive rotation of the associated ro-tary axis.
The axes U/V/W are parallel to the axes X/Y/Z.
The positive direction is that of the associated main axis.
V W U X W B Y Z
B552
B552
Page 6 828D/840Dsl SINUMERIK OperateNotes
Section 4
Points and distances within the work space
Explanation:For the determination of all points within the work space, the control unit requires a zero point of the coordinate system. This has been determined by the machine manufacturer. All other points have either fixed distances from the machine zero point or else the distance must be defined.
The machine zero point (M) is determined by the machine manufacturer and cannot be altered. On milling machines point is usually set on the work table, and on turning machines on the spindle flange.
The work piece zero point (W) is the origin of the work piece coordinate system. This can be specified by the programmer and should always be chosen in a way that the least calculation work is required to determine points on the contour given the dimen-sioning of the drawing. For turning work it lies mostly on the turning axis and the right hand planar face. The reference point (R) is approached for initializ-ing the path measurinitializ-ing system, which means that at this point all axes are set to zero. This is necessary since generally speaking the machine zero point cannot be approached.
The tool carrier reference point (F) is of prime im-portance for the adjustment of preset tools. The lengths “L” (XPF) and offset “O” (ZPF) shown in the image below are used as tool calculation values for instance for the tool radius correction and must be entered into the tool memory of the control unit.
ZMW ZMR ZMF X M R ZPF X M F X P F Example: 2-axis turning machine
828D/840Dsl SINUMERIK Operate Page 7
B552
B552
NotesSection 4
Points and distances within the work space
XMR = YMR = ZMR =
Distances from the reference point to the machine zero point. These are set by the machine manufac-turer during commissioning and are transferred to the control unit when the reference point is reached.
XMW = YMW = ZMW =
These represent distances from the machine zero point to the work piece zero point. The work piece zero point must be determined by the operator by scratching or probing and entered into the tool cor-rection memory.
XPF = ZPF =
Distances from the tool carrier reference point to the tool point on the cutting edge or the front face of the milling cutter.
XMF =
ZMF =
Distances from the machine zero point to the tool carrier reference point. The distance is determined by the machine manufacturer and entered into the control unit (only relevant on turning machines). Example: 3-axis milling machine XMW ZM W Y M R ZP F ZM R Y M W XMR
B552
B552
Page 8 828D/840Dsl SINUMERIK OperateNotes
Section 5
Programming planes
Continuous path control units can control slides and tool carriers simulta-neously along 2 or more axes at a programmed feed rate. For this the speed of the individual drives must be matched to one another. This job is taken over by the interpolator of the CNC-control unit. This is a software program for the evaluation of intermediate positions and speed conditions of the individual axes such that the slides can follow the programmed path. Starting with a 2 ½-D Continuous path control unit the interpolation can be switched between the three different planes.
G19 G17 G18 -Y +X +Z
A selection of the plane is made with the associated programming instruction:
XY-Plane - programming command G17
XZ-Plane - programming command G18
YZ-Plane - programming command G19
Note:
The standard plane being used for working with CNC-Turning machines is G18. With CNC-Milling machines the programming plane G17 is being used.
The working plane should either be programmed at the beginning of the NC-program, or before programming an operation in the relevant working plane.
The active programming plane is modal and remains active until changed by another programming instruction.
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B553
B553
828D/840Dsl SINUMERIK Operate
Simple contour elements
1 Brief description
Objective of the module:
Working through this module you learn to program linear and circular interpolation commands both with absolute and incremental dimensions.
Description of the module:
This module explains the use of absolute, incremental and mixed coordinate points. It also explains the programming of simple geometrical path conditions.
B553
Content:
Absolute and incremental dimensioning, mixed programming Rapid traverse motion
Straight line interpolation Circular interpolation Summary
B553
B553
Page 2 828D/840Dsl SINUMERIK OperateNotes
828D/840Dsl SINUMERIK Operate Page 3
B553
B553
Simple contourelements: START
Absolute and in-cremental dimen-sioning, mixed programming Rapid traver-se motion Straight line interpolation Circular interpolation Summary Simple contour elements: END
Simple contour elements: Description
This module explains the use of absolute, incre-mental and mixed coordinate points. It also ex-plains the programming of simple geometrical path conditions.
B553
B553
Page 4 828D/840Dsl SINUMERIK OperateNotes
Absolute and incremental dimensioning, mixed programming
When writing CNC-programs a fundamental differentiation must be made between absolute and incremental coordinates.
Which of the two options the programmer chooses depends on the usage of the program and the dimensioning on the drawing.
Absolute dimensioning, Code G90
All dimensions always refer to the active work piece zero point.
About workpiece zero point refer to Module B555 - “reference point, work-piece offset”, Section 3.
The absolute coordinates in a departure command describing the position,
to which the tool is to traverse.
G90 X Y P1 20 35 P2 50 60 P3 70 20 G90 X Z P1 25 -7.5 P2 40 -15 P3 40 -25 P4 60 -35 Example: Coordinates for milling:
Coordinates
An example for turning: (All X values are diameter values, DIAMON)
Code G90 is usually activated as machine default when switching ON. It is modally active for all axes simultaneously and can be reset to incre-mental dimensioning with G91.
Workpiece zero point
2. 1 Absolute dimensioning
828D/840Dsl SINUMERIK Operate Page 5
B553
B553
NotesAbsolute and incremental dimensioning, mixed programming
Code G91
(also known as chain dimensioning).
All position statements refer to the current starting position of the tool. The programmed value states the coordinate distance, by which the tool is being traversed. G91 X Y P1 20 35 P2 30 20 P3 20 -35 G91 X Z P1 12.5 -7.5 P2 7.5 -7.5 P3 0 -10 P4 10 -10
Code G91 is modally active for all axes simultaneously and can be reset to absolute dimensioning with G90.
2.2 Incremental dimensioning
Example: Coordinates for milling:
Example: Coordinates for turning: (All X values are radius values, DIAMOF)
B553
B553
Page 6 828D/840Dsl SINUMERIK OperateNotes
Absolute and incremental dimensioning, mixed programming
G90 X Y P1 20 35 P2 IC(30) IC(25) P3 70 IC(-40) G91 X Y P1 AC(20) AC(35) P2 30 AC(60) P3 20 -40
As already mentioned, the destination point coordinates can be stated in the program for all types of interpolation as absolute or incremental values respectively.
Depending on the presently activated status (G90 or G91), all further coor-dinate values will refer then also this type of dimensioning.
In practice, however, it is often sensible to mix the two possibilities within a program block. The control unit provides a comfortable means of instruc-tion to utilize this addiinstruc-tional possibility.
Mixed programming: Codes AC(…) and IC(…)
A dimension value will also be taken as an absolute dimension under G91 if the following syntax is used: AC(numerical value)
If a dimension value is to be taken to be an incremental value under G90, it must be written as follows: IC(numerical value)
Clarification of mixed programming with an example for milling:
A great number of various possibilities are available to the operator in deal-ing with a mixture of the two types of dimensiondeal-ing:
Note:
The above example describes only a small selection of mixed coordinate inputs. A further selection of examples can be found in the description of interpolation types in this manual.
2.3 Mixed Programming
828D/840Dsl SINUMERIK Operate Page 7
B553
B553
NotesRapid traverse motion
Code G00Rapid traverse is used for the quickest possible repositioning of the tool to the contour element or, for instance, for moving the tool to the tool chang-ing position.
The highest possible speed along a straight line that the machine is capa-ble of attaining is used, however, no machining is possicapa-ble here. Hence the control unit does not require a value input under the address “F”.
Repositioning with rapid traverse can be programmed to take place in sev-eral axes simultaneously.
Programming example: Explanation:
N10 T1 ; End mill N20 M6
N30 G00 X200 Y80 Z2 D1 Motion at rapid traverse to the desti-
nation point X200, Y80, Z2 (taking into account the tool length)
N90 M30 End of program
The above programming example repositions the tool from point P1 to the point P2.
straight line
B553
B553
Page 8 828D/840Dsl SINUMERIK OperateNotes
Straight line interpolation
Code G01
The straight line interpolation is used to move the tool with an exactly de-fined speed along a straight line from the current position to the pro-grammed destination point.
All axes can be traversed simultaneously, in which case the resulting line of motion can lie anywhere at an angle within the working space. For this the control unit requires a specified feed rate which at the latest must be defined under the address “F” in the block containing the Code G1. The following example describes the milling of a slot with absolute dimen-sioning as per the drawing shown below.
Note:
The setup feed rate G94 defines the feed rate in millimetre per minute (mm/min), in comparison to setup feed rate G95 that defines the feed rate in millimetre per revolution (mm/rev).
Programming example: Explanation:
N10 T1 ; End mill Tool call-up T1 N20 M6
N30 G94 F300 S2000 M3 D1 Technology block for the tool T1
with the cutting edge D1,
N40 G90 G00 X40 Y48 Z2 M8 With rapid traverse to the starting po-
sition P1 on the safety plane (absolute dimensions),
N50 G01 Z-12 Plunging with feed rate,
N60 X20 Y18 Z-10 Milling the slot in 3 axes (G1 is
modally active),
N70 Z2 F1000 Retraction with increased feed rate N80 G00 Z200
N90 M30
The following program section shows the milling of the same slot using in-cremental dimensioning (up to N40 see above):
N50 G91 G1 Z-14 Infeed along Z by –14 mm,
N60 G01 X-20 Y-30 Z2 Incremental traversing of the axes N70 G90 Z2 F1000 Retraction with absolute dimensions N80 G00 Z200
N90 M30
4.1 Straight line interpolation
828D/840Dsl SINUMERIK Operate Page 9
B553
B553
NotesStraight line interpolation
4.2 Straight line interpolation with mixed programming
The example shown below describes the milling of the slot with mixed coordinates input.
Program blocks such as the call-up of the tool etc., which have already been dealt with, will not be repeated.
Important:
If any address letter “X”, “Y”, “Z” is not followed immediately by a numerical value, an equal-sign must be written instead.
Syntax: X=IC(…), Y=AC(…), Z...
Programming example under G90: Explanation:
….
N40 G90 G00 X40 Y48 Z2 M8 To starting position absolute
N50 G01 Z=IC(-14) Incremental coordinate Z
N60 X20 Y=IC(-30) Z-10 Incremental coordinate Y
N70 Z2 F1000 ….
Programming example under G91: Explanation:
N10 G91 Incremental dimensioning,
….
N40 G00 X=AC(40) Y=AC(48) Z=AC(2) To starting position P1 absolute N50 G01 Z-14 Incremental coordinate Z
N60 X=AC(20) Y-30 Z2 Absolute coordinate X
N70 Z=AC(2) F1000 Absolute coordinate Z
….
B553
B553
Page 10 828D/840Dsl SINUMERIK OperateNotes
Circular interpolation
Code G02 (clockwise)
Code G03 (anti-clockwise)
A circular interpolation permits the traversing of the tool with a defined speed along a circular path from the present start point to the programmed destination point.
Apart from the destination point coordinates, the control unit also needs statements about the sense of rotation and the centre of the circle.
The centre is entered with “I”, “J” and “K” with incremental dimensions with the centre point as origin.
The following assignment applies:
I for the X-axis
J for the Y-axis
K for the Z-axis
Programming example with G02: Explanation:
…..
N40 G00 X30 Y40 Z2 With rapid traverse to the start point N50 G01 Z-5 Grooving with Z
N60 G02 X50 Y40 I10 J-7 Circular interpolation clockwise N70 G01 Z2 F1000
…..
The following example describes an anti-clockwise circular interpolation as shown in the sketch above.
Note:
The endpoint in the sketch is now the starting point for the circular interpo-lation.
Programming example with G03: Explanation:
…..
N40 G00 X50 Y40 Z2 With rapid traverse to the start point N50 G01 Z-5
N60 G03 X40 Y40 I-10 J-7 Circular interpolation anti-clockwise N70 G01 Z2 F1000 ….. 5.1 Circular interpolation End point Centre point Start point
Section 5
828D/840Dsl SINUMERIK Operate Page 11
B553
B553
NotesCircular interpolation
5.2 Circular interpolation with mixed programming
Particularly the incremental statement of the centre of the circle usually represents some difficulties to the operator in practice, since it must often be evaluated using triangle calculations.
This is a prime example of where the mixed coordinate programming of the circle centre point in absolute dimensions comes in useful.
Programming example: Explanation:
…..
N40 G00 X30 Y40 Z2 N50 G01 Z-5
N60 G02 X50 Y40 I=AC(40) J=AC(33) Circle centre absolute N70 G01 Z2 F1000 ….. End point Centre point Start point
Section 5
B553
B553
Page 12 828D/840Dsl SINUMERIK OperateNotes
Circular interpolation
5.3 Circular interpolations before and behind the turning axis
The sketch below shows once again the principle of direction programming of circular interpolations.
Code G02: Circular arc clockwise Code G03: Circular arc anti-clockwise
The following sketch shows the circular arc orientation on turning ma-chines with different tool arrangements due to the machine layout.
Note:
No matter which tool arrangement is applicable to the particular machine, the program as per DIN ISO always describes the contour of the workpiece behind the turning axis.
G3 G2
G3
G2
Tool arrangement in front of the turning axis
Tool arrangement behind the turning axis
828D/840Dsl SINUMERIK Operate Page 13
B553
B553
NotesSummary
Path informationInstruction Meaning
G90 Coordinate input with absolute dimensions G91 Coordinate input with incremental dimensions G00 Linear motion with rapid traverse
G01 Straight line interpolation with defined speed G02 Circular interpolation clockwise
G03 Circular interpolation anti-clockwise
All the above departure commands are modal.
Interpolation parameter
Meaning
I Circle centre coordinate in X, incremental from starting point
J Circle centre coordinate in Y, incremental from starting point
K Circle centre coordinate in Z, incremental from starting point
The interpolation parameters are operative block-by-block
Mixed programming for coordinate input
IC(…) AC(…)
Incremental dimension input Absolute dimension input
The statements IC(…) and AC(…) are valid only for the address preceed-ing them. Example: Instruction Meaning X=IC(10) Y=AC(20) Traverse by 10 mm in X Traverse to 20 mm in Y
Section 6
B553
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B554
B554
828D/840Dsl SINUMERIK Operate
Basic mathematical principles
B554
1 Brief description
Objective of the module:
Working through this module you learn the mathematical approach necessary for the programming and for the calculation of missing contour points.
Description of the module:
In this module contour points will be calculated using the Pythagorean theorem and trigonometrical functions (sine, cosine and tangent).
Content:
Types of angles
The Pythagorean theorem Trigonometrical functions Example calculations
B554
B554
Page 2 828D/840Dsl SINUMERIK OperateB554
Notes
828D/840Dsl SINUMERIK Operate Page 3
B554
B554
Basic mathematical principles: START Types of angles The Pythago-rean theorem Trigonometri-cal functions Example calculations Basic mathematical principles: ENDBasic mathematical principles: Description
In this module contour points will be calculated using the Pythagorean theorem and trigonometri-cal functions (sine, cosine and tangent).
B554
B554
Page 4 828D/840Dsl SINUMERIK OperateNotes
Types of angles
2.1 Basic principles of coordinate evaluation
Almost all of the contours encountered during machining can be traced back to a interface of straight lines and circular arcs.
For part programming the respective endpoint of the contour element must be known.
In most cases these contour points can be taken directly from the drawing provided dimensioning is NC-suitable. In some cases, however, the an evaluation of coordinates may be necessary. For these calculations a ba-sic knowledge of the types of angles, trigonometrically functions and the Pythagorean theorem is required.
2.2 Types of angles
In the case of oblique work piece contours angles with a definite relation-ship to one another result between the contour sections. Depending on their relative position a differentiation is made between complementary an-gles, step angles and side angles.
If a transition is at right angles to the radius centre point it is always a tan-gential transition, and there is no corner shown on the technical drawing. If a corner line is shown, it is not a tangential transition.
Step angles
have always the same value
Complementary angles
add up to 180°
828D/840Dsl SINUMERIK Operate Page 5
B554
B554
NotesThe Pythagorean theorem
The right angled triangle has a special meaning in geometry, since the sides of such a triangle exhibit a definite relationship to one another. The various sides of the right angled triangle are named specifically: The longest line opposite the right angle is called the hypotenuse. The two other lines, which form the right angle, are called cathetus. The side opposite an angle is called the opposite side.
The bounding side of the angle is called the adjacent side.
c²= a² + b²
By suitable rearrangement of the equations the respective sides can be calculated.
3x3=9 4x4=16 5x5=25 16+9=25
a =
c
2
b
2
c =
a
2
b
2
b =
c
2
a
2
a b cIn case of a right angled triangle the missing length of a side can be calcu-lated if the length of the other two sides is known. For this the Pythagorean theorem is used.
Pythagorean theorem:
In a right-angled triangle the square of the hypotenuse (the side
opposite the right angle), c, is equal to the sum of the squares
of the other two sides, b and a - that is: a² + b² = c².
B554
B554
Page 6 828D/840Dsl SINUMERIK OperateNotes
Trigonometrical functions
The trigonometrical ratios describe the relationships between the angles and the sides in a right angled triangle. With the aid of these trigonometri-cal functions it is possible to trigonometri-calculate both angles and sides in a right an-gled triangle. For this one side and an angle or two sides must be known. The selection of the suitable trigonometrical function, i. e. the sine, cosine or tangent, depends on which sides and angles are known and which side or angle is to be found.
By the use of the various trigonometrical functions all sides and angles can be calculated.
3
2
1 α
1. Adjacent side (AS) 2. Hypotenuse (H) 3. Opposite side (OS) α Angle β Angle β Sine function Cosine function Tangent function
H
OS
α
sin
sin
OS
H
OS
sin
α
*
H
H
AS
cos
AS
cos
*
H
AS
OS
tan
tan
OS
AS
OS
tan
*
AS
cos
AS
H
Section 4
828D/840Dsl SINUMERIK Operate Page 7
B554
B554
NotesExample calculations
P1 M1 P2 P3 P4 M2 X 25 35 40 30 Z -20 -20 Evaluate the missing coordinates of the points “P1” to “P4”, as well as “M1” and “M2”
Enter the coordinate values in the table.
The values for the spaces shown with a dark background are dimen-sions that can be taken directly from the drawing.
Note: All X values are diameter values
See the next page for the solution of this example.
5.1 Task
B554
B554
Page 8 828D/840Dsl SINUMERIK OperateNotes
P1 M1 P2 P3 P4 M2
X 25 35 27,929 37,071 40 30
Z -20 -20 -23,536 -28,107 -31,642 -31,642
For the solution method see the following page
5.2 Solution for the example calculation
Example calculations
828D/840Dsl SINUMERIK Operate Page 9
B554
B554
NotesSince the two sides are equal, all values can be found using the Pythago-rean theorem. 5355 , 23 5355 , 3 20 2 / ² 5 20 2 zp 20 2 zp z 1 P z 2 P 929 , 27 )) 5355 , 3 5 ( * 2 ( 25 )) 2 xp 5 ( * 2 ( 25 x 2 P
642
,
31
5355
,
3
1065
,
28
2
zp
z
3
P
z
4
P
071 , 37 ) 5355 , 3 5 ( * 2 40 x 3 P a (P3x p2x) / 2 (37,071 27,929) / 2 4,571 571 , 4 a 3 zp 1065 , 28 571 , 4 535 , 3 20 3 zp 2 zp z 1 P z 3 P 5355
,
3
)
1
(
*
2
zp
4
zp
xp3 zp4 3,53555355
,
3
2
/
²
5
5
2
xp
5355 , 3 2 xp 2 zp 5.3 Solution methodB554
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B555
B555
828D/840Dsl SINUMERIK Operate
Zero points, work offset and reference
point
B555
1 Brief description
Objective of the module:
In this module you learn to use the various zero points within the working space of a milling machine.
Description of the module:
This module describes the call-up of individual work piece zero points on the work piece with reference to various starting conditions.
Content:
Position of the machine zero point Zero point offset G54
Further zero point offsets Further zero point offsets Summary
B555
B555
Page 2 828D/840Dsl SINUMERIK OperateNotes
828D/840Dsl SINUMERIK Operate Page 3
B555
B555
Zero offsets andreference points: START Position of the machine zero point Zero point offset G54 Further zero point offsets Further zero point offsets Summary
Zero offsets and reference points:
END
Zero offsets and reference points: Description
This module describes the call-up of individual work piece zero points on the work piece with ref-erence to various starting conditions.
B555
B555
Page 4 828D/840Dsl SINUMERIK OperateNotes
Z
X
M
Y
Section 2
Position of the machine zero point
All axis motions on a CNC-machine tool refer to the right-hand Cartesian coordinate system.
Note:
See also Module B552 - “Geometry basics”.
The entire path measuring system is initialized by approaching the refer-ence point with all axes.
At the same time the control unit activates the coordinate system at the machine zero point.
This fixed coordinate point (origin) is determined by the manufacturer and cannot be altered by the operator.
It serves as a reference point for the machine coordinate system (MCS) of the machine tool.
828D/840Dsl SINUMERIK Operate Page 5
B555
B555
NotesZero point offset G54
For machining the workpiece the workpiece coordinate system (WCS) is available on the machine.
This can be freely chosen by the operator depending on the manufacturing conditions or according to the usual workshop practice.
By this you define a zero point on the workpiece which is offset from the machine zero point by a defined distance, obtaining a work piece zero point that is directly referred to the workpiece to be machined.
Zero point offset: Code G54 (modally operative)
With this command the workpiece zero point can be defined on the ma-chine.
The following image shows how the position of the workpiece zero has been shifted with G54 by the operator to the marked corner point, alterna-tively any other corner can be defined as workpiece zero
The determined zero point on the machine can be set in JOG mode and can be activated in the program with the same comand (G54).
By this the coordinate origin for the program and the machine zero point coordinate are now identical.
Programming example: Explanation:
N10 G17 G54 ... Plane selection, call-up of the
zero point offset G54
N20 G00 X200 Z300 Approach tool changing point
N30 T1; Surface cutter Call-up tool T1
...
W Workpiece zero point
B555
B555
Page 6 828D/840Dsl SINUMERIK OperateNotes
Further zero point offsets
Nevertheless, for the efficient production of parts the availability of several workpiece zero points often makes sense.
The control unit manufacturer provides for up to 99 selectable zero point offsets.
Note:
Depending on the machine parameters this number can be set differently. Please refer to the machine manual regarding the exact number of avail-able zero points.
Further zero point offsets: Codes G55, G56 and G57 Codes G505 to G599
(all stated codes are modally operative)
The application example shows a requirement for a second workpiece zero offset.
In the picture below the work piece zero point has been transferred with G55 exactly to the setting plane of the chuck jaws.
In the program this must be activated by means of the code G55.
The use of several zero point offsets can substantially reduce the setup times particularly in cases of one-off or small series machining.
For example: You could define just once a specific setting point for each one of your clamping fixtures or else a specific work piece zero point for various work pieces.
In the program the respective zero point offset depending on the clamping fixture or the work piece can then be selected.
If an identical work piece is to be machined at a later time, the respective zero point is immediately available under the same code.
Important:
Zero point offset instructions or commands are MODAL COMMANDS .i.e. once executed they remain active until they are newly defined with the same command or a different set of commands is activated.
G54
G55
828D/840Dsl SINUMERIK Operate Page 7
B555
B555
NotesMilling machines usually have a fixed tool change position (TCP). This point is typically chosen in a way, that tools can be changed in a collision-proof area in the work space of the machine.
For this the tool carrier is generally retracted well back into the positive range of the work space.
Note:
Take into account the real traverse ranges of your machine; the values used in the example are only exemplary!
Programming example 1: Explanation:
N10 G17 G54 ...
N20 G00 X300 Z150 Approach of the tool changing point
N30 T1; Milling cutter Indexing the turret to position T1
...
On this basis the tool carrier will traverse to various positions depending on the active tool length (Z) and the position of the work piece zero point.
Note:
It is always the tool tip that is being positioned.
On the next page a suggestion for the programming of an independent tool changing point can be found.
Pos. X
Pos. Y Pos. Z
B555
B555
Page 8 828D/840Dsl SINUMERIK OperateNotes
In order to approach a tool changing point that is independent of the length of the tool and the presently active zero point offset, the following condi-tions must be programmed:
Switching OFF of all the active offsets or manipulations of the coordinate system
Deactivation of the tool lengths in X and Z
Programming example 2: Explanation:
N10 G17 G54...
N20 G00 X400 Z500 SUPA D0 Approach of tool changing point in the
MCS, without tool data,
N30 T1; milling cutter Indexing the turret to position T1,
N40 D1 Call-up of the tool data for T1 …
Since with the use of the SUPA command any manipulations of the coordi-nate system have been deactivated for the programmed block only, they do not need to be reactivated.
Keep in mind, to call up the required cutting edge again, after each tool change.
Note:
The extent of programming for the approach of the tool changing point can be reduced if for this purpose a subprogram is written (see page 8 in this module).
Pos. X
Pos. Y Pos. Z
Tool changing point
Code SUPA (operative block-by-block) Code D0 (modally operative)
Section 5
828D/840Dsl SINUMERIK Operate Page 9
B555
B555
NotesSummary
Suggestion of a subprogram for tool changing:
Subprogram name: SUBR100.SPF
N10 G17 G00 X300 Z500 SUPA G40 D0;
N20 RET;
Explanation of the symbols
MCS Machine coordinate system WCS Workpiece coordinate system
Instruction
Meaning
G54 to G57 Call-up of a selectable zero point offset * G505 to G599 Call-up of further zero point offsets *
(conditionally available)
D0 Deactivation of the tool offsets *
D1 - D9 Reactivation of the tool offsets after the tool change *
SUPA Switching-OFF of programmable, selectable and external offsets **
RET End of subprogram, return jump * Modally operative instruction ** Instruction operative block-by-block
M Machine zero point
W Workpiece zero point
Approach of tool changing point, zero point offsets OFF, all tool corrections OFF Return to the main program, without interruption of the feed motion.
B555
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B556
B556
828D/840Dsl SINUMERIK Operate
Program structure
B556
1 Brief description
Aim of the module:
In this module you learn how to structure a part program clearly and functionally.
Description of the module:
This module describes the programming structure of NC-programs.
Content:
Basic principles of programming Program structure of a part program
Program structure of a machining sequence Settings at the start of a program
B556
B556
Page 2 828D/840Dsl SINUMERIK OperateNotes
828D/840Dsl SINUMERIK Operate Page 3
B556
B556
Program structure: START Basic princi-ples of pro-gramming Program structure of a part program Program structure of a machining sequence Settings at the start of a pro-gram Program structure: ENDProgram structure: Description
This module describes the programming structure of NC-programs.
B556
B556
Page 4 828D/840Dsl SINUMERIK OperateNotes
Basic principles of programming
Certain principles should be followed during the creation of part pro-grams:
The program must ensure that an unlimited number of work pieces can be produced with the quality (tolerances, surface quality, form and posi-tion deviaposi-tion, etc.) required on the drawing with a minimum of produc-tion time and the least possible material wastage.
It is always the motion of the tool along the drawn ideal contour of the work piece.
If tolerances are shown, the programming is always referred to the mid-dle of the tolerance.
Example: 20 + 0,1 - programmed value = 20,05.
Precise dimension corrections can be carried out on the machine by means of the wear correction feature for the tool.
The program should exhibit a clear and concise structure and should contain comments wherever possible to ensure that other users can un-derstand the layout easily at later stages.
828D/840Dsl SINUMERIK Operate Page 5
B556
B556
NotesProgram structure of a part program
The following flow chart represents a possible suggestion for a suitable structure of the main program.
Tool call-up 1 Program
header
Technology block
Approaching the safety level with the tool
Machining sequence 1
Retraction of the tool
Tool call-up 2 End of program
Technology block
Approaching the safety level with the tool
Machining sequence 2
Workpiece finished
no yes
B556
B556
Page 6 828D/840Dsl SINUMERIK OperateNotes
The programming of the machining sequence can be achieved by means of description of the individual steps using departure commands (e.g. G00, G01, G02, etc.) or by means of machining cycles.
The following representation refers to the flow chart in section 2 of this manual and describes a possible machining sequence.
Programming with G-Codes Programming using cycles
The following criteria should be kept in mind when selecting between the two described possibilities:
Availability of the cycles on the respective machine.
Machining time required with cycles or with G-codes.
The relation of the number of work pieces to the required programming extent.
Input of the individual pa-rameters using the input mask and graphical support Activation of radius
correc-tion
Interpolation to the first destination point
Interpolation to the next destination point
Interpolation to the last destination point
Deactivation of the radius correction
Program structure of a part program
828D/840Dsl SINUMERIK Operate Page 7
B556
B556
NotesFor the user it may be advantageous to switch on certain settings, that are to be activated in the part program, already in the program heading. If necessary, these modally operative commands can always be reset by other commands at any stage during the program.
Suggestion of a program heading for a “milling” application:
Programming example: Explanation:
N10 G17 G54 G64 G71 G90 G94 X/Y-plane, 1st ZP-offset, continuous control, metrical system, absolute dimensions, linear feed rate F in mm/min,
N20….
….
Suggestion of a program heading for a “turning” application:
Programming example: Explanation:
N10 G18 G54 G64 G71 G90 G96 Z/X-plane, 1st ZP-offset, continuous control, metrical system, absolute dimensions, constant cutting speed S in m/ min
N20 DIAMON LIMS=3000 Diameter input*, speed limitation nmax= 3000 min-1
N30….
….
Note:
As the tool progresses towards the centre during facing, the spindle speed evaluated internally in the control unit increases steadily until eventually the maximum possible spindle speed would be attained.
Depending on the clamping conditions and the size of the work piece a speed limitation should always be selected for reasons of safety.
B556
This document was produced for training purposes. Siemens assumes no responsibility for its contents.
828D/840Dsl SINUMERIK Operate Page 1
B557
B557
828D/840Dsl SINUMERIK Operate
Cutting edge radius correction
B557
Objective of the module:
In this module you learn to write a simple milling program, taking into account the radius correction.
Description of the module:
This module describes the commands for radius correction, the rounding and the chamfering of edges. These commands can be used for writing a simple CNC-program. A explanations of the com-mands is provided.
1 Brief description
Content:
Cutter radius compensation
Rounding and chamfering of edges
Mixed incremental and absolute programming Summary
B557
B557
Page 2 828D/840Dsl SINUMERIK OperateNotes
828D/840Dsl SINUMERIK Operate Page 3
B551
B551
Cutting edge radiuscorrection: START Cutter radius compensation Rounding and chamfering of edges Mixed incre-mental and absolute pro-gramming Summary Solutions of the tasks
Cutting edge radius correction:
END
Cutting edge radius correction: Description
This module describes the commands for radius correction, the rounding and the chamfering of edges. These commands can be used for writing a simple CNC-program. A explanations of the com-mands is provided.
B557
B557
Page 4 828D/840Dsl SINUMERIK OperateNotes
Cutter radius compensation
Exercise 1
Open the program editor by pressing the following keys successively:
Write the following program header into the editor. Explain the blocks in the table. While doing this make yourself familiar with the editor. Mark the zero point on the drawing
The path programmed with G01, G02 and G03 represents the path taken by the centre of the milling cutter. In this case the radius of the milling cut-ter must be taken into account.
N50
N70
N90
N110
Motion at feed rate Motion with rapid traverse
Solution see page 13
N10 G54 G64 G17 SOFT
N20 T1 Select tool Nr. 1 (PF60 with tool tips)
N30 M6
N40 S1000 F200.M3 M8 D1
N50 G00 X115 Y65 Z2
Approach of starting point and safety level (P1)
N60 G01 Z0 N70 X-35 N80 G00 Z2 N90 X115 Y15 N100 G01 Z0 N110 X-35 N120 G00 Z150 N130 X150 Y150 M9
Section 2
828D/840Dsl SINUMERIK Operate Page 5
B557
B557
NotesCutter radius compensation
The instructions G41 or G42 are necessary for the programming of con-tours. With this the contour shown on the drawing can be described di-rectly. The radius value for the milling cutter entered in the tool manage-ment is taken into account. The equidistant path for the cutter centre evalu-ated by the control unit is such that the required contour results on the cut-ter circumference.
To enable the control unit to evaluate the correct equidistant path it must know whether the milling cutter is on the right or the left of the contour. This is determined by relative to the machining direction.
Dimensional deviations can then be compensated for by changing the cutter radius.
Before activating the radius compensation a starting point should be cho-sen that is sufficiently far from the contour. If possible this distance should be greater than the cutter radius. The starting and end point must be cho-sen such that no damage to the contour occurs.
Solution 1:
Approach and exit of the contour
Solution 2:
Approach and exit from/into open area. The points „P0“ and „P9“ do not lie on the contour
S=starting point E=end point Px=programmed contour points Equidistant path with feed direction