Macroprogramming (# INIT MACRO TAB)

Macros permit the assignment of an alias name (macro name) to an executable NC code (macro content). The macro content may consist of arithmetical expressions and NC commands. The related NC code is executed whenever the corresponding macro name (macro call) is specified.

Macros support the generation of low-maintenance and clear NC programs. Changes need only be made once in the macro content.

Macros may only be configured in the channel parameter list [1]-1 and also defined in the NC program.

Syntax of a macro definition

"<macro_name>" = "<macro_content>"

<macro_name>   Name des Makros (alias)

<macro_content>   Executable NC code

A macro call is initiated by the macro name and can be combined in the same NC block with other NC commands.

Syntax of a macro call:


Programing Example


Macro definition and use

N10 "POSITION_1" = "X200 Y200 Z300"    ;Macro definition

N20 "POSITION_2" = "X300 Y100 Z50"     ;Macro definition


N200"POSITION_1"    (Macro call, X200 Y200 Z300 is executed)


N500"POSITION_2"    (Macro call, X300 Y100 Z50 is executed)

Release Note


As of Build V2.11.2010.02 the command #INIT MACRO TAB replaces the command #INIT MAKRO TAB. For compatibility reasons, this command is still available but it recommended not to use it in new NC programs.

Syntax of Initiating the macro table:


This command clears all macros previously defined in the macro table. The macros pre-assigned by the channel parameters [1]-1 are retained.