5 writing f-tran statements – Micromod Micro-DCI: 53MC5000 Multi-Loop Process Controller CUSTOMIZATION GUIDE User Manual
Page 19

“+”
5) Remove and add the top two values in the stack and
place resulting sum back in the stack (level 1), leaving
(level 2) clear.
6) End of statement, therefore remove the computed value
from the stack and make that data be the value assigned
to C33.
The operators (
*
and +) used in the above example, removed the top two values from the stack
and, after performing the applicable mathematical operation, replaced the answer on the top of the
stack. The procedure is similar for subtraction (-) and division (/).
2.4.5 Writing F-TRAN Statements
2.4.5.1 Assignment Statements
Assignment statements provide a method of setting any accessible operand to a value determined
by an arithmetic expression.
Operand = Expression
Observe, however, that when the expression on the right hand side evaluates to a different data
type than the left hand side, the instrument automatically expands or contracts the value to make it
compatible with the operand type. An example of some valid statements would be:
1) C40 = C41
Compatible values.
2) C03 = H03
In this case the H type value is automatically
contracted to a C type.
3) H17 = C17
In this case the C type value is automatically
expanded to an H type.
4) C05 = L28
In this case the L type value is automatically
expanded to an C type.
Some invalid statements would be:
1) B33 = A00
(byte numeric data) = alphanumeric string
2) C33 = C01
*
C13 + C12
not in RPN
3) L20 = L21 L22 : ;
not valid “L” operator
If the above statements were used, the compiler would report them as errors.
NOTE
Logical or numeric data can not be transposed to string data across the
equal sign; and vise versa.
MODULAR CONTROLLER CUSTOMIZATION GUIDE
2-12