beautypg.com

Data transmission protocol & data block structure – Guralp Systems CMG-DM24 User Manual

Page 59

background image

Operator’s Guide DM-24 Digitiser

Issue G January 2003

57

9. DATA TRANSMISSION PROTOCOL &

DATA BLOCK STRUCTURE


The block structure of the SAM/DM data format (which does NOT use BDTS format)
lends itself to a simple block transmission/acknowledge protocol for transmission of the
data between multiple SAM/DM units and central data acquisition systems.

To send blocks of data from one system to another each block is packaged in a
‘transport’ layer, which consists of a short block header and a checksum tail. The header
consists of 4 bytes. The first is always an ASCII ‘G’ and the second is an incrementing
block number (modulo 256). The other 2 bytes contain the length of the data block
(binary, Motorola byte order). The checksum is also a ‘word’ (16 bit) being the sum of
all the bytes in the data block and the 4 header bytes.

To optimise the use of available transmitter bandwidth the transmitted data block is
truncated to the actual data length. As the systems currently only have 24 bit resolution
the redundant most significant byte in 32 bit data blocks is also not included in these
blocks i.e. 24 bit (3 byte) records are transmitted. This reduction is only applied to the
difference records - the first and last absolute values are still transmitted as 32 bit
values.

The transmission header consists of 4 bytes

Fixed identifier

ASCII ‘G’ (hex 47)

Block sequence number

0 - 255

Block size in bytes (excludes

Most significant byte

header and checksum)

Least significant byte


The digitiser units transmit data as complete blocks become available without any flow
control except that provided by a simple positive/negative acknowledge (ack/nak).

Acknowledgement of received packets is not necessary as the transmitter only waits for
a nominal 100 mSec before moving onto the next block, if ready. To acknowledge
correct reception of a block the receiver should reply with an ‘ack’ character (here
defined as hex 01) and the least significant byte of the block’s ‘stream-id’. This allows
for a system which has a simple broadcast acknowledgement via a common link (radio
band) to many systems that are part of an array, each system is able to identify its own
ack/nak by matching the identifier byte. Reception of a positive acknowledgement will
enable the transmitter to terminate its wait timer and immediately proceed to the next
block.

When the receiver detects a transmission error it should reply with a ‘nak’ (here defined
as hex 02) and the identifier byte. This will cause the transmitter to re-send the block of
data.