GSE Scale Systems - 161
Chapter 16 Macro Programming Operations Technical Reference Manual
4%Q Send 4th custom transmit.
n%r Assert and De-assert Handshake
The following commands allow for the RTS to be used
as a tri-state control for the RS-422/485 transceiver chip.
%r IF RTS asserted
0%r De-asserts Handshake
1%r Asserts Handshake
These commands are only functional if h/w handshake is
disabled. Also do not use if network is enabled at
parameter P250.
n%R Test if register n is not = 0, where n = 1 - 4
This IF command allows macro execution to vary
depending on whether one of the four register's value is
currently zero. One common use for this is for testing
the value of a loop counter for operations which must
repeat a certain number of times. Refer to the in-depth
explanation of the IF statement operations.
Example:
91%s Select REG #1 viewing mode.
10%e Initialize to process 10 boxes.
%T Tag position for branch back to here
later on.
WeighBox%W Prompt operator and WAIT for any
key.
4%s Select Gross Total + Current mode.
.%I Perform accumulate.
1%Q Send 1st custom transmit.
91%s Select Reg #1 viewing mode.
%i Decrement REG #1.
1%R IF REG #1 is not equal to 0 then
execute next commands. Otherwise
skip the next commands and proceed
to an ELSE or END IF.
AGAIN%P Prompt operator for one second.
%J JUMP to TAG.
%E ENDIF: continue with next command
if reg 1 = 0.
%S SOUND beeper for 1/2 second.
DONE!%P Prompt operator for one second.
%S SOUND beeper for 1/2 second.
2%Q PRINT 2nd custom transmit data (for
totals).
%S SOUND beeper for .5 sec
This simply turns on the beeper for one half second. If a
longer beep is required, this command may be used
multiple times in succession if a delay is implemented
between the %S commands. The delay could be either
the %P or multiple %I commands depending on the
effect desired. Note however that this command does not
delay the execution of the next command in the macro at
all. Refer to the example above for an implementation of
the %S command
%T TAG current position for later jump (see also
%J)
This command marks or TAGS a location in the macro
so that a branch may come back to this point from further
on within the same macro. This is used in conjunction
with the "%J" command to JUMP back to the tagged
location.
Whenever a "%T" is encountered during macro
execution its location within the macro is noted. Then
when a "%J" command is encountered, the macro checks
if a "%T" command has been encountered in the current
macro. If so macro execution proceeds to the location
where the most recent "%T" was found. If a "%T" has
not occurred, the "%J" has no effect on macro execution.
TAGS occurring in other macros have no effect on
JUMPS within a given macro. In other words, a JUMP
will not occur from one macro to another macro. Also,
macro execution will not JUMP to a TAG which is not
executed due to its location within a macro's IF or ELSE
statements.
Refer to the previous example for an example of a TAG
and JUMP.
The Tag (%T) and Jump (%J) commands allow multiple
tagged locations to be used. This allows the looping
within a loop during a macro. Up to ten tagged locations
may be used. Previously, any entry preceding a Tag or
Jump command was ingnored and the entry would
remain in the 574's entry buffer. That is still the case
unless the entry preceding the Tag or Jump is a single
numeric character. For instance, if a location in a macro
is Tagged with a 1%T then to Jump back to that location
would require a 1%J. A zero preceding the Tag or Jump
is the same as the Tag or Jump without any entry.
Once a certain tag number is used in a macro, it should
not be used again in that macro or in any macro that is
called by first macro unless that tag will no longer need
to be jumped referenced. For example:
SECTION - 16.8