Serialclose(); Serialin(); Serialout() - Campbell SDM-SIO1A Instruction Manual

Hide thumbs Also See for SDM-SIO1A:
Table of Contents

Advertisement

6.3.1.2 SerialClose()

This will place the SDM-SIO1A unit into shutdown mode where only SDM
communications will operate. This means any data coming into the
SDM-SIO1A on the RS-232/RS-485 interface will be lost.
This is the lowest possible power mode, and for optimum power efficiency, the
SDM-SIO1A should be placed in this mode whenever possible.

6.3.1.3 SerialIn()

The primary difference when using this instruction with an SDM-SIO1A
compared to when it is used with a serial port built into the datalogger is
timing. If the data has already been sent by the remote sensor/system, the
instruction will run in a few tens of microseconds as the data is read from
internal memory. However, when using the SDM-SIO1A, extra time is
required to transfer data from the module into the datalogger's own memory.
The extra time (in microseconds) taken to transfer data from the SDM-SIO1A
to the datalogger can be calculated using the formula below:
Time = (C + 1) • (8 • SDMRate)
Where,
C = Number of characters to transfer from the SDM-SIO1A
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 datalogger used. If you require more accurate
information about SDM data rates, consult your datalogger 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-SIO1A to the datalogger 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
dataloggers. 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 datalogger and all SDM devices.

6.3.1.4 SerialOut()

Transmission from the SDM-SIO1A will commence once the first byte of user
information is received from the datalogger. 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.
SDM-SIO1A and SDM-SIO4A Serial Input/Output Modules
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sdm-sio4a

Table of Contents