常問問題

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 你們光譜儀有LIBS應用的快門裝置麼?

A

AHR 快門光譜儀系列支持LIBS 快門。 最小觸發到積分開始時間為31.25ns. 變化間隔15.625ns. 積分時間可調範圍3us-67s.

具體請看:
https://www.gratingworks.com/zh/products/spectrometers/ahr-libs-spectrometers/

Q 光柵最佳安裝方法

A

光柵面是最佳安裝面。 因為基板和光柵都是光柵面定位。

用戶有用邊定位, 背面定位, 但需要矯正裝置把光柵微調固定在一個機械裝置上。 如果沒有矯正裝置, 每次安裝誤差不好控制。

Q 貴公司能在我提供的要求下幫我設計光柵麼?

A

我們提供設計服務。

我們有跑樣服務, 提供設計服務和幾片樣品。 費用需要看具體設計。