31 programming variables – HEIDENHAIN SW 54843x-03 DIN Programming User Manual
Page 407

HEIDENHAIN MANUALplus 620, CNC PILOT 640
407
4.31 Pr
ogr
amming v
a
ri
ables
4.31 Programming variables
The Steuerung provides a variety of variable types.
The following rules apply to the use of variables:
Multiplication/division before addition/subtraction
Up to 6 bracket levels
Integer variables: Integer values between –32767 and +32768
Real variables: Floating point numbers with max. 10 integers and 7
decimal places
Do not use any blank spaces when programming variables.
The variable number itself and an index value, if applicable, can be
described by another variable, e.g.: #g( #c2)
See the table for the available functions
Syntax
Operator functions
+
Addition
–
Subtraction
*
Multiplication
/
Division
( )
Parenthesizing
=
Equate function
Syntax
Arithmetic functions
ABS(...)
Absolute amount
ROUND(...)
Round
SQRT(...)
Square root
SQRTA(.., ..)
Square root of (a
2
+b
2
)
SQRTS(.., ..)
Square root of (a
2
–b
2
)
INT(...)
Truncate decimal places
Syntax
Trigonometric functions
SIN(...)
Sine (in degrees)
COS(...)
Cosine (in degrees)
TAN(...)
Tangent (in degrees)
ASIN(...)
Arc sine (in degrees)
ACOS(...)
Arc cosine (in degrees)
ATAN(...)
Arc tangent (in degrees)
Syntax
Other functions
LOGN(...)
Natural logarithm
EXP(...)
Exponential function ex
BITSET(...)
Bitset function
STRING(...)
String
PARA(...)
Configuration data
The distinction made by CNCPILOT XXXX and
MANUALplus X110 controls between variables that can
be modified at runtime and those that cannot, does not
apply any longer. The NC program is no longer compiled
before the program run, but at runtime.
Program NC blocks containing variable calculations with
"slide code $.." if your lathe has more than one slide.
Otherwise, the calculations are repeated.
Positions and dimensions transferred into system
variables are always indicated in metric form. This also
applies when an NC program is run in inches.
You can also program the listed functions by soft key.
The soft-key row is available when the variable
assignment function is active and the alphabetic keyboard
is closed.