beautypg.com

National Instruments FP-3000 User Manual

Page 66

background image

Chapter 4

Block Reference

FieldPoint FP-3000 User Manual

4-14

www.ni.com

User Functions

User functions are not supported. You cannot define sub-routines within an
expression block.

Purpose

Scales the floating point value,

valueToScale

, to a

percentage in the scale range specified by

engUnit0

and

engUnit100

.

Return value

The scaled floating point value status pair.

engUnit0 <= vs_float.value

returned.value <=engUnit100

Function Name

to_unity

Function Syntax

vs_float to_unity(float euValue,

float engUnit0,

float engUnit100)

Input

engUnit0

is the low value of the scale range,

engUnit100

is the high value of the scale range,

and

euValue

is the value that needs to be converted

from engineering units to an implicit 0 to 1 scale.

EngUnit0 <= euValue <= engUnit100

Purpose

Un-scales the floating point value input in

euValue

parameter to a value using the scale range specified
by

engUnit0

and

engUnit100

for the conversion.

Return value

The floating point value status pair, with floating
point value being between 0 and 1.

0 <= vs_float_value returned.value <= 1

Function Name

to_discrete

Function Syntax

vs_discrete to_discrete(vs_float)

Input

A symbol that is a value status float

Purpose

Converts a value status floating point variable to a
discrete value status variable.

Return value

A discrete value status record.