
Page 7
4. microDAQ Communication Channels.
4.1RS232
4.1.1Overview.
Streamingdata overRS232 allowsaccess tocalibratedpressuredata withno frontendsoftware
support,asengineeringunitdata maybevieweddirectly in aterminalprogram such as
Hyperterminal®.RS232 maybeadequateforsomelowspeedapplications,thoughitsuse
requiresthe downclockingof the microDAQ’s systemclockandscanneraddressingto5kHzfrom
the defaultmaximum20kHz.
4.1.2Connection
Connection to the microDAQ viaRS232 requiresonly that the communicatingdevice hasitsserial
portparameters setcorrectly tomatch the microDAQ.The parameters otherthanbaudrateare
fixedas8bits,no parity,1stopbit,no flowcontrol.Baudrateisassetin microDAQSetup,avalue
between 9600 and115200 baud (typically 57600).
4.1.3RS232 Protocol.
Withthe RS232 channelselectedon,calibratedpressuredata arestreamedcontinuously overthe
serialinterface. Pressurereadings areformedintopacketsof one readingperchannelat the
desireddata delivery rate, andsenttothe client.RS232 supports 3 differentdata formatsas
shownin Figure4.1.The binary data formatsscalethe data to0to 65535 representing -/+ full
scalerespectively. Binary protocols requireless communicationsbandwidthaswell asless
processoroverheadwithin the microDAQ;itisrecommendedthat engineeringunitconversionsbe
appliedat the client.
Protocol Example data format Note
16 bit LE
0x00 0xFF 0x00 CH1LSBCH1MSBCH2LSB
CH2MSBCH3LSB…..CHNLSBCHNMSB 3 byte (00, FF, 00)headeridentifies
startofpacket.All activechannels
(CH1to CHN) then sent LSBfirst,
no delimiters.
16 bit BE 0x00 0xFF 0x00 CH1MSBCH1LSBCH2MSB
CH2LSBCH3MSB….. CHNMSBCHNLSB 16 bit data,3byte header,no
delimiters, MSBfirst.
Eng. Units *,#.#####,#.#####,#.#####,#.###
##,#.#####,#.#####……..#.##### ASCII readablestring,*(ASCII 42)
asheader,activechannelsin
ascending order,5decimalplaces,
commadelimited.
Figure 4.1, Data PacketProtocol, RS232 Channel.
4.1.4Control Via RS232
Incomingbyteson the microDAQ’s serialinputarebuffered,andif 5successive bytesmakeupa
commandpacket,the contentsaredecodedandanappropriateacknowledgementissued(‘*’ for
positive, ‘!’fornegative)on the serialport.Ifthe contentsof the packetareavalidcommand,itwill
then be carriedout.
Notethat if data packetsarebeingsenton the RS232 channel, the acknowledgementis likely tobe
lostwithin the data,unless the data delivery ismutedwiththe ‘Stream Off’commandbeforethe
commandissent.Itisrecommendedthat a‘Stream Off’(or‘Standby’command)isissuedbefore
anyothercommand.
4.1.5DataRate
Data ratesselectableforthe RS232 delivery channelare(Hz)1,2,5,10,20.Highervalues of data
rate are betterservedwith aTCP orCAN connection.