quDIS-protocol
Protocol Description

Protocol

The data streams between PC and device are divided into protocol elements of defined length, called telegrams. Four types of telegrams are used: Set, Get, Ack and Tell. All telegrams begin with the same header which identifies the type (opcode), the length, address, index and a correlation number used to match answers to requests. After receiving the header, its interpretation allows to receive the rest of the telegram.

Generally, a telegram transports one parameter or result, i.e. it has one single data field of 32 Bits. Only in special cases longer Ack or Tell telegrams are used to transport a set of synchronized results etc.

The protocol is binary with intel-type byte order (not network byte order). The structure of the telegrams is described in ucprotocol.h .

Data Channels

Data channels are a method to continlusly transport measurement results in bulk telegrams. The device cyclically sends Tell telegrams of a size depending on medium and data rate, at most UC_MAXSIZE bytes. The length field should be used to calculate the number of data items transferred. The index field acts as a sample counter; if the data consists of frames (like e.g. spectroscopy results), it is reset at frame start.

A limited (product specific) number of data channels is available and has to be configured by adjusting data source, trigger source and (if applicable) sample time and averaging. See product the specific address documentation for details.

quDIS Position Data

The UC protocol is based on 32 bit items that are not sufficient for the resolution of quDIS position data. Thus a special encoding is used: A distance value is 48 bit wide, the corresponding marker counter (if enabled) has 14 bit. They are transferred in two subsequent 32 bit items, the low and high dword. In both of them bits 0 ... 23 carry the respective half of the position value, bits 24 ... 30 the marker counter, and bit 31 marks the high dword. When merging the position halfs in software into 64 bit integers, the sign extension has to be considered because positions may be negative.

Six independent data channels can be confiured, transporting the absolute and relative positions of the three axes. The index field of the telegrams allow to synchronize the six streams.