PSI BOX PLUS+ Reference
Control Functions
MACRO.
Defines Or Lists Macro.
_________
_____________________
Purpose.
Allows the user to define a new macro or list the
__________
current macro.
A MACRO is a series of PSI BOX commands grouped
together, that are executed by issuing the X keyword. Whenever
the X command is found the whole series of commands defined
in the macro is executed. Thus the macro facility allows the user
to define his own pseudo commands, that can be simply
executed.
This is a powerful feature, especially when used with the
repeating form of X and when a WAIT command has been
given in the macro. This allows multiple, timed, bus sequences
to be performed by simply issuing one character. The overhead
on the RS232 line is cut dramatically and the PSI BOX can be
used in an automated fashion whilst the controlling terminal is
busy performing other jobs.
The MACRO command followed by only spaces and a
carriage return will cause the PSI BOX to send the current
macro definition back to the user. IE it lists the macro.
The MACRO command followed by any parameters and
data will cause that sequence to be stored as the new current
macro overwriting and discarding any previous macro.
ON power up the macro is set to perform a BUS STATUS
command.
ON RESET, using the PSI BOX reset character any stored
macro is kept intact. Ensure that it has not been corrupted by
listing it.
If the X command is placed within a macro, it and its
parameter, are skipped over when the macro executes.
If the MACRO command contains the MACRO keyword
and a new macro definition then an ERROR is flagged when the
macro is executed. A MACRO command may end with the
MACRO keyword. This causes the MACRO to list itself
whenever it executes.
Page 112
Chapter 8