1 introduction, 1 method of entering special / control characters – Campbell Scientific SDM-SIO4 4-Channel Serial I/O Interface User Manual

Page 17

Advertising
background image

3-1

Section 3. Understanding How the
SDM-SIO4 Handles Data

For simple applications the SDM-SIO4 can be configured and controlled from the
datalogger alone, using the datalogger program instruction P113 (CR10X and CR7
dataloggers only). Future developments will include support for other dataloggers.

More complicated applications require configuration of the SDM-SIO4 using the
‘command line’ function on a PC running a terminal emulator. This allows you to set up
mechanisms to control the transmission of long, formatted output data and filtering of
numerical values out of received data. This is done by storing the detailed formatting and
filtering configurations in the SDM-SIO4 (see the section about the command line mode
below).

Thus when the datalogger needs to send out long or complicated data strings it only needs
to send a short command to the SDM-SIO4 to tell it to do this, i.e. it does not have to pass
the whole string via the SDM interface. Likewise, by telling the SDM-SIO4 how to process
received data, it can strip off the unwanted characters and reduce the data to either binary
or floating point numbers. This minimizes the time it takes for the datalogger to get the
data and so allows the datalogger to load the data values into its memory with minimal
processing.

3.1 Introduction

For collection of data from an intelligent sensor the datalogger programming is
typically broken down into several steps, which might be:

1. Set up and configure the serial ports, e.g. baud rate, parity, handshaking.

This can be done by one call of the datalogger instruction either at program
compilation (so it is done only once) or perhaps in a subroutine which is
called when a flag is toggled.

2. Use a second call of the instruction to tell the SDM-SIO4 to send out a

string to request data from a sensor and to tell it how to process the returned
data.

3. At some point later in the program use a third call to collect the pre-

processed data from the SDM-SIO4.

Before examining the detail of the datalogger instruction it is necessary to
understand the data output formatter and the input filters. These work in
principle (and in certain details) like the formatting and filtering options used to
write and read data from files in some high-level programming languages.

3.1.1 Method of Entering Special / Control Characters

Before going on to discuss filters, you should understand how to enter special /
control characters.

Advertising