quDIS-protocol
qudis_protocol.h File Reference

Control Protocol Constants for quDIS. More...

Go to the source code of this file.

Macros

Global Limits and Resources

Resource counts and other addressing limitations.

#define QDS_NUM_AXES   3
 Number of Axes. More...
 
#define QDS_NUM_CHANNELS   16
 Number of Data Channels. More...
 
#define QDS_TCP_PORT   2101
 TCP Port Number The TCP port number the device is listening to. More...
 
#define QDS_HWTYPE_0_1   0x8300
 quDIS hardware Types Hardware identifier numbers of the existing quDIS variants. More...
 
#define QDS_HWTYPE_1_0   0x8500
 Hardware version 1.0 (Serial numbers J 02 ...)
 
Device Features

Get requests installed device features.

Index must be 0.

#define ID_QDS_NUM_AXES_AV   0x0753
 Number of Axes available The parameter contains the number of axes statically enabled (1...3).
 
#define ID_QDS_CAP_ABSOLUTE_AV   0x0751
 Absolute Distance Measurement The boolean parameter is true (1) if the absolute measurement feature is enabled.
 
#define ID_QDS_CAP_PILOT_AV   0x0757
 Pilot Laser available The boolean parameter is true (1) if a red pilot laser is built in the device.
 
Device Identification

Every device provides a number ("Hardware ID") for identification in a multi device enviroment. This number can be individually programmed and read back. For programming, it is not sufficient to sent the new number to the device; it has to be saved to persistent memory explicitly.

#define ID_GET_HW_TYPE   0x0167
 Retreive Hardware Type A GET on this address retrieves the hardware hardware type of the device. More...
 
#define ID_GET_HW_ID   0x0168
 Retreive Device ID A GET on this address retrieves the current hardware identification of the device. More...
 
#define ID_SET_HW_ID   0x016A
 Set volatile Device ID A SET on this address sets the hardware identification number. More...
 
#define ID_PROGRAM_ID   0x016F
 Save Device ID persistently. More...
 
Device Status

Output parameters that reflect the device status. The parameters can be inquired with GET, but are also autonomously sent by the device if the state changes.

#define ID_QDS_TCTL_STATE   0x0776
 State of Wavelength Control On startup, the quDIS initializes its wavelength control by adjusting the laser temperature. More...
 
#define QDS_TCTL_OK   0
 Wavelength control: sucessfully running.
 
#define QDS_TCTL_FAIL   1
 Wavelength control: failed; no valid positions.
 
#define QDS_TCTL_INI   2
 Wavelength control: initialisation in progress.
 
Hardware Control

Settings for electrical and optical interfaces of the device.

#define ID_QDS_PILOT_ON   0x07EA
 Pilot-Laser Switches the red pilot laser on (data=1) or off (data=0) for all axes.
 
Output Control

The following addresses control the output data stream.

#define ID_ASYNC_EN   0x0145
 Enable asynchronous Events. More...
 
#define ID_DATA_EN   0x0146
 Enable Streaming. More...
 
Data Channels

The controller provides a number of data channels (QDS_NUM_CHANNELS), see Data Channels.

The ID_CHAN_ addresses are used to configure the data that are sent on a specific channel: data source, triggering, and sampling. The ID_... constants are used for the "address" field, QDS_TRG_... and QDS_SRC_... are valid enumeration values for ID_CHAN_TRIGGER and ID_CHAN_SOURCE telegrams, respectively.

Data encoding depends on the data source. For the encoding of position data, see here.

The index is valid and transports the channel number of the channel to be configured.

#define ID_CHAN_TRIGGER   0x0030
 Data channel trigger (one of QDS_TRG_..)
 
#define ID_CHAN_SOURCE   0x0031
 Data channel source (one of QDS_SRC_..)
 
#define ID_QDS_DSIZE_EVEN   0x0696
 Force even packet size (bool), useful for positions.
 
#define ID_CHAN_BASE   0x0F00
 Data Channel Base Address When a data channel has been configured sucessfully, the device will autonomously send streaming telegrams. More...
 
#define QDS_TRG_DISABLED   0
 Data trigger: none (channel is disabled)
 
#define QDS_TRG_POS   2
 Data trigger: averaged positions.
 
#define QDS_TRG_SWEEP   5
 Data trigger: wavelength sweep (suitable e.g. More...
 
#define QDS_SRC_INTERFRG_1   9
 Data source: interferogram axis 1.
 
#define QDS_SRC_INTERFRG_2   10
 Data source: interferogram axis 2.
 
#define QDS_SRC_INTERFRG_3   11
 Data source: interferogram axis 3.
 
#define QDS_SRC_REL_1   1
 Data source: relative position axis 1.
 
#define QDS_SRC_REL_2   3
 Data source: relative position axis 2.
 
#define QDS_SRC_REL_3   5
 Data source: relative position axis 3.
 
#define QDS_SRC_ABS_1   2
 Data source: absolute position axis 1.
 
#define QDS_SRC_ABS_2   4
 Data source: absolute position axis 2.
 
#define QDS_SRC_ABS_3   6
 Data source: absolute position axis 3.
 
Position Control

The following parameters control details of the position output streams

#define ID_QDS_POS_AVG   0x0771
 Position Average Time. More...
 
#define ID_QDS_RESET   0x060D
 Reset Relative Position. More...
 
#define ID_QDS_INDEX_RESET   0x0770
 Reset Position Index. More...
 
Marker Feature

The marker feature allows to mark positions in data streams by using an external electrical trigger input. The edges of the trigger signal (rising and falling) are counted, and the count is included in data telegrams as part of the 64 bit samples.

#define ID_QDS_TRG_ENABLE   0x07EB
 Enable Marker Feature. More...
 
#define ID_QDS_TRG_RESET   0x07EC
 Reset Trigger Counter. More...
 
#define ID_QDS_TRG_AUTORESET   0x07ED
 Timeout for Automatic Counter Reset. More...
 

Detailed Description

Control Protocol Constants for quDIS.

This file defines constants to be used as parameters or parameter limits for the control protocol of ucprotocol.h . It is meant as a working C header as well as a documentation for users of other programming languages.

Note
Constants beginning with ID_ are provided for the address field of the protocol. They are called addresses. All other constants are meant as values or limits for the data field.
Many addresses control a function of a specific axis. In this case the axis is identified by the index field of the protocol.

Definition in file qudis_protocol.h.

Macro Definition Documentation

#define ID_ASYNC_EN   0x0145

Enable asynchronous Events.

State values (such as ID_QDS_TCTL_STATE) can be sent autonomously by the device if they change internally. The async enable telegram globally enables (data=1) or disables (data=0) all events. After successfully connecting to the device the events should be enabled.

Definition at line 175 of file qudis_protocol.h.

#define ID_CHAN_BASE   0x0F00

Data Channel Base Address When a data channel has been configured sucessfully, the device will autonomously send streaming telegrams.

Their opcode is TELL, the address will be ID_CHAN_BASE + channel number. The Index is used as a data counter. Read only.

Definition at line 212 of file qudis_protocol.h.

#define ID_DATA_EN   0x0146

Enable Streaming.

Streaming is a method to transport measurement results, see Data Channels. This telegram globally enables (data=1) or disables (data=0) streaming telegrams. After successfully connecting to the device streaming should be enabled.

Definition at line 183 of file qudis_protocol.h.

#define ID_GET_HW_ID   0x0168

Retreive Device ID A GET on this address retrieves the current hardware identification of the device.

Factory default is -1 (0xFFFFFFFF). Index must be 0; SET will be rejected.

Definition at line 110 of file qudis_protocol.h.

#define ID_GET_HW_TYPE   0x0167

Retreive Hardware Type A GET on this address retrieves the hardware hardware type of the device.

The hardware type is a fixed identifier that allows to identify the product and its hardware version. SET will be rejected.

Definition at line 104 of file qudis_protocol.h.

#define ID_PROGRAM_ID   0x016F

Save Device ID persistently.

A SET on this address with the field data set to 0x1234 saves the current identification number in persistent memory in the device. The value can be overwritten by ID_SET_HW_ID and saved by ID_PROGRAM_ID any time.

Definition at line 123 of file qudis_protocol.h.

#define ID_QDS_INDEX_RESET   0x0770

Reset Position Index.

Requests resetting the index field of all position data streams to 0. Affects all axes, the index field must be 0.

Definition at line 265 of file qudis_protocol.h.

#define ID_QDS_POS_AVG   0x0771

Position Average Time.

Controls the average time that is applied to all relative and absolute positions. The parameter is logarithmic; the actual average time is calculated as follows: time = 40us * (2 ^ parameterValue). Range = 0 ... 16 Affects all axes, the index field must be 0.

Definition at line 247 of file qudis_protocol.h.

#define ID_QDS_RESET   0x060D

Reset Relative Position.

Sets the relative position of an axis to 0. The axis is selected by the index field of the telegram. Index = 3 resets the positions of all axes at the same time. The data field must be set to 1.

Definition at line 257 of file qudis_protocol.h.

#define ID_QDS_TCTL_STATE   0x0776

State of Wavelength Control On startup, the quDIS initializes its wavelength control by adjusting the laser temperature.

The parameter reflecs the state of that process.

Definition at line 139 of file qudis_protocol.h.

#define ID_QDS_TRG_AUTORESET   0x07ED

Timeout for Automatic Counter Reset.

The trigger counter is automatically set to 0 if the trigger signal stays low for the timeout time. The parameter transports the timeout time in ms. A value of 0 disables the automatic reset.

Definition at line 298 of file qudis_protocol.h.

#define ID_QDS_TRG_ENABLE   0x07EB

Enable Marker Feature.

The marker feature is enabled (data=1) or disabled (data=0). The index field must be 0.

Definition at line 283 of file qudis_protocol.h.

#define ID_QDS_TRG_RESET   0x07EC

Reset Trigger Counter.

The trigger counter is set to 0 (trigger signal low) or 1 (high) The index field must be 0, the data field should be 1.

Definition at line 290 of file qudis_protocol.h.

#define ID_SET_HW_ID   0x016A

Set volatile Device ID A SET on this address sets the hardware identification number.

Index must be 0. To save this value persistently in the device, use ID_PROGRAM_ID.

Definition at line 116 of file qudis_protocol.h.

#define QDS_HWTYPE_0_1   0x8300

quDIS hardware Types Hardware identifier numbers of the existing quDIS variants.

See ID_GET_HW_TYPE .Hardware version 0.1 (Serial numbers J 01 ...)

Definition at line 62 of file qudis_protocol.h.

#define QDS_NUM_AXES   3

Number of Axes.

Number of axes of the device. The axis number (used in the index field) has to be smaller than this number.

Definition at line 44 of file qudis_protocol.h.

#define QDS_NUM_CHANNELS   16

Number of Data Channels.

Number of data channels available for the transport of measurement results.

Definition at line 50 of file qudis_protocol.h.

#define QDS_TCP_PORT   2101

TCP Port Number The TCP port number the device is listening to.

(The IP address has to be configured individually)

Definition at line 56 of file qudis_protocol.h.

#define QDS_TRG_SWEEP   5

Data trigger: wavelength sweep (suitable e.g.

for interferograms

Definition at line 217 of file qudis_protocol.h.