Programming With Variables; Variable Types - HEIDENHAIN MANUALPLUS 620 User Manual

Smart.turn and iso programming
Hide thumbs Also See for MANUALPLUS 620:
Table of Contents

Advertisement

4.31 Programming with Variables

A variety of variable types are available.
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
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.

Variable types

The MANUALplus distinguishes the following variable types:
General variables
#I1 to #I30 Channel-independent local variables are effective
within a main or a subprogram.
#c1 .. #c30 Channel-dependent, global variables can be used for
each slide (NC channel). Identical variable numbers on different
slides are no problem. The variable content is provided globally by
one channel; globally means that a variable described in a
subprogram can be evaluated in the main program, and vice versa.
#g1 .. #g199 Channel-independent, global REAL variables are
provided once within the control. If the NC program changes a
variable, it applies to all slides. The variables are retained even when
the control is switched off, and can be evaluated again after power-
up.
HEIDENHAIN MANUALplus 620
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
SQRTS(.., ..)
Square root of (a
Example:
. . .
N.. #l1=#l1+1
N.. G1 X#c1
N.. G1 X(SQRT(3*(SIN(30)))
N.. #g1=(ABS(#2+0.5))
. . .
N.. G1 Z#m(#l1)(Z)
N.. #x1="Text"
N.. #g2=#g1+#l1*(27/9*3.1415)
. . .
2
2
+b
)
2
2
–b
)
355

Advertisement

Table of Contents
loading

Table of Contents