dpElementType()
Returns the data type.
Synopsis
int dpElementType(string dp);
Parameter
| Parameter | Meaning | 
|---|---|
| dp | Data point element | 
Return Value
In the event of a failure dpElementType() returns -1, otherwise the integer value of the data type.
| Integer constant | int value | Comment | 
|---|---|---|
| DPEL_BIT32 | 24 | bit pattern | 
| DPEL_BIT32_STRUCT | 16 | bit pattern structure | 
| DPEL_BIT64 | 50 | bit pattern | 
| 5DPEL_BLOB | 46 | blob (binary large object) | 
| DPEL_BLOB_STRUCT | 47 | blob structure | 
| DPEL_BOOL | 23 | bit | 
| DPEL_BOOL_STRUCT | 15 | bit structure | 
| DPEL_CHAR | 19 | character | 
| DPEL_CHAR_STRUCT | 11 | character structure | 
| DPEL_DPID | 27 | DP-Identifier | 
| DPEL_DPID_STRUCT | 39 | label structure | 
| DPEL_DYN_BIT32 | 8 | dynamic array for bit pattern | 
| DPEL_DYN_BIT32_STRUCT | 35 | dynamic bit-pattern array structure | 
| DPEL_DYN_BIT64 | 51 | dynamic array for bit pattern | 
| DPEL_DYN_BLOB | 48 | dynamic blob | 
| DPEL_DYN_BLOB_STRUCT | 49 | dynamic blob structure | 
| DPEL_DYN_BOOL | 7 | dynamic bit array | 
| DPEL_DYN_BOOL_STRUCT | 34 | dynamic bit array structure | 
| DPEL_DYN_CHAR | 3 | dynamic character array | 
| DPEL_DYN_CHAR_STRUCT | 30 | dynamic character array structure | 
| DPEL_DYN_DPID | 29 | dynamic DP-Identifier array | 
| DPEL_DYN_DPID_STRUCT | 38 | dynamic DP-Identifier array structure | 
| DPEL_DYN_FLOAT | 6 | dynamic number array for floating decimal point | 
| DPEL_DYN_FLOAT_STRUCT | 33 | dynamic number structure for floating decimal point | 
| DPEL_DYN_INT | 5 | dynamic integer array | 
| DPEL_DYN_INT_STRUCT | 32 | dynamic integer structure | 
| DPEL_DYN_LANGSTRING | 44 | multilingual dynamic text array | 
| DPEL_DYN_LANGSTRING_STRUCT | 45 | multilingual dynamic text structure | 
| DPEL_DYN_STRING | 9 | dynamic text array | 
| DPEL_DYN_STRING_STRUCT | 36 | dynamic text-array structure | 
| DPEL_DYN_TIME | 10 | dynamic time array | 
| DPEL_DYN_TIME_STRUCT | 37 | dynamic time array structure | 
| DPEL_DYN_UINT | 4 | dynamic array of positive whole numbers | 
| DPEL_DYN_UINT_STRUCT | 31 | dynamic array of positive integers | 
| DPEL_DYN_LONG | 55 | dynamic array of Integer values (64 bit) | 
| DPEL_DYN_ULONG | 59 | dynamic array of Positive integer values (64 bit) | 
| DPEL_FLOAT | 22 | floating point system | 
| DPEL_FLOAT_STRUCT | 14 | number structure for floating decimal point | 
| DPEL_INT | 21 | integer | 
| DPEL_INT_STRUCT | 13 | integer structure | 
| DPEL_LANGSTRING | 42 | description | 
| DPEL_LANGSTRING_STRUCT | 43 | description structure | 
| DPEL_LONG | 54 | Integer value (64 bit) | 
| DPEL_STRING | 25 | text | 
| DPEL_STRING_STRUCT | 17 | text structure | 
| DPEL_STRUCT | 1 | structure | 
| DPEL_TIME | 26 | time | 
| DPEL_TIME_STRUCT | 18 | time structure | 
| DPEL_TYPEREF | 41 | data point type reference | 
| DPEL_UINT | 20 | unsigned integer | 
| DPEL_UINT_STRUCT | 12 | structure of unsigned integers | 
| DPEL_ULONG | 58 | Positive integer value (64 bit) | 
Errors
The errors can be retrieved with getLastError(). This includes missing arguments or when the data point does not exist
Description
The function dpElementType() returns the data type of a data point element.
                 Example
                Example
            
Condition as a function of the data type of the data point element valve17.opening.
main()
{
  if (dpElementType("Valve17.opening")==DPEL_FLOAT)
  else if(dpElementType("Valve17.opening")==DPEL_INT)
}Assignment
Data point function
Availability
CTRL
