Historian Data Types
Data Type | Size | Description |
---|---|---|
Single Float | 4 bytes | The single float data type stores decimal values up to 6 places. Valid ranges for the single float data type are 1.175494351e-38F to 3.402823466e+38F |
Double Float | 8 bytes | The double float data type stores decimal values up to 15 places. Valid values for the double float data type are 2.2250738585072014e-308 to 1.7976931348623158e+308 |
Single Integer | 2 bytes | The single integer data type stores whole numbers, without decimal places. Valid values for the single integer data type are -32767 to +32767. |
Double Integer | 4 bytes | The double integer data type stores whole numbers, without decimal places. Valid values for the double integer data type are - 2147483648 to +2147483648. |
Quad Integer | 8 bytes | The quad integer data type stores whole numbers without decimal places. Valid values for the quad integer data type are -9,223,372,036,854,775,808 (negative 9 quintillion) to +9,223,372,036,854,775,807 (positive 9 quintillion). |
Unsigned Single Integer | 2 bytes | The unsigned single integer data type stores whole numbers without decimal places. Valid values for the unsigned single integer data type are 0 to 65535. |
Unsigned Double Integer | 4 bytes | The unsigned double integer data type stores whole numbers without decimal places. Valid values for the unsigned double integer data type are 0 to 4,294,967, 295 (4.2 billion). |
Unsigned Quad Integer | 8 bytes | The unsigned quad integer data type stores whole numbers without decimal places. Valid values for the unsigned quad integer data type are 0 to 18,446,744,073,709,551,615 (19 quintillion). |
Byte | 1 byte | The Byte data type stores integer values. Valid values for the byte data type are -128 to +127. |
Boolean | 1 byte | The Boolean data type stores boolean values. Valid values for the boolean data type are 0=FALSE and 1=TRUE. If the user sends zero, the value is taken as zero. Anything other than zero is treated as one. |
Fixed String | Configured by user | The fixed string data type stores string data of a fixed size. Valid values are between 0 and 255 bytes. |
Variable String | No fixed size | The variable string data type stores string values of undetermined size. This data type is useful if you cannot rely on a constant string length from your data source. |
Binary Object | No fixed size | The binary object data type stores binary data. This is useful for capturing data that can not be classified by any other data type. |
Scaled | 2 bytes | The scaled data type lets you store a 4-byte float as a 2-byte integer in the Historian archive. The scaled data type saves disk space but sacrifices data precision as a result. |
Additional Notes on Data Types
Quad Integer
If a tag is associated with Quad Integer, Unsigned Double Integer, or Unsigned Quad Integer data types and if you are retrieving data using Non-Web Admin, Excel Add-in, Calculation, ihSQL, and ihSDK, then there may be a loss of precision value due to a Visual Basic limitation.
Calculation collector supports only the calculations performed using the current value calculation. It does not support other calculations due to a Visual Basic script limitation.
The high and low EGU limits for Quad Integer, Unsigned Single Integer, Unsigned Double Integer, and Unsigned Quad Integer are between 2.2250738585072014e-308 to 1.7976931348623158e+308.
Fixed String Data Types
The fixed string data type lets you store string data of a fixed size. This is useful when you know exactly what data will be received by Historian. If a value is larger than the size specified in the Data Length field, it will be truncated.
Scaled Data Types
Historian uses the high and low EGU values to both store and retrieve archived values for the scaled data type. This allows you to store 4 byte floats as 2 byte integers in the Historian archive. Though this saves disk space, it also sacrifices data precision as a result. The smaller the span is between the high and low EGU limits, the more precise the retrieved value will be.
ArchivedValue = (((RealWorldValue - EngUnits->Low) / (EngUnits->High - EngUnits->Low) * (float) HR_SCALED_MAX_VALUE) + .5);
For example: A value of 12.345 was stored in a scaled tag whose high EGU was 200 and low EGU was 0. When later retrieved from the Historian archive, a value of 12.34473 would be returned.