Programming
10.1 Fundamental Principles of NC Programming
Cylindrical grinding
230 Programming and Operating Manual, 07/2009, 6FC5398-4CP10-2BA0
Address Meaning Value assignments Information Programming
Arithmetic functions In addition to the 4 basic
arithmetic functions using the
operands + - * /, there are the
following arithmetic functions:
SIN( ) sinusoidal 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
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
control mode
RET ;separate block
S... Spindle speed
(master spindle)
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
S2=... Spindle speed
for spindle 2
0.001 ... 99
999.999
Unit of measurement of the
spindle r.p.m.
S2=730 ; speed 730 r.p.m.
for spindle 2
S Cutting rate
with G96 active
0.001 ... 99
999.999
Cutting rate unit m/min with
G96;
for master 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
0 ... 9, 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...
Z Axis ±0.001 ... 99
999.999
Positional data Z...