SIS function blocks > SIS Math Blocks > Logic Solver Calculation function block > Expressions in DeltaV SIS Software

Variables in Logic Solver Expressions

You can simplify complex calculations by using variables to temporarily store values. All variables are floating point numbers. The value of the variable is retained from one scan to the next. The initial (first scan) value of a variable is zero. The scope/visibility of variables is limited to the Logic Solver Calc/Logic block in which they exist.

Declaring Variables

You must declare variables used in the Logic Solver, because the Option Explicit statement is implied. Option Explicit turns on checking to ensure that a variable has been created in a VAR...END_VAR statement before it is used in an expression. Variable names must start with a letter or underscore. Variable names can contain only letters (A-Z, a-z), numbers (0-9), and underscores ( _ ) and are case insensitive.

Note

Some keywords are reserved for DeltaV expressions and cannot be uses as local variable names.

Variable Declaration:

Option Explicit; (* optional *)
VAR
[identifers]
END_VAR;

The VAR...END_VAR statement syntax has these parts:

Part

Description

Identifiers

Required. One or more names of temporary variable separated by semi-colons.