Nesting macros

The use of macros in combination with NC code on the right-hand side of the assignment (nesting) is permitted. The maximum nesting depth can be configured as required [6]-6.40. Nesting is shown by a '\' character that precedes the delimiting quotation marks. A macro always represents complete expressions of an NC block (NC command, arithmetic expression, term). This makes it impossible that a macro only represents the address letter of an NC command without the related arithmetic expression. This connection will be discussed in the next chapters.

"<MACRO_NAME>" = "<NC_CODE> \"<MACRO_NAME_i>\" <NC_CODE>"

Notice

A macro may not include the nested macro name of itself. Only nesting of other macro names is permitted.

Programming example

N10 "POS_1" = "X500 Y200" (Macro definition)
N20 "MOVE1" = "G01 \"POS1\" F1000 (Macro definition with nesting)
N30 "MOVE1" (Macro call
M30