For sending and receiving data, the
SerialOpen()
instruction is used to specify which serial
port, the speed, and mode of operation. The speed is set by the
BaudRate
parameter in the
instruction and the mode (bits, parity, duplex, RS-232 or RS-485) is set by the
SerialOpenFormat
parameter. Refer to the
CRBasic Editor
help system for more details of the
options. With the correct parameters in the
SerialOpen()
instruction, the program can be
written in almost exactly the same way as using any other serial port with
SerialIn()
,
SerialOut()
, and similar instructions. The
(p. 26) section of this manual gives
details of some of the minor changes needed and some simple program examples.
The SDM-SIO2R can also be used as an interface to Modbus and DNP3 sensors or networks. The
interface is configured by including an extra
SerialOpen()
instruction at the start of the
program. Normal calls to the relevant Modbus or DNP3 instructions can then be used specifying
the COM port number relevant to the SDM-SIO2R.
6.1 Mounting
The SDM-SIO2R is designed to be installed in a dry, non-condensing environment. The
SDM-SIO2R is normally mounted on a DIN rail mounting bracket (as shown in
(p. 9)) that is then attached to the backplate of a Campbell Scientific enclosure.
Figure 6-1. DIN rail mounting
A SDM-SIO2R can be removed from the DIN rail by using a screwdriver to pry on the din rail
release bar. See
SDM-SIO2R Serial Input/Output Module with Switched Sensor Power
9