beautypg.com

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

Page 14

background image

Operators + - * /

These operators may be used to effect addition,subtraction, multiplication
or division operations. The respective operator performs the indicated operation
on the top two operands on the stack and replaces them with the result.

^ Operator

The square root operator (^) is used to remove a C type data value from the stack,
to compute the square root and then to return the computed value to stack memory.
Other mathematical calculations may then be performed.

NOTE: If the data on the stack is an H type, it must be converted to a C

type before the square root operator is issued.

: Operator

Use of the compare operator (:) will cause the transformation of the B, C or H data types
to a logical L. The “:” operator is used to compare two data values or two expressions.
The result of the comparison will be a “bit” type data that is set to “1" if the first data
value is greater than or equal to the value of the second.
To permit direct comparison, the two data values must be the same type (i.e., two
C data values may be compared without data transformation — both are 4-digit values).
To compare a C (4-digit) to an H (8-digit) data value, the H data value must first be
contracted to a 4-digit value. This requires using a contract operator ($) to follow the H
data value. The $ operator will result in a data transform by the computer, but in this
case the process simply changes the structure of the data not its meaning.

Z Operator

The zero operator (Z) can be used to check the last B, C, or H value on the stack.
If the last value is exactly zero (00.00), the Z operator replaces the data value
with a logical 1, which is otherwise 0. This operator can not be used with logicals
(bit type data).

% and $ Operators

The expand (%) operator permits expanding 4-digit data values to 8-digit data,
or expanding byte type data (B) to 4-digit or 8-digit data values or logic type data (L)
to byte data.The contract operator ($) permits contracting 8-digit data values to 4-digit
or 3-digit (byte) data, or contracting a 4-digit value to a 3-digit byte.

Note: That 8-digit data values cannot be expanded and logic type data
cannot be contracted. The applicable operator symbol must be placed

immediately following the operand, or expression, that is to be

expanded or contracted.

MODULAR CONTROLLER CUSTOMIZATION GUIDE

2-7