logo资料库

Bayspec解调模块.pdf

第1页 / 共18页
第2页 / 共18页
第3页 / 共18页
第4页 / 共18页
第5页 / 共18页
第6页 / 共18页
第7页 / 共18页
第8页 / 共18页
资料共18页,剩余部分请下载后查看
Sense 20/20 User’s Guide of Sense 2020 SDK Version 2.0.7.4 Document No. 94-101228 BaySpec, Inc. 1101 McKay Drive, San Jose, CA 95131 Tel. (408) 512-5928  Fax: (408) 512-5929 Web: www.bayspec.com July 2013 © Copyright to BaySpec, Inc. 2013 Preliminary document subject to alterations without notice BaySpec, Inc. www.bayspec.com Document No. 94-101228 July 2013
Table of Contents: 1. Overview ............................................................................................................. 4 2. System Requirements ........................................................................................ 4 2.1 Hardware ........................................................................................................ 4 2.2 Software .......................................................................................................... 4 3. DLL Functions ................................................................................................... 4 3.1 Get DLL Version ............................................................................................ 4 3.2 Initialize Device ............................................................................................. 5 3.3 Close Device ................................................................................................... 5 3.4 Get Device Status ........................................................................................... 5 3.5 Get Device Serial Number ............................................................................. 5 3.6 Get Device Hardware and Firmware Revision .............................................. 6 3.7 Get Device Pixel Count .................................................................................. 6 3.8 Set Sensor Mode ............................................................................................. 6 3.9 Get Sensor Mode ............................................................................................ 7 3.10 Set Device Integration Time ........................................................................ 7 3.11 Get Device Integration Time ........................................................................ 7 3.12 Set Integration times of Multiple Channel for Auto-Scan .......................... 8 3.13 Set Optical Switch State ............................................................................... 8 3.14 Get Optical Switch Status ............................................................................ 9 3.15 Set GPIO State ............................................................................................ 10 3.16 Get GPIO State ........................................................................................... 10 3.17 Calibrate Device with IRS .......................................................................... 10 3.18 Get Device Temperature ............................................................................ 11 3.19 Get Snapshot Spectrum .............................................................................. 11 3.20 Load Calibration Data ................................................................................ 11 3.21 Get Wavelength Mapping .......................................................................... 12 BaySpec, Inc. www.bayspec.com Document No. 94-101228 2 July 2013
3.22 Search Peaks in Spectrum .......................................................................... 12 3.23 Start Constantly Grabbing spectra.............................................................. 14 3.24 Stop Constantly Grabbing spectra .............................................................. 15 3.25 Get the Last Spectra Index ......................................................................... 15 3.26 Get One Spectrum of a Line Number ........................................................ 16 3.27 Get All Peaks Information of One Spectrum at a Line Number ................ 16 3.28 Optical Switch Control and GPIO Pins Layout ......................................... 17 3.29 Trigger In and Out Pins Layout.................................................................. 18 BaySpec, Inc. www.bayspec.com Document No. 94-101228 3 July 2013
1. Overview BaySpec Sense 20/20 Software Development Kit (SDK) supplies the interface for the software developer to access the BaySpec SuperGamutTM and NunavutTM series spectral engines. The Dynamic Link Library (DLL) in the SDK can be used under different programming environments: C, C++, Visual Basic and LabVIEW. The library is compatible with Windows 2000, XP and Vista. The SDK provides a set of functions that allow user to configure and control the spectral engines, acquire spectra and post-process the spectrum data. The sample codes of Visual C++ 6.0 and LabVIEW 8.2 are included in this SDK. 2. System Requirements 2.1 Hardware The minimum requirements for the computer are listed below: OS: Microsoft Windows 2000/XP/Vista/7 CPU: 1 GHz, recommend Intel Core 2 Duo processor or equivalent RAM: 1GB, recommend 2GB or higher USB Port: USB 2.0 2.2 Software USB driver: Set up communication between BaySpec spectral engine and application program running on the host computer. _Usb20irDevOpDLL.dll: Low level DLL to access BaySpec spectral engine(Revision 2.1.9.2) Sense2020Dll.h: Header file (for C and C++). Sense2020Dll.lib: Library file (for C and C++). Sense2020Dll.dll: Wrapped DLL file with data processing functions (Revision 2.0.7.4) 3. DLL Functions 3.1 Get DLL Version BOOL DLL_Get_DLL_Versions(DWORD* pdwDLLVersion); Description: Get DLL version Parameters: DWORD* pdwDLLVersion: Pointer of DLL revision Return value: Boolean BaySpec, Inc. www.bayspec.com Document No. 94-101228 4 July 2013
TRUE: Open device OK FALSE: Open device failed 3.2 Initialize Device BOOL DLL_Open_Device(); Description: Create an instance and initialize the device Parameters: None Return value: Boolean Note: TRUE: Open device OK FALSE: Open device failed This function allocates internal memories for data acquisition. DLL_Close_Device must be called to release these memories 3.3 Close Device void DLL_Close_Device(); Description: Delete the instance and release allocated memories Parameter: None Return value: None Note: The memories allocated for data acquisition are deleted in this function 3.4 Get Device Status BOOL DLL_Is_Device_OK(); Description: Check device’s current status Parameter: None Return value: Boolean TRUE: Device operated correctly FALSE: Device not initialized or connected 3.5 Get Device Serial Number BOOL DLL_Get_Device_SN(LPSTR lpszSN); Description: Get device’s serial number Parameter: LPSTR lpszSN: Pointer of character array allocated by the user. BaySpec, Inc. www.bayspec.com Document No. 94-101228 5 July 2013
(Buffer size >= 8 bytes.) Return value: Boolean TRUE: Operation completed FALSE: Operation failed 3.6 Get Device Hardware and Firmware Revision BOOL DLL_Get_HW_FW_REV(DWORD* pdwHW, DWORD* pdwFW); Description: Get device’s hardware and firmware revision Parameter: DWORD* pdwHW: Pointer of hardware revision DWORD* pdwFW: Pointer of firmware revision Return value: Boolean TRUE: Operation completed FALSE: Operation failed 3.7 Get Device Pixel Count int DLL_Get_Pixel_Count(); Description: Get device’s pixel count Parameter: None Return value: Signed integer  -1: Pixel Count -1: Operation failed 3.8 Set Sensor Mode BOOL DLL_Set_Sensor_Mode (WORD wSensorMode); Description: Set device’s sensor mode Parameter: WORD wSensorMode: Device sensor mode. Return value: Boolean 0 – High sensitive mode 1 – High dynamic range mode TRUE: Operation completed BaySpec, Inc. www.bayspec.com Document No. 94-101228 6 July 2013
FALSE: Operation failed 3.9 Get Sensor Mode int DLL_Get_Sensor_Mode_Status (); Description: Get device’s sensor mode Parameter: None Return value: Signed integer 0 – High sensitive mode 1 – High dynamic range mode -1 – Operation failed 3.10 Set Device Integration Time BOOL DLL_Set_Integration_Time_Line_Rate(DWORD dwIntegrationTime, Description: Set device’s integration time and line rate Parameter: DWORD dwIntegrationTime: Integration time in s. WORD wLineRate); (Range: 20 to 60000000 s) WORD wLineRate: Spectrum sampling rate in Hz (Range: 1 to 5000 Hz, Condition: 106 / wLineRate >= dwIntegrationTime) Return value: Boolean TRUE: Operation completed FALSE: Operation failed 3.11 Get Device Integration Time BOOL DLL_Get_Integration_Time_Line_Rate (DWORD* pdwIntegrationTime, Description: Get device’s integration time Parameter: DWORD* pdwIntegrationTime: Pointer of integration time in s WORD* wLineRate: Pointer of spectrum sampling rate in Hz WORD* pwLineRate); Return value: Boolean BaySpec, Inc. www.bayspec.com Document No. 94-101228 7 July 2013
TRUE: Operation completed FALSE: Operation failed 3.12 Set Integration times of Multiple Channel for Auto-Scan BOOL DLL_Set_AutoScan_Integration_Time(DWORD* pdwIntegrationTime); Description: Set integration times for channel 1 to channel 7 in auto scan mode Parameter: DWORD* pwIntegrationTime: Pointer of integration times in s for channel 1 to channel 7. (Range: 20 to 60000000 s) Return value: Boolean TRUE: Operation completed FALSE: Operation failed Note: Integration time of channel 0 and sampling rate for all channels are set by function DLL_Get_Integration_Time_Line_Rate in auto scan mode. All integration time (s) > 106  Sampling Rate (Hz). All auto-scan integration times will be lost after device being disconnected. 3.13 Set Optical Switch State BOOL DLL_Set_Optical_Switch (WORD wChannelCount, BOOL bAutoChannelScan, WORD wChannelIndex); Description: Set 14 or 18 optical switch state Parameter: WORD wChannelCount: 2 - 1x2 optical switch 4 - 1x4 optical switch 8 - 1x8 optical switch 16 - 1x16 optical switch BOOL bAutoChannelScan: TRUE - Auto scan channel 1 to 2 / 4 / 8 / 16 repeatedly during continue data acquisition FALSE - Disable auto channel scan WORD wChannelIndex: n - Channel n Range of n from 1 to 2 for 1x2 optical switch Range of n from 1 to 4 for 1x4 optical switch BaySpec, Inc. www.bayspec.com Document No. 94-101228 8 July 2013
分享到:
收藏