Data Types

Historian uses the following data types.

Data Type Size Description Valid Values
Single Float 4 bytes Stores decimal values up to 6 places. 1.175494351e-38F to 3.402823466e+38F
Double Float 8 bytes Stores decimal values up to 15 places. 2.2250738585072014e-308 to 1.7976931348623158e+308
Single Integer 2 bytes Stores whole numbers. -32767 to +32767
Double Integer 4 bytes Stores whole numbers. - 2147483648 to +2147483648
Quad Integer 8 bytes Stores whole numbers. -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 Stores whole numbers. 0 to 65535
Unsigned Double Integer 4 bytes Stores whole numbers. 0 to 4,294,967, 295 (4.2 billion)
Unsigned Quad Integer 8 bytes Stores whole numbers. 0 to 18,446,744,073,709,551,615 (19 quintillion)
Byte 1 byte Stores integer values. -128 to +127
Boolean 1 byte Stores boolean values. 0=FALSE and 1=TRUE (any value other than zero is treated as one)
Fixed String Configured by user Stores string data of a fixed size. 0 and 255 bytes
Variable String No fixed size 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 Stores binary data. This is useful for capturing data that can not be classified by any other data type.
Scaled 2 bytes Stores a 4 byte float as a 2 byte integer. The scaled data type saves disk space but sacrifices data precision as a result.
Note: Tags associated with Quad Integer, Unsigned Double Integer, or Unsigned Quad Integer data types may suffer a loss of precision value due to a Visual Basic limitation.

Scaled Data Types

Historian uses the high and low EGU values to store and retrieve archived values for the scaled data type. This allows you to store 4 byte floats as 2 byte integers in the archive. Though this saves disk space, it sacrifices data precision. The smaller the span is between the high and low EGU limits, the more precise the retrieved value will be. When calculating the value of a scaled data type, you can use this formula:
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 will be returned.
Important: Values that are outside of the EGU range of a scaled data type tag are stored as bad, scaledoutofrange in Historian. Changing either the High or Low EGU tags does not affect existing data, but only affects the new data with new timestamps. You cannot correct values for scaled data types that were inserted while EGUs were incorrect. If necessary, contact technical support for additional information.

Quad Integer Data Types: The high and low EGU limits for Quad Integer, Unsigned Single Integer, Unsigned Double Integer, Unsigned Quad Integer are between 2.2250738585072014e-308 to 1.7976931348623158e+308.