HANDLING FILES
iKon-L SECTION 7
Page 130
Table 10: Types of .dat files
Data type No. of Bytes Range
(1)
16 bit integer 2 -32,768 to 32,767
(2)
32 bit integer 4 -2,147,483,648 to 2,147,483,647
(3)
32 bit float 4
3.4 x 10
-38
to 3.4 x 10
+38
(1) Saves a data set to a 16 bit integer .dat file.
NOTE: If a data value exceeds the limits of a 16-Bit integer (<-32,768 or > 32,767), that data value is
truncated to the corresponding limit (e.g. if a data value is 36,000 units then the value is truncated to
32,767 units).
(2) Saves a data set to a 32 bit integer .dat file. The limits for the 32 bit integer are handled in similar fashion to
the 16 bit integer above.
(3) Saves a data set to a 32 bit floating point .dat file.
When using your own software to handle a .dat file, you have to work out how many bytes to read in. Each 32
bit value requires 4 bytes to handle the value. Thus, for example, to read in a 32 bit .dat file consisting of 1024
data values, you would have to read in 4096 bytes in total.