beautypg.com

Pm designer operation manual – B&B Electronics WOP-2121V-N4AE - Manual User Manual

Page 411

background image

14

PM Designer Operation Manual

14-2

CHAPTER 14 USING MACROS

Run the Macro:

Use:

When a specific trigger bit
changes from 0 to 1

Event Macro
An Event Macro is run whenever the associated trigger bit changes from 0 (off) to 1
(on). An application can have up to four Event Macros which are numbered from 1 to
4. Specify Event Macros in Panel General Setup dialog box.

Periodically with a preset time
interval

Time Macro
A Time Macro is run periodically with a preset time interval. An application can have
up to four Time Macros which are numbered from 1 to 4. Each Time Macro has a
different set of time interval options you can choose to specify how often you want it
to be run. Specify Time Macros in Panel General Setup dialog box.

When a specific screen is
being opened

Open Macro
An Open Macro is run once when the associated screen is being opened. The PM
will not display the screen until the Open Macro terminates. Specify the Open Macro
of a screen in Screen Properties dialog box.

While a specific screen is
open

Cycle Macro
A Cycle Macro is run all the time while the associated screen is open. The PM runs
Cycle Macros cyclically, i.e. it will run a Cycle Macro starting from the first command
again each time after it completes the processing of the last command of the macro
or when it encounters an END command in the middle of the macro. And the cycle
macro terminates immediately if the screen is closed.

Specify the Cycle Macro of a

screen in Screen Properties dialog box.

When a specific screen is
being closed

Close Macro
A Close Macro is run once when the associated screen is being closed. The PM will
not erase the screen until the Close Macro terminates. Specify the Close Macro of a
screen in Screen Properties dialog box.

When a specific button is
pressed or released to set a
bit to on

On Macro
An On Macro is run once when the associated button is pressed or released to set a
bit to 1 (on). The setting of the bit will not be performed until the On Macro
terminates. So it is important to keep the On Macro as short as possible in order not
to delay the setting of the bit. Both the Bit Buttons and the Toggle Switches can have
an On Macro. Specify the On Macro of a button in that button’s configuration dialog
box.

When a specific button is
pressed or released to set a
bit to off

Off Macro
An Off Macro is run once when the associated button is pressed or released to set a
bit to 0 (off). The setting of the bit will not be performed until the Off Macro
terminates. So it is important to keep the Off Macro as short as possible in order not
to delay the setting of the bit. Both the Bit Buttons and the Toggle Switches can have
an Off Macro. Specify the Off Macro of a button in that button’s configuration dialog
box.

When a specific object is
activated to perform a specific
operation

Object Macro
An Object Macro is run once when the associated object is activated to perform a
specific operation. Whether the macro is run before or after the operation is
performed depends on the type of that operation. The objects that can have an
Object Macro include Screen Buttons, Function Buttons, and Keypad Buttons.
Specify the Object Macro of an object in that object’s configuration dialog box.