beautypg.com

31 programming variables – HEIDENHAIN SW 548328-05 DIN Programming User Manual

Page 389

background image

HEIDENHAIN MANUALplus 620, CNC PILOT 620/640

389

4.31 Pr

ogr

amming v

a

ri

ables

4.31 Programming variables

The Control 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 mathematical operations

Syntax

Mathematical functions

+

Addition

Subtraction

*

Multiplication

/

Division

SQRT(...)

Square root

ABS(...)

Absolute amount

TAN(...)

Tangent (in degrees)

ATAN(...)

Arc tangent (in degrees)

SIN(...)

Sine (in degrees)

ASIN(...)

Arc sine (in degrees)

COS(...)

Cosine (in degrees)

ACOS(...)

Arc cosine (in degrees)

ROUND(...)

Round

LOGN(...)

Natural logarithm

EXP(...)

Exponential function ex

INT(...)

Truncate decimal places

SQRTA(.., ..)

Square root of (a

2

+b

2

)

SQRTS(.., ..)

Square root of (a

2

–b

2

)

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.