dpGetUnit()
This function returns the unit of a datapoint.
Synopsis
langString dpGetUnit(string dp);
Parameter
| Parameter | Meaning |
|---|---|
| dp | Datapoint 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 datapoint are applied to the DPE.
Example
main()
{
langString unit;
unit=dpGetUnit("mld_float."); // Get Unit
DebugN(unit)
}
Assignment
Datapoint function
Availability
CTRL
