Model 574 Programmable Counting System (PCS)
168 - GSE Scale Systems
WrongCode!%P Warn operator for one
second.
%J Jump to tag for re-entry of
code.
%E End IF
n,m%+ The ADD macro command
This command is used to perform the addition of two
numeric values. Specifically, the value of the first
parameter (whose parameter ID = "n") is added to the
value of the second parameter (whose ID is "m") and the
result in stored in parameter "m". IE "n" + "m" -> m.
Example:
80,81%+ Add value of parameter 80
(Var #0) to value of
parameter 81 (Var #1) and
store result in Var #1. <80>
+ <81> result stored in
<81>
Note: In the math examples, the use of the <> around a
parameter ID is intended to represent the value of the
parameter as opposed to the parameter ID itself. Also the
"=>" indicates "is stored into". This is used instead of
the equals sign to reduce confusion.
n,m%- The SUBTRACT macro command
This command is used to perform the subtraction of two
numeric values. Specifically, the value of the second
parameter (whose parameter ID = "m") is subtracted
from the value of the first parameter (whose ID is "n")
and result in stored in parameter "m". (i.e. < n > - <
m > difference stored in < m >).
Example:
80,81%- Subtract value of parameter 81 (Var
#1) from value of parameter 80 (Var
#0) and store result in Var #1. <80> -
<81> difference stored in <81>
n,m%* The MULTIPLY macro command
This command is used to perform the multiplication of
two numeric values. Specifically, the value of the first
parameter (whose parameter ID = "n") is multiplied by
the value of the second parameter (whose ID is "m") and
the result is stored in parameter "m". IE "n" x "m" => m.
example:
80,81%* Multiply the value of
parameter 80 (Var #0) to the
value of parameter 81 (Var
#1) and store result in Var #1.
<80> x <81> the product
stored in <81>
n,m%/ The DIVIDE macro command
This command is used to perform the division of two
numeric values. Specifically, the value of the first
parameter (whose parameter ID = "n") is divided by the
value of the second parameter (whose ID is "m") and
result in stored in parameter "m" ("n" ÷ "m" the quotient
stored in "m")
Example:
80,81%/ Divide the value of parameter 80 (Var
#0) by the value of parameter 81 (Var
#1) and store the result in Var #1.
<80> ÷ <81> the quotient stored
in <81>.
Often times both of the values to be used in a calculation
must be retained. Since the second parameter specified
in the command is also used to store the result, a COPY
may be performed of the second parameter before the
math operation is done.
In the following example Reg #1 is used as a counter to
keep track of the number of boxes weighed on the scale
each day. The Gross Total parameter holds the total
weight of boxes processed that day.
Example:
91,80%C COPY box counter (REG #1) to Var
#0.
3,80%/ Divide the total weight (Parameter 3)
by the # of boxes.
Var #0 now holds the average weight.
%\ IF NO ENTRY...
This command test the "entry buffer" to check if in fact
an entry was actually made. It is most often used after an
operator has been prompted to make an entry with the %
G command. In some applications, it may be desirable to