dpGetUnit()

This function returns the unit of a data point.

Synopsis

langString dpGetUnit(string dp);

Parameter

Parameter Meaning
dp Data point element

Return Value

The return value is a string that contains the unit (for example, "gallon") in one or several languages. In the event of an error, an empty string is returned.

Description

The unit can be retrieved using the CTRL function dpGetUnit(). dpGetUnit(): If no specification exists on the DPE (i.e. no description because this specifications are coded in the description), corresponding values from the master data point are applied to the DPE.

Example

main()
{
  langString unit;
  unit=dpGetUnit("mld_float."); // Get Unit
  DebugN(unit)
}

Assignment

Data point function

Availability

CTRL