R.3.31
Date Code 20111215 Reference Manual SEL-421 Relay
SELOGIC Control Equation Programming
SELOGIC Control Equation Operators
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 specified result location is not replaced. The SEL-421 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 3.14 contains examples of arithmetic operations in use.
EXAMPLE 3.14 Using Arithmetic Operations
The free-form math SEL
OGIC 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
multiplication operation.
# Use of multiplication to select numerical values based on active settings
group
# Use 7 if protection settings group 1 active
# Use 5 if protection settings group 2 active
AMV005 := 7 * SG1 + 5 * SG2
The lines below demonstrate math calculation error detection.
# The line below results in a math error if AMV029 becomes 0
AMV006 := 732 / AMV029
In the second line, if AMV029 is 6 on the first pass through the
automation programming, the relay stores the result 122 in AMV006.
If on the next pass AMV029 is 0, the MATHERR bit asserts and the
value in AMV006 does not update.
SQRT
Use the SQRT operation to calculate the square root of the argument. Use
parentheses to delimit the argument of a SQRT operation. A negative
argument for the SQRT operation results in a math error and assertion of the
corresponding math error bit described in Arithmetic on page R.3.30.
Example 3.15 shows examples of the SQRT operator in use.
EXAMPLE 3.15 Using the SQRT Operator
The free-form math SEL
OGIC control equations below show examples
of SQRT operator usage.
# SQRT examples
AMV001 := SQRT (AMV005) # Single argument version of SQRT
AMV002 := SQRT (AMV005 + AMV034) # Calculates the square root of the
sum
AMV003 := SQRT (AMV007) # Produces a math error if AMV007 is negative