Skip to main content
Skip table of contents

0x2C04 - Macro commands

Index

Sub Index

Name

Data Type

Acc.

Pdo Map.

NVM

Value range

Default value

0x2C04

0x01

Macro call

INT32

WO

No

No

INT32

-

0x2C04

0x02

Return from macro call

INT32

WO

No

No

INT32

-

0x2C04

0x03

Macro jump

INT32

WO

No

No

INT32

-

0x2C04

0x04

Reset macro

INT32

WO

No

No

INT32

-

0x2C04

0x05

Jump absolute

INT32

WO

No

No

INT32

-

0x2C04

0x06

Jump relative

INT32

WO

No

No

INT32

-

0x2C040x07Macro call InterruptINT32WONoNoINT32-
0x2C040x08Unpush macroINT32WONoNoINT32-

This object provides access to a set of command that provide execution and jumps between different macros.

SubIndex description:

  • 0x01 (Macro call): This command allows a previously defined macro specified by the parameter to be called like a subroutine. When this command is used, the current macro being executed and the value of the Accumulator are pushed into the macro stack and the execution of new macro begins. If macro has not been defined, then an error will be reported. After execution of the defined macro, command execution will continue immediately after the Macro Call command. The Macro Call command can be used any place in a macro.

    Macro calls via the Macro Call command or the interrupt system, may be nested up to 21 calls deep.

  • 0x02 (Return from a macro call): When executed, this command will cause immediate return to the calling macro (assuming there was one). All macros should finish with this command to avoid unexpected results. The parameter is not used by the command but is necessary to maintain the same structure of other commands.
  • 0x03 (Macro jump): This command may be used to "Jump" to another macro. Once the emcl begins executing the new macro, it has no record of how it got there. This means that any commands that appear after the Macro Jump command will not be executed. If there is no macro defined by the number specified in the parameter, an error will be reported. Once the end of the macro is encountered, macro execution stops. It is also acceptable for a macro to jump to itself
  • 0x04 (Reset macro): This command is used to delete one macro. The macro specified by the argument will be deleted and the memory it uses will be lost. A Reset Macro command should be used before entering or downloading a new set of macro commands.

    A reset macro command must be followed by a 500 msec delay before the next command can be sent to the controller.

  • 0x05 (Jump absolute): This command causes execution of a macro to jump to the absolute command specified by the parameter. Commands are numbered sequentially starting from 0. If parameter is specified whereas the command would attempt to jump past the end of the macro, then an error will be reported.
  • 0x06 (Jump relative): This command causes execution of a macro to jump to the relative command specified by the parameter. Commands are numbered sequentially starting from 0. If parameter is specified whereas the command would attempt to jump past the end of the macro, then an error will be reported.
  • 0x07 (Macro call interrupt): This command allows a previously defined macro specified by the parameter to be called from an external source (i.e. communication port) like a subroutine.

When executing macros using RS232 interface, this command must be used instead of a simple Macro call.

  • 0x08 (Unpush macro): This command resets completely the actual macro call and return stack. It could be used to abort a return from a macro interrupt function. The parameter is not used.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.