ConvertUOM
The ConvertUom function is supported only in Studio. It returns a new
value as result of a unit of measure conversion.
Prototype
ConvertUom(Value; FromUom; ToUom)
Arguments
Value Number By value
A valid number, an expression or a variable (Studio only) to be converted.
FromUom String By value
A valid string, an expression or a variable (Studio only) representing the original unit of measure.
Allowed strings are based on the abbreviation or the name of the unit of measures configured into the
PI System UOM database.
ToUom String By value
A valid string,or an expression or a variable (Studio only) representing
the new unit of measure.
Allowed strings are based on the abbreviation or the name of the unit of measures configured into the
PI System UOM database.
Returns
Number
The function returns the difference between the two values according to the calculation rule
(refer to function description).
Exception
Undefined
Undefined is returned if:
- The value parameter is not a number
- The unit of measure parameters are not valid units of measure
- The unit of measure parameters don\'t belong to the same unit of measure class
Example:
ConvertUom(1000; 'Kg'; 't')
This will return a 1 as a result from the unit of measure conversion of 1000 kilograms to tons.