from internal memory. However, when using the SDM-SIO2R, extra time is required to transfer
data from the module into the data logger memory.
The extra time (in microseconds) taken to transfer data from the SDM-SIO2R to the data logger
can be calculated using the following formula:
Time = (C + 1) × (8 × SDMRate)
Where,
C = Number of characters to transfer from the SDM-SIO2R
SDMRate = Rate set using the
SDMSpeed()
instruction in CRBasic giving the time in
microseconds for one bit period.
It’s worth noting that the bit rate defined by
SDMSpeed()
is not exact and will vary slightly
depending on the data logger used. If you require more accurate information about SDM data
rates, consult your data logger documentation.
Example
The instruction
SerialIn
(Dest,32,1,0,10)
using a 30 µs bit rate would transfer its 10
bytes of data from the SDM-SIO2R to the data logger in approximately 2.7 ms.
Time (in microseconds) = (10 + 1) × (8 × 30)
Note that 30 µs per bit is the default data rate for most Campbell Scientific data loggers. It is
possible to reduce this time and the transfer time by using the
SDMSpeed()
instruction. This can
be done if using short cable runs between the data logger and all SDM devices.
6.3.1.4 SerialOut()
Transmission from the SDM-SIO2R will commence once the first byte of user information is
received from the data logger. There will be a total delay of 16 bit periods (at the
SDMSpeed()
)
before transmission commences. Normally this delay can be ignored as it is short (0.48 ms), but
some applications may need to account for it.
6.3.1.5 SerialInBlock()
The
SerialInBlock()
instruction can be used as described in the data logger manual.
However, if using the option to capture only the most recent data, make sure the instruction is
called often enough to avoid filling up the SDM-SIO2R buffer. The SDM-SIO2R buffer operates in
fill and stop mode, and, therefore, will not include the most recent data if it gets full.
6.3.1.6 SerialOutBlock()
No special information. Can also be used to set the general purpose output line. See
handshaking lines for general input/output
(p. 42) for more information.
SDM-SIO2R Serial Input/Output Module with Switched Sensor Power
33