Control Emulator Macros

Macros provide the developer with a means of customizing the control emulator, when the questions in QUEST fail to satisfy specific requirements. They also extend the range of CNC functionality recognized by Control Emulator. They are programmed in an easy-to-use APT-like language and input via the questionnaire using the macro editor.

  • The Macro Language” describes the macro language syntax.

  • Control Emulator Macro Commands” describes the syntax of various control emulator command (e.g., EXEC, LPRINT…), which are used in macros to control special features and functions of the control emulator.

  • String Formatting” describes the string formatting conventions used within macros and in control emulator commands with text string parameters.

Syntax Format Conventions

Syntax Format Conventions

The syntax for macro commands is listed using the following format conventions:

  • Square brackets \big[ \; \big] encase syntax that is optional. The 0:n symbol preceding the bracketed item, as in \icamrange{0.8}{0}\,\big[,a\,\big] indicates that the bracketed item a can be repeated zero or more times.

  • Parentheses \big( \; \big) encase syntax that lists a number of choices, one of which is required. The parentheses are omitted when the syntax is a simple choice among a number of keywords. The 1:n symbol preceding the parenthesized item, as in \icamrange{0.8}{1}\,\big(,a\,\big) indicates that the item a can be repeated one or more times.

  • Any value not contained in square brackets or parentheses must be programmed each time the macro command is used.

  • Formal keywords are shown in bold upper case, as in ON and WHILE.

  • Lower case words within angled brackets identify common syntax, as in <axis>. The syntax of axis is then defined separately. This makes complex syntax more readable.

  • Italicized lower case words identify variable parameters supplied in the syntax, such as offset or 'name'.