
The Function Block MACROS_NUM defines multiple macros on the visualization.
The macros differ from scenes, as each command is executed asynchronously per PLC cycle. In addition, the function block also allows the superordinate control of scenes.
The database DB specifies the memory location of the macros. Thus, an element can have multiple macro function blocks. The database is stored behind the visualization variable and cannot be accessed as with a normal database.
When the value at the input changes, the corresponding macro is executed immediately. After execution, the output Q is set to the value of the called macro. If the macro does not exist, the value is still set.
The input deactivates the execution of a macro with the input NUM.
On a positive edge, the macro with the number at the input NUM is executed immediately.
Tip: Connect this input to a trigger of the interface to call the macro with the same number again.
The output returns the number of the last executed macro.
The control of the macros is done via the elements Macros and Macro Configuration. Under Interface, the value can be connected with the used function blocks.
The control via the visualization has priority over the corresponding input.
The configuration of a macro is explained in the help section under Visualization.