Subprogram section, Return code, Const code – HEIDENHAIN CNC Pilot 4290 V7.1 User Manual
Page 145
HEIDENHAIN CNC PILOT 4290
145
4.4 Pr
ogr
am Section Code
SUBPROGRAM section
If you define a subprogram within your NC program (within the same
file), it is designated with SUBPROGRAM, followed by the name of
the subprogram (max. 8 characters).
RETURN code
The RETURN code concludes the subprogram.
CONST code
In the CONST section of the program you define constants. You use
constants for the definition of:
a value
a # variable
a V variable
You enter the value directly or you calculate it. If you use constants in
the calculation you must first define them.
The length of the constant name must not exceed 16 characters.
Example: CONST
CONST
[_nvr: Zero point shift]
[_noz: Zero point offset]
[_nws: Shift]
_nvr = 0
_noz = PARA(1,1164,0)
_nws = _noz-_nvr
_lg_roht = 1
[Variable #1]
_posbeginn = 178
[Variable V178]
. . .
CONTOUR Q4 X0 Z_nws V2
ROHTEIL [WORKPIECE BLANK]
N 3 #_lg_roht=270
N 1 G20 X120 Z#_lg_roht K2
. . .
BEARBEITUNG [MACHINING]
. . .
N 6 G0 X{V_posbeginn}
. . .