4 writing f-tran expressions – Micromod Micro-DCI: 53MC5000 Multi-Loop Process Controller CUSTOMIZATION GUIDE User Manual
Page 17

logical "1" = skip "n" lines
logical "0" = no skip
| Operator
The absolute value operator will replace the top value on the stack ("C" or "H" type
only) with its absolute value. If the value is positive no change will be made. If the
value is negative, it will be made positive.
@ Indirect address symbol
The indirect address symbol is not a true operator. This symbol is used to designate
a "B" data point as an indirect address pointer. The value of the data point is the
actual address. This capability is particularly useful when the address can vary;
being determined, computed, or modified at F-TRAN execution time.
Any B data point may operate as an indirect address pointer. The number that follows the
indirect address symbol, @, is the data number of the data point. The value of this point
should be used as the data number of the operand. As an example, L@73 where the value
of B73 is 17 would be interpreted as L17. A further example of indirect addressing as used
in an F-TRAN program is shown in Figure 2. This short program demonstrates a method of
zeroing out many data point locations while conserving program space.
F* Pointer addressing
Pointer addressing is similar to indirect addressing in that the value desired is from a
source referenced by the contents of the indicated datapoint. Pointer address can only be
used with F datapoints as the source specifier. The F datapoint containing the source of
the desired data is indicated by the number following the *. The contents of this F datapoint
must be a string representing a legal datapoint. An example of pointer usage
C100 = F*28 where F28 contains the character string H52,
and datapoint H52 contains the numeric value 27.75
after execution C100 would contain the numeric value 27.75.
2.4.4 Writing F-TRAN Expressions
2.4.4.1 Reverse Polish Notation
The F-TRAN program is written as a sequence of statements consisting mainly of expressions for
various arithmetic data assignments, calculations, or logic decisions. These expressions are com-
posed of a valid combination of operands and operators as selected from the F-TRAN Instruction
Set. Table 1 shows the operators available and what data types they use. The sequence in which
the Modular Controller performs the particular calculation is dictated by the operation of the oper-
and stack memory (part of the central processing unit of the computer). This operand stack (also re-
ferred to as a push-down stack) is a First In-Last Out type memory limited to a maximum of 12
positions. Stack positions required are dependent on data type as defined below. The number of
positions retained in stack memory will change when a statement operator results in a computation
or logical evaluation.
MODULAR CONTROLLER CUSTOMIZATION GUIDE
2-10