FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder

FlexPro Documentation 2025

Unit

Returns the unit of a data set as a quantity with the value 1.

Syntax

Unit(DataSet)

 

The syntax of the Unit function consists of the following parts:

Part

Description

DataSet

The data set whose unit is to be determined.

All data structures are allowed. All data types are permitted.

Remarks

As the result the function returns a scalar value of data type 64-bit floating point.

The unit is returned as a 64-bit floating point value of 1 with a unit. For aggregate data structures, only the Y component is considered.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Available in

FlexPro Basic, Professional, Developer Suite

Examples

Unit(5.6 V)

Results in 1 V.

Unit({56 mV, 7.8 V})

Results in 1 mV.

AdjustUnit(Frequency, 1. / Unit(Time))

The 'Frequency' unit is transformed to the reciprocal value of the 'Time' unit.

See Also

AdjustUnit Function

UnitSymbol Function

SIUnits Function

UnitType Function

Unit Manager

Quantities in FPScript