Micromod Micro-DCI: 53MC5000 Multi-Loop Process Controller CUSTOMIZATION GUIDE User Manual
Page 20

2.4.5.2 Comparison Statements
Two typical data comparison statements are given below. In the 2nd statement, the logical results
of the two comparisons are then used for an “AND” ("&") operation according to conventional gate
logic, as shown in the Truth Table.
1) L04 = C02 C23 :
2) L05 = C07 C23 : C06 C23 H05 $
*
: &
where,
C07 C23 :
Expression A
C06 C23 H05 $
*
:
Expression B
Statement 1) is interpreted as follows:
If C02 is greater than or equal to C23 the statement is true; if not the statement is false. When the
compare operator is executed , either a logic level “1" bit (true) or a logic level ”0" bit (false) will be
replaced in the stack; leaving level 2 clear. The end of statement operator will then set logical L04
to that logic level resulting from the data comparison.
Statement 2) will be executed as follows;—reference Figure 3B.
“C07”
1) Places the value of C07 in the stack memory (level 1).
“C23”
2) Places the value of C23 in the stack (level 1), pushing
C07 down to (level 2).
“:”
3) Removes the top two values on the stack and compares
them. If C07 is greater than or equal to C23 the expression
is true; if not the statement is false. A true statement will
transform to a logical “1” and a false statement will transform
to a logical “0”. The resulting logical is returned to the stack
memory (level 1) and is called “bit A”; the logical result of
Expression A. Stack memory (level 2) is now clear.
“C06”
4) Places C06 in the stack memory, pushing bit A down to
(level 2).
“C23”
5) Places C23 in the stack memory, pushing C06 to
(level 2) and bit A to (level 3).
“H05”
6) Places H05 on the stack memory (level 1), pushing C23
to (level 2), C06 to (level 3) and bit A to (level 4).
“$”
7) Removes the top value from the stack, transforms the
8-digit data to 4-digit data, and then places the latter value
back in stack memory (level 1).
“*”
8) Removes and multiplies the top 2 values from the stack and
places the resulting data value back in (level 1).
MODULAR CONTROLLER CUSTOMIZATION GUIDE
2-13