R.3.5
Date Code 20111215 Reference Manual SEL-421 Relay
SELOGIC Control Equation Programming
SELOGIC Control Equation Programming
EXAMPLE 3.2 Free-Form SELOGIC Control Equations
The following equations are examples of free-form SEL
OGIC control
equations. The text after the # character is a comment included in
the equation and stored in the relay for future reference and
documentation.
# Free-form equation example programming
#
# Is 80% of A-phase fundamental voltage greater than 12kV
PMV01 := VAFM * 0.8 # 80% of A-phase fundamental voltage
PSV04 := PMV01 >= 12000 # True if A-phase fundamental voltage is greater
than or equal to 12000
Use comments to group settings in the free-form SELOGIC control
equations by task and to document individual equations. In this
example, an intermediate calculation generates the value we want to
test to determine if PSV04 will be turned on.
Assignment
Statements
Both fixed and free-form SELOGIC control equations are a basic type of
computer programming statement called an assignment statement.
Assignment statements have a basic structure similar to that shown below:
LVALUE := Expression
Starting at the left, the LVALUE is the location where the result of an
evaluation of the expression on the right will be stored. The := symbol marks
the statement as an assignment statement and provides a delimiter or separator
between the LVALUE and the expression. Type the := symbol as a colon and
equal sign. The assignment symbol is different than a single equal sign (=) to
avoid confusion with a logical comparison between two values. The type of
LVALUE must match the result of evaluating the expression on the right.
There are two basic types of assignment statements that form SEL
OGIC
control equations. In the first type, Boolean SEL
OGIC control equations, the
SEL-421 evaluates the expression on the right to a result that is a logical 1 or a
logical 0. The LVALUE must be some type of Boolean storage location or
setting that requires a Boolean value. For example, the setting for the
Protection Conditioning Timer 7 Input, PCT07IN, requires a value of 0 or 1,
which you set with a Boolean SEL
OGIC control equation.
The second type is a math SEL
OGIC control equation. Use the math SELOGIC
control equation to perform numerical calculations on data in the relay. For
example, in protection free-form programming, enter AMV034 := 5 *
BK1IAFM to store the product of 5 and the Circuit Breaker 1 A-phase current
in automation math variable 34. Example 3.3 lists several examples of
Boolean and math SEL
OGIC control equations.