Appendix B. Example data
logger programs
There follows two simple examples of how to write programs in CRBasic to send and receive data
using the SDM-SIO2R. These programs are not extensive and are fundamentally no different to
those written for use when reading data from a standard data logger serial port.
The program code is the same for all data loggers that support the SDM-SIO2R.
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.
A third example shows how to control the switched relay power using the
SDMGeneric()
instruction.
SDM-SIO2R Serial Input/Output Module with Switched Sensor Power
45