Programming principles
1.1 Fundamentals of programming
Turning Part 2: Programming (Siemens instructions)
18 Programming and Operating Manual, 05/2012, 6FC5398-5DP10-0BA0
Address Significance Value assignments Information Programming
ACOS() Arc cosine R20=ACOS(R2) ; R20: ...
Degrees
ATAN2( , ) Arctangent2 The angle of the sum vector is
calculated from 2 vectors
standing vertically one on
another. The 2nd vector
specified is always used for
angle reference.
Result in the range: -180 to
+180 degrees
R40=ATAN2(30.5,80.1) ;
R40: 20.8455 degrees
SQRT() Square root R6=SQRT(R7)
POT() Square R12=POT(R13)
ABS() Absolute value R8=ABS(R9)
TRUNC() Truncate to integer R10=TRUNC(R2)
LN() Natural logarithm R12=LN(R9)
EXP() Exponential
function
R13=EXP(R1)
RET Subroutine end Used instead of M2 - to maintain
the continuous-path mode
RET ;separate block
S... Spindle speed
0.001 ... 99 999.999 Unit of measurement of the
spindle r.p.m.
S...
S1=... Spindle speed
for spindle 1
0.001 ... 99 999.999 Unit of measurement of the
spindle r.p.m.
S1=725 ; speed 725
r.p.m. for spindle 1
S Cutting rate
with G96 active
0.001 ... 99 999.999 Cutting rate unit m/min with
G96; for spindle only
G96
S...
S Dwell time
in block with G4
0.001 ... 99 999.999 Dwell time in spindle revolutions G4 S... ;separate block
T Tool number 1 ... 32 000
only integer, no sign
The tool change can be
performed either directly using
the T command or only with M6.
This can be set in the machine
data.
T...
X Axis ±0.001 ... 99 999.999 Positional data X...
Y Axis ±0.001 ... 99 999.999 Positional data Y...
Z Axis ±0.001 ... 99 999.999 Positional data Z...
AC Absolute
coordinate
- The dimension can be specified
for the end or center point of a
certain axis, irrespective of G91.
N10 G91 X10 Z=AC(20)
;X -incremental
dimension,
Z - absolute dimension
ACC[
axis
] Percentage
acceleration
override
1 ... 200, integer Acceleration override for an axis
or spindle; specified as a
percentage
N10 ACC[X]=80 ;for the X
axis 80%
N20 ACC[S]=50;for the
spindle: 50%