![Dectris MYTHEN Скачать руководство пользователя страница 11](http://html1.mh-extra.com/html/dectris/mythen/mythen_interface-manual_2462219011.webp)
Socket Interface Specification. MYTHEN Detector System. Version: 3.0.0, Document Version: 2
11/34
5.
Operation
5.1. Connecting to the server
As a first step, the client has to open a socket connection to the server. The user can choose whether he wants to
use UDP or TCP as protocol. While TCP is more reliable, UDP is faster and allows for higher frame rates.
To open the connection, the user has to specify the IP of the DCS, which is by default 192.168.0.90. The port of
the socket server is 1030 for the UDP and 1031 for the TCP protocol.
The commands sent to the server are ASCII strings. The response is a byte array, which has to be interpreted as
string, integer array or float array, depending on the command. All commands return responses of well defined
lengths. Since the response might be fragmented on its way through the network, the client might have to read
several packages, until the expected response length is reached.
In case of an error, the server will respond with a negative number. The meaning of the error codes can be found
in section 7.2.
5.2. Initialization
First of all it should be checked, that the socket server has the expected version. This is done with help of the
command "-get version".
Afterwards the detector system should be initialized by invoking the "-reset" command, which takes up to two
seconds per module. This command loads settings for Cu X-rays and enables the flatfield correction and the
interpolation for bad channels (more details on the default values after initialization can be found in section 7).
For proper operation all delivered modules have to be connected to the DCS. Nonetheless it is possible to read
out only the first few modules. The number of active modules to be use
d can be specified using the “-nmodules”
command. The MYTHEN system can also be operated with more than the delivered modules if the corresponding
calibration files are available on the DCS. When increasing the number of active modules, all modules are set
back to default settings.