Professional Documents
Culture Documents
Programmer’s Manual
1. INTRODUCTION ................................................................................................ 5
1.2. SCOPE........................................................................................................... 5
2.2. IP CONFIGURATION............................................................................................ 7
Page 2 of 153
7.1. COMMAND AND IMAGE FORMAT ........................................................................... 153
Page 3 of 153
Warning
Detection Technology, Plc. assumes no liability for damages consequent to the use of the
product presented in this manual. The product presented is not designed with components
of a level of reliability suitable for the use in life support, medical or other critical
applications.
Disclaimer
All information presented in this manual is believed to be accurate and reliable. However,
Detection Technology, Plc. assumes no responsibility for the use of such information or for
any infringements of patents or other rights of third parties that may result from its use.
Due to continuous product development, the information in this document is subject to
change without notice.
Copyright
© 2015 Detection Technology, Plc. All rights reserved. No part of this publication may be
reproduced in any form or by any means, without a written permission from Detection
Technology, Plc.
Contact address
Change record
A2 2015-06-05 Zhang Xu Add 0x7B[EM] and 0x7C[TI] and 0x7D; Revise 0x22; Add
0x5A[TC] and 0x7E[MT]; Add 0x7F[TH] and 0x8A[SW];
Revise 0x6C; Add 0x8B[ZG]; Add 0x39[PP], 0x3A[PC],
0x3B[EP] and 0x3C[CP].
1.1 2015-12-29 Zhang Xu Add figure 2-1, 2-4, 2-7 and 2-8 and relative illustrations.
Page 4 of 153
1. INTRODUCTION
1.1. Overview
The X-LIB software library is designed to work with X-GCU products. It is built on the
application layer of Ethernet technology using a UDP IPv4 Ethernet protocol as the
transport layer protocol.
Supports rapid, safe and robust data transmission between an X-GCU product and
a computer.
1.2. Scope
The X-LIB programmer’s manual covers the following topics:
Getting started
Command list
1.3. Requirements
The X-LIB software supports Windows7, Windows8.1 and both 32-bits and 64-bits
Ubuntu12.04 systems. The following compilers are supported:
GCC 4.6.3
Page 5 of 153
Abbreviation Definition
DMID The index of DMs; the first DM of the first X-GCU channel is marked
as DM1, the following DMs are marked by the order.
HEX Hexadecimal.
Hi/Lo trigger The high energy and low energy external line trigger generated by
dual- energy LCS system.
X-DEF The front end control unit of the detector which reads the signal
from analog front-end, digitizes the signals and sends back the
image data to the X-GCU.
X-GCU Gigabit control unit board of the detector which reads the image
data from numbers of X-DFEs and sends the data to the system host
computer.
Page 6 of 153
2. PROTOCOL OF X-GCU
2.1. Overview
The X-GCU device adopts the Gigabit Ethernet technology to transmit command and image
data. It allows for easy interfacing between an X-GCU product and a computer using a
standard CAT-5e/6 cable.
All the X-GCU protocols use the UDP IPv4 Ethernet protocol as the transport layer
protocol. There are three main adopted protocol formats: broadcast, command and image
packets.
The X-GCU device adopts 3 UDP ports to build broadcasting channel, command channel
and image channel, which are used for configuring the Ethernet parameter, controlling the
device and sending the image data.
2.2. IP configuration
IP configuring negotiation covers the sequence of events for X-GCU device to get a valid IP
address using standard IP protocols and for a control application to enumerate devices on
the network. Once the negotiation is completed, an application is ready to send control
requests to an X-GCU device.
Page 7 of 153
GCU listens for broadcasting
command on port 7000
Begin
YES
Fail
Application receives
NO acknowledge within tim eout? GCU broadcasts acknowledge
YES
Fail
Succeed
Page 8 of 153
End code 0xFCFC
CMD The same with the command code of the application: 0x01
Page 9 of 153
SN:
32bytes;
X-GCU’s IP:
4bytes; Set X-GCU’s
IP, MAC and
0x00:
X-GCU’s port. X-GCU
Success;
0x01 0x00 0x2E MAC: needs to 0x00 0x00 None
6bytes; check the
Other: Fail
SN before
Cmd port: setting
2bytes;
Img port:
2bytes
SN:
32bytes;
X-GCU’s
IP:
4bytes;
Read X- 0x00:
X-GCU’s
0x01 GCU’s SN, 0x01 Success;
0x02 0x00 0x00 None 0x00 0x2E MAC:
IP, MAC and
6bytes;
port Other: Fail
Cmd
port:
2bytes;
Img port:
2bytes
0x00:
Recover the Success;
0x05 0x00 0x00 None 0x00 0x00 None
default value
Other: Fail
Command and acknowledge messages must each be contained in a single packet. The
Application must wait for the acknowledge message (when requested) before sending the
next command message. If the application doesn’t get ACK message within the timeout, it
should report the timeout error to user.
Page 10 of 153
Application sends the first
GCU receives the command
command
Application receives
NO
acknowledge within tim eout?
GCU sends acknowledge
YES
Report timeout
Application receives
NO acknowledge within tim eout? GCU sends acknowledge
YES
Fail
Application goes
on sending
The X-GCU command protocol uses the UDP with IPv4 as the transport protocol. The
command channel port number of the application is dynamically allocated or designated
and that of the X-GCU device is designated by the negotiation process. The default
command port number of X-GCU is 3000.
The command and ACK messages must be contained in a single UDP packet. All the
command and ACK messages are transported by the command port of the X-GCU and the
application.
Page 11 of 153
load/0x04
If no heartbeat packet comes within the timeout, the application should report the error to
user. Following figure is the heartbeat flowchart.
Page 12 of 153
Application waits for
heartbeat packet
YES
Application receives
heartbeat within timeout? GCU sends heartbeat packet
NO
Report timeout
In table 2-2, the calculations of X-GCU voltage, temperature and humidity are as follows:
v1 = voltage value*24/1.5(V)
v2 = voltage value*2(V)
v3 = voltage value*2(V)
v4 = voltage value(V)
v2: 3.3V±5%;
v3: 2.5V±5%;
v4: 1.1V±5%.
X-GCU ACK
Description
CMD ERRID DM ID SIZE DATA
Page 13 of 153
Humidity: 2 bytes
The image data transmission must be initiated by application. Application doesn’t give any
ACK to X-GCU, so the image channel works in single direction mode. Application should
start a timeout counter after starting scan. If no image data packet is received within the
timeout period, application should report the timeout error to user.
Application sends
stopping scan command?
YES
NO
YES
Image channel receives GCU sends image
packet within timeout? packet
NO
The X-GCU image protocol uses the UDP with IPv4 as the transport protocol. The basic
unit of an image is a pixel line composed by pixels, which is also the unit for transmission.
An additional leader packet should be sent before the line payload packets. The leader
packet provides specific information about the pixel line.
Page 14 of 153
Line payload packet.
Line payload
Pixel line
Image packet header
Packet id = 2
Line payload packet
Line payload
Line payload
Page 15 of 153
DM INFO Each DM’s info covers 8 bytes: CRC err flag: no err/0x00;
Temperature; Voltage err flag: no err/0x00; Humidity; HE gain and
LE gain
CRC CRC of CMD, LINE ID, PACKET ID, PAYLOADSIZE and payload data
sections
Header Payload
START CMD LINE ID PACKET ID PAYLOAD SIZE LINE STAMP LINE SIZE PIXEL SIZE ENERGY FLAG COMPRESSION FLAG DM PAC NUM
2 Bytes 1 Byte 2 Bytes 1 Byte 2 Bytes 4 Bytes 4 Bytes 1 Byte 1 Byte 1 Byte 1 Byte
Payload
DFE1_CRC_ERR_Flag 1 Bytes, DFE1_T emp_H 1 Byte, DFE1_T em_L 1 Byte, DFE1_VOT _ERR_Flag 1 Byte, DFE1_Humid_H 1 Byte, DFE1_Humid_L 1
Byte, DFE1_Gain_H 1 Byte, DFE1_Gain_L 1 Byte; CRC 4 Bytes END 2 Bytes
.........DFEn.....
CRC CRC of the CMD, LINE ID, PACKET ID, PAYLOADSIZE and payload data
sections
Header
START CMD LINE ID PACKET ID PAYLOAD SIZE PIXEL PAYLOAD CRC END
2 Bytes 1 Byte 2 Bytes 1 Byte 2 Bytes PAYLOAD SIZE Bytes 2 Bytes 2 Bytes
Page 16 of 153
3. CONFIGURATION
XLibDll.lib 32-bits and 64-bits .lib files (Win C++) x-lib sdk\lib\x86, \lib\x64
XLibDll.dll 32-bits and 64-bits .dll files (Win C++) x-lib sdk\lib\x86, \lib\x64
GCC 4.6.3
Page 17 of 153
3.3. Demos
Please refer to the \demo folder for the specific examples. For Visual Studio 2008 demo,
you should copy the “stdint.h” file from demo project to “C:\Program Files \Microsoft
Visual Studio 9.0\VC\include”.
Page 18 of 153
4. C++ CLASS REFERENCES
IXCmdSink The user defines derived class from this abstract class to handle
events of the XCommand object.
IXImgSink The user defines derived class from this abstract class to handle
events of the XAcquisition object.
XAcquisition This class is in charge of getting image data from the X-GCU.
XFrameTransfer Gets line data from the XAcquisition object and combines line
data into frame.
XOffCorrect Provides off-board gain and offset correcting functions for all
operational modes except non-continuous hi/lo trigger mode.
XOffHLCorrect Provides off-board gain and offset correcting functions only for
non-continuous hi/lo trigger mode.
Page 19 of 153
XSystem This class communicates with the X-GCU by broadcast, which
reads and sets the Ethernet configurations of the X-GCU.
Description:
Abstract class. The user defines derived class from it to handle the events of the
XCommand and XSystem objects.
#include “ixcmd_sink.h”
Functions:
Parameters:
Remark:
The error callback of the XCommand and XSystem objects. Please refer to
the section 4.3 for the specific error ID.
Parameters:
Remark:
The event callback of the XCommand and XSystem objects. Please refer to
the section 4.4 for the specific event ID. This callback responds to the event
IDs from 56 to 57.
IXImgSink class
Description:
Abstract class. The user defines derived class from this abstract class to handle
events of the XAcquisition and XFrameTransfer objects.
#include “iximg_sink.h”
Functions:
Parameters:
© Detection Technology, Plc. 2015
Page 20 of 153
err_id Error ID.
Remark:
Parameters:
Remark:
Parameters:
Remark:
When the frame is completed, the user can get the frame data in this
callback function. Please note, if this function takes too much time to return,
the frame buffer could overflow.
XAcquisition class
Description:
#include “xacquisition.h”
Constructors:
XAcquisition::XAcquisition()
Parameters:
Page 21 of 153
If it is 0, the grabbing thread will block waiting for data
without reporting any error.
Remark:
For the default constructor with on parameters, the user must set the
factory pointer by the function SetFactory(IXFactory* ) before opening.
Functions:
void XAcquisition::Close()
Remark:
Parameters:
Remark:
When enabled, there will be an info header added on the front of each line
data. The content of the header is line id (2 bytes), line stamp(4 bytes),
energy flag(1 byte) and DFE number flag(1 byte). It is disabled by default.
bool XAcquisition::GetIsGrabbing()
Return:
bool XAcquisition::GetIsOpen()
Return:
uint32_t XAcquisition::GetLastError()
Return:
Returns the error ID if any exception occurs. Please refer to the section 4.3
for the explanation of the specific error.
Parameters:
Return:
Page 22 of 153
Returns 1 if successful, 0 otherwise.
Remark:
Starts grabbing image data from the X-GCU. If it returns 0, the user can
utilize the GetLastError() to trace the error.
Parameters:
dev_ XDevice object pointer which provides the detector’s info. See
XDevice class.
Return:
Remark:
Allocates the resources needed. If it returns 0, the user can utilize the
GetLastError() to trace the error.
Parameters:
Remark:
The IXImgSink object handles the error and event callbacks. This function
should be called before opening.
Parameters:
Remark:
Parameters:
Remark:
Parameters:
Page 23 of 153
time Timeout value.
Remark:
If no image data comes during the timeout period while grabbing, it reports
an error and stop scanning. The timeout unit is ms with the default value
20000. The range is from 0 to 2000000. If it is 0, the grabbing thread will
block waiting for data without reporting any error. It should be set before
opening.
bool XAcquisition::Snap()
Return:
Remark:
Gets one frame from the X-GCU and is blocked until one frame is received.
If it returns 0, the user can utilize the GetLastError() to trace the error.
bool XAcquisition::Stop()
Return:
Remark:
Stops grabbing frame which should be used with the function Grab(0). If it
returns 0, the user can utilize the GetLastError() to trace the error.
XAnalyze class
Description:
#include “xanalyze.h”
Constructors:
XAnalyze::XAnalyze()
Remark:
Default constructor.
Functions:
Parameters:
Page 24 of 153
1: Calculates row noise;
Return:
Remark:
If you want to get noise, the averaging analysis must be done first. The user
can get the public parameter arrays directly after doing the analysis.
Public attributes:
uint32_t* _col_avg_
Remark:
The column average array which can be received after the averaging
analysis. The array size is the image width. The default is NULL.
uint32_t* _col_max_
Remark:
The column max array which can be received after the max analysis. The
array size is the image width. The default is NULL.
uint32_t* _col_min_
Remark:
The column min array which can be received after the min analysis. The
array size is the image width. The default is NULL.
float* _col_noise_
Remark:
The column noise array which can be received after noise analysis. The
array size is the image width. The default is NULL.
uint32_t* _row_avg_
Remark:
The row average array which can be received after the averaging analysis.
The array size is the image height. The default is NULL.
uint32_t* _row_max_
Remark:
The row max array which can be received after the max analysis. The array
size is the image height. The default is NULL.
Page 25 of 153
uint32_t* _row_min_
Remark:
The row min array which can be received after the min analysis. The array
size is the image height. The default is NULL.
float* _row_noise_
Remark:
The row noise array which can be received after the noise analysis. The
array size is the image height. The default is NULL.
XCommand class
Description:
The XCommand class manages the basic communication with the X-GCU. It adopts
question and answer mode the X-GCU gives the ACK for each command. The user
can send an ASCII or a HEX command directly to the X-GCU or use the wrapping
functions instead.
#include”xcommand.h”
Constructors:
XCommand::XCommand()
Parameters:
Remark:
For the default constructor with no parameters, the user must set the
factory pointer by the function SetFactory(IXFactory* ) before opening.
Functions:
void XCommand::Close()
Remark:
Parameters:
Page 26 of 153
Data Some of the executions need this argument. See the following
table.
Return:
Remark:
The user calls this function to force the X-GCU carry out the specific
execution. It sends the specific command to the X-GCU. The X-GCU does the
corresponding execution then returns the ACK. If an error occurs, the user
can call the GetLastError() to trace the error.
bool XCommand::GetIsOpen()
Return:
uint32_t XCommand::GetLastError()
Return:
Page 27 of 153
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
Parameters:
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
Default is 3000.
Default is 500.
0: Continuous mode;
1: Non-continuous mode
Default is 0.
Page 28 of 153
Para Data DM_ID Description
Default is 0x0606.
Valid range:
LCS2: 1~63;
X-Card 0.2/0.4/0.8: 1~2;
X-Card 1.5/1.6/2.5: 1~12;
X-Card2 0.2/0.4: 1~2;
X-Card2 0.8: 1~8.
The DM index cannot be 0xFF.
0: Low-energy gain;
1: High-energy gain;
0: Stopping;
1: Scanning.
0: Disable;
1: Enable.
Default is 0.
Page 29 of 153
Para Data DM_ID Description
disables channel offset
correction.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
Default is 0.
0: Original pixel;
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
Page 30 of 153
Para Data DM_ID Description
8: 256 lines.
Default is 0.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: Original;
n: Original – n.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines.
Page 31 of 153
Para Data DM_ID Description
0: Rising edge;
1: Falling edge;
Default is 0.
0: Disable;
1: Enable.
Default is 0.
Default is 0.
Default is 0.
0: Rising edge;
1: Falling edge.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
Page 32 of 153
Para Data DM_ID Description
0: Low level;
1: High level.
Default is 0.
16: 16 bits;
18: 18 bits.
Default is 16.
0: Disable;
Page 33 of 153
Para Data DM_ID Description
Default is 0.
5: 32;
6: 64;
7: 128;
8: 256;
9: 512.
0: LCS2 DM;
1: X-Card 0.2/0.4/0.8;
2: X-Card 1.5/1.6/2.5;
3: X-Card2 0.2/0.4/0.8;
4: Dual-row LCS2.
0: Disable;
Page 34 of 153
Para Data DM_ID Description
1: Enable.
Default is 1.
0: Disable;
1: Enable.
Default is 0.
0: Ethernet;
1: Camera Link.
Default is 0.
Parameters:
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
Page 35 of 153
Para Data DM_ID Description
Parameters:
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
Page 36 of 153
Para Returns DM_ID Description
v2: 3.3V±5%;
v3: 2.5V±5%;
v4: 1.1V±5%.
v3: 5.2V±5%;
v4: 1.2V±5%;
v5: 5V±5%;
v6: 3.3V±5%;
v7: 4.096V±5%.
Parameters:
dev_ XDevice object pointer which provides detector’s info. See the
XDevice class.
Return:
Page 37 of 153
Remark:
Allocates the resources needed. If it returns 0, the user can utilize the
GetLastError() to trace the error.
Parameters:
Remark:
The IXCmdSink object handles error events. This function should be called
before opening.
Parameters:
asc_send_
asc_recv_
Return:
Remark:
Parameters:
Page 38 of 153
dm_id DM index: none/0x00, all/0xFF or specific ID number. Some
of the commands need this argument. If it is 0xFF, the X-GCU
will apply the command to all DMs. Otherwise, the X-GCU only
operates the specified DM module. The DM ID 0x01
represents the first DM module in the first X-GCU channel.
Return:
Remark:
Accepts a hex format command. Please refer to the chapter 6 for the hex
command list.
Example:
uint8_t send_data[128];
uint8_t recv_data[128];
send_data[0] = 0x03;
send_data[1] = 0xE8;
Parameters:
Remark:
Parameters:
Page 39 of 153
Return:
Remark:
The user calls this function to set the specific parameter of the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
Default is 3000.
Default is 500.
0: Continuous mode;
1: Non-continuous mode
2: Constant integration
time mode;
3: Non-continuous with
Hi/Lo trigger.
Default is 0.
Page 40 of 153
Para Data DM_ID Description
0: Low-energy gain;
1: High-energy gain.
Default is 0. It is only
available while
XPARA_OPE_MODE is 3.
0: Stopping;
1: Scanning.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
XPARA_EN_BASELI Base line correcting state None Base line correcting state,
NE_CORRECT value 1-byte unsigned value.
Page 41 of 153
Para Data DM_ID Description
0: Disable;
1: Enable.
Default is 0.
Default is 0.
0: Original pixel;
1: Averaging every 2
pixels;
3: Averaging every 4
pixels;
Default is 0.
XPARA_AVERAGE_M Line averaging filter mode None Line averaging filter mode,
ODE value 1-byte unsigned value.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
XPARA_SUMMING_ Line summing filter mode None Line summing filter mode,
MODE value 1-byte unsigned value.
0: None;
Page 42 of 153
Para Data DM_ID Description
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: Original;
n: Original – n.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines.
Default is 0. It is only
available while
XPARA_OPE_MODE is 3.
XPARA_LINE_TRIG External line trigger mode None External line trigger mode,
GER_MODE value 1-byte unsigned value.
0: Rising edge;
1: Falling edge;
Page 43 of 153
Para Data DM_ID Description
Default is 0.
XPARA_EN_LINE_T External line trigger state None Enables external line trigger
RIGGER value function, 1-byte unsigned
value.
0: Disable;
1: Enable.
Default is 0.
XPARA_LINETRG_FI External line trigger fine None External line trigger fine
NE_DELAY delay value delay, 1-byte unsigned
value. The unit is 0.125us.
Default is 0.
XPARA_LINETRG_R External line trigger raw None External line trigger raw
AW_DELAY delay value delay, 1-byte unsigned
value. The unit is 64us.
Default is 0.
0: Rising edge;
1: Falling edge.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
XPARA_HILO_EDGE Hi/Lo trigger edge mode None Hi/Lo line trigger with hi/lo
edge level detection, 1-byte
© Detection Technology, Plc. 2015
Page 44 of 153
Para Data DM_ID Description
value unsigned value.
0: Low level;
1: High level.
Default is 0.
XPARA_GCU_TEST_ GCU’s test pattern mode None X-GCU’s test pattern mode,
MODE value 1-byte unsigned value.
0: Disable;
Default is 0.
Default is 0.
0: Disable;
Page 45 of 153
Para Data DM_ID Description
1: Enable.
Default is 1.
0: Disable;
1: Enable.
Default is 0.
Parameters:
Return:
Remark:
The user calls this function to set the specific parameter of the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
Page 46 of 153
void XCommand::SetTimeout(uint32_t time)
Parameters:
Remark:
If the ACK does not arrive during the timeout period after sending a
command, it will report an error. The timeout unit is ms, the default value is
20000, and the range is from 12000 to 2000000.
bool XCommand::StartHeartbeat()
Return:
Remark:
If it starts correctly, the X-GCU will keep sending the heartbeat packet by
period of 1s. If it cannot get the heartbeat 10 times in a row, it will report
the error XERROR_CMD_HEARTBEAT_FAIL. The user should check the NET
cable or X-GCU in that case.
bool XCommand::StopHeartbeat()
Return:
Remark:
Stops the X-GCU sending the heartbeat packet. If it forces the thread exiting
it will report the error XERROR_CMD_HEARTBEAT_STOP_ABNORMAL. In that
case, it cannot start again.
XDevice class
Description:
The XDevice class wraps the basic parameters of the detector. It is used as an
argument in the initializing process of the XCommand and XAcquisition objects.
Functions:
uint32_t XDevice::GetCardNumber()
Return:
uint32_t XDevice::GetCardType()
Return:
0: LCS2 DM;
Page 47 of 153
1: X-Card 0.2/0.4 and 0.8;
uint16_t XDevice::GetCmdPort()
Return:
uint32_t XDevice::GetDMPixelNumber()
Return:
0: 32;
1: 64;
2: 128;
3: 256;
4: 512.
uint16_t XDevice::GetImgPort()
Return:
Return:
uint8_t* XDevice::GetMAC()
Return:
uint32_t XDevice::GetOPMode()
Return:
0: Continuous mode;
1: Non-continuous mode;
Page 48 of 153
uint32_t XDevice::GetPixelDepth()
Return:
uint32_t XDevice::GetPixelNumber()
Return:
uint64_t XDevice::GetSerialNum()
Return:
XSystem* XDevice::GetSystem()
Return:
Returns the system object pointer which creates the XDevice object.
Parameters:
Remark:
Parameters:
Remark:
Parameters:
Remark:
Parameters:
ip IP address string.
Page 49 of 153
Remark:
XDisplay class
Description:
The XDisplay class is in charge of displaying raw image data, which is only available
in the Windows system.
#include “xdisplay.h”
Constructor:
XDisplay::XDisplay()
Remark:
Default constructor.
Functions:
void XDisplay::Close()
Remark:
Parameters:
Remark:
float XDisplay::GetGama()
Return:
bool XDisplay::GetIsDDrawEnable()
Return:
Remark:
Used to check whether the direct draw is enabled after opening. If the direct
draw is not enabled, it will use the GDI to display the image data.
uint32_t XDisplay::GetLastError()
Return:
Page 50 of 153
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
bool XDisplay::GetIsOpen()
Return:
Parameters:
Return:
Remark:
Allocates the needed resources. If it returns 0, the user can utilize the
GetLastError() to trace the error.
Parameters:
Remark:
XDualEngCorrect class
Description:
The dual energy line data of the interlaced dual-energy raw data sub-system comes
according to the sequence of the external line trigger. For most applications, the
Hi/Lo trigger comes alternatively, so the Hi/Lo line data comes in pairs. In that
Page 51 of 153
case, the XDualEngCorrect object combines two lines into one line where the Lo
data is on the left, the Hi data is on the right.
Before using this correction, the line info mode of the XAcquisition object must be
enabled.
#include “xdual_eng_correct.h”
Constructor:
XDualEngCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
If successful, the user should call the GetImage() to get the combined
image. If the allocation of the combined image fails, it returns 0.
XImage* XDualEngCorrect::GetImage()
Return:
XDualLineCorrect class
Description:
For the dual-line detector sub-system, two lines come together. The
XDualLineCorrect object can re-arrange the sequence and the position of the two
line data. In single energy mode, the two lines can be arranged into two cases
according to the direction flag, as in the following figure.
LA1
LB1
LA2
LB2
LA1 LB1
LA2 LB2
LB1
LA1
LB2
LA2
Page 52 of 153
In dual energy mode, if Hi/Lo line data comes in pairs, the two energy data of two
lines are arranged as in the following figure. .
LA HA
LB HB
LA LB
HA HB
LB HB
LA HA
Before using this correction, the line info mode of the XAcquisition object must be
enabled.
#include “xdual_line_correct.h”
Constructor:
XDualLineCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
If successful, the user should call the GetImage() to get the combined
image. If the allocation of the combined image fails, it returns 0.
XImage* XDualLineCorrect::GetImage()
Return:
Parameters:
Remark:
Page 53 of 153
void XDualLineCorrect::SetDualEnergy(bool eng)
Parameters:
Remark:
XFrameTransfer class
Description:
The XFrameTransfer class receives raw line data from the XAcquisition class and
combines lines into a frame. The user can get the frame data from its callback
function.
#include “xframe_transfer.h”
Constructor:
XFrameTransfer::XFrameTransfer(uint32_t line_num)
XFrameTransfer::XFrameTransfer()
Parameters:
Remark:
Functions:
bool XFrameTransfer::GetIsRunning()
Return:
uint32_t XFrameTransfer::GetLastError()
Return:
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
uint32_t XFrameTransfer::GetLineNum()
Return:
Parameters:
Page 54 of 153
Remark:
The IXImgSink object handles the error event and frame ready event. This
function should be called before opening the XAcquisition object.
Parameters:
Remark:
Changes the line number of the frame after the construction, which should
be called before opening the XAcquisition object.
XGigFactory
Description:
The XGigFactory class is responsible for allocating all resources. Then the user has
to define the factory object and pass it to the other objects needing it.
#include”xgig_factory.h”
Constructor:
XGigFactory::XGigFactory()
Remark:
Default constructor.
XImage class
Description:
The XImage class wraps the frame data and the information of the frame.
Functions:
Parameters:
Return:
Remark:
Parameters:
Page 55 of 153
col Horizontal coordinate.
Return:
Parameters:
Return:
Remark:
Saves the image data as a “.txt” file, supports only the “.txt” file.
Parameters:
Remark:
Public attributes:
uint32_t* _data_
Remark:
uint32_t _data_offset
Remark:
The position of the first pixel value is 0 by default. If using the line info
mode, the line information is attached on the front of each line. Please see
the XAcquisition:: EnableLineInfo(bool enable) function.
uint32_t _height
Remark:
uint32_t _pixel_depth
Remark:
Page 56 of 153
uint32_t _size
Remark:
uint32_t _width
Remark:
XMultiTransfer class
Description:
#include “xmulti_transfer.h”
Constructor:
XMultiTransfer::XMultiTransfer()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
Attaches the transfer objects into the list. The line number of each transfer
object must be 2^n (n < 15). This function should be called before opening.
void XMultiTransfer::Close()
Remark:
uint32_t XMultiTransfer::GetLastError()
Return:
Page 57 of 153
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
bool XMultiTransfer::Open()
Return:
Remark:
To use the XMultiTransfer class, the XAcquisition must enable line info
mode.
Parameters:
Remark:
The IXImgSink object handles the error event and frame ready event. This
function should be called before opening.
XOffCorrect class
Description:
#include “xoff_correct.h”
Constructor:
XOffCorrect::XOffCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Page 58 of 153
target 0: Uses min channel value as the target;
Return:
Remark:
Remark:
void XOffCorrect::Close()
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
Parameters:
Page 59 of 153
index Gain index, rang 0-3, default 0.
Return:
Remark:
Parameters:
Return:
Remark:
void XOffCorrect::Reset()
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
Saves the gain and offset parameters to the flash. It can save 4 groups of
gain by using different gain index.
XOffHLCorrect class
Description:
Page 60 of 153
The XOffCorrect class is in charge of the off-board correction functions only in non-
continuous hi/lo trigger mode.
#include “xoff_hilo_correct.h”
Constructor:
XOffHLCorrect::XOffHLCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
Remark:
void XOffHLCorrect::Close()
Remark:
Parameters:
Page 61 of 153
Return:
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
void XOffHLCorrect::Reset()
Remark:
Parameters:
Remark:
XPiecewiseCorrect class
Description:
The XPiecewiseCorrect object takes three air images corresponding to low, middle
and high X-ray to build a more accurate piecewise correcting function.
#include “xpiecewise_correct.h”
Constructor:
Page 62 of 153
XPiecewiseCorrect::XPiecewiseCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Page 63 of 153
Calculates the gain and offset parameters of middle X-ray.
Parameters:
Return:
Remark:
void XPiecewiseCorrect::Close()
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
Parameters:
Return:
Page 64 of 153
Remark:
Parameters:
Remark:
XPixelCorrect class
Description:
#include “xpixel_correct.h”
Constructor:
XPixelCorrect::XPixelCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
Parameters:
Remark:
void XPixelCorrect::Refresh()
Remark:
Page 65 of 153
XReferenceCorrect class
Description:
#include “xreference_correct.h”
Constructor:
XReferenceCorrect::XReferenceCorrect()
Remark:
Default constructor.
Functions:
Parameters:
Return:
Remark:
void XReferenceCorrect::Close()
Remark:
Parameters:
Return:
Remark:
Parameters:
Page 66 of 153
Ref_num Referenced pixel number.
Return:
Remark:
XSystem class
Description:
#include “xsystem.h”
Constructor:
XSystem::XSystem()
Parameters:
Remark:
The XSystem object must bind with the fixed IP address. If using the default
constructer, the SetLocalIP() function must be called before opening.
Functions:
void XSystem::Close()
Remark:
Parametares:
Return:
Remark:
Page 67 of 153
void XSystem::EnableLog(bool enable)
Parameters:
Remark:
int32_t XSystem::FindDevice()
Return:
Remark:
Enumerates the X-GCU devices which connect with the bound network
adapter.
Parameters:
Return:
Returns the XDevice object pointer. If the device index is out of range,
returns NULL.
size_t GetDeviceNum()
Return:
bool XSystem::GetIsOpen()
Return:
uint32_t XSystem::GetLastError()
Return:
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
bool XSystem::Open()
Return:
Remark:
Page 68 of 153
Allocates the needed resources. If it returns 0, the user can utilize the
GetLastError() to trace the error.
int32_t XSystem::RecoverDevice()
Return:
Remark:
Recovers IP, MAC and port configurations to the default value. IP:
192.168.1.2, Cmd Port: 3000, Img Port: 4001.
Parameters:
Remark:
The IXCmdSink object handles the error event. This function should be
called before opening.
Parameters:
Remark:
If using the default constructor, the local IP address must be set before
opening.
Parameters:
Remark:
The timeout unit is ms with the default value 2000. The range is from 0 to
2000000. It should be called before opening.
Page 69 of 153
Error ID Macro Description
send command.
Page 70 of 153
Error ID Macro Description
Page 71 of 153
Error ID Macro Description
Page 72 of 153
5. .NET CLASS REFERENCES
XAcquisitionW This class is in charge of getting image data from the X-GCU.
XFrameTransferW Gets line data from the XAcquisition object and combines line data
into frame.
XOffCorrectW Provides off-board gain and offset correcting functions for all
operational modes except non-continuous hi/lo trigger mode.
XOffHLCorrectW Provides off-board gain and offset correcting functions only for non-
continuous hi/lo trigger mode.
XPiecewiseCorrectW Provides off-board three points piecewise correction functions for all
operation modes except non-continuous hi/lo trigger mode.
XSystemW This class communicates with the X-GCU by broadcast which reads
and sets the Ethernet configurations of the X-GCU.
Page 73 of 153
5.2. Class references
XAcquisitionW class
Description:
Remark:
Remark:
If you are using the class XMuliTransfer to synchronize the multi-X-GCU, the
line info mode must be enabled.
Remark:
Remark:
Remark:
Gets the error ID if any exception occurs. Please refer to the section 5.3 for
the explanation of the specific error.
Parameters:
Return:
Page 74 of 153
Returns 1 if successful, 0 otherwise.
Remark:
Starts grabbing the image data from the X-GCU. If it returns 0, the user can
utilize the XAcquisition.LastError to trace the error.
Parameters:
Return:
Remark:
Allocates the needed resources. If it returns 0, the user can utilize the
XAcquisition.LastError to trace the error.
Remark:
Remark:
Remark:
If no image data comes during the timeout period while grabbing, it reports
an error and stop scanning. The timeout unit is ms with the default value
20000. The range is from 0 to 2000000. If it is 0, the grabbing thread will
block waiting for data without reporting any error. It should be set before
opening.
Remark:
Gets one frame from the X-GCU and will be blocked until the one frame is
received. If it returns 0, the user can utilize the XAcquisitionW.LastError to
trace the error.
Return:
Page 75 of 153
Returns 1 if successful, 0 otherwise.
Remark:
Stops grabbing the frame which should be used with the function Grab(0). If
it returns 0, the user can utilize the XAcquisitionW.LastError to trace the
error.
Delegations:
Parameters:
Remark:
The error callback of the XAcquisitionW object. Please refer to the section
5.3 for the specific error ID.
Parameters:
Remark:
The event callback of the XAcquisitionW object. Please refer to the section
5.4 for the specific event ID. This callback responds to the event IDs from
50 to 55.
XAnalyzeW class
Description:
Parameters:
Page 76 of 153
Return:
Remark:
If the user wants to get noise, the averaging analysis must be done first.
The user can get the public parameter arrays directly after doing the
analysis.
Remark:
The column average array which can be received after the averaging
analysis. The array size is the image width, the type is unsigned long*.
Remark:
The column max array which can be received after the max analysis. The
array size is the image width, the type is unsigned long*.
Remark:
The column min array which can be received after the min analysis. The
array size is the image width, the type is unsigned long*.
Remark:
The column noise array which can be received after the noise analysis. The
array size is the image width, the type is float*.
Remark:
The row average array which can be received after the averaging analysis.
The array size is the image height, the type is unsigned long*.
Remark:
The row max array which can be received after the max analysis. The array
size is the image height, the type is unsigned long*.
Remark:
The row min array which can be received after the min analysis. The array
size is the image height, the type is unsigned long*.
Page 77 of 153
IntPtr _row_noise_ Property (read only)
Remark:
The row noise array which can be received after the noise analysis. The
array size is the image height, the type is float*.
XCommandW class
Description:
The XCommandW class manages the basic communication with the X-GCU. It
adopts question and answer mode the X-GCU gives the ACK for each command.
The user can send an ASCII command directly to the X-GCU or utilize the wrapping
functions instead.
Remark:
Parameters:
Data Some of the executions need this argument. See the following
table.
Return:
© Detection Technology, Plc. 2015
Page 78 of 153
Returns 1 if successful, 0 no such execution, -1 error.
Remark:
The user calls this function to force the X-GCU to carry out the specific
execution. It sends the specific command to the X-GCU. The X-GCU does the
corresponding execution, then returns the ACK. If an error occurs, the user
can call the XCommandW.LastError to trace the error.
Remark:
Remark:
Gets the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
Parameters:
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the XCommandW.LastError to trace the
error.
Default is 3000.
Page 79 of 153
Para Data DM_ID Description
Default is 500.
1: Non-continuous mode
Default is 0.
0: Low-energy gain;
1: High-energy gain.
1: Scanning.
0: Disable;
Page 80 of 153
Para Data DM_ID Description
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
Default is 0.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
Page 81 of 153
Para Data DM_ID Description
8: 256 lines.
Default is 0.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: Original;
n: Original – n.
1: 2 lines;
2: 4 lines;
3: 8 lines.
0: Rising edge;
1: Falling edge;
Page 82 of 153
Para Data DM_ID Description
Default is 0.
0: Disable;
1: Enable.
Default is 0.
Default is 0.
Default is 0.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
0: Low level;
1: High level.
Default is 0.
Page 83 of 153
Para Data DM_ID Description
18: 18 bits.
Default is 16.
0: Disable;
Default is 0.
Page 84 of 153
Para Data DM_ID Description
5: 32;
6: 64;
7: 128;
8: 256;
9: 512.
1: X-Card 0.2/0.4/0.8;
2: X-Card 1.5/1.6/2.5;
3: X-Card2 0.2/0.4/0.8;
1: Enable.
Default is 1.
0: Disable;
1: Enable.
Default is 0.
1: Camera Link.
Default is 0.
Page 85 of 153
Para Data DM_ID Description
value 0: Single energy;
Parameters:
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the XCommandW.LastError to trace the
error.
Parameters:
Page 86 of 153
temperature Returned temperature value of X-GCU or DM.
Return:
Remark:
The user calls this function to get the specific parameter from the X-GCU. If
any error occurs, the user can call the GetLastError() to trace the error.
v2: 3.3V±5%;
v3: 2.5V±5%;
v4: 1.1V±5%.
v3: 5.2V±5%;
v4: 1.2V±5%;
v5: 5V±5%;
Page 87 of 153
v6: 3.3V±5%;
v7: 4.096V±5%.
Parameters:
Return:
Remark:
Allocates the resources needed. If it returns 0, the user can utilize the
XCommandW.LastError to trace the error.
Parameters:
Return:
Returns the ACK string. Format: “[FLAG, DATA]”. Example: “[4]”, error;
“[0]”, successful with no data; “[0, DATA]” successful with data.
Remark:
Remark:
Parameters:
Page 88 of 153
para Parameter type defined in the following table.
Return:
Remark:
The user calls this function to set the specific parameter of the X-GCU. If
any error occurs, the user can call the XCommandW.LastError to trace the
error.
Default is 3000.
Default is 500.
0: Continuous mode;
1: Non-continuous mode
Default is 0.
Page 89 of 153
Para Data DM_ID Description
above 0: Valid range:
specific LCS2: 1~63;
DM. X-Card 0.2/0.4/0.8: 1~2; X-
Card 1.5/1.6/2.5: 1~12;
X-Card2 0.2/0.4: 1~2;
X-Card2 0.8: 1~8.
0: Low-energy gain;
1: High-energy gain.
0: Stopping;
1: Scanning.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
13 Base line correcting state None Base line correcting state, 1-byte
value unsigned value.
Page 90 of 153
Para Data DM_ID Description
0: Disable;
1: Enable.
Default is 0.
Default is 0.
0: Original pixel;
Default is 0.
21 Line averaging filter mode None Line averaging filter mode, 1-byte
value unsigned value.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
22 Line summing filter mode None Line summing filter mode, 1-byte
value unsigned value.
0: None;
1: 2 lines;
2: 4 lines;
Page 91 of 153
Para Data DM_ID Description
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: Original;
n: Original – n.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines.
25 External line trigger mode None External line trigger mode, 1-byte
value unsigned value.
0: Rising edge;
1: Falling edge;
Default is 0.
0: Disable;
Page 92 of 153
Para Data DM_ID Description
1: Enable.
Default is 0.
27 External line trigger fine None External line trigger fine delay, 1-
delay value byte unsigned value. The unit is
0.125us.
Default is 0.
28 External line trigger raw None External line trigger raw delay, 1-
delay value byte unsigned value. The unit is
64us.
Default is 0.
0: Rising edge;
1: Falling edge.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
33 Hi/Lo trigger edge mode None Hi/Lo line trigger with hi/lo edge
value level detection, 1-byte unsigned
value.
0: Low level;
1: High level.
Default is 0.
Page 93 of 153
Para Data DM_ID Description
41 GCU’s test pattern mode None GCU’s test pattern mode, 1-byte
value unsigned value.
0: Disable;
Default is 0.
Default is 0.
0: Disable;
1: Enable.
Default is 1.
0: Disable;
1: Enable.
Default is 0.
Parameters:
Page 94 of 153
para Parameter type defined in the following table.
Return:
Remark:
The user calls this function to set the specific parameter of the X-GCU. If
any error occurs, the user can call the XCommandW.LastError to trace the
error.
Remark:
If the ACK does not arrive during the timeout period after sending a
command, it will report an error. The timeout unit is ms with the default
value 20000. The range is from 12000 to 2000000.
Return:
Remark:
If it starts correctly, the X-GCU will keep sending the heartbeat packet by a
period of 1s. If it cannot get the heartbeat after 10 times in a row it will
report the error XERROR_CMD_HEARTBEAT_FAIL. The user should check the
NET cable or the X-GCU in that case.
Page 95 of 153
Return:
Remark:
Stops the X-GCU sending the heartbeat packet. If it forces the thread exit , it
will report the error XERROR_CMD_HEARTBEAT_STOP_ABNORMAL. In that
case, it cannot start again.
Delegations:
Parameters:
Remark:
The error callback of the XCommandW object. Please refer to the section 5.3
for the specific error ID.
Parameters:
Remark:
The event callback of the XCommandW object. Please refer to the section
5.4 for the specific event ID. This callback responds to the event IDs from
56 to 57.
XDeviceW class
Description:
The XDeviceW class wraps the basic parameters of the detector. It is used as an
argument in the initializing process of the XCommandW and XAcquisitionW objects.
Remark:
Remark:
Page 96 of 153
0: LCS2 DM;
1: X-Card 0.2/0.4/0.8;
2: X-Card 1.5/1.6/2.5;
3: X-Card2 0.2/0.4/0.8;
Remark:
Remark:
0: 32;
1: 64;
2: 128;
3: 256.
Remark:
Remark:
Remark:
Sets or gets the 6-byte MAC address array of the X-GCU. The type is char*.
Remark:
0: Continuous mode;
1: Non-continuous mode;
Page 97 of 153
unsigned long XDeviceW.PixelDepth Property(read only)
Remark:
Remark:
Remark:
XDisplayW class
Description:
Remark:
Parameters:
Remark:
Remark:
Remark:
Remark:
Page 98 of 153
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
Remark:
Parameters:
Return:
Remark:
Allocates the needed resources. If it returns 0, the user can utilize the
XDispalyW.LastError to trace the error.
XDualEngCorrectW class
Description:
The dual energy line data of the interlaced dual-energy raw data sub-system comes
according to the sequence of the external line trigger. For most applications, the
Hi/Lo trigger comes alternatively, so the Hi/Lo line data comes in pairs. In that
case, the XDualEngCorrectW object combines two lines into one line where Lo data
is on the left, Hi data is on the right.
Before using this correction, the line info mode of the XAcquisitionW object must be
enabled.
Parameters:
Page 99 of 153
Return:
Remark:
Return:
XDualLineCorrectW class
Description:
For the dual-line detector sub-system, two lines come together. The
XDualLineCorrectW object can rearrange the sequence and the position of the two
line data. In the single energy mode, the two lines can be arranged into two cases
according to the direction flag as in the following figure.
LA1
LB1
LA2
LB2
LA1 LB1
LA2 LB2
LB1
LA1
LB2
LA2
In the dual energy mode, if the Hi/Lo line data comes in pairs, the two energy data
of the two lines is arranged as follows.
LA HA
LB HB
LA LB
HA HB
LB HB
LA HA
Before using this correction, the line info mode of the XAcquisitionW object must be
enabled.
Parameters:
Return:
Remark:
If successful, the user should call the GetImage() to get the combined
image. If the allocation of combined image fails, it returns 0.
Return:
Parameters:
Remark:
Parameters:
Remark:
XFrameTransferW class
Description:
The XFrameTransferW class receives the raw line data from the XAcquisitionW class
and combines lines into the frame. The user can get the frame data from its
callback function.
Remark:
Remark:
Returns the error ID if any exception occurs. Please refer to the error list for
the explanation of the specific error.
Remark:
Sets or gets the line number of a frame. It should be set before opening the
XAcquisitionW object.
Delegations:
Parameters:
Remark:
Parameters:
Remark:
Parameters:
Remark:
When the frame is completed, the user can get the frame data in this
callback function. Please note, if this function takes too much time to return,
the frame buffer could overflow.
XGigFactoryW
Description:
The XGigFactoryW class is responsible for allocating all resources. The user has to
define the factory object and pass it to the other objects needing it.
XImageW class
Description:
Parameters:
Return:
Parameters:
Return:
Remark:
Parameters:
Remark:
Remark:
Remark:
The position of the first pixel value default is 0. If using the line info mode,
the line information is attached on the front of each line. Please see the
XAcquisitionW. EnableLineInfo.
Remark:
Remark:
Remark:
Remark:
XMultiTransferW class
Description:
Parameters:
Return:
Remark:
Attaches transfer objects into the list. The line number of each transfer
object must be 2^n (n < 15). This function should be called before opening.
Remark:
Returns the error ID if any exception occurs Please refer to the error list for
the explanation of the specific error.
Return:
Remark:
Delegations:
Parameters:
Remark:
The error callback of the XMultiTransferW object. Please refer to the section
5.3 for the specific error ID.
Parameters:
Remark:
The event callback of the XMultiTransferW object. Please refer to the section
5.4 for the specific event ID. This callback responds to the event IDs from
50 to 55.
Parameters:
Remark:
When the frame is completed, the user can get the frame data in this
callback function. Please note, if this function takes too much time to return,
the frame buffer could overflow.
Description:
Parameters:
Return:
Remark:
Remark:
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
Saves the gain and offset parameters to the flash. It can save 4 groups of
gain by using different gain index.
XOffHLCorrectW class
Description:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
Remark:
Parameters:
Remark:
XPiecewiseCorrectW class
Description:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
Parameters:
Return:
Remark:
Parameters:
Remark:
XPixelCorrectW class
Description:
Parameters:
Return:
Remark:
Parameters:
Remark:
Remark:
XReferenceCorrectW class
Description:
Return:
Remark:
Remark:
Parameters:
Return:
Remark:
Parameters:
Return:
Remark:
XSystemW class
Description:
Parametares:
Return:
Remark:
Parameters:
Remark:
Enables or disables the log function; the default state is enabled. If the state
is disabled, it should be called before opening.
Return:
Remark:
Enumerates the X-GCU devices which connect with the bound network
adapter.
Parameters:
Return:
Returns the XDeviceW object pointer. If the device index is out of range,
returns NULL.
Remark:
Return:
Return:
Remark:
Allocates the needed resources. If it returns 0, the user can utilize the
XSystemW.LastError to trace the error.
Remark:
Return:
Remark:
Recovers the IP, MAC and port configurations to the default value. IP:
192.168.1.2, Cmd Port: 3000, Img Port: 4001.
Remark:
If the ACK does not arrive during the timeout period after sending a
command, it will report an error. The timeout unit is ms with the default
value 2000. The range is 0 to 2000000.
Delegations:
Parameters:
Remark:
The error callback of the XSystemW object. Please refer to the section 5.3
for the specific error ID.
Initializes X-GCU
0x00:
device from the
Success;
0x04 0x00 0x00 None user flash 0x00 0x00 None
0x10 Other: Fail
0x10
0x00:
Saves the
Success;
0x03 0x00 0x00 None settings to the 0x00 0x00 None
user flash
Other: Fail
0x00:
Sets integration
Integration Success;
0x20 0x01 0x00 0x04 time, the unit is 0x20 0x00 0x00 None
time value
us
Other: Fail
0x00:
Reads Success; Integration
0x02 0x00 0x00 None 0x00 0x04
integration time time value
Other: Fail
0x00:
Continuous
mode;
0x01:
Non-
continuous
mode;
0x00:
0x02: Sets operation Success;
0x01 0x00 0x01 0x00 0x00 None
Constant mode
integration Other: Fail
time
mode;
0x03:
Non-
continuous
with Hi/Lo
0x22 0x22
trigger
0x00:
Continuous
mode;
0x01: Non-
continuous
mode;
0x00:
Reads operation Success;
0x02 0x00 0x00 None 0x00 0x01 0x02:
mode
Constant
Other: Fail
integration
time mode;
0x03: Non-
continuous
with Hi/Lo
trigger
0xFF:
0xFF:
All
All
DMs; 0x00:
High gain DMs;
Sets DM gain Success;
0x23 0x01 0x02 1byte, low 0x23 0x00 None
Other value
gain 1byte Other:
: Other: Fail
Specific
Specif
DM
ic DM
0xFF:
All
DMs; 0x00:
High gain
Reads DM gain Success; Specific
0x02 0x00 None 0xXX 1byte, low
Other value DM
gain 1byte
s: Other: Fail
Specif
ic DM
0x00: Low
gain; Sets high or low
0x00:
energy
Success;
0x01 0x00 0x01 0x01: High operation mode 0x00 0x00 None
gain; in single energy
Other: Fail
mode
0x24 0x24
0x00: Low
Reads high or gain;
0x00:
low energy
Success;
0x02 0x00 0x00 None operation mode 0x00 0x01 0x01: High
in single energy gain;
Other: Fail
mode
First
channel’s
DM
number:
1byte;
Second
channel’s
DM
number:
1byte;
Third
0x00:
channel’s
Sets DM number Success;
0x01 0x00 0x05 DM 0x00 0x00 None
of each channel
number:
Other: Fail
1byte;
Forth
channel’s
0x25 DM 0x25
number:
1byte;
Fifth
channel’s
DM
number:
1byte
First
channel’s
DM number:
0x00: 1byte;
Reads DM
Success;
0x02 0x00 0x00 None number of each 0x00 0x05 Second
channel channel’s
Other: Fail
DM number:
1byte;
Third
Forth
channel’s
DM number:
1byte;
Fifth
channel’s
DM number:
1byte
0x00: Stop
scanning; 0x00:
Starts/stops Success;
0x01 0x00 0x01 0x00 0x00 None
0x01: scanning
Start Other: Fail
scanning
0x27 0x27
0x00: Stop
0x00:
scanning;
Reads scanning Success;
0x02 0x00 0x00 None 0x00 0x01
status
0x01: Start
Other: Fail
scanning
0x00:
Disable
gain
0x00:
correction;
Enables gain Success;
0x01 0x00 0x01 0x00 0x00 None
correction
0x01:
Other: Fail
Enable
gain
0x30 correction 0x30
0x00:
Disable gain
0x00:
correction;
Reads gain Success;
0x02 0x00 0x00 None 0x00 0x01
correction mode
0x01:
Other: Fail
Enable gain
correction
0x00:
Disable
offset
0x00:
correction;
Enables offset Success;
0x01 0x00 0x01 0x00 0x00 None
correction
0x01:
Other: Fail
Enable
offset
correction
0x31 0x31
0x00:
Disable
offset
0x00:
correction;
Reads offset Success;
0x02 0x00 0x00 None 0x00 0x01
correction mode
0x01:
Other: Fail
Enable
offset
correction
0x00:
Disable
base line
0x00:
correction;
Enables base Success;
0x01 0x00 0x01 0x00 0x00 None
line correction
0x01:
Other: Fail
Enable
base line
correction
0x32 0x32
0x00:
Disable base
line
0x00:
correction;
Reads base line Success;
0x02 0x00 0x00 None 0x00 0x01
correction mode
0x01:
Other: Fail
Enable base
line
correction
Flash
index: 1
byte, 0-3;
Payload
index: 1
0x00:
byte;
Saves gain to Success;
0x03 0x00 0xXX 0x00 0x00 None
the flash
Payload:
Other: Fail
1024
0x33 0x33
bytes,
each gain
account for
4 bytes,
float type
Payload
index: 1
byte;
0x00:
Payload: Saves offset to Success;
0x03 0x00 0xXX 0x00 0x00 None
1024 the flash
bytes, Other: Fail
0x34 each offset 0x34
account for
4 bytes
0x00:
Loads offset Success;
0x04 0x00 0x00 None 0x00 0x00 None
from the flash
Other: Fail
0x00:
Base line Sets base line Success;
0x01 0x00 0x02 0x00 0x00 None
value value
Other: Fail
0x35 0x35
0x00:
Reads base line Success; Base line
0x02 0x00 0x00 None 0x00 0x02
value value
Other: Fail
0x00:
Resets gain to Success;
0x37 0x00 0x00 0x00 None 0x37 0x00 0x00 None
1.0
Other: Fail
0x00:
Resets offset to Success;
0x38 0x00 0x00 0x00 None 0x38 0x00 0x00 None
0
Other: Fail
Payload
index: 1
byte;
0x00:
Saves PDC
Payload: Success;
0x03 0x00 0xXX position data to 0x00 0x00 None
1024
the flash
bytes, Other: Fail
0x39 each data 0x39
account for
4 bytes
0x00:
Loads PDC
Success;
0x04 0x00 0x00 None position data 0x00 0x00 None
from flash
Other: Fail
Payload
index: 1
byte;
0x00:
Payload: Saves PDC
Success;
0x03 0x00 0xXX 1024 coefficient data 0x00 0x00 None
bytes, to the flash
Other: Fail
each data
0x3A 0x3A
account for
4 bytes,
float type
0x00:
Loads PDC
Success;
0x04 0x00 0x00 None coefficient data 0x00 0x00 None
from the flash
Other: Fail
0x00:
Disable
PDC
0x00:
correction;
Enables PDC Success;
0x01 0x00 0x01 0x00 0x00 None
correction
0x01:
Other: Fail
Enable
PDC
0x3B correction 0x3B
0x00:
Disable PDC
0x00:
correction;
Reads PDC Success;
0x02 0x00 0x00 None 0x00 0x01
correction mode
0x01:
Other: Fail
Enable PDC
correction
Pixel 0x00:
Sets PDC
position: Success;
0x3C 0x01 0x00 0x01 correction pixel 0x3C 0x00 0x00 None
0x00 –
position
0xFF Other: Fail
0x00:
Reads PDC Pixel
Success;
0x02 0x00 0x00 None correction pixel 0x00 0x01 position:
position 0x00 – 0xFF
Other: Fail
0x00:
Original
pixel;
0x01:
Averaging
every 2
pixels;
0x02:
0x00:
Summing
Success;
0x01 0x00 0x01 every 2 Pixelbinning 0x00 0x00 None
pixels;
Other: Fail
0x03:
Averaging
every 4
pixels;
0x04:
Summing
every 4
pixels
0x40 0x40
0x00:
Original
pixel;
0x01:
Averaging
every 2
pixels;
0x02:
0x00:
Summing
Reads pixel Success;
0x02 0x00 0x00 None 0x00 0x01 every 2
binning status
pixels;
Other: Fail
0x03:
Averaging
every 4
pixels;
0x04:
Summing
every 4
pixels
0x00:
Filter value Line averaging,
Success;
0x01 0x00 0x01 n: 0x00- the filter size is 0x00 0x00 None
0x08 2^n
Other: Fail
0x41 0x41
0x00:
Reads line Filter value
Success;
0x02 0x00 0x00 None averaging file 0x00 0x01 n: 0x00-
size 0x08
Other: Fail
0x00:
Filter vale Line summing,
Success;
0x01 0x00 0x01 n: 0x00- the filter size is 0x00 0x00 None
0x08 2^n
Other: Fail
0x42 0x42
0x00:
Reads line
Success; Filter vale n:
0x02 0x00 0x00 None summing the 0x00 0x01
0x00-0x08
filter size
Other: Fail
0x00:origi
nal
0x01:origi
nal -1
0x02:origi
nal -2
0x03:origi
nal -3
0x04:origi 0x00:
nal -4 Sets output Success;
0x01 0x00 0x01 0x00 0x00 None
0x05:origi scale
nal -5 Other: Fail
0x06:origi
nal -6
0x07:origi
nal -7
0x08:origi
nal -8
…
0x43 0x43
0x00:origina
l
0x01:origina
l -1
0x02:origina
l -2
0x03:origina
l -3
0x00: 0x04:origina
Reads output Success; l -4
0x02 0x00 0x00 None 0x00 0x01
scale 0x05:origina
Other: Fail l -5
0x06:origina
l -6
0x07:origina
l -7
0x08:origina
l -8
0x00: 1
line;
0x01: 2 0x00:
lines; Sets offset Success;
0x01 0x00 0x01 0x00 0x00 None
0x02: 4 averaging filter
lines; Other: Fail
0x03: 8
0x44 lines 0x44
0x00: 1
0x00: line;
Reads offset
Success; 0x01: 2
0x02 0x00 0x00 None averaging filter 0x00 0x01
status lines;
Other: Fail 0x02: 4
lines;
0x00:
Rising
edge
mode;
0x01: 0x00:
Sets external
Falling Success;
0x01 0x00 0x01 line trigger 0x00 0x00 None
edge
mode
mode; Other: Fail
0x02:
Trigger
0x50 stamp 0x50
mode
0x00: Rising
edge mode;
0x00: 0x01:
Reads external
Success; Falling edge
0x02 0x00 0x00 None line trigger 0x00 0x01
mode;
mode
Other: Fail
0x02:
Trigger
stamp mode
0x00:
Disable
external
line
trigger;
0x00:
0x01: Enables external Success;
0x01 0x00 0x01 0x00 0x00 None
Enable line trigger
normal Other: Fail
external
line
trigger;
0x51 0x51
0x00:
Disable
external line
trigger;
0x00:
Reads external
Success;
0x02 0x00 0x00 None line trigger 0x00 0x01 0x01:
status Enable
Other: Fail
external line
trigger;
0x00:
Unit is Sets line trigger Success;
0x52 0x01 0x00 0x01 0x52 0x00 0x00 None
0.12us fine delay
Other: Fail
0x00:
Reads line
Success; Unit is
0x02 0x00 0x00 None trigger fine 0x00 0x01
0.12us
delay
Other: Fail
0x00:
Unit is Sets line trigger Success;
0x01 0x00 0x01 0x00 0x00 None
64us raw delay
Other: Fail
0x53 0x53
0x00:
Reads line
Success;
0x02 0x00 0x00 None trigger raw 0x00 0x01 Unit is 64us
delay
Other: Fail
0x00:
Rising
edge 0x00:
Sets external
mode; Success;
0x01 0x00 0x01 frame trigger 0x00 0x00 None
mode
0x01: Other: Fail
Falling
0x54 edge mode 0x54
0x00: Rising
0x00: edge mode;
Reads external
Success;
0x02 0x00 0x00 None frame trigger 0x00 0x01
0x01:
mode
Other: Fail Falling edge
mode
0x0000:
Disable
external
frame
trigger;
0x00:
Enables external Success;
0x01 0x00 0x02 n: Enable 0x00 0x00 None
frame trigger
external
Other: Fail
frame
trigger, the
frame
height is
n*32
0x55 0x55
0x00:
Disable
external
frame
0x00: trigger;
Reads external
Success;
0x02 0x00 0x00 None frame trigger 0x00 0x02
n: Enable
status
Other: Fail external
frame
trigger, the
frame height
is n*32
0x00:
Sets frame
Unit is 32 Success;
0x56 0x01 0x00 0x01 trigger raw 0x56 0x00 0x00 None
lines
delay
Other: Fail
0x00:
Reads frame
Success; Unit is 32
0x02 0x00 0x00 None trigger raw 0x00 0x01
lines
delay
Other: Fail
Sends a 0x00:
simulated Success;
0x57 0x00 0x00 0x00 None 0x57 0x00 0x00 None
external frame
trigger Other: Fail
0x00: lo
Sets Hi/Lo line 0x00:
edge;
trigger with hi/lo Success;
0x01 0x00 0x01 0x00 0x00 None
edge level
0x01: hi
detection Other: Fail
edge
0x58 0x58
0x00: lo
Reads Hi/Lo line 0x00:
edge;
trigger with hi/lo Success;
0x02 0x00 0x00 None 0x00 0x01
edge level
0x01: hi
detection Other: Fail
edge
0x00:
Sampling Sets Hi/Lo line
Success;
0x01 0x00 0x02 position, trigger sampling 0x00 0x00 None
unit is 1us position
Other: Fail
0x59 0x59
0x00:
Reads Hi/Lo line Sampling
Success;
0x02 0x00 0x00 None trigger sampling 0x00 0x02 position,
position unit is 1us
Other: Fail
0x00:
Disable
parity
check;
0x02: Use
“even”
parity
0x5A check 0x5A
0x00:
Disable
parity
check;
0x00:
Reads trigger
Success; 0x01: Use
0x02 0x00 0x00 None stamp parity 0x00 0x01
“odd” parity
check mode
Other: Fail check;
0x02: Use
“even”
parity check
0x00: Stop
0x00:
Starts/stops
Other: Success;
0x60 0x01 0x00 0x01 heartbeat 0x60 0x00 0x00 None
Period of packets
heartbeat Other: Fail
packets,
0x00: Stop
0x00:
Other:
Reads heart Success;
0x02 0x00 0x00 None 0x00 0x01 Period of
status
heartbeat
Other: Fail
packets,
unit is 1s
0x00:
Ethernet;
0x00:
0x01: Success;
0x01 0x00 0x01 Sets X-GCU type 0x00 0x00 None
Camlink;
Other: Fail
Other :
Reserved
0x61 0x61
0x00:
Ethernet;
0x00:
Reads X-GCU Success; 0x01:
0x02 0x00 0x00 None 0x00 0x01
type Camlink;
Other: Fail
Other :
Reserved
0x00:
X-GCU’s
Success;
0x01 0x00 0x20 S/N Sets X-GCU S/N 0x00 0x00 None
32bytes
Other: Fail
0x62 0x62
0x00:
Reads X-GCU Success; X-GCU’s S/N
0x02 0x00 0x00 None 0x00 0x20
S/N 32bytes
Other: Fail
0x00:
Specif DM’s S/N Success; Specific
0x01 0x20 Sets DM S/N 0x00 None
ic DM 32bytes DM
Other: Fail
0x63 0x63
0x00:
Specif Success; Specific DM’s S/N
0x02 0x00 None Reads DM S/N 0x20:
ic DM DM 32bytes
Other: Fail
0x00:
Reads pixel Success; Pixel
0x64 0x02 0x00 0x00 None 0x64 0x00 0x02
number number
Other: Fail
0x00:
Real pixel Success;
0x01 0x00 0x01 Sets pixel size 0x00 0x00 None
size * 10
Other: Fail
0x65 0x65
0x00:
Success; Real pixel
0x02 0x00 0x00 None Reads pixel size 0x00 0x01
size * 10
Other: Fail
0x10:
16bits;
0x12:
0x00:
18bits;
Success;
0x01 0x00 0x01 Sets pixel depth. 0x00 0x00 None
0x14:
Other: Fail
20bits;
0x18:
24bits
0x66 0x66
0x10:
16bits;
0x00: 0x12:
Reads pixel Success; 18bits;
0x02 0x00 0x00 None 0x00 0x01
depth.
Other: Fail 0x14:
20bits;
0x18: 24bits
Min
integration
time:
0x00:
4bytes;
Sets min/max Success;
0x01 0x00 0x08 0x00 0x00 None
integration time
Max
Other: Fail
integration
time:
4bytes
0x67 0x67
Min
integration
0x00: time:
Reads min/max Success; 4bytes;
0x02 0x00 0x00 None 0x00 0x08
integration time
Other: Fail Max
integration
time: 4bytes
0x00:
X-GCU
Reads X-GCU Success;
0x68 0x02 0x00 0x00 None 0x68 0x00 0x02 firmware
firmware version
version
Other: Fail
0x00:
DM
Specif Reads DM Success; Specific
0x69 0x02 0x00 None 0x69 0x02 firmware
ic DM firmware version DM
version
Other: Fail
0x00:
Disable;
0x01:
0x00:
Normal
Sets test pattern Success;
0x6A 0x01 0x00 0x01 test 0x6A 0x00 0x00 None
status
pattern;
Other: Fail
0x02:
Slope test
pattern
0x00:
Disable;
0x00:
0x01:
Reads test Success;
0x02 0x00 0x00 None 0x00 0x01 Normal test
pattern status
pattern;
Other: Fail
0x02: Slope
test pattern
0x00:
Normal
image data
mode;
0xFF:
0x01: 0xFF:
All
Enable DM All
DMs; 0x00:
board fixed DMs;
Sets DM’s test Success;
0x01 0x01 value 0x00 None
Other mode
(AAAAA[He Other:
: Other: Fail
x]) test Specific
Specif
mode.; DM
ic DM
0x02:
Enable I’m
here
function
0x6B 0x6B
0x00:
Normal
image data
mode;
0xFF:
0x01:
All
Enable DM
DMs; 0x00:
board fixed
Reads DM’s test Success; Specific
0x02 0x00 None 0xXX value
Other mode DM
(AAAAA[Hex
: Other: Fail
]) test
Specif
mode.;
ic DM
0x02:
Enable I’m
here
function;
0x05: 32;
0x06: 64;
0x00:
Sets pixel Success;
0x01 0x00 0x01 0x07: 128; 0x00 0x00 None
number per DM
Other: Fail
0x08: 256;
0x09: 512
0x6C 0x6C
0x05: 32;
0x06: 64;
0x00:
Reads pixel Success;
0x02 0x00 0x00 None 0x00 0x01 0x07: 128;
number per DM
Other: Fail
0x08: 256;
0x09: 512
0x00:
Card Sets card Success;
0x01 0x00 0x01 0x00 0x00 None
number number per DFE
Other: Fail
0x6D 0x6D
0x00:
Reads card Success; Card
0x02 0x00` 0x00 None 0x00 0x01
number per DFE number
Other: Fail
0x00:
LCS2 DM;
0x01: X-
Card
0.2/0.4/0.
8;
0x02: X-
0x00:
Card
Success;
0x01 0x00 0x01 1.5/1.6/2. Sets card type 0x00 0x00 None
5;
Other: Fail
0x03: X-
Card2
0.2/0.4/0.
8;
0x04:
Dual-row
0x6E 0x6E
LCS2 DM
0x00: LCS2
DM;
0x01: X-
Card
0.2/0.4/0.8;
0x00: 0x02: X-
Success; Card
0x02 0x00 0x00 None Reads card type 0x00 0x01
1.5/1.6/2.5;
Other: Fail
0x03: X-
Card2
0.2/0.4/0.8;
0x04: Dual-
row LCS2
DM
Reads X-GCU’s
temperature and
voltage.
X-GCU’s
Voltage value = voltage:
(voltage high 2bytes * 4
0x00:
byte*255 + Success;
0x72 0x02 0x00 0x00 None voltage low 0x72 0x00 0x0C Temperature
byte)*2.048/20 : 2bytes;
Other: Fail
47 (V)
Humidity:
v1 = voltage 2bytes
value*24/1.5(V)
v2 = voltage
v3 = voltage
value*2(V)
v4 = voltage
value(V)
Temperature
value =
(temperature
high byte*255 +
temperature low
byte)*0.125(°C)
Humidity value
= (humidity
high byte*255 +
humidity low
byte)*125/6553
6 – 6(%)
Reads DM’s
voltage,
temperature and
humidity.
Voltage value =
(voltage high
byte*255 +
voltage low
byte)*2.048/20
47 (V)
v1 = voltage
value*2(V)
v2 = voltage
value*24/1.5(V)
v3 = voltage DM’s
value*5.2/1.66( voltage:
V) 2bytes*7;
0x00:
Specif Success;
0x73 0x02 0x00 None v4 = voltage 0x73 0x00 0x0E Temperature
ic DM
value(V) :2bytes;
Other: Fail
v5 = voltage Humidity:
value*5.0/1.6(V 2bytes
)
v6 = voltage
value*2(V)
v7 = voltage
value*4.096/1.3
(V)
Temperature
value =
(temperature
high byte*255 +
temperature low
byte)*0.125(°C)
Humidity value
= (humidity
0x00:
0x00:
Disable;
Enables LED Success;
0x01 0x00 0x01 0x00 0x00 None
light
0x01:
Other: Fail
Enable
0x75 0x75
0x00:
0x00:
Disable;
Reads LED light Success;
0x02 0x00` 0x00 None 0x00 0x01
state
0x01:
Other: Fail
Enable
0x00:
0x00:
Disable;
Enables terminal Success;
0x01 0x00 0x01 0x00 0x00 None
resistor
0x01:
Other: Fail
Enable
0x76 0x76
0x00:
0x00:
Disable;
Reads terminal Success;
0x02 0x00` 0x00 None 0x00 0x01
resistor state
0x01:
Other: Fail
Enable
Chann
0x00:
el ID:
Success; Channe
0x77 0x00 0x01 0x01 Test data LVDS loopback 0x77 0x01 Test data
l ID
~0x0
Other: Fail
5
0x00: Hidden X-
Reads hidden X-
Success; GCU
0x78 0x02 0x00 0x00 None GCU firmware 0x78 0x00 0x01
firmware
version
Other: Fail version
0x00:
Reads hidden Hidden DM
Specif Success; Specific
0x79 0x02 0x00 None DM firmware 0x79 0x01 firmware
ic DM DM
version version
Other: Fail
0x00: Low
from first,
high from
first;
0x01: Low
from last,
high from
0x00:
first;
Sets pixel order Success;
0x7A 0x01 0x00 0x01 0x7A 0x00 0x00 None
mode of card
0x02: Low
Other: Fail
from first,
high from
last;
0x03: Low
from last,
high from
last
0x00: Low
from first,
high from
first;
0x01: Low
from last,
high from
0x00:
Reads pixel first;
Success;
0x02 0x00 0x00 None order mode of 0x00 0x01
card 0x02: Low
Other: Fail
from first,
high from
last;
0x03: Low
from last,
high from
last
0x00: SE;
0x00:
0x01: DE
Sets energy Success;
0x01 0x00 0x01 stacked; 0x00 0x00 None
mode
Other: Fail
0x02: DE
parallel
0x7B 0x7B
0x00: SE;
0x00:
0x01: DE
Reads energy Success;
0x02 0x00 0x00 None 0x00 0x01 stacked;
mode
Other: Fail
0x02: DE
parallel
0x00:
0x01~0x0 Sets gain table Success;
0x01 0x00 0x01 0x00 0x00 None
5 ID
Other: Fail
0x7C 0x7C
0x00:
Read gain table Success;
0x02 0x00 0x00 None 0x00 0x01 0x01~0x05
ID
Other: Fail
Product 0x00:
info ASCII Sets Product Success;
0x01 0x00 0x80 0x00 0x00 None
code, Info
128bytes Other: Fail
0x7D 0x7D
0x00:
Product info
Reads Product Success;
0x02 0x00 0x00 None 0x00 0x80 ASCII code,
Info
128bytes
Other: Fail
0x00:1500
0x00:
bytes
Success;
0x01 0x00 0x01 Sets MTU size 0x00 0x00 None
0x01:8192
Other: Fail
0x7E bytes 0x7E
0x00:1500b
0x00: ytes
0x02 0x00 0x00 None Reads MTU size 0x00 0x01
Success;
0x01:8192b
0x00:
Sets threshold
0x0000~0 Success;
0x01 0x00 0x02 in constant 0x00 0x00 None
xFFFF
mode
Other: Fail
0x7F 0x7F
0x00:
Reads threshold
Success; 0x0000~0xF
0x02 0x00 0x00 None in constant 0x00 0x02
FFF
mode
Other: Fail
0x00: Not
Sets swap mode 0x00:
swap;
of low energy Success;
0x01 0x00 0x01 0x00 0x00 None
and high energy
0x01:
part Other: Fail
Swap
0x8A 0x8A
Reads swap 0x00: 0x00: Not
mode of low Success; swap;
0x02 0x00 0x00 None 0x00 0x01
energy and high
energy part Other: Fail 0x01: Swap
0x00:
Sets Z gap
Success;
0x01 0x00 0x01 0x00~0xFF value, step is 0x00 0x00 None
0.1mm
Other: Fail
0x8B 0x8B
0x00:
Reads Z gap Success;
0x02 0x00 0x00 None 0x00 0x01 0x00~0xFF
value
Other: Fail
No such
0xXX 0xXX 0xXX 0xXX 0xXX 0x00 0x00 0x00 0x00 0x00
command
0~3: integration
time; 4~5: non- 0x00:
continuous Success;
Operation
0xF1 0x01 0x00 0xXX integration time; 0xF1 0x00 0x00 None
frame
6: operation Others:
mode; 7: X- Fail
DFE gain mode;
DM1: LE Gain:
1byte; DM1: HE
Gain: 1byte;
DM2: LE Gain:
1byte; DM2: HE
Gain:1 byte;
DMn: LE Gain:
1byte; DMn: HE
Gain: 1byte
Fixed size is
516, unused
bytes filled by
0xFF
0~3: integration
time; 4~5: non-
continuous
integration time;
6: operation
mode; 7: X-
DFE gain mode;
8~12: X-DFE
number of each
segment;
13: RESERVE;
14:
enable/disable
gain correction;
15:
enable/disable
offset
correction;
16: Diagnostic 0x00:
0x00 enable/disable frame to Success; 0x00
0xF2 0x01 0xXX base value enable 0xF2 0x00 None
correction; diagnostic Others:
17~18: base mode Fail
line value; 19:
enable/disable
pixel binning;
20:
enable/disable
average line
filter; 21:
enable/disable
sum line filter;
22: set output
scale bit; 23:
set offset
averaging filter;
24: set line
trigger mode;
25:
enable/disable
external line
trigger; 26:
DM1 Diag.Mode:
1byte; DM2
Diag.Mode:
1byte;
DMn
Diag.Mode:1byte
Fixed size is
516, unused
bytes filled by
0xFF
Payload index:
4byte;
0xFF:all
0xFF:all
DMs;
DMs; Conf Data 0x00:
Others: payload: 512 Configuration Success;
Others:
0xF3 0x01 specific 0xXX bytes at most frame to 0xF3 0x00 None
specific
DM program Others:
DM;
Fixed size is Fail
0x00:GCU 516, unused
0x00:GCU
bytes filled by
0xFF
For the ASCII command format, all commands obey the following rules: The first character
of the command body is ‘[’, the last character is ‘]’; The first section is the key word
written in capital letters; The second section is the operation mode, which is ‘W’/write,
‘R’/read, ‘E’/execute, ’S’/save or ‘L’/load; The third section is the DM index, which is
‘0’/None, ‘FF’/all DMs or the specific number of the HEX format; The last section is data,
which is in the HEX format. All sections are separated by the character ‘,’.
The return command is also in the ASCII format. Normally, “[0]” or ”[0, data]” is the
successful return. Otherwise, some errors may occur.
For example, the command “[ST,W,0,3E8]” is to set the integration time to be 1000us, the
successful return should be “[0]”; the command “[ST,R,0]” is to get the integration time,
the successful return should be “[0,3E8]”
0x10 0x04 0x00 0x00 [IN,L,0] [1]: EPCS error; Loads settings from the
none user flash.
[2]: LVDS receive
0x11 0x03 0x00 0x00 [IN1,S,0] error; Savesdefault settings to the
none main and backup flash (not
[3]: Calibration for the customer).
error;
0x11 0x04 0x00 0x00 [IN1,L,0] Loads default setting from
none [4]: Command the main flash.
error;
0x20 0x01 0x00 0x04 [ST,W,0,data] Sets integration time. The
data [5]: SN not match;
integration time is a 4-byte
[6]: Execution unsigned value.The unit is
timeout; us. The range is defined by
max and min integration
[7]: Command
times.
receive error;
Default is 0xBB8.
[8]: Parameter out
0x20 0x02 0x00 0x00 [ST,R,0] of range; Reads integration time.
none
[9]: Reply timeout;
0x21 0x01 0x00 0x02 [NT,W,0,data] Sets non-integration time.
Default is 0x1F4.
0: Continuous mode;
1: Non-continuous mode
2: Constant integration
mode;
3: Non-continuous with
Hi/Lo trigger.
Default is 0.
Default is 0606.
Valid range:
LCS2: 1~3F;
X-Card 0.2/0.4/0.8: 1~2;
X-Card 1.5/1.6/2.5: 1~C;
X-Card2 0.2/0.4: 1~2;
X-Card2 0.8: 0~7.
0: Low-energy gain;
1: High-energy gain.
0: Stopping;
1: Scanning.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
Range is 0~3.
0x35 0x01 0x00 0x02 [BS,W,0,data] Sest base line value. Base
data line value, 2-byte unsigned
value. Default is 0.
0: Disable;
1: Enable.
0: Original pixel;
1: Averaging every 2
pixels;
3: Averaging every 4
pixels;
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines;
4: 16 lines;
5: 32 lines;
6: 64 lines;
7: 128 lines;
8: 256 lines.
Default is 0.
0: Original;
n: Original – n.
Default is 0. E.g.,the
original bit is 16, the scale
value is 8, the output pixel
bits will be 8.
0: None;
1: 2 lines;
2: 4 lines;
3: 8 lines.
Default is 0.
0: Disable;
1: Enable.
Default is 0.
0x52 0x01 0x00 0x01 [TD,W,0,data] Sets line trigger fine delay.
data External line trigger fine
delay, 1-byte unsigned
value. The unit is 0.125us.
Default is 0.
0x53 0x01 0x00 0x01 [RD,W,0,data] Sets line trigger raw delay.
data External line trigger raw
delay, 1-byte unsigned
value. The unit is 64us.
0x53 0x02 0x00 0x00 [RD,R,0] Reads line trigger raw delay
none
0: Rising edge;
1: Falling edge.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
0x58 0x01 0x00 0x01 [LE,W,0,data] Sets Hi/Lo line trigger with
data rising/falling edge
detection. Hi/Lo line trigger
with rising/falling edge
detection, 1-byte unsigned
value.
0: Rising edge;
1: Falling edge.
Default is 0.
0: Gigabit Ethernet;
1: Camera Link.
Default is 0.
0: Disable;
Default is 0.
Default is 0.
0: Disable;
1: Enable.
Default is 1.
0: Disable;
1: Enable.
Default is 0.
0x7E 0x01 0x00 0x01 [MT,W,0,data] Sets MTU size. The size of
data max UDP packet. If to use
the big size, please set the
Ethernet adapter jumbo
© Detection Technology, Plc. 2015
0:1500 bytes;
1:8192 bytes.
Default is 0.
The Camera Link Image channel adopts the communication mechanism as the Figure 2-8
shows. The format of the line data should be as follows:
ENERGY FLAG High or low energy flag: low/0x00, high/0x01 (For LCS2)
Header
START LINE ID LINE STAMP ENERGY FLAG DM PAC NUM PIXEL PAYLOAD OF ONE LINE
The X-LIB C++ demo code gives a competed Camera Link wrapper; the user can utilize it
directly or modify it for special use.
For more details of how to operate the Camera Link frame grabber, please refer to the
Sapera LT User’s Manual and the X64 Xcelera-CL PX4 User’s Manual.