Frequently Asked Questions

Q Change setting parameter, eg. firmware average count

A

Logic:

  1. define storage space for setting
  2. read setting from flash or memory
  3. change setting
  4. write back setting back to flash or memory.

There is a RAM space reserved for frequently used parameters to avoid frequent flash writes. Try to update flash content very infrequently.

 

// 4 data structure stored in the flash. return one of them, use index (0,1,2,3) to indicate which one.
// pre-allocate the space for p_data, it is 128bytes. cast to the structure defined in myusb.h
// -1==failure, 0==success
extern “C” INTERFACE_API int XSPEC_get_SpecConfig0123(USB_SPEC *ptr,char *p_data, int index);

// 4 data structure stored in the flash. return one of them, use index (0,1,2,3) to indicate which one.
// create the data for p_data, it is 128bytes. use get_SpecConfig() to get the entire structure. Modify the one you need
// to change and put the data structure back using this function.
// return number of bytes sent, -1==failure,
extern “C” INTERFACE_API int XSPEC_write_SpecConfig(USB_SPEC *ptr,char *p_data, int index);
//only update the setting0 in memory, not update the flash
extern “C” INTERFACE_API int XSPEC_update_config_mem(USB_SPEC *ptr,char *p_data);
// download program page by page into the flash. index start from 0, page_size is the flash page size, it may differ depending on which ucontroller is used. 128 or 256
// return number of bytes sent, -1==failure,

SYSTEM_SETTING_TYPE setting0;
XSPEC_get_SpecConfig0123(USB_SPEC *ptr, (char *) &setting0, 0);

setting0->average=10; // firmware average

XSPEC_update_config_mem(USB_SPEC *ptr, (char *) &setting0); //update memory only

or

XSPEC_write_SpecConfig(USB_SPEC *ptr,  (char *) &setting0, 0); //permanent flash change, update memory as well

 

 

Q Version 2011, TCD1304, data format

A

[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

Q Does your spectrometer support LIBS and please describe the timing

A

      We do support fast triggering for LIBS operation. The minimum time interval between external trigger and start of integration time is 31.25ns. It can be increased in 15.625ns step. Integration time can be adjusted from 3us to 67s.

Please refer to the datasheet in
https://www.gratingworks.com/products/spectrometers/ahr-libs-spectrometers/

Q What is the best way to mount the Grating.

A

      Face mount is the best way. Since the face is the most critical surface as well as the reference surface during blanking manufacturing and grating exposure. Customer can specify more than one surface as the critical surface but it will have impact on the cost.

      People do use side mount and back mount, they design an external alignment system to properly secure and align the grating onto a mechanical fixture to reduce the freedom of movement. Without the external alignment system, the adjustment variation can be hard to control and that leads to resolution and intensity variation.

Q Can you help me design the grating based on my requirement?

A

      Yes, we provide design service for  customers. We have a sample program that include the design and prototype set of gratings. Cost is design specific.