Macro Execution; Macro Stack - GSE 60 SERIES Technical Reference Manual

Programmable process controllers
Table of Contents

Advertisement

MACRO
INVOKED
STACK
MACRO#
200
199
198
á
á
4
3
102
2
101
1
6
EXECUTE
Figure: Macro Stack
M
E
ACRO
XECUTION
Macros instructions are executed sequentially within a macro, beginning
with the first instruction and continuing until it reaches a stopping point,
such as the end of the macro or a break command. Branching within a
macro or from one macro to another is made possible with the use of
Boolean logic commands, macro go-to or call commands and jump & tag
commands.
Only one macro can execute at a time. Requests to invoke additional
macros during the execution of another are pushed onto the macro stack
to be executed in turn. It is possible to interrupt a macro to immediately
execute another. It is also possible to abort or suspend macro execution
via the front panel keypad.
The speed at which macro commands are executed depends on:
Enabled Scales
Enabled Setpoints
Custom Transmits
Enabled Analog Outputs
A/D Interval
In general, the more non-macro functions the scale must perform, the less
often the processor can execute macro commands. For example, the
processor receives 60 A/D interrupts each second during which time it
must update all active weight parameters. Macro commands are executed
between these interrupts. If a second scale is added, approximately 60
more A/D interrupts occur each second. A continuous custom transmit will
require yet more processor resources. The time it takes to process these
additional functions results is less time to execute macro commands.
Even with numerous demands on the processor resources, macro
execution speed will be adequate for most applications. Execution speed
can be significantly increased by reducing the A/D interrupt interval (at the
expense of weight conversions) with the %r A/D Interval macro command.
M
S
ACRO
TACK
A macro will be executed immediately when invoked unless another macro
is in process. If so, the invoked macro will be pushed to the top of the
macro stack. Macros on the macro stack are executed in a first-in, first-out
basis.
The figure – Macro Stack illustrates the macro stack concept. Here there
are 2 macros on the macro stack, macros 101 and 102. These macros
were invoked, but cannot run because macro 6 is presently executing. If
another macro is invoked while macro 6 is still running, it will be pushed
rd
onto the 3
position of the macro stack. When macro 6 ends, macro 101
will execute and macro 102 will move down to the 1
Any other macros on the stack will also move down one position.
Up to 200 macros can be stacked in this manner. If the macro stack limit
is exceeded, a macro stack error results. The display will show

Macro Stack

and all macro execution stops. This situation can occur
st
position on the stack.
60 Series Technical Reference Manual
Macros 9-11
Code81

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents