4
Expanded variable syntax CONST – VAR
By defining the key words CONST or VAR, you can assign names
to variables. The key words can be used in the main program and
subprogram. To use the definitions in a subprogram, you need to
declare the constant or variable before the MACHINING code.
Rules for defining constants and variables:
names of constants and variables must be preceded by
an underscore. They can comprise lower case letters,
numbers and the underscore character.
The maximum length must not exceed 20 characters.
Variable names with VAR
By assigning variable names, you make it easier to read an NC
program. To do this, you must insert the program section VAR. In
this program section, you assign the variable designations to the
variables.
Example: Free-text variables
%abc.nc
VAR
#_rohdm=#l1
BLANK
N..
FINISHED PART
N..
MACHINING
N..
. . .
Example: Subprogram
%SP1.ncS
VAR
#_wo = #c1
MACHINING
N.. #_wo = #w0(WTL)
N.. G0 X(#_posx*2)
N.. G0 X#_start_x
. . .
474
DIN/ISO programming | Programming variables
The
#_rohdm is a synonym of #l1
Tool orientation
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017