Skip to content

Comunication description

UDP data structure

The first two bytes of data are the identifier. The two constant characters are "GT" 0x4754. The following bytes, labeled Byte 0, 1, and so on, in the following table represent custom commands and data and are described below.

byte 0 byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7
request (m -> sl) 1 – Reading a32 bit register group # param#
response (sl -> m) 1 (OK) group # param# OK data data data data
response (sl -> m) 1 (Err) group # param# err
request (m -> sl) 2 – write a32-bit register group # param# data data data data
response (sl -> m) 2 (OK) group # param# OK
response (sl -> m) 2 (Err) group # param# err
request (m -> sl) 3 – Read acontiguous area of ​​32 bit registers group # param# number
response (sl -> m) 3 (OK) group # param# OK number data data ...
response (sl -> m) 3 (Err) group # param# err # OK data /? data /? ...
request (m -> sl) 4 – writing acontiguous area of ​​32 bit registers group # param# number data data data ...
response (sl -> m) 4 (OK) group # param# OK number
response (sl -> m) 4 (Err) group # param# err # OK
request (m -> sl) 11 – Read acontiguous oscilloscope area a.offs_L a.offs_H number
response (sl -> m) 11 (OK) a.offs_L a.offs_H OK number data data ...
response (sl -> m) 11 (Err) a.offs_L a.offs_H err # OK data /? data /? ...
Name Meaning
group # Parameter group number
param # Parameter number in the group
OK Write / Read OK ("= 0")
Err Error code ("≠ 0" 1 = wrong command, 2 = invalid address, 3 = RO / out of range, 4 = data firmware error)
Number Parameter number (Int32) in a contiguous area
# OK The number of the successfully written parameter
a.offs Offset in the area of 32-bit registers (one 32-bit register)

A description of each register with information about group # and param # can be found HERE.

Request (master -> slave) The minimum length of UDP data is 2 + 3 bytes for reading and 2 + 4 bytes for writing. The packet can contain several requests. The maximum total packet length is 1470 bytes + 2 (+2 indicates part of the identifier).

Response (slave -> master) The command, the number of parameters, and the parameter number in the group are the same as in the case of the request. To work with a contiguous area of registers, it is necessary to use the number of parameters. The length of the response to a read request is extended by the 4-byte value of the parameter. The response to a write request is extended by the result write: = 0 - write OK, ≠ 0 - write error code. The responses are also grouped into one packet. The master must design the application so that it is possible to send responses with one packet with a total length of max. 2 + 1 470 bytes (2+ indicates the identifier section).

Example of Communication

Request

identifier identifier write group element data data data data
0x47 0x54 0x02 0x03 0x90 0x90 0x12 0x34 0x11
read group element
0x01 0x02 0x45

Response

identifier identifier write number group status
0x47 0x54 0x02 0x03 0x90 0x00
read group element status data data data data
0x01 0x02 0x45 0x00 0x72 0x12 0x34 0x56

UDP data structure for reading a text message

byte 0 byte 1 byte 2 byte 3 byte 4 byte 5 byte 6 byte 7 byte 8
request (m -> sl) 41 - reading messages a.off number
response (sl -> m) 41 (OK) a.off number OK data data data data ...
response (sl -> m) 41 (Err) a.off number err data data data data ...
parameter meaning
a.off offset of the first message (line) 0..255
number number of consecutive messages (lines) in telegram 1..4 (message length is 256 bytes)