Table 4-4. flow control and group constructs, Flow control, Delimiters – National Instruments FP-3000 User Manual

Page 62: Functions

Advertising
background image

Chapter 4

Block Reference

FieldPoint FP-3000 User Manual

4-10

www.ni.com

Flow Control

Flow control and grouping constructs supported by the expression
language will be a variant of the C language designed to eliminate the
possibility for endless loops and other pathological cases. This variant
includes standard if...then...else statements and compositions.

Example:

//Conditional statement with an if...then clause

if (a_state_0 > 5) { //begin a composition

A_state_0 = 0;

A_state_1 = 5;

} //end

composition

else //The else clause is optional and not required

a_state_0 = a_state_0 + 1; //else clause is not

required to be a composition.

Delimiters

Every valid program statement must be terminated using the C-language
style delimiter ‘;’.

For example,

a_in_0 = 0.0;

a_in_1 = 0.0;

Functions

Intrinsic Functions

The Expression block language provides a set of standard functions that
implement some higher math functions, as well as functions for controlling
the status of a value.

Table 4-4. Flow Control and Group Constructs

Operation

Syntax

Conditional

if (condition) <statement(s) to be executed for true
case
>
[ else <statement(s) to be executed for false case> ]

for loop and while loop constructs are not supported

Composition

{ <statement> ; ... }

Advertising