[0]16bits,PACKET_START, (0xE1)
[1]16bits,TYPE(TRIG_CMD 0x51),
[2]16bits,SIZE(received size in bytes), 3684*2 for TCD1304DG
[3]16bits,Type of detector. TCD1304=0, Hama S1115X 1
[4-5]32bit Number of data sets were ready to be sent, due to the transmission speed, some might got dropped. Used in continuous read.
[6-7]32bit, Data sets sent through the USB. Used in continuous read.
[8-9]32bit, start time, Used in continuous read. divide by 3 to us
[10-11]32bit, integration time, if integration < 3720, subtract 0x80000000, else divide by 3
if(current_data->real_integ_time & 0x80000000)
temp.Format(_T(“S%dus”), current_data->real_integ_time& 0x7FFFFFFF);
else
{
double dtemp;
unsigned int integ;
dtemp=(double)current_data->real_integ_time;
dtemp=dtemp/3.0+0.5;
integ=(unsigned int)dtemp;
temp.Format(_T(“N%dus”), integ);
}
[12-13]32bit ID, passed in XSPEC_measure. if EXTERNAL Trig, default is #define EXT_TRIG_ID 0xE1234567, overwritten by ID in XSPEC_measure
[14-15]32bit TEMPERATURE, call double XSPEC_get_temperature(unsigned int bits);
[START_DARK-1]16bits, Average Dark current, avg_dark
[START_DARK-2]16bits, Number of spectrums where the Average Dark Current was taken. avg_dark_counter
START_DARK is different from different detector. For TCD1304 it is 19. Check the setting
#define START_DARK 19
#define TOTAL_DARK 13
#define DATA_START 37
#define DATA_END 3684