App-6 IM 04L20A01-01E
Appendix 2 Meaning and Syntax of Equations
This section describes the meaning of the computation equation and how to write them.
Rules for Writing an Equation (Common Items)
Follow the rules below in writing the computing equations.
• Use up to 40 characters to write equations.
• The precedence of computing terms can be specified using parentheses.
• Specify the channels in the equation using channel numbers. (Example: Channel 1 is
“01” or “1”)
• You can use “01” or “1,” for example, to specify one-digit numbers for channels,
constants, communication input data, and conditions of the remote control terminals in
equations.
Example: 01, 1, K01, K1, C01, C1, D01, D1
• The data value for the channel used in the equation, and for all channels greater in
number than that channel, are substituted with data from the previous scan.
• Do not use more than 16 stacks (channel, K01 to K30, C01 to C12, D01 to D08) in
one equation. Otherwise, a computation error may occur.
Example: The number of stacks in the equation 01+K01
(03+04 K02) is five.
Order of Precedence of the Operators
The order of precedence of the operators in the equation is as follows. The operators
are placed in order from the highest precedence.
Type Operator
(higher precedence)
Functions ABS( ), SQR( ), LOG( ), EXP( ), TLOG.MAX( ),
TLOG.MIN(), TLOG.P-P( ), TLOG.SUM( ), TLOG.AVE( )
Power
Logical negation NOT
Multiplication and division , /
Addition and subtraction +, –
Greater than/less than .GT., .LT., .GE., .LE.
Equal/not equal .EQ., .NE.
Logical AND AND
Logical OR, exclusive OR OR, XOR
(lower precedence)