Table 4-2. expression block data types, Status calculation rules, Syntax rules – National Instruments FP-3000 User Manual

Page 58: Status calculation rules -6 syntax rules -6

Advertising
background image

Chapter 4

Block Reference

FieldPoint FP-3000 User Manual

4-6

www.ni.com

Status Calculation Rules

To simplify status calculation for simple cases, the Expression block
performs all arithmetic operations on value/status pairings and manipulates
statuses according to the following rules:

Constant values and intrinsic variables have no status.

If two statuses are being composed, all substatus values are discarded
and the results have a NonSpecific Substatus.

For two operand operators, the results have quality equivalent to the
lowest quality operand (i.e., the worst status propagates to the output).
The order of quality is as follows: Good, Good_NonCascade,
Uncertain, and Bad.

The limit bits reflect the effect of the operator on the limit bits of the
operand(s). For example, a high-limited value that is negated would
become low-limited. The result of adding two high-limited values
would still be high-limited.

Assignment operators and variable bindings leave the status entirely
unchanged.

Conditional statements ignore the statuses and only use the values.

Syntax Rules

Each expression may only consist of the following types of lines:

Comments—Fragments of text in the expression that are not used to
generate any code. These are delimited with matching

/*

and

*/

, or by

//

and

\n

(newline character).

Symbols—Strings of alphanumeric characters beginning with a letter
or underscore.

Table 4-2. Expression Block Data Types

Type Name

Description

vs_float

A F

O U N D A TIO N

Fieldbus Value/Status record for floating point values.

vs_discrete

A F

O U N D A TIO N

Fieldbus Value/Status record for discrete values. This

discrete will be considered to be a 32-bit integer. The least significant four
bits of the 32-bit integer map to the 16 Fieldbus discrete states. (As such, the
discrete values may be used for computational purposes for numbers greater
than 16. For the purposes of publishing on the bus, these will still be the
standard one byte F

O U N D A TIO N

Fieldbus discrete values.)

Advertising