13.30
SEL-400 Series Relays Instruction Manual Date Code 20171006
SELOGIC Control Equation Programming
SEL
OGIC Control Equation Operators
Arithmetic
Use arithmetic operators to perform basic mathematical operations on numerical
values. Arguments of an arithmetic operation can be either Boolean or numerical
values. In a numerical operation, the relay converts logical 0 or logical 1 to the
numerical value of 0 or 1. For example, multiply numerical values by Boolean
values to perform a selection operation. Use parentheses to group terms in math
SEL
OGIC control equations and control the evaluation order and sequence of
arithmetic operations.
NOTE: IEEE 32-bit floating point
numbers have a precision of
approximately 7 significant digits. This
means that numbers bigger than
10,000,000 will lose precision in the
least significant digit. Do not
implement counters expecting them
to get bigger than 10,000,000. Do not
expect precise accuracy in analog
quantities when they get bigger than
10,000,000.
The relay uses IEEE 32-bit floating-point numbers to perform SELOGIC control
equation mathematical operations. If an operation results in a quantity that is not
a numerical value, the SEL
OGIC control equation status bit that signals a math
error, MATHERR, asserts. The value that the relay stored previously in the speci-
fied result location is not replaced. The relay clears the corresponding math error
bits if you change SEL
OGIC control equation settings (protection or automation),
or if you issue a STATUS SC command. Example 13.13 contains examples of
arithmetic operations in use.
Table 13.23 Math Error Examples
Example Value in PMV01 Type MATHERR
PMV01 := PMV02 / 0 0
a
a
Evaluation of expression results in an error and prevents storage of new result. In the example,
PMV01 remains 0. If the argument were a variable, PMV01 would contain the result of the last
evaluation when the argument is valid.
Divide by zero Yes
PMV01 := LN ( 0 ) 0
a
LN of 0 Yes
PMV01 := LN ( -1) 0
a
LN of negative number Yes
PMV01 := SQRT ( -1) 0
a
Square root of a negative number Yes
Example 13.13 Using Arithmetic Operations
The freeform math SELOGIC control equations below show examples of
arithmetic operator usage.
# Arithmetic examples
AMV001 := AMV005 + AMV034 # Calculate sum
AMV002 := AMV005 – AMV034 # Calculate difference
AMV003 := AMV005 * AMV034 # Calculate product
AMV004 := AMV005 / AMV034 # Calculate quotient
The lines below demonstrate the use of Boolean values with the multiplica-
tion operation.
# Use of multiplication to select numerical values based on active set-
tings group
# Use 7 if protection settings group 1 active
# Use 5 if protection settings group 2 active
AMV005 := 7 * SG1 + 5 * SG2