GSE 60 SERIES Technical Reference Manual page 405

Programmable process controllers
Table of Contents

Advertisement

Example:
Repeating An Interruptible Macro
Command After Interrupt
If a macro is interrupted during an entry such as
i
the %G command, the entry will be lost. This
? ? If the macro debug table is
macro routine will repeat the target entry routine
accessed without entering the
if it was aborted due to a macro interrupt.
setup access code, it will not be
==================================
possible to print the table.
=
MACRO #1 – ENTER TARGET
If the macro debug table is
tag #1
1%T
accessed using the limited access
get operator entry
EnterTargt%G
code and limited access is
enabled at P50000, then it will not
if macro interrupted...
%/
be possible to view or print the
jump to tag#1
1%J
table.
end if
%E
save entry
=80.1P%o
An internal flag is set if any of the interruptible macro commands in are
interrupted. This flag can be tested with the %/ If Macro Interrupted
command. This allows you to determine if a macro command was not
executed when the interrupted macro continues and repeat the command
if required (see example – Repeating an Interruptible Macro Command
After Interrupt).
*NOTE: The %b - Pause and perform Sample Routine - and the %, -
Pause until No-Motion - should not be used with an interrupt macro.
Keep in mind that any of the commands listed above will reset the Interrupt
Flag for the If Interrupted Command. This is part of it's normal function.
Therefore, if any of the above commands are used in the interrupting
macro, the Interrupted Flag would be reset and the original macro would
be unable to discern that an interrupt had occurred.
Since an Interrupt Macro can be invoked at any point within a current
Macro, it is possible to have data in the Entry Buffer at the time of the
interrupt. For this reason it is advisable to use the %[ - Save Entry - at the
beginning of the Interrupt Macro and the %] - Retrieve Entry - at the end of
the Interrupt Macro. This would restore the data to the Entry Buffer. Any
data previously saved with %[ is lost.
If it is not desirable to return to the Interrupted Macro, then that Macro can
be deleted from the stack by using the n%B command. A new variation of
the Break Macro Command - $%B has been added. This command will
delete all Macros from the current stack except the currently running
Macro.
An Interrupt Macro must be invoked via Setpoint Control or Input
Interpreter. Front Panel Keys or Serial Commands to invoke a Macro do
not actually put a Macro on the Macro Stack and thus cannot cause an
interrupt to occur.
M
D
ACRO
EBUG
The macro debug is a comprehensive diagnostic tool that allows you to
track macro execution. The debug uses a portion of RAM permanently
allocated to record each macro command executed. The debug buffer is a
circular buffer. When the buffer becomes full, new macro commands will
continue to be recorded while deleting the oldest records. The macro
debug is always enabled to record macro execution. Thus, it is possible to
review the most recent macro activity at any time. Printing the macro
debug provides additional information such as relative execution times,
macro stack activity, branching results and error conditions.
R
T
EVIEWING
HE
The macro debug table is located at P50001 of the setup mode. To
access the debug parameter from the weigh mode, key in
50001 [SELECT] 23640 [ID] [ENTER]
M
D
ACRO
EBUG
60 Series Technical Reference Manual
Macros 9-157
T
ABLE

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents