Page 7
4. microDAQ Communication Channels.
4.1 RS232
4.1.1 Overview.
Streaming data over RS232 allows access to calibrated pressure data with no front end software
support, as engineering unit data may be viewed directly in a terminal program such as
Hyperterminal ®. RS232 may be adequate for some low speed applications, though its use
requires the downclocking of the microDAQ’s system clock and scanner addressing to 5kHz from
the default maximum 20kHz.
4.1.2 Connection
Connection to the microDAQ via RS232 requires only that the communicating device has its serial
port parameters set correctly to match the microDAQ. The parameters other than baudrate are
fixed as 8 bits, no parity, 1 stop bit, no flow control. Baudrate is as set in microDAQSetup, a value
between 9600 and 115200 baud (typically 57600).
4.1.3 RS232 Protocol.
With the RS232 channel selected on, calibrated pressure data are streamed continuously over the
serial interface. Pressure readings are formed into packets of one reading per channel at the
desired data delivery rate, and sent to the client. RS232 supports 3 different data formats as
shown in Figure 4.1. The binary data formats scale the data to 0 to 65535 representing -/+ full
scale respectively. Binary protocols require less communications bandwidth as well as less
processor overhead within the microDAQ; it is recommended that engineering unit conversions be
applied at the client.
Protocol
Example data format
Note
16 bit LE
0x00 0xFF 0x00 CH1LSB CH1MSB CH2LSB
CH2MSB CH3LSB…..CHNLSB CHNMSB
3 byte (00, FF, 00) header identifies
start of packet. All active channels
(CH1 to CHN) then sent LSB first,
no delimiters.
16 bit BE
0x00 0xFF 0x00 CH1MSB CH1LSB CH2MSB
CH2LSB CH3MSB….. CHNMSB CHNLSB
16 bit data, 3 byte header, no
delimiters, MSB first.
Eng. Units
*,#.#####,#.#####,#.#####,#.###
##,#.#####,#.#####……..#.#####
ASCII readable string, * (ASCII 42)
as header, active channels in
ascending order, 5 decimal places,
comma delimited.
Figure 4.1, Data Packet Protocol, RS232 Channel.
4.1.4 Control Via RS232
Incoming bytes on the microDAQ’s serial input are buffered, and if 5 successive bytes make up a
command packet, the contents are decoded and an appropriate acknowledgement issued (‘*’ for
positive, ‘!’ for negative) on the serial port. If the contents of the packet are a valid command, it will
then be carried out.
Note that if data packets are being sent on the RS232 channel, the acknowledgement is likely to be
lost within the data, unless the data delivery is muted with the ‘Stream Off’ command before the
command is sent. It is recommended that a ‘Stream Off’ (or ‘Standby’ command) is issued before
any other command.
4.1.5 Data Rate
Data rates selectable for the RS232 delivery channel are (Hz) 1, 2, 5, 10, 20. Higher values of data
rate are better served with a TCP or CAN connection.