beautypg.com

15 v a riable pr ogr amming, 15 programming variables – HEIDENHAIN CNC Pilot 4290 User Manual

Page 187

background image

HEIDENHAIN CNC PILOT 4290

175

4.15

V

a

riable Pr

ogr

amming

Syntax

Mathematical function

+

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 e

x

INT(...)

Cut decimal places

Only with # variables:

SQRTA(.., ..) Square root of (a

2

+b

2

)

SQRTS(.., ..) Square root of (a

2

–b

2

)

Examples for ”# variables”

. . .

N.. #1=PARA(1,7,3) [transfers ”machine value 1 Z” to

variable #1 ]

. . .

N.. #1=#1+1

N.. G1 X#1

N.. G1 X(SQRT(3*(SIN(30)))

N.. #1=(ABS(#2+0.5))

. . .

4.15 Programming Variables

The CNC PILOT supports NC programs before the program run. The
system therefore differentiates between two types of variables:

# variables are evaluated during NC program interpretation.

V variables (or events) are evaluated during NC program run.

The following rules apply:

Multiplication/division before addition/subtraction

Up to 6 bracket levels

Integer variables (only for V variables): Integer values between

–32767 .. +32768

Real variable (with # and V variable): Floating point numbers with

max. 10 integers and 7 decimal places

The variable are kept even if the control was switched off

4.15.1 # Variables

The CNC PILOT uses value ranges to define the scope of variables:

#0 .. #29: Channel-dependent, global variable

Can be used for each slide (NC channel). Identical variable numbers
on different slides are no problem.

Global variables are retained after the program has been completed
and can be processed by the following NC program.

#30 .. #45 channel independent, global variable

Are available once within the control. If the NC program of a slide
changes a variable, it applies to all slides. The variables are retained
after the program has been completed and can be processed by the
following NC program.

#46 .. #50 variables are only used in expert programs

. Do not use these variables in your NC program.

#256 .. #285 local variables

are effective within a subprogram.

Reading-in parameter values

Syntax: #1 = PARA(x,y,z)

x = Parameter group

1: Machine parameters

2: Control parameters

3: Setup parameters

4: Machining parameters

5: PLC parameters

y = Parameter number

z = Sub-parameter number

Continued

Program NC blocks containing variable
calculations with ”slide code $..” if your
lathe has more than one slide. Otherwise,
the calculations are repeated.