Chapter 3 Creating and Editing Screens
Table 3-14-1 Macro Command Table
Macro Name Descriptions
On Macro
The user can use the On Macro for each specific button element (Bit).
It is called the On Macro because the Macro is executed once upon
the button element (Bit) changing from OFF to ON.
Off Macro
The user can use the Off Macro for each specific button element
(Bit). It is called the Off Macro because the Macro is executed once
upon the button element (Bit) changing from ON to OFF.
Before Execute
Macro
The user can use the Before Execute Macro for all button elements
and numeric / character entry element. One element has one Before
Execute Macro.
After Execute Macro
The user can use the After Execute Macro for all button elements
and numeric / character entry element. One element has one After
Execute Macro.
Screen Open Macro
The Screen Open Macro will be executed only ONCE when the user
open a screen (or switch to a new screen) and the screen elements
will not be displayed until after the Screen Open Macro has
completed execution. Therefore, it is important that the user pay
close attention when designing the Screen Open Macro to avoid
infinite loops (programs that cannot be ended) as it may cause a
system delay or even prevent executing the screen’s elements
permanently. Writing long macros is not recommended and should
be avoided if at all possible. Pay close attention on using loops and
make sure to test the Macro with on-line/off-line simulation before
downloading to HMI to ensure expected performance and operation.
Screen Close Macro
The Screen Close Macro will be executed only ONCE when the user
close the screen and no other macros will be executed until the
Screen Close Macro is completed. Therefore, it is important that the
user pay close attention when designing the Screen Close Macro to
avoid infinite loops (programs that cannot be ended) as it may cause
a system delay.
Screen Cycle Macro
The macro will be executed continuously when the screen is open.
Therefore, writing long macros is not recommended and should be
avoided for this type of macro.
Initial Macro
There is only one Initial Macro in a program and it is executed just
prior to the startup screen being displayed. This macro is very useful
when setting initial values in the HMi or in a PLC.
3-276 Revision May, 2010