Page 8
4.2 TCP
4.2.1 Overview.
The microDAQ’s TCP channel affords it the ability to stream real time pressure data at high speed
over standard 100Mbit Ethernet connections.
4.2.2 Connection.
When using the TCP/IP channel, the microDAQ is programmed to listen on its local port number
101. It will respond to a connection request, connect and immediately start streaming data if it has
been setup to use the TCP channel. Note that the microDAQ only supports one TCP connection.
Setup requires the microDAQ to be given an IP address, and the network’s subnet mask. It is
possible either to run the microDAQ over a local Ethernet connection, or directly from a PC’s
network card, as long as a crossover cable is used. A dual network card (or 2 cards) may be used,
however care should be taken about network routing, as similar subnets for two network
connections on a single Windows ® machine can cause the microDAQ not to be seen on the
second card. The microDAQ will respond to a ‘ping’ instruction for the purposes of setup and
troubleshooting.
4.2.3 TCP Protocol
The microDAQ’s TCP data protocol is shared with the RS232 serial data stream protocol, and is
repeated here for completeness.
In the case of the TCP channel, the engineering unit protocol should be avoided if possible, due to
the need to declock the microDAQ’s internal clock and scanner addressing to 10kHz from the
default maximum 20kHz (due to internal issues regarding string handling). The 16 bit little ended
protocol is most efficient from the microDAQ’s viewpoint, the data being calibrated and spanned to
0 to 65535 (zero at 32767). Scaling to floating point full scale is better achieved within a PC client
application where there is more processing power available. Figure 4.2 shows the available data
packet formats over TCP.
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.2, Data Packet Protocol, TCP Channel.
4.2.4 TCP Data Rate.
The data delivery rate is selected from the setup program, and the following values are available
(Hz) – 1, 5, 10, 20, 25, 50, 100, 150, 200, 225, 312, 400, 500, 625, 1000. Although the system
endeavours to deliver the rate with maximum accuracy, ultimate responsibility for data timing lies
with the user’s host system.
Note that since the scanners are addressed at a fixed channel rate (20kHz if configured for Gen1
scanners, 50kHz if configured for Gen2 scanners), requesting a data delivery of more than 20k/No.
Channels (Gen1) or 50k/No. Channels (Gen2) - i.e. 312Hz for a 64 channel Gen 1 scanner) -