BaySpec, Inc. www.bayspec.com Document No. 94-101228 July 2013
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 2 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 3 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 4 July 2013
1. Overview
BaySpec Sense 20/20 Software Development Kit (SDK) supplies the interface for the software
developer to access the BaySpec SuperGamut
TM
and Nunavut
TM
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 5 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
TRUE: Open device OK
FALSE: Open device failed
Note: 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.