SIEMENS 808D TURNING PROGRAMMING

Fundamentals of programming:

1) Program names
Enter the file extension ".SPF" if the current default program type is MPF (main program)and you desire to create a sub program Enter the file extension ".MPF" if the current default program type is SPF (subprogram)and you desire to create a main program Do not enter the file extension if you desire to take the current default program type.Avoid using special characters for program names.
              Example: Turning 123
2) Program structure
The NC program consists of a sequence of blocks (see the table below). Each block
represents a machining step. Instructions are written in the blocks in the form of words. The
last block in the execution sequence contains a special word for the end of the program.
           Example: Block  Word  Word  Word ... ; Comment
                            Block  N10    G0     X20 ... ; First block
                            Block  N20    G2    Z37 ... ; Second block
                            Block  N30   G91 ... ... ; ...
                            Block  N40    ...    ...  ...
                            Block  N50   M2 ; ...   ...         End of program
3) Word structure and address

Functionality/structure

A word is a block element and mainly constitutes a control command. The word consists of
the following two parts:
1) address character: generally a letter
2) numerical value: a sequence of digits which with certain addresses can be added by a
sign put in front of the address, and a decimal point.
A positive sign (+) can be omitted.
Several address characters:

A word can also contain several address letters. In this case, however, the numerical value
must be assigned via the intermediate character "=".

Example: CR=5.23

Additionally, it is also possible to call G functions using a symbolic name (For more
information, refer to Section "List of instructions (Page 12)".).
Example: SCALE ; Enable scaling factor

Extended address

With the following addresses, the address is extended by 1 to 4 digits to obtain a higher
number of addresses. In this case, the value must be assigned using an equality sign "=".

R Arithmetic parameters

H H function
I, J, K Interpolation parameters/intermediate point
M Special function M, affecting the spindle with other options
S Spindle speed
Examples: R10=6.234 H5=12.1 I1=32.67 M2=5 S1=400
4) Character set

The following characters are used for programming. They are interpreted in accordance with
the relevant definitions.

Letters, digits

A, B, C, D, E, F, G, H, I, J, K, L, M, N,O, P, Q, R, S, T, U, V, W X, Y, Z
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
No distinction is made between lowercase and uppercase letters.

Printable special characters

(  Open parenthesis " Inverted commas
)  Close parenthesis _ Underscore (belongs to letters)
[  Open square bracket . Decimal point
]  Close square bracket , Comma, separator
<  less than ; Comment start
>  greater than % Reserved; do not use
:  Main block, end of label & Reserved; do not use
=  Assignment, part of equation ' Reserved; do not use
/  skip $ System variable identifiers
*  Multiplication ? Reserved; do not use
+  Addition and positive sign ! Reserved; do not use
-  Subtraction, minus sign
Non-printable special characters

LF End-of-block character
Blank Separator between words; blank
Tab character Reserved; do not use
5) Block format
A block should contain all data required to execute a machining step.
Generally, a block consists of several words and is always completed with the end-of-block
character " LF " (Linefeed). When writing a block, this character is automatically generated
when pressing the linefeed key on an externally connected keyboard or pressing the
following key on the PPU:

Word order

If there are several instructions in a block, the following order is recommended:
N... G... X... Z... F... S... T... D... M... H...
Note regarding block numbers:
First select the block numbers in steps of 5 or 10. Thus, you can later insert blocks and
nevertheless observe the ascending order of block numbers.

Block skip

Blocks of a program, which are to be executed not with each program run, can be marked by
a slash / in front of the block number.
The block skip itself is activated via Operation (program control: "SKP") or by the
programmable controller (signal). A section can be skipped by several blocks in succession
using " / ".
If a block must be skipped during program execution, all program blocks marked with " / " are
not executed. All instructions contained in the blocks concerned will not be considered. The
program is continued with the next block without marking.

Comment, remark

The instructions in the blocks of a program can be explained using comments (remarks). A
comment always starts with a semicolon " ; " and ends with end-of-block.
Comments are displayed together with the contents of the remaining block in the current
block display.

Messages

Messages are programmed in a separate block. A message is displayed in a special field
and remains active until a block with a new message is executed or until the end of the
program is reached. Up to 65 characters can be displayed in message texts.
A message without message text cancels a previous message.
MSG ("THIS IS THE MESSAGE TEXT")

Programming example

N10 ;  Part name
N20 ;  Drawing number
N30 ;  Header of the program
N40 :  Machine controller,Speed,Coolant 
N50  :Work co ordinate system and axis reference point,Feed,Depth
N60  : Create tool path,Cutting parameters
N70  :
N80  
N90  
N100
N110  : Machine controller speed,coolant
N120  M30 ; End of program

Positional data:

Programming dimensions

In this section you will find descriptions of the commands, with which you can directlyprogram dimensions taken from a drawing. This has the advantage that no extensivecalculations have to be made for NC programming.

Overview of typical dimensions

The basis of most NC programs is a drawing with concrete dimensions.
When implementing in a NC program, it is helpful to take over exactly the dimensions of a
workpiece drawing into the machining program. These can be:
1) Absolute dimension, G90 modally effective applies for all axes in the block, up to
revocation by G91 in a following block.
2)  Absolute dimension, X=AC(value) only this value applies only for the stated axis and is
not influenced by G90/G91. This is possible for all axes and also for SPOS, SPOSA
spindle positionings, and interpolation parameters I, J, K.
3) Absolute dimension, X=CC(value) directly approaching the position by the shortest route,
only this value applies only for the stated rotary axis and is not influenced by G90/G91.
This is also possible for SPOS, SPOSA spindle positionings.
4) Absolute dimension, X=ACP(value) approaching the position in positive direction, only
this value is set only for the rotary axis, the range of which is set to 0... < 360 degrees in
the machine data.
5)  Absolute dimension, X=ACN(value) approaching the position in negative direction, only
this value is set only for the rotary axis, the range of which is set to 0... < 360 degrees in
the machine data.
6) Incremental dimension, G91 modally effective applies for all axes in the block, until it is
revoked by G90 in a following block.
7) Incremental dimension, X=IC(value) only this value applies exclusively for the stated axis
and is not influenced by G90/G91. This is possible for all axes and also for SPOS,
SPOSA spindle positionings, and interpolation parameters I, J, K.
8)  Inch dimension, G70 applies for all linear axes in the block, until revoked by G71 in a
following block.
9) Metric dimension, G71 applies for all linear axes in the block, until revoked by G70 in a
following block.
10)  Inch dimension as for G70, but applies also for feedrate and length-related setting data.
11)  Metric dimension as for G71, but applies also for feedrate and length-related setting data.
12)  Diameter programming, DIAMON on
13)  Diameter programming, DIAMOF off
Diameter programming, DIAM90 for traversing blocks with G90. Radius programming for
traversing blocks with G91.

Absolute / incremental Dimensioning : G90, G91,

With the instructions G90/G91, the written positional data X, Z, ... are evaluated as a
coordinate point (G90) or as an axis position to traverse to (G91). G90/91 applies for all
axes.
Irrespective of G90/G91, certain positional data can be specified for certain blocks in
absolute/incremental dimensions using AC/IC.
These instructions do not determine the path by which the end points are reached; this is
provided by a G group (G0, G1, G2 and G3...). For more information.
Programming
G90 ; Absolute dimension data
G91 ; Incremental dimension data
Example of programming
                          G0 G54 G90/G91 X0 Z0

Dimensions in metric units and inches: G71, G70

If workpiece dimensions that deviate from the base system settings of the control are present
(inch or mm), the dimensions can be entered directly in the program. The required
conversion into the base system is performed by the control system.
Programming
G70 ; Inch dimensions
G71 ; Metric dimensions

Example of Programming:

G0 G75 G71/G70 X0  Z0

Workpiece  settable work offset: G54 to G59(G500,G53,G153)

The adjustable work offset specifies the position of the workpiece zero on the machine
(offset of the workpiece zero with respect to the machine zero point). This offset is
determined upon clamping of the workpiece into the machine and must be entered in the
corresponding data field by the operator. The value is activated by the program by selection
from six possible groupings: G54 to G59.

Programming

G54 to G59 ; 1. to 6th settable work offset
G500 ; Settable work offset OFF - modal
G53 ; settable work offset OFF non-modal, also suppresses programmable
offset
G153 ; As with G53; additionally suppresses base frame
Programming example
N10 G54 G0 X50 Z135
N20 X70 Z160
N30 T1 D1
N40 M3 S1000
N50 G0 X20 Z130
N60 G01 Z150 F0.12
N70 X50 F0.1
N80 G500 X100 Z170
N90 M30

Axis movements:
The rapid traverse movement G0 is used for fast positioning of the tool, however, not for
direct workpiece machining.
All axes can be traversed simultaneously - on a straight path.
For each axis, the maximum speed (rapid traverse) is defined in machine data. If only one
axis traverses, it uses its rapid traverse. If two axes are traversed simultaneously, the path
velocity (resulting velocity) is selected to achieve the maximum possible path velocity in
consideration of both axes.
Any programmed feedrates (F word) are not relevant for G0.
G0 remains active until canceled by another instruction from this G group (G0, G1, G2, G3,
...).

See the following illustration for linear interpolation with rapid traverse from point P1to P2
Example:
   G0 X10 Z10

Feedrate F:
The feed F is the path velocity and represents the value of the geometric sum of the velocity
components of all axes involved. The axis velocities are determined from the share of the
axis path in the overall path.
The feedrate F is effective for the interpolation types G1, G2, G3, CIP, and CT and is

retained until a new F word is written. Refer to Sections "Linear interpolation with feedrate:
Programming
F...
Remark: For integer values, the decimal point is not required, e.g.: F300
Unit of measure for F with G94, G95
The dimension unit for the F word is determined by G functions:
● G94 F as feedrate in mm/min
● G95 F as feedrate in mm/rev. (only relative to the spindle speed!)
Programming example
N10 G94 F310 ; Feedrate in mm/min
N20 G01 X60 Z60
N30 M5
N40 S200 M3 ; Spindle rotation
N50 G95 F0.8 ; Feedrate in mm/revolution
N60 G01 X100 Z100
N70 M30
Linear interpolation with feedrate: G1

The tool moves from the starting point to the end point along a straight path. For the path
velocity, is determined by the programmed F word .
All the axes can be traversed simultaneously.
G1 remains active until canceled by another instruction from this G group (G0, G2, G3, ...).

See the following illustration for linear interpolation with G1:
Programming example

N05 G54 G0 G90 X40 Z200 S500 M3 ; The tool traverses in rapid traverse,
spindle speed = 500 r.p.m., clockwise
N10 G1 Z120 F0.15 ; Linear interpolation with feedrate 0.15
mm/revolution
N15 X45 Z105
N20 Z80
N25 G0 X100 ; Retraction in rapid traverse
N30 M2 ; End of program

Circular interpolation: G2, G3:
The tool moves from the starting point to the end point along a circular path. The direction is

determined by the G function:

Programming
G2/G3 X... Y... I... J... ; Center and end points
G2/G3 CR=... X... Y... ; Circle radius and end point
G2/G3 AR=... I... J... ; Opening angle and center point
G2/G3 AR=... X... Y... ; Opening angle and end point

G2/G3 AP=... RP=... ; Polar coordinates, circle around the pole
Note

Further possibilities for circle programming result from:
CT - circle with tangential connection and
CIP - circle via intermediate point (see next sections).

Entering tolerances for the circle

Circles are only accepted by the control system with a certain dimensional tolerance. The
circle radius at the starting and end points are compared here. If the difference is within the
tolerance, the center point is exactly set internally. Otherwise, an alarm message is issued.
The tolerance value can be set via machine data.
Programming example: 
1) Definition of center point and end point
N5 G90 Z30 X40 ; Starting point circle for N10

N10 G2 Z50 X40 K10 I-7 ; End point and center point

2) End point and radius specification:
N5 G90 Z30 X40 ; Starting point circle for N10

N10 G2 Z50 X40 CR=12.207 ; End point and radius

3) Definition of end point and aperture angle:
N5 G90 Z30 X40 ; Starting point circle for N10

N10 G2 Z50 X40 AR=105 ; Opening angle and end point

4) Definition of center point and aperture angle:
N5 G90 Z30 X40 ; Starting point circle for N10

N10 G2 K10 I-7 AR=105 ; Opening angle and center point

Circular interpolation via intermediate point: CIP

The direction of the circle results here from the position of the intermediate point (between
starting and end points). Specification of intermediate point: I1=... for the X axis, K1=... for
the Z axis.
CIP remains active until canceled by another instruction from this G group (G0, G1, ...).
The configured dimensional data G90 or G91 applies to the end point and the intermediate
point.

See the following illustration for circle with end point and intermediate point specification
N5 G90 Z30 X40 ; Starting point circle for N10
N10 CIP Z50 X40 K1=40 I1=45 ; End point and intermediate point

Circle with tangential transition: CT

With CT and the programmed end point in the current plane (G18: Z/X plane), a circle is
produced which tangentially connects to the previous path segment (circle or straight line).
This defines the radius and center point of the circle from the geometric relationships of the
previous path section and the programmed circle end point.

See the following illustration for circle with tangential transition to the previous path section:

Fixed point approach: G75

By using G75, a fixed point on the machine, e.g. tool change point, can be approached. The
position is stored permanently in the machine data for all axes. A maximum of four fixed
points can be defined for each axis.
No offset is effective. The velocity of each axis is its rapid traverse.
G75 requires a separate block and acts non-modal. The machine axis identifier must be
programmed!
In the part program block after G75, the previous G command of the "Interpolation type"

group (G0, G1,G2, ...) is active again.
Example:
G75 X0 Z0

Exact stop G60, G9:
If the exact stop function (G60 or G9) is active, the velocity for reaching the exact end
position at the end of a block is decelerated to zero.
Another modal G group can be used here to set when the traversing movement of this block

is considered ended and the next block is started.

Continuous-path control mode G64:

The objective of the continuous-path control mode is to avoid deceleration at the block
boundaries and to switch to the next block with a path velocity as constant as possible (in
the case of tangential transitions). The function works with look-ahead velocity control over
several blocks.
For non-tangential transitions (corners), the velocity can be reduced rapidly enough so that
the axes are subject to a relatively high velocity change over a short period of time. This may
lead to a significant jerk (acceleration change). The size of the jerk can be limited by
activating the SOFT function.

EXAMPLE:
N10 G64 G1 Z5 F0.15 M3 S800 ; Continuous-path mode
N20 X20 Z0 ; Continuous-path control mode continues to be
active
N30 Z-40
N40 G60 X30 Z-50 ; Switching over to exact stop
N50 X45 Z-70
N60 M30
Look-ahead velocity control
In the continuous-path control mode with G64, the control system automatically determines
the velocity control for several NC blocks in advance. This enables acceleration and
deceleration across multiple blocks with approximately tangential transitions. For paths that
consist of short travels in the NC blocks, higher velocities can be achieved than without look
ahead.
Dwell Time: G4

Between two NC blocks you can interrupt the machining process for a defined period by
inserting your own block with G4; e.g. for relief cutting.
Words with F... or S... are only used for times in this block. Any previously programmed

feedrate F or a spindle speed S remain valid.
Programming
G4 F... ; Dwell time in seconds
G4 S... ; Dwell time in spindle revolutions
N5 G1 F3.8 Z-50 S300 M3 ;Feed F; spindle speed S
N10 G4 F2.5 ; Dwell time 2.5 seconds
N20 Z70
N30 G4 S30 ;dwelling 30 revolutions of the spindle, corresponds at
; S=300 rpm and 100 % speed override to: t=0.1 min
N40 X20 ;Feed and spindle speed remain effective

Spindle movements:

1) Spindle speed S, directions of rotation
The spindle speed is programmed under the address S in revolutions per minute, if the
machine has a controlled spindle.
The direction of rotation and the beginning or end of the movement are specified via M

commands.
Programming
M3 ; Spindle clockwise
M4 ; Spindle counterclockwise
M5 ; Spindle stop
N10 G1 X70 Z20 F3 S270 M3 ; before the axis traversing X, Z the spindle
accelerates to 270 r.p.m., clockwise
N20 X90 Z0
N30 Z-40
N40 M5
N50 M4 S290
N60 G1 X100 Z50
N70 S450 Z100 ; Speed change
N80 X150 Z150
N90 G0 Z180 M5 ; Z movement, spindle comes to a stop
N100 M30

Constant cutting rate: G96, G97:
Requirement: A controlled spindle must be present.
With activated G96 function, the spindle speed is adapted to the currently machined
workpiece diameter (transverse axis) such that a programmed cutting rate S remains
constant on the tool edge:
Spindle speed times diameter = constant.
The S word is evaluated as the cutting rate as of the block with G96. G96 is modally effective

until cancellation by another G function of the group (G94, G95, G97).
Programming:
G96 S... LIMS=... F... ; Constant cutting speed ON
G97 ; Constant cutting speed OFF
S ; Cutting rate, unit of measurement m/min.
LIMS= ; Upper limit speed of the spindle with G96, G97 effective
F ; Feedrate in mm/revolution – as for G95
NOTE:
If G94 instead of G95 was active before, a new appropriate F value must be written.

See the following illustration for constant cutting rate G96:
Rapid traverse:

With rapid traverse G0, there is no change in speed.
Exception: If the contour is approached at rapid traverse and the next block contains an
interpolation type G1 or G2, G3, CIP, CT (contour block), then the speed for the contour
block is applied already in the approach block with G0.

Upper speed limit LIMS:

During machining from large to small diameters, the spindle speed can increase significantly.
In this case, it is recommended to program the upper spindle speed limitation LIMS=... .
LIMS is only effective with G96 and G97.
By programming LIMS=..., the value entered into the setting data (SD 43230:
SPIND_MAX_VELO_LIMS) is overwritten. This SD takes effect when LIMS is not written.
The upper limit speed programmed with G26 or defined via machine data cannot be
overwritten with LIMS=.

Deactivate constant cutting rate: G97

The function "Constant cutting rate" is deactivated by G97. If G97 is active, a programmed S
word is given in RPM as the spindle speed .
If no new S word is programmed, the spindle turns at the last defined speed with G96
function active.
EXAMPLE:
N10 M3 S1000 ; Spindle's direction of rotation
N20 G96 S120 LIMS=2500 ; Activate constant cutting speed, 120 m/min, speed
limit 2,500 r.p.m.
N30 G0 X150 ; no change in speed, because block N31 with G0
N40 X50 Z20 ; no change in speed, because block N32 with G0
N50 X40 ; Approach on contour, new speed is automatically set as
is required for the beginning of block N40
N60 G1 F0.2 X32 Z25 ; Feedrate 0.2 mm/revolution
N70 X50 Z50
N80 G97 X10 Z20 ; Deactivating constant cutting rate
N90 S600 ; new spindle speed, r.p.m.
N100 M30

Rounding, chamfer:
You can insert the chamfer (CHF or CHR) or rounding (RND) elements into a contour corner.
If you wish to round several contour corners sequentially by the same method, use "Modal
rounding" (RNDM).
You can program the feedrate for the chamfer/rounding with FRC (non-modal) or FRCM
(modal). If FRC/FRCM is not programmed, the normal feedrate F is applied.
Programming:
CHF=... ; Insert chamfer, value: Length of chamfer
CHR=... ; Insert chamfer, value: Side length of the chamfer
RND=... ; Insert rounding, value: Radius of chamfer
RNDM=... ; Modal rounding:
Value >0: Radius of chamfer, modal rounding ON
This rounding is inserted in all contour corners.
Value = 0: Modal rounding OFF...
FRC=... ; Non-modal feedrate for chamfer/rounding
Value >0, feedrate in mm/min (G94) or mm/rev. (G95)
FRCM=... ; Modal feedrate for chamfer/rounding:
Value >0: Feedrate in mm/min (G94) or mm/rev. (G95),
Modal feedrate for chamfer/rounding ON
Value = 0: Modal feedrate for chamfer/rounding OFF
Feedrate F applies to the chamfer/rounding.

Points:
1) The chamfer/rounding functions are executed in the current planes G18 to G19.
The appropriate instruction CHF= ... or CHR=... or RND=... or RNDM=... is written in the
block with axis movements leading to the corner.
2) The programmed value for chamfer and rounding is automatically reduced if the contour
length of an involved block is insufficient.
No chamfer/rounding is inserted
3) more than three blocks in the connection are programmed that do not contain any
information for traversing in the plane.
4) or a plane change is carried out.
F, FRC,FRCM are not active when a chamfer is traversed with G0.
If the feedrate F is active for chamfer/rounding, it is by default the value from the block which
leads away from the corner. Other settings can be configured via machine data.
Chamfer CHF or CHR:

A linear contour element is inserted between linear and circle contours in any combination.
The edge is broken.
See the following illustration for inserting a chamfer with CHF using the example: between
two straight lines.
Example:
N10 G0 X100 Z100 G94 F100
N20 G1 X80 CHF=5 ; Insert chamfer with chamfer length of 5 mm
N30 X50 Z60
N40 X40 Z50
N50 G1 X30 CHR=7 ; Insert chamfer with leg length of 7 mm
N60 X10 Z20
N70 X0 Z0
N80 G1 FRC=200 X100 CHR=4 ; Insert chamfer with feedrate FRC
N90 X120 Z20
N100 M30

Comments

Popular Posts