EMCL includes the capability of using certain commands to generate macro commands. Those macro commands, as the name implies, are predetermined sequences of actions that can be launched upon request. These macros are stored in NVM, and can be executed automatically upon power on. The following diagram shows the structure of the stand-alone functionality:
The 0x2C05 - Macro access register allows to write and read macro commands in the desired NVM positions. When the macros are finished. they can be executed in stand-alone mode through the Macro commands - 0x2C04 register. Other operations available in stand-alone mode are:
- Sequence commands - 0x2C02: Execution flow branch operations can be evaluated and executed through this register.
- Register commands - 0x2C01: Arithmethical, logical and other miscellaneous operations can be executed through this register. Those operations can be applied to both general purpose registers - 0x2C00 and CANopen objects.
Macros are programmed in a similar fashion than assembly language routines, and they are executed sequentially. Whenever a response to a specific external event is needed, an interrupt module is available. This module can trigger a macro execution after a GPI or another mappable event has been detected. Finally, a timer module is available, to provide the system with a time base when working in stand-alone mode.