Rs-485 Half-Duplex Mode; Using The Rs-232 Link In Receive Only Mode; Example Datalogger Programs - Campbell SDM-SIO1A Instruction Manual

Serial input/output module
Hide thumbs Also See for SDM-SIO1A:
Table of Contents

Advertisement

NOTE

4.2.2 RS-485 half-duplex mode

NOTE

4.2.3 Using the RS-232 link in receive only mode

4.3 Example datalogger programs

• 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 11)
In RS-485 half duplex mode the SDM-SIO1A 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-SIO1A 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 11).
To place the SDM-SIO1A 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-SIO1A will consume less current than normal but
still can receive new information on its RS-232 port.
The example below will set the SDM-SIO1A with the address 0 into receive only
mode. All normal baud rates and buffer sizes are supported.
Example
SerialOpen (32,115200,64,100,10000)
There follows some simple examples of how to write programs in CRBasic to send
and receive data using the SDM-SIO1A. 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.
User Guide
'Set receive only mode
19

Advertisement

Table of Contents
loading

Table of Contents