EasyManua.ls Logo

GSE 672 - Macro Stack

Default Icon
430 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Macros
9-10 Chapter 9
• 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
ACRO
S
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 onto the 3rd position of the macro
stack. When macro 6 ends, macro 101 will execute and macro 102 will move down to the 1st position on
the stack. 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 Code81 Macro Stack and all macro execution stops. This situation can occur
if macros are continually invoked faster than they can execute. Avoid using program loops or long entry
sequences when other macros are being invoked. If this is not practical, consider using interrupt macros
(see the Interrupt Macros section beginning on page 9-143) to help prioritize macro execution. Other macro
tools such as the %B Break Macro command can also help manage the macro stack. You can analyze
macro stack activity by performing a macro debug download (see the Macro Debug section beginning on
page 9-144).
Use the macro debug download to analyze macro stack activity
MACRO
STACK
INVOKED
MACRO#
200
199
198
4
3
2
102
1
101
EXECUTE
6
Figure: Macro Stack

Table of Contents

Other manuals for GSE 672

Related product manuals