Variable types, 31 pr ogr amming v a ri ables – HEIDENHAIN SW 54843x-03 DIN Programming User Manual
Page 408
408
DIN Programming
4.31 Pr
ogr
amming v
a
ri
ables
Variable types
The Steuerung distinguishes the following variable types:
General variables
#l1 .. #l30 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.
#g200 .. #g299 Channel-independent, global INTEGER 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.
#x1 .. #x20 Channel-dependent, local text variables are effective
within a main or subprogram. They can only be read on the channel
to which they were written.
Machine dimensions
#m1(n) .. #m99(n): "n" is the designation of the axis (X, Z, Y) for
which the machine dimension is to be read or written. The variable
calculation uses the table "mach_dim.hmd".
Simulation: During the startup of the control, the table
"mach_dim.hmd" is read by the simulation. The simulation function
now uses the table of the simulation.
Beispiel:
. . .
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)
. . .
If the variables are to be retained in the memory when the
control is switched off, this feature must be activated by
the machine tool builder (configuration parameter:
"Channels/ChannelSettings/CH_NC1/CfgNcPgmParState/
persistent=TRUE").
If this feature is not activated, the variables values will
always be "zero" after power-up.
Beispiel: Machine dimensions
. . .
N.. G1 X(#m1(X)*2)
N.. G1 Z#m3(Z)
N.. #m4(Z)=350
. . .