3 data formats – space requirements, 4 available storage – Campbell Hausfeld SM4M User Manual
Page 22

SM4M/SM16M Storage Module User Guide
4-2
4.3 Data Formats – Space Requirements
The modules store data in the format in which it is sent to them. There is no
conversion or encoding of the data received before it is stored.
Data can be sent to the module in either the Campbell Scientific Final Storage
Format (binary) or in the Printable ASCII format. One low resolution data point
requires two bytes in binary format. Since storing ASCII data requires 10 bytes
per data point, the binary option should be used whenever possible.
Bytes from the Storage Module input buffer are permanently stored in byte-pairs.
The Campbell Scientific dataloggers Final Storage Format data is always grouped
in pairs. Printable ASCII may have a single byte left in the input buffer when the
PE line drops. In this case the byte will be stored with a null character (ASCII
Code 0) as the second byte.
4.4 Available Storage
The flash memory used within the modules is divided into 64 Kbytes blocks,
within the memory chips themselves. One limitation of flash memory is that it
must be erased before it is possible to write data to it. It is only possible to erase
entire blocks of memory in this case, 64 Kbytes at a time.
If the module is being used as Fill and Stop, this is of no consequence as the
memory will have been entirely erased before use. The module will store data
until every memory block has been filled.
However, when used as Ring Memory, once the module has filled it must erase
the next block of memory before it can continue writing around the ring. Erasing
a block takes approximately one second, and so, if data is still streaming into the
module, the erase process must take place in advance of writing to that block.
The consequence of this process is that the module must erase blocks of the oldest
data in advance. The modules initiate the erase process 24,000 bytes before the
end of the current block. In the worst case the size of the erased section of the
module will be 64 Kbytes plus 24,000 bytes. Table 4-1 lists effective capacity for
the SM4M and SM16M configured as ring memory. The effective size of the
memory can be calculated by taking the storage module size minus 4 bytes per
block (used for internal marking purposes), MINUS the worst case erased data
size.
Table 4-1 Ring-Memory Effective Memory Capacity
Module
Bytes
Low-Res Data Values
SM4M
4104516
2052258
SM16M
16686660
8343330
The amount of storage available for fill and stop memory is 89524 bytes or 44762
low-resolution data values greater than the above (the last eight bytes of memory
can not be written to).
The module will only store data up to the end of the last complete block of data
transmitted before the module becomes full. This means that if data is sent in large
blocks and the module becomes full just before receipt of the end of the last block,
then the effective capacity will be the above figures minus almost the block size.