Programming principles
1.1 Fundamentals of programming
Turning Part 2: Programming (Siemens instructions)
Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
17
Address Significance Value assignments Information Programming
Mn=3 CW rotation of spindle n = 1 M1=3 ; CW rotation stop
for spindle 1
Mn=4 CCW rotation of spindle (for spindle n) n = 1 M1=4 ; CCW rotation
stop for spindle 1
Mn=5 Spindle stop (for spindle n) n = 1 M1=5 ; Spindle stop for
spindle 1
M6 Tool change Only if activated with M6 via the
machine control panel;
otherwise, change directly using
the T command
M40 Automatic gear stage switching
Mn=40 Automatic gear stage switching
(for spindle n)
n = 1 M1=40 ; automatic gear
stage; for spindle 1
M41 to M45 Gear stage 1 to gear stage 5
Mn=41 to
Mn=45
Gear stage 1 to gear stage 5 (for spindle n) n = 1 M1=41; 1st gear stage for
spindle 1
M70, M19 - Reserved; do not use
M... Remaining M functions Functionality is not defined by
the control system and can
therefore be used freely by the
machine manufacturer
N Block number -
subblock
0 ... 9999 9999
only integer, no sign
Can be used to identify blocks
with a number; is written at the
beginning of a block.
N20
: Block number of a
main block
0 ... 9999 9999
only integer, no sign
Special block identification, used
instead of N... ; such a block
should contain all instructions for
a complete subsequent
machining step.
:20
P Number of
subroutine passes
1 ... 9999
only integer, no sign
Is used if the subroutine is run
several times and is contained in
the same block as the call
L781 P... ;separate block
N10 L871 P3 ; three
cycles
R0
to
R299
Arithmetic
parameters
± 0.0000001 ...
9999 9999
(8 decimal places) or
specified as an
exponent:
± (10-300 ... 10+300 )
R1=7.9431 R2=4
with specification of an
exponent:
R1=-1.9876EX9; R1=-1
987 600 000
Arithmetic functions In addition to the 4 basic
arithmetic functions using the
operands + - * /, there are the
following arithmetic functions:
SIN( ) Sine Degrees R1=SIN(17.35)
COS() Cosine Degrees R2=COS(R3)
TAN() Tangent Degrees R4=TAN(R5)
ASIN() Arc sine R10=ASIN(0.35) ; R10:
20.487 degrees