Programming instructions

12-4
NC Compiler Functions NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
1. Changing tools
:
N0035 DEFINE M860 AS M86 M3 S10 Declutching while the spindle
rotates slowly
N0036 DEFINE M6 AS BSR .WZW Simulating the M6 DIN tool
changing function
N0037 DEFINE QUICK AS G01 F15000
swift motion at 35 m/min
N0038 DEFINE ANPOS_X AS MTD (112, 1, 8, 1)
X load position for tool change
N0039 DEFINE ANPOS_Y AS MTD (112, 1, 8, 2)
Y load position for tool change
N0040 DEFINE ANPOS_Z AS MTD (112, 1, 8, 3)
Z load position for tool change
;
N0041 QUICK X = ANPOS_X Y = ANPOS_Y M860
swift loading in X, Y and
declutching
N0042 Z = ANPOS_Z M6 swift loading in Z and
changing tools
:
2. Tool correction compensation
:
N0086 DEFINE L3_KORR AS TLD ( , 1, @101, , 1, 13, )
tool wear
N0087 DEFINE D_SOLL AS MTD (114, 2, 0, 1)
actual tool diameter
N0088 DEFINE D_IST AS MTD (114, 2, 0, 2)
tool command diameter
;
N0089 L3_KORR = (D_SOLL - D_IST) /2 computation of the tool wear
:
Notes:
A macro name may have up to 20 characters.
The instruction related to a global macro may contain up to 156 char-
acters (consisting of 2 lines with up to 78 characters each).
With a local macro, the compiler interprets all NC instructions that fol-
low the AS key word as the instruction sequence that must be inserted
instead of the macro name.
Nesting macros is not permitted. This means that there may be no
further macro calls within an instruction sequence that is to be in-
serted.
Example: DEFINE M860 AS M86 M3 S10
In contrast to the textual user interface and to the SOT, within the
graphical user interface, the user may program global macros in MDI
mode.
Key words may not be super-defined by macros.
CAUTION
Macro technique permits the programming language to
be heavily simplified. Thus, it must be used with ex-
treme care.
Examples