Modifying the motor module - overview

Specifying conditions with the Expression Assistant

The motor should shut off if any of the following three conditions occurs:

Now we need a way to specify these requirements. The condition blocks serve this purpose. Each condition will have associated with it an expression that identifies the condition precisely in mathematical or logical terms. Expressions are made up of operands, operators, functions, constants, and keywords.

Two guidelines for writing an expression for a condition are:

The DeltaV system provides an Expression Assistant to help you define expressions. After you enter an expression, the Expression Assistant checks the syntax, indicates any problems, and identifies any unresolved parameters. You can access the Expression Assistant using either the Object menu or the right-click context menu for Action, Calculation/Logic, and Condition function blocks.

The Expression Assistant inserts the characters shown in the following table when constructing expressions. If you type the expressions without using the Expression Assistant, you need to use these characters in the same way.

Characters

Use

Example

/

Precedes a reference to an internal parameter (one within the current module). Use the Insert Internal Parameter button to browse for these parameters.

^/

Precedes a reference to an internal parameter up one block level. Use the Insert Internal Parameter button to browse for these parameters.

//

Precedes a reference to an external parameter (one within another module). Use the Insert External Parameter button to browse for these parameters.

'//XV-101/DC1/PV_D.CV'

# #

In Batch processing, used to enclose an alias.

:

Used to separate a named set from the named set value.

'vlvnc-sp:OPEN'

:=

Used to assign values. Step actions use this operator. The value of the right operand is assigned to the left operand.

'SP':='SFCCTRL:IDLE'

=

Used to compare values. Similar operators include >, <, >=, <=,!= (not equal to), <> (not equal to). Transitions use these operators.

'SP'='SFCCTRL:START'

+

Used to add numeric values or to concatenate strings.

' '

Single quotes are used to enclose parameters.

" "

Double quotes are used to enclose strings.

;

Used to continue action statements on subsequent lines of the Expression Assistant.