User Guide
19
Auto flow control should only be selected in RS-232 mode
When Autoflow control is enabled the user cannot set or clear the spare I/O
ports (pins 8 and 9)
4.2.2 RS-485 half-duplex mode
In RS-485 half duplex mode the SDM-SIO1 will wait for approximately 2.5ms
after a character is received before it tries to transmit out any data in it’s transmit
buffer. This is to ensure that a contention does not occur on the data line which
will cause data corruption. There is also a delay of at least the time to send one
character after the last character has been transmitted before the SDM-SIO1 will
listen for new incoming data.
When in either RS-485 half duplex or full duplex modes the user
can’t set or clear the spare I/O ports (Pins 8 and 9).
4.2.3 Using the RS-232 link in receive only mode
To place the SDM-SIO1 into RS-232 receive only mode, use the ‘SerialOpen’
command with the ‘SerialOpenFormat’ value set within the range of 64 to 79.
Consult Section 4.1.1 in this manual for more detailed information about these
settings.
In receive only mode the SDM-SIO1 will consume less current than normal but
still can receive new information on its RS-232 port.
The example below will set the SDM-SIO1 with the address 0 into receive only
mode. All normal baud rates and buffer sizes are supported.
Example
SerialOpen (32,115200,64,100,10000)
‘Set receive only mode
4.3 Example datalogger programs
There follows some simple examples of how to write programs in CRBasic to send
and receive data using the SDM-SIO1. These programs are not extensive and are
fundamentally no different to those written for use when reading data from a
standard serial port.
The exact program to be used will vary with the serial device being used.
Unfortunately the number of possible variations of reading different sensors is
almost infinite. If you are struggling to write code please contact Campbell
Scientific who may already have experience with the sensor and may be able to
offer advice on how to deal with it.
NOTE
NOTE