Section 3. Understanding How the SDM-SIO4 Handles Data
3-3
•
Search for an ASCII hex pair to convert to Campbell Scientific floating
point format.*
•
Search for an 8-bit binary number to convert to Campbell Scientific floating
point format.
•
Search for a 16-bit binary number to convert to Campbell Scientific floating
point format.
* Non-numeric characters are ignored.
See Section 5 – ‘Programming the Datalogger’.
Filter Strings
These are used to define how to filter incoming data from a port into a format
the datalogger can use. This is done by having a user-defined filter string pre-
stored in the battery-backed memory of the SDM-SIO4. These strings have to
be created via the command line (see Section 4), in a similar fashion to the
format strings. The filter commands are as follows:
•
An
Define a filter time-out. The range is from 0 to 255 in 50ms steps,
giving a range of 0 to 12.75 seconds. The accuracy is -50ms +0ms so an
‘n’value of 1 is not practical as the time-out could be between 0 and 50ms.
This filter type can be put anywhere in the string. If a time-out occurs before
the entire filter is complete, any data already processed is disregarded and
the filter is restarted. When the filter string is finished the time-out is
stopped and set to zero. If n=0 then this stops the time-out and the filter will
operate with no time-out. While the time-out is active the SDM-SIO4 will
not shut down into the low power state unless the filter is complete or the
time-out has finished. Note it best to start the time-out after a trigger
command.
•
B[n,n,n,...]
Carry out a bit field to floating point conversion. The
SDM-SIO4 gets or waits for as many bytes as are required to fulfil the total
number of bit fields. ‘n’ can be any number of bits from 0 to 255, but more
than 23 bits is beyond the floating point range of the datalogger so the value
returned to the datalogger will be invalid. There can be any number of bit
fields, only limited by the command line buffer and the 255-byte limit for
string storage. If there is part of a byte unconverted and there are no more
bit fields remaining then those bits are discarded.
•
bn
A binary number should be at this position. The SDM-SIO4 converts
‘n’ bytes (1, 2 or 3 bytes) to Campbell Scientific floating point.
•
C
Discard one byte (character).
•
c
Read one byte (not converted to Campbell Scientific floating point).
•
D
A signed integer should be at this position. If it is found, the signed
integer is sent to the datalogger and removed from the buffer. If no signed
integer is found, the SDM-SIO4 sends -99999 to the datalogger.
•
d
Search for a signed integer indefinitely, skipping non-numeric
characters.
Summary of Contents for SDM-SIO4
Page 6: ...SDM SIO4 Table of Contents iv This is a blank page ...
Page 12: ...Section 1 Introduction 1 6 This is a blank page ...
Page 16: ...Section 2 Installation and Hardware Set Up 2 4 This is a blank page ...
Page 26: ...Section 3 Understanding How the SDM SIO4 Handles Data 3 10 This is a blank page ...
Page 32: ...Section 4 Programming the SDM SIO4 4 6 This is a blank page ...
Page 62: ...Section 5 Programming the Datalogger 5 30 This is a blank page ...
Page 76: ...This is a blank page ...
Page 81: ...This is a blank page ...