Home

AS-5216x64 DLL Manual

image

Contents

1. s 17 2 3 2 ANS Done duc tacui mies cM DA MR RU Mur M DR AER 17 2 3 3 AN S Get NrOLPDDevIGes ees EES EES EEN 17 2 3 4 MEET EE EEN 18 2 3 5 DONNE 18 2 3 6 PS ALME TS Te RATER EDO En 18 2 3 7 AVS Registers ap EE 19 2 3 8 AVS Prepare m E AERA REA AEE AEE a NEREA 19 2 3 9 AVS Measte Ee EE EE Eh 19 2310 AVS EEN le EE 20 2 3 1 AVS GetNumbPixels orte iter A eege EES 20 2 3 12 AVS GetParameter EE 21 DENS AVS EE 21 2 3 14 AVS Ee E TR E 22 2 3 15 AVS GetSat ratedPixels a ete AE EE EEOAE EEE NEENA E EESE 22 23 167 AVS GetAnaloegIn E 22 4 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 17 ANS _GetDi UEM 23 2 3 18 AE NC er ecscccccdcccacceccdaccesccaenedenceetccevedgacedcdascsedecadedeucdedceevedacccedccascc deceueden ceed ceavedsensdecdeees 23 2 3 19 AVS _ GetFileSize 0 ccccccescscccsssececssccecesaeeecsesaececeeeeecseaaececseaaececeeecsesaeeecseaaesessneeeseeaeeesseaaeess 24 2320 AVS Get ile og T EH 24 23 21 AVS GetErstEile iio et rete cene eee tei eo ete e pter e doe e ee est er eR URINE Yee Ee ERES 25 2 3 22 AVS GetNextEile ics etre te etre eee ene Ee ona e ev EE a EO FUE RENE Lee TEE RE SAREE r RE ENE 25 2 3 23 AVS AF IJ I 26 pco MEE
2. LCorrect 7 ADCFactor 54800 0 97741 E z LS z zZ mm oo D 0 E SoHo Hio The AD Counts value corrected for linearity and dark becomes 54800 0 97741 56067 Counts The AD Counts value corrected for linearity only not for dark becomes 56067 1200 57267 Counts Using the m aLowNLCounts and m aHighNL Counts parameters in 16bit mode also requires to include the ADCFactor when comparing the measured Counts to these parameters m aLowNLCounts 200 therefore if ADCFactor measured counts corrected for Dark 200 use NCPS 200 0 99203 else if ADCFactor measured counts corrected for Dark gt 15500 use NCPS 15500 0 96099 else calculate NCPS as shown above In the example above all counts corrected for dark lt 800 will be corrected in AvaSoft by dividing through 0 99203 Likewise all counts corrected for dark gt 62000 will be corrected in AvaSoft by dividing through 0 96099 All counts corrected for dark 800 lt counts lt 62000 will be corrected by the NCPS calculated by the polynomial Gain and Offset These parameters have been optimized by Avantes and there should be no need to change these values The m Gain and m Offset parameters are used to optimize the Gain and Offset of the AD Converter Most detector types use only the m Gain 0 and m Offset 0 The parameters m Gain 1 and m Offset 1 are only used by the SENS SUSI2LDB detectors 512 pixel NIRs The
3. Function Group Description Parameters Return int AVS SetParameter AvsHandle a_hDevice DeviceConfigType a_pData Blocking data send function Overwrites the device configuration data internally and in the spectrometer The data is not checked a_hDevice device identifier returned by AVS Activate a_pData pointer to a DeviceConfigType structure On success ERR_SUCCESS On error ERR_DEVICE_NOT_FOUND ERR_INVALID_DEVICE_ID ERR_TIMEOUT error in communication ERR_OPERATION_PENDING ERR_INVALID_STATE measurement pending 2 3 30 AVS_SetAnalogOut Function Group Description Parameters Return int AVS_SetAnalogOut AvsHandle a_hDevice unsigned char a PortId float a Value Blocking data send function Sets the analog output value for the specified analog output a hDevice device identifier returned by AVS Activate a Portld identifier for one of the two output signals 0 AOI pin 17 at 26 pins connector 1 AO2 pin 26 at 26 pins connector a Value DAC value to be set in Volts internally an 8 bits DAC is used with range 0 5 0V On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER 2 3 31 ANS SetDigOut Function Group Jun 12 Avantes int AVS SetDigOut AvsHandle a hDevice unsigned char a Portld unsigned char a Value Blocking data send function AS 5216x6
4. 15500 will be corrected by the NCPS calculated by the polynomial Using the nonlinearity correction polynomial in combination with the 16bit ADC Counts range see also section 2 3 36 function ANS UseHighResAdc does require a small modification in your application software since the polynomial was recorded in 14bit mode and therefore should be applied to a 14bit range when calculating the NCPS This will be illustrated by introducing the variable ADCFactor to the equations that are used in the correction same example as above same polynomial The value of ADCFactor becomes 0 25 when running in 16bit ADC mode and 1 0 when running in 14bit ADC mode In 16bit ADC mode the measured counts will be a factor 4 higher than in 14bit mode or with a 14 bit ADC Therefore the same pixel of the same spectrometer in this example returns 4 300 1200 Counts for darkdata and 4 14000 56000 Counts at a certain light intensity The AD Counts corrected for dark therefore becomes 54800 The Normalized Counts Per Second can be calculated from the polynomial 62 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy NCPS m_ z LCorrect 0 LCorrect 1 ADCFactor 54800 LCorrect 2 ADCFactor 54800 LCorrect 3 ADCFactor 54800 LCorrect 4 ADCFactor 54800 LCorrect 5 ADCFactor 54800 LCorrect 6 ADCFactor 54800
5. lt 32767 signed integer unsigned short 16 bits value 0 lt x lt 65535 unsigned integer int 32 bits value 2 147 483 648 lt x lt 2 147 483 647 signed integer unsigned int 32 bits value 0 lt x lt 4294967295 unsigned integer float 32 bits value floating point number 7 digits precision double 64 bits value double sized floating point number 15 digits precision HWND 32 bits value Windows typedef for window identification HWND is used for Windows API calls that require a Window handle AvslIdentity struct Type char m_aSerialld 10 serial identification number char m_aUserFriendlyld 64 user friendly name to be defined by application DeviceStatus m_Status device status Size 75 bytes Jun 12 AS 5216x64 DLL Manual docx 35 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description ControlSettings struct Type unsigned short m_StrobeControl 0 OxFFFF number of strobe pulses during integration period high time of pulse is 1 ms 0 no strobe pulses unsigned int m LaserDelay 0 OXFFFFFFFF laser delay since trigger unit is internal FPGA clock cycle unsigned int m LaserWidth 0 OxFFFF laser pulse width unit is internal FPGA clock cycle 0 no laser pulse float m LaserWaveLength Peak wavelength of laser nm used for Raman Sp
6. m ExtOffset parameter is used to be able to match the detector output range with the ADC range Defective Pixels The m DefectivePixels 30 array can be used to store the pixelnumbers that should be eliminated from the data transfer The as5216x64 dll will calculate the data for a defective pixel by interpolating the data of the neigbor pixels A defective pixel can be specified in the range from 0 to NrOfPixels 1 where NrOfPixels specifies the total pixels available for the detectortype used in the spectrometer see also AVS_GetNumPixels The as5216x64 dll evaluates the array m DefectivePixels i inan increasing order until a pixel is specified which is equal or larger than the number of pixels in the detector Jun 12 AS 5216x64 DLL Manual docx 63 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 6 0 EEProm structure Standalone Parameters The StandaloneType structure includes a boolean m_Enable which is not used in the standard version but which can be used for user specific standalone functionality The Measurement parameters are also included in this structure as well as the Number of Measurements parameter m Nmsr Finally the SDCardType structure has been added to have storage space available to store dark and reference and scopemode spectra Detector Stand lone Inadiance Calibration Reflectance Calibration Spectrum Correction Temperature Sens
7. solutions in spectroscopy AvaSpec 3648 USB2 SENS TCD1304 0 01 AvaSpec 102 USB2 SENS TSL1301 0 06 AvaSpec 128 USB2 SENS TSL1401 0 07 AvaSpec 2048x14 USB2 SENS HAMS9840 2 17 AvaSpec 350F USB2 SENS ILX554 0 20 AvaSpec 950F USB2 SENS ILX554 0 50 AvaSpec 1350F USB2 SENS ILX554 0 70 AvaSpec 1650F USB2 SENS ILX554 0 85 AvaSpec 2048x16 USB2 SENS HAMSI11071 2048X16 1 82 AvaSpec 2048x64 USB2 SENS HAMSI11071 2048X64 2 40 AvaSpec HS1024x58 USB2 SENS HAMS7031 1024X58 5 22 AvaSpec HS1024x122 USB2 SENS HAMS7031 1024X122 6 24 AvaSpec 2048XL USB2 SENS HAMSI11155 0 002 0 01ms for SENS HAMS9201 in Firmware v 000 025 000 000 and later else 0 52ms TE AvaSpec NIR256 2 2TEC with SENS_SU256LSB detector released in 2011 and is the successor of the NIR2 2 with SENS HAMS9201 detector ERE 1 82 ms for SENS_ HAMS11071_2048X16 in FPGA 006 003 000 000 or later else 0 91ms 2 40 ms for SENS HAMSI11071 2048X64 in FPGA 006 003 000 000 or later else 1 75ms The longest integration time is 10 minutes 600000 ms 3 2 3 Measurement structure Integration Delay The integration delay parameter can be used to start the integration time not immediately after the measurement request or on an external hardware trigger but after a specified delay The unit for this delay is FPGA clock cycles The FPGA clock runs at 48 MEZ so the integration delay can be set with 20 83 nanoseconds steps S
8. solutions in spectroscopy 2 3 12 ANS GetParameter Function Group Description Parameters Return int AVS_ GetParameter AvsHandle a_hDevice unsigned int a_Size unsigned int a_pRequiredSize DeviceConfigType a_pData Internal data read function Returns the device information of the spectrometer This information is stored in the DLL during the AVS_Activate procedure a_hDevice device identifier returned by AVS_Activate a_Size number of bytes allocated by caller to store DeviceConfigT ype a_pRequiredSize number of bytes needed to store DeviceConfigType a_pData pointer to buffer that will be filled with the spectrometer configuration data On success ERR_SUCCESS On error ERR_DEVICE_NOT_FOUND ERR_INVALID_DEVICE_ID ERR_INVALID_SIZE a_Size is smaller than required size 2 3 13 ANS PollScan Function Group Description Parameters Return Jun 12 Avantes int AVS PollScan AvsHandle a hDevice Internal data read function Determines if new measurement results are available The most effective way to let the application know when a new measurement is ready is by using Windows Messaging in which case the as5216x64 dll sends a WM MEAS READY message to the application as soon as a measurement is ready to be imported into the application software see also section 2 4 2 But if the programming environment does not support Windows Messaging it is also possible to use AV
9. ERR INVALID DEVICE ID ERR INVALID MEAS DATA no measurement data received 2 3 15 AVS GetSaturatedPixels Function Group Description Parameters Return int AVS GetSaturatedPixels AvsHandle a hDevice unsigned char a pSaturated Internal data read function Returns for each pixel if that pixel was saturated 1 or not 0 Should be called by the application after the notification on ANS Measure is triggered e g after calling AVS_GetScopeData which also requires that valid data is available a hDevice device identifier returned by AVS Activate a pSaturated array of chars each char indicates if saturation occurred for corresponding pixel size equal to the selected pixelrange On success valid measurement available On error 0 no measurement data available ERR DEVICE NOT FOUND ERR INVALID DEVICE ID 2 3 16 AVS GetAnalogIn Function 22 Avantes int AVS GetAnalogIn AvsHandle a hDevice unsigned char a AnalogInld float a pAnalogIn AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com Group Description Parameters Return AVAN TES solutions in spectroscopy Blocking control function Returns the status of the specified analog input a_hDevice a_AnalogInId a pAnalogIn On success On error 2 3 17 ANS GetDigIn Function Group Description Parameters Return int AVS_GetDigIn AvsHandle unsigned
10. SAO uicissim 26 2 3 25 ENN Ee mE 26 ps EM NADA rbicey dm 27 pA RT MEME SAECULO RR e ee EENS 27 2 328 ANS SaveSpectraToS DCard cccsssssssscssrsessecceersssssccnsnsesvsccosnsesesseesnsesvsscosnesetsceesnsesrascssneessnse 28 2 3 20 AVS SetParameter EE 29 2 29 20 AVS SetAnalosQUEL E 29 2 31 AVS Seu IS OU M 29 2 3 32 ANS et Erwuesse EENS hri heehee ee keel E eles 30 2 3 33 AVS SetSyne Mode eege ees eent ete eet tet Eti e Eat eet tie be het ie eer vete Wises etel lere EeegetdeN 31 23 34 MEC EE EE M 31 2 3 35 AMSSetPrescanMOode o eana rasa a rea A AEE a E A S aa AEE a Aeta eiS 32 2 3 30 AVS UseHiehResAde eee hte ae a aa AK Ea Eee a ER Ea o a EA ARER RE EaR 33 23 31 AMXS SetSensitivityMOde arse ini iiia ae a aa AE a i e AE a reae AE E A RE oue edes 34 2 4 Data Elements i sicsisssiesesssesssecssssesesssesssscssssocssasessosdsaveeseassescoacsessesoecsesssuseassesessseasaeesssavseceseasies sesasesasesseacsays 35 2 4 1 Return value constants cccccceessccecsessececeescecesseeeceesaececseeeeeeesaeeecseaececseeeeeeeaeeecsesaeeecseseeeesseeeeenees 43 2 4 2 Windows TE 45 3 EXAMPLE SOURCE CODE uuun cccccccceesssesseessseseeeeeeesecceensssseseeeeeeseooeessseeeeeees 46 3 1 Initialization and Activation of a spectrometer s
11. The last change in version 1 2 is only in this manual For spectrometers that have been calibrated for irradiance measurements the IrradianceType structure contains data that can be used to convert the ScopeData A D Counts to an irradiance spectrum Section 3 6 3 in this manual describes in more detail how this can be done 1 11 New in version 1 1 0 0 The as5216 dll version 1 1 includes one new function AVS_SetPrescanMode which can be used for the AvaSpec 3648 spectrometer Furthermore a lower and upper limit has been added to the nonlinearity polynomial to avoid incorrect correction for very low and or high counts Finally example programs with source in LabView 7 1 Visual C 6 0 Visual Basic 6 0 and Visual Basic NET 2005 2 0 have been added to the already existing examples in Delphi 6 0 and Borland C 5 0 The AVS SetPrescanMode function for the AvaSpec 3648 is described in section 2 3 35 and detailed information about how to apply the nonlinearity correction can be found in section 3 6 1 12 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 1 12 New in version 1 0 0 0 as5216 dll versus as161 dll Although there is no previous version for as5216 dll v1 0 a comparison can be made for programmers who have used the as161 dll to write application software for the USBI platform AvaSpec spectrometers A number of improvements have been
12. USB2 5000 full spectra 350 pixels can be saved into onboard RAM in exactly one second 0 20 ms integration time The return value of the function ANS GetSaturatedPixels in previous as5216 dll functions was not implemented as intended Unlike all other functions ANS GetSaturatedPixels returns 1 on success and 0 if it is called at a moment that no data is available measurement pending Because this return value has been present in all previous versions changing this in the as5216 dll may result in an incompatibility of the application software Therefore it was decided to make the notification in this manual and leave the return value as implemented in the previous versions See also section 2 3 15 1 6 New in version 1 6 0 0 Addition of support for Windows Vista x64 The DLL now detects whether it is running on a 64 bit version of Windows and will then use the WinUSB device driver instead of the 32 bit Avsusb2 sys kernel mode device driver WinUSB is Microsoft s own USB driver that is distributed with Vista The install package for the as5216 dll will configure WinUSB to support the AS5216 hardware The DLL and examples are all still 32 bit programs but they will now work on Vista x64 in the so called WoW64 mode 10 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 1 7 New in version 1 5 0 0 Addition of support for the AvaSpec
13. application and the DLL can be divided in four functional groups e internal data read functions which read device configuration data from the internal DLL storage e blocking control functions which send a request to the device and wait till an answer is received or a time out occurs before returning control to the application e non blocking data read functions which send a request to the device and then return control to the application After the answer from the device is received or a timeout occurs a notification is sent to the application e data send functions which send device configuration data to the device After the application has initialised it should select the spectrometer s it wants to use Therefore the following steps have to be taken 1 Call ANS GetNrOfDevices to determine the number of attached devices 2 Allocate buffer to store identity info RequiredSize NrDevices sizeof AvsIdentityType 3 Call AVS GetList with the RequiredSize and obtain the list of connected spectrometers 4 Selectthe spectrometers you want to use with AVS Activate 5 Register a notification window handle with AVS Register to detect device attachment removal 16 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 Exported functions 2 3 1 ANS Init Function int AVS Init short a Port Group Blocking control function Description Opens t
14. connector 6 DO7 pin 13 at 26 pins connector a_Frequency desired PWM frequency 500 300000 Hz the frequency of outputs 0 1 and 2 is the same the last specified frequency is used also the frequency of outputs 4 5 and 6 is the same a_DutyCycle percentage high time in one cycle 0 100 channels 0 1 and 2 have a synchronised rising edge the same holds for channels 4 5 and 6 Return On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER 30 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 33 AVS_SetSyncMode Function Group Description Parameters Return int AVS_SetSyncMode AvsHandle a_hDevice unsigned char a_Enable Internal DLL write function Disables enables support for synchronous measurement DLL takes care of dividing Nmsr request into Nmsr number of single measurement requests a hDevice master device identifier returned by ANS Activate a Enable 0 is disable sync mode 1 is enables sync mode On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID 2 3 34 AVS StopMeasure Function Group Description Parameters Return Jun 12 Avantes int AVS_StopMeasure AvsHandle a_hDevice Blocking data send function Stops the measurements needed if Nmsr infinite can als
15. dark drk reference ref or scope roh spectrum should be saved The m aFileRootName 6 parameter is a character string that is used as first part of the name of the stored spectra A sequence number 00 to 99 if the rootname is six characters long 000 to 999 if the rootname is five characters long etc and the file extension drk reference ref or scope roh completes the filename on SDCard The m TimeStamp parameter has been added to be able to add a date time to the files saved on SDCard 64 Avantes AS 5216x64 DLL Manual docx website http www avantes com Jun 12 email Info avantes com AVAN TES solutions in spectroscopy 3 6 3 EEProm structure Irradiance Reflectance Calibration and Spectrum Correction The m_Irradiance m_Reflectance and m_SpectrumCorrect parameters occupy together over 99 of the defined memory in the EEProm structure Sizeof DeviceParamT ype with the m_aReserved block excluded This is because each of these three parameters include an array of 4096 MAX_NR_PIXELS float numbers which can hold pixel specific calibration data The Irradiance Calibration structure IrradianceType has been defined to store the results of an irradiance intensity calibration in EEProm as well as the settings during this calibration integration time smoothing measurement setup fiberdiameter By reading these data from EEProm it will be possible to convert a spectrum with raw scopedata into an i
16. external hardware trigger mode an external trigger pulse results in an output signal pulse width 15 us at pin2 of the DB15 connector DO2 about 1 3 us after the trigger pulse was received The pulse at DO2 can be used to fire a laser in a LIBS application The function AVS SetIntegrationDelay can be used to specify an integration time delay which is related to DO2 With the AvaSpec 2048 USB2 and AvaSpec 3648 US B2 this feature has been improved at the following points 1 Not limited to external trigger mode The output signal and integration delay can be generated in external trigger mode but also in normal software trigger mode 2 Multiple measurements The number of measurements can be set by the nrms parameter in the AVS Measure function 3 Pulse width The laserpulse width at pin 23 of the DB26 connector can be set by the user between 0 and 1 ms 21 nanosec steps 4 Laser Delay The 1 3 us period for the AvaSpec 2048 USB2 between receiving a trigger measurement request in software trigger mode or TTL pulse in hardware trigger mode can be delayed from 1 3ys to 89 sec 21ns steps 14 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 1 12 4 USB2 platform specific functions The functions that have been added to as5216x64 dll to support the new hardware features in the USB2 platform spectrometers can be grouped into
17. from Avantes equipment You have the right to redistribute the libraries contained in the Software subject to the following conditions 1 You are developing applications to control Avantes equipment If you use the code contained herein to develop applications for other purposes you MUST obtain a separate software license 2 You distribute only the drivers necessary to support your application 3 You place all copyright notices and other protective disclaimers and notices contained on the Software on all copies of the Software and your software product 4 You or your company provides technical support to the users of your application Avantes bv will not provide software support to these customers 5 You agree to indemnify hold harmless and defend Avantes bv and its suppliers from and against any claims or lawsuits including attorneys fees that arise or result from the use or distribution of your software product and any modifications to the Software Jun 12 AS 5216x64 DLL Manual docx 3 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy OI ug 28 une ei acai ec Rd Gai Gh i ra a GU M S EGRE Lu D nnna 6 i VERSION HISTORY niv MEM MEE DEMNM REMINDER MES 9 1 1 NEw in version 2 3 0 0 9 1 2 NEW in version 2 2 0 0 iscssssssssssssesscsvssesessosvecesoesseseiscsescossvinscosesduscsbsedsessbssisorsbesisbeebeessessevessessiesdvoassossuceasee
18. implemented in the as5216 dll when comparing the functions to the as161 dll These improvements can be grouped into the following categories Data acquisition Synchronization in multichannel systems Laser control and integration time delay e g for Laser Induced Breakdown Spectroscopy USB2 platform spectrometer These categories will be described in sections 1 12 1 to 1 12 4 1 12 1 Data acquisition Just like with the as161 dll a spectrum can be collected by calling the function ANS Measure and when a scan has been sent to the PC it can be retrieved with the function ANS GetScopeData The following improvements have been realized in as5216x64 dll for the USB2 platform spectrometers 1 Starting a measurement In continuous mode the USB1 platform spectrometers always run continuously also if no measurement requests are posted A call to AVS Measure in as161 dll results in returning the first available scan see section 2 2 of the as161 dll manual The USB2 platform spectrometers are in idle mode if not scanning and will start a scan if a measurement request AVS Measure from the as5216x64 dll is received 2 Number of measurements The AVS Measure function in as161 dll always results in one single scan A spectrum is only sent to the PC if a measurement request is received The AVS Measure function in as5216x64 dll includes a nrms argument which specifies the number of measurements the spectrometer should perform after one measurement
19. on OS 2 3 8 AVS_PrepareMeasure Function Group Description Parameters Return int AVS_PrepareMeasure AvsHandle a_hDevice MeasConfigType a_pMeasConfig Blocking data write function Prepares measurement on the spectrometer using the specified measurement configuration a_hDevice Device identifier returned by AVS_Activate a_pMeasConfig pointer to structure containing measurement configuration On success ERR_SUCCESS On error ERR DEVICE NOT FOUND ERR OPERATION PENDING ERR INVALID DEVICE ID ERR INVALID PARAMETER ERR INVALID PIXEL RANGE ERR INVALID CONFIGURATION invalid fpga type ERR TIMEOUT ERR INVALID MEASPARAM DYNDARK 2 3 9 ANS Measure Function Group Description Parameters Jun 12 Avantes int AVS Measure AvsHandle a hDevice HWND a hWnd short a Nmsr Non Blocking data write function Starts measurement on the spectrometer a hDevice device identifier returned by ANS Activate AS 5216x64 DLL Manual docx 19 website http www avantes com email Info avantes com Return AVAN TES solutions in spectroscopy a_hWnd window handle to notify application measurement result data is available The DLL sends a message to the window with command WM MEAS READY with SUCCESS the number of scans that were saved in RAM if StoreTORAM parameter gt 0 or INVALID MEAS DATA as WPARM value and a_hDevice as LPARM value a Nmsr number of measurements to do after
20. uses one DeviceHandle so if you want to run multiple devices simultaneously you need to allocate storage space for multiple devicehandles see the main sample program in the Qtdemo full demo subfolder For the activated device the Device information is collected AVS_GetVersionInfo ANS GetNumPixels ANS GetParameter ANS GetLambda and displayed in the main window Thanks to the Windows API OnDeviceChange function attachment and removal of spectrometers can be detected by the application see the OnDeviceChange function in the source code Note To match the structures that are used in the AS5216 firmware the structures used in the as5216x64 dll should be compiled with byte alignment 3 2 Starting a measurement Measurements can be started by clicking the Start Measurement button The Nr of Scans field displays how many scans will be performed after one measurement request Before a call to ANS Measure is done the ANS PrepareMeasurement function is called with the parameters in the MeasConfigType structure The Prepare Measurement Settings group in the figure below shows all the parameters in this MeasConfigType structure Jun 12 AS 5216x64 DLL Manual docx 47 Avantes website http www avantes com email Info avantes com Prepare Measurement Settings AVAN TES solutions in spectroscopy unsigned short unsigned short m StartPixel m_StopPixel Dark C tion Setti Blatt piel G Sas deg float m Integrati
21. 11 2048 AvaSpec 3648 USB2 SENS TCD1304 3648 AvaSpec HS1024x58 USB2 SENS HAMS7031 1024X58 1024 AvaSpec HS1024x122 USB2 SENS HAMS7031 1024X122 1024 AvaSpec 2048XL USB2 SENS HAMS11155 2068 T AvaSpec NIR256 2 2TEC with SENS_SU256LSB detector released in 2011 and is the successor of the NIR2 2 with SENS_HAMS9201 detector For each detector different FPGA firmware is needed The SensorType parameter should therefore not be changed unless new FPGA firmware for another detectortype has been loaded The number of pixels is determined by the detectortype and should therefore not be changed unless another detectortype has been connected and the right FPGA code has been loaded Also for the Fast Series 350F 950F 1350F 1650F the number of pixels is fixed and should not be changed Wavelength Calibration The polynomial coefficients in m_aFit 5 describe the relation between the pixelnumber of the detector array 0 m_NrPixels 1 and the corresponding wavelength in nanometer at this pixelnumber m aFit 0 m aFit 1 pixnr m aFit 2 pixnr m_aFit 3 pixnr m aFit 4 pixnr In the function AVS_GetLambda the m aFit coefficients are used internally to store the wavelength numbers into an array 60 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Nonlinearity Calibration and Correction A polynomial can be used to correct
22. 2048L USB2 with Sony ILX 511 detector Minimum integration time for the AvaSpec 2048x14 USB2 is changed from 2 24 msec to 2 17 msec An additional delay of 500 msec is added when a device is activated this proved to be necessary on recent PC s when using Windows Vista 1 8 New in version 1 4 0 0 Implementation of the StoreToRam function which allows the storing of scans at high speed as fast as 1 1 msecs per scan for the AvaSpec 2048 USB2 and 0 1 msecs per scan for the AvaSpec 102 USB2 in the spectrometer without the overhead of USB communication About 4MB of storage is available which allows for 1013 full spectra with the AvaSpec 2048 USB2 and 19784 for the AvaSpec 102 USB2 or a lot more if the pixelrange is reduced by selecting the start and stoppixel StoreToRam requires firmware version 0 20 or later A firmware upgrade utility can be downloaded from our website Implementation of directory support for the Secure Digital Card In a few occasions there have been problems with detecting and or activating AvaSpec USB2 spectrometers under Windows Vista The reason for this is that according to MicroSoft a USB device takes a long time to resume from selective suspend mode on a Windows Vista based computer that uses UHCI Universal Host Controller Interface USB controllers In the as5216 dll version 1 4 a workaround has been implemented to solve this problem New sample programs for Visual C 2005 Delphi and LabView o The Vis
23. 3700 LCorrect 5 13700 LCorrect 6 13700 LCorrect 7 13700 0 97741 z z uu z zZ mm Dm Dm D D D zZ H Ho oe H HB The AD Counts value corrected for linearity and dark becomes 13700 0 97741 14017 Counts The AD Counts value corrected for linearity only not for dark becomes 140174300 14317 Counts Note that the AvaSpec 2048 2048L 2048x14 and 3648 include a Correct for Dynamic Dark option see section 3 2 5 If this correction is applied the measured dark AD Counts value without subtracting measured dark counts is already fluctuating around zero The polynomial can therefore be applied directly to the measured counts The m aLowNL Counts and m aHighNL Counts parameters can be used to limit the range for the correction in counts for which the polynomial should be applied The use of polynomials beyond the range of measured data points can give erratic corrections In AvaSoft Avantes uses the same correction factor NCPS for measured counts corrected for dark that are lower than m aLowNLCounts as is used for m aLowNL Counts and for counts higher than m aHighNL Counts the same NCPS as is used for m aHighNL Counts In the example above NCPS 200 0 99203 and all counts lt 200 will be corrected in AvaSoft by dividing through 0 99203 Likewise NCPS 15500 0 96099 and all counts gt 15500 will be corrected in AvaSoft by dividing through 0 96099 All counts 200 counts
24. 4 DLL Manual docx 29 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Description Sets the digital output value for the specified digital output Parameters a_hDevice device identifier returned by AVS_Activate a_Portld identifier for one of the 10 output signals 0 DOI pin 11 at 26 pins connector 1 DO2 pin 2 at 26 pins connector 2 DO3 pin 20 at 26 pins connector 3 DO4 pin 12 at 26 pins connector 4 DOS pin 3 at 26 pins connector 5 DO6 pin 21 at 26 pins connector 6 DO7 pin 13 at 26 pins connector 7 DOS pin 4 at 26 pins connector 8 DOO pin 22 at 26 pins connector 9 DO10 pin 25 at 26 pins connector a Value value to be set 0 1 Return On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER 2 3 32 ANS SetPwmOut Function int AVS SetPwmOut AvsHandle a hDevice unsigned char a_Portld unsigned long a_Frequency unsigned char a_DutyCycle Group Blocking data send function Description Selects the PWM functionality for the specified digital output Parameters a_hDevice device identifier returned by AVS_Activate a_PortlId identifier for one of the 6 PWM output signals 0 DOI pin 11 at 26 pins connector 1 DO2 pin 2 at 26 pins connector 2 DO3 pin 20 at 26 pins connector 4 DOS pin 3 at 26 pins connector 5 DO6 pin 21 at 26 pins
25. 56 2 2TEC 4 92 9 4 Kos 52 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy AvaSpec NIR512 1 7TEC AvaSpec NIR512 2 2TEC KE Eegen 5 75 8 AvaSpec 2048x14 USB2 2170 0 AvaSpec 2048x16 USB2 1820 0 AvaSpec 2048x64 US B2 2400 0 AvaSpec HS1024x58 USB2 5220 0 AvaSpec HS1024x122 USB2 6240 0 AvaSpec 2048XL USB2 0 28 0 30 2 The AvaSpec 350F USB2 AvaSpec 950F USB2 AvaSpec 1350F USB2 and AvaSpec 1650F USB2 use the same detector as the AvaSpec 2048 USB2 and will therefore have the same trigger response characteristics as the AvaSpec 2048 USB2 The delay for the AvaSpec 3648 USB2 in prescan mode strongly depends on the integration time setting but can be calculated within 0 02 us precision by the following equations Scanspassed floor Inttime 0 002 3 6961 Inttime 0 002 min delay 0 00183 Scanspassed Inttime 0 002 ms max delay 0 00185 Scanspassed Inttime 0 002 ms Inttime Integration time setting in milliseconds in the preparemeasurement structure Example Inttime 0 1ms Scanspassed floor 38 72 38 min_delay 0 00183 38 0 098 3 72583 ms max_delay 3 72585 ms Example2 Inttime 0 01ms Scanspassed floor 463 01 463 min_delay 0 00183 463 0 008 3 70583ms max_delay 3 70585 ms So if the application allows that the AvaSpec 3648 USB2 in prescan mode is triggered
26. AMETER no SD card present or file not found a hDevice a pName a pDest a pSize Blocking read function Returns the contents of a binary file from the SD card a hDevice a pName a pDest a pSize device identifier returned by ANS Activate file name 14 characters including terminating zero pointer to buffer to store binary file data length of buffer expected file size as determined with AVS_GetFileSize max length is 64kB AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com Return AVAN TES solutions in spectroscopy On success ERR_SUCCESS buffer contains valid value On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER no SD card present or file not found 2 3 21 AVS GetFirstFile Function Group Description Parameters Return int AVS GetFirstFile AvsHandle a hDevice unsigned char a pName Blocking read function Returns the name of the first file in the root directory of the SD card a hDevice device identifier returned by ANS Activate a pName file name 14 characters including terminating zero On success ERR SUCCESS buffer contains valid value On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER no SD card present or file not found 2 322 AVS GetNextFile Function Group Description Parameters Re
27. AVAN TES solutions in spectroscopy AS 5216x64 DLL Interface Package for 64 bit Windows Applications Version 2 3 0 0 USER S MANUAL June 2012 Avantes B V Oude Apeldoornseweg 28 NL 7333 NS Apeldoorn The Netherlands Tel 31 313 670170 Fax 31 313 670179 Web www avantes com Email info avantes com Jun 12 AS 5216x64 DLL Manual docx Avantes website http www avantes com 1 email Info avantes com AVAN TES solutions in spectroscopy Microsoft Visual C Visual Basic Visual C Windows Windows 95 98 Me Windows NT 2000 XP and Microsoft Office are registered trademarks of the Microsoft Corporation Windows Vista and Windows 7 are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries Delphi and C Builder are trademarks of CodeGear a subsidiary of Embarcadero Technologies LabVIEW is a trademark of the National Instruments Corporation MATLAB is a registered trademark of The MathWorks Inc Qt is a trademark of Nokia Corporation in Finland and or other countries worldwide Copyright 2012 Avantes bv All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted by any means electronic mechanical photocopying recording or otherwise without written permission from Avantes bv This manual is sold as part of an order and subject to the condition that it shall not by way of trade or othe
28. Return AVAN TES solutions in spectroscopy Blocking read function Returns the status of the software version of the different parts DLL does not check the size of the buffers allocated by the caller a_hDevice a_pFPGA Version a_pFirmwareVersion a_pDLLVersion On success On error 2 3 19 ANS GetFileSize Function Group Description Parameters Return device identifier returned by ANS Activate pointer to buffer to store FPGA software version 16 char pointer to buffer to store Microcontroller software version 16 char pointer to buffer to store DLL software version 16 char ERR SUCCESS buffer contains valid value ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication int AVS GetFileSize AvsHandle unsigned char unsigned int a hDevice a pName a pSize Blocking read function Returns the file size in bytes if the file can be read from the SD card a hDevice a pName a pSize On success On error 2 3 20 AVS GetFile Function Group Description Parameters 24 Avantes int AVS GetFile AvsHandle unsigned char unsigned char unsigned int device identifier returned by ANS Activate file name 14 characters including terminating zero pointer to buffer to store length ERR SUCCESS buffer contains valid value ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PAR
29. S PollScan for this purpose After a measurement request has been posted by calling ANS Measure the function ANS PollScan can be called in a loop until it returns 1 Note that it should be avoided that AVS PollScan is called continuously without any delay This can cause such a heavy CPU load that this can freeze the application software after a while Adding a 1 millisecond delay so polling every ms already solves this problem a hDevice device identifier returned by AVS Activate On success 0 no data available 1 data available On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID AS 5216x64 DLL Manual docx 21 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 14 AVS_GetScopeData Function Group Description Parameters Return int AVS_GetScopeData AvsHandle a_hDevice unsigned int a pTimeLabel double a pSpectrum Internal data read function Returns the pixel values of the last performed measurement Should be called by the application after the notification on ANS Measure is triggered The DLL does not check the allocated buffer size a hDevice device identifier returned by AVS Activate a pTimeLabel ticks count last pixel of spectrum is received by microcontroller ticks in 10 uS units since spectrometer started a pSpectrum array of doubles size equal to the selected pixelrange On success ERR SUCCESS On error ERR DEVICE NOT FOUND
30. The FPGA clock runs at 48 MHz so delays and pulse width can be set with 20 83 nanoseconds steps If the integration delay T2 is set to 0 FPGA Jun 12 AS 5216x64 DLL Manual docx 55 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy cycles the rising edge of the integration signal will start one clock cycle 20 83ns before the rising edge of the laser pulse This will ensure that with this setting the flash of the source that is triggered by the laser pulse entirely falls in the integration time cycle Laser Induced Breakdown Spectroscopy LIBS is an application where the integration delay is used in combination with a TTL out at the DB 26 connector to fire a laser After a measurement request or on an external hardware trigger the laser is fired by the TTL out The integration time period should not include the laser light so the start of the integration time needs to be delayed A typical integration delay in LIBS applications is about lus ILX554 detector in AvaSpec 2048 USB2 see also section 3 2 3 Laser wavelength The Laser wavelength m_LaserWaveLength control setting is not used in the current version of the as5216 A value can be entered but the as5216 firmware does not use this information StoreToRam As of firmware version 0 20 0 0 the StoreToRam function has been implemented To use this function you must set the requested number of scans in the m_StoreToRam control sett
31. X554 is heavily saturated at a light intensity of approximately 5 times the intensity at which saturation starts it will return values 65535 counts The other detector types in the AvaSpec 102 128 256 1024 2048L 2048x14 and 3648 and AvaSpec NIR do not show this effect so no correction is needed Normally you don t need to use this third level for the AvaSpec 2048 but when measuring a peaky spectrum with some heavily saturated peaks the autocorrect can be used A limitation to this level is that it can be used only if no averaging is used m NrAverages 1 The AvaSpec USB2 spectrometers with an as5216 board Rev C and earlier were equipped with a 14 bit AD converter range 0 16383 In this case the detector is saturated at 16383 counts Jun 12 AS 5216x64 DLL Manual docx 51 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 2 8 Measurement structure Trigger Type Trigger Settings Trigger mode Hardware jw Software Trigger source Je External Synchronized Trigger type MM Edge Level The trigger type structure includes settings for Trigger Mode Hardware Software Trigger Source External Synchronized and Trigger type Edge Level Setting the Trigger Source to Synchronized is relevant if multiple spectrometers need to run synchronised all spectrometers start a measurement at the same time This option will be described below under Running mu
32. a couple of milliseconds before the event that needs to be measured this event can be shifted with high precision into the integration time cycle of the spectrometer Moreover the integration delay parameter section 3 2 3 can be used to add additional delay in steps of 21 nanoseconds to the min_delay calculated above rz 4 92 5 75 us with FPGA version 6 4 and later 137 5 138 3 us with FPGA version 6 3 ea 402 5 75 us with FPGA version 6 4 and later 251 1 252 8 us with FPGA version 6 3 Trigger Mode Hardware Level triggered This trigger setting is used when scans should be performed as long as the external trigger at pin 6 of the DB26 connector is HIGH The spectrometer will start to accumulate data take scans at the selected integration time at the rising edge of the TTL pulse and will continue to do so as long as the TTL signal remains high When the signal becomes low the average of the accumulated data except for the last scan will be sent This mode is especially useful for conveying belt applications when a product needs to be scanned independent of the transport speed Jun 12 AS 5216x64 DLL Manual docx 53 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Running multiple spectrometers Synchronized All USB2 platform spectrometers can be connected by a SYNC cable In syncmode one spectrometer is configured as Master by calling the AVS SetSyncMode fun
33. a_pNextName contains valid value On error ERR_DEVICE_NOT_FOUND communication not open yet ERR_INVALID_DEVICE_ID device handle is not known in DLL ERR_TIMEOUT error in communication ERR_INVALID_PARAMETER no SD card present or no more directories on the SD card 2 3 26 AVS_DeleteDirectory Function Group Description Parameters Return int AVS_DeleteDirectory AvsHandle a_hDevice unsigned char a_pName Blocking read function Deletes a directory from the SD card a_hDevice device identifier returned by AVS_Activate 1 for first active device a_pName directory name 14 characters including terminating zero On success ERR_SUCCESS On error ERR_DEVICE_NOT_FOUND communication not open yet ERR_INVALID_DEVICE_ID device handle is not known in DLL ERR_TIMEOUT error in communication ERR_INVALID_PARAMETER no SD card present or no more directories on the SD card 2 3 27 AVS_SetDirectory Function Group Description Parameters Return Jun 12 Avantes int AVS_SetDirectory AvsHandle a_hDevice char a_aFileRootName 6 Blocking data send function Sets current working directory All file functions will act on this directory a_hDevice device identifier returned by AVS_Activate 1 for first active device a_aFileRootName string that sets the current working directory for all file based functions On success ERR_SUCCESS On error ERR_DEVICE_NOT_FOUND communication not ope
34. above because the intensity calibration if performed by Avantes or by using AvaSoft application software is always recorded in 14bit mode The value of ADCFactor becomes 0 25 when running in 16bit ADC mode and 1 0 when running in 14bit ADC mode The equation becomes Irradiance Intensity ADCFactor Inttimefactor ScopeData 1 DarkData i IntensityCal i The Reflectance Calibration data can be used to convert the scopedata into a Reflectance or Absorbance spectrum The Spectrum Correction data can be used to correct the spectral data e g for Pixel Response Non Uniformity PRNU or for temperature effects The Reflectance and Correction arrays are not yet used for calibration purposes by Avantes Jun 12 AS 5216x64 DLL Manual docx 65 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 6 4 EEProm structure Temperature Sensors The as5216 boards are prepared for using up to three thermistors NTC1 is mounted on the board NTC2 is not mounted and the third thermistor is in the detector The voltage level of the thermistors can be retrieved by calling the AVS_GetAnalogIn function see also section 2 3 16 and 3 5 The structure TempSensorType can hold the coefficients for a polynomial that converts the voltage level into a temperature Detector Standalone Inadiance Calibration Reflectance Calibration Spectrum Correction Temperature Sensors Tec Control NIC Ca
35. all the 4S 5216 64 DLL 64 bit interface package by clicking Cancel to exit Setup If the specified directory does not exist it will be created r Destination Folder C 455216x64 DLL_2 3 lt Back Cancel During this installation the installation program will check if the most recent USB driver has been installed already at the PC If no driver is found or if the driver needs to be upgraded the Device Driver Installation Wizard is launched automatically click Next Starting with version 1 6 the driver packages are signed and should not generate a warning that the publisher of the driver software cannot be identified If this warning appears anyway please select Install this driver software anyway Device Driver Installation Wizard Device Driver Installation Wizard Welcome to the Device Driver Installation Wizard Completing the Device Driver Installation Wizard This wizard helps you install the software drivers that some computers devices need in order to work S i p The drivers were successfully installed on this computer You can now connect your device to this computer If your device came with instructions please read them first Driver Name Status v Avantes AvaSpec USB2 Ready to use To continue click Next lt Back teen After the drivers have been installed successfully the dialog at the right is displayed click Finish After all files have bee
36. atus of this data instead of letting a message handler react to the Windows message from the dll By calling the function AVS_GetScopeData the spectral data is stored in the application for further processing Jun 12 AS 5216x64 DLL Manual docx 57 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 4 Digital IO The USB2 platform spectrometers have 10 Test Digital 10 0 x programmable digital output pins and 3 Digal Dupas programmable input pins available at the DB26 m O DR MM Frequency 500 300000 Hz connector The function AVS SetDigOut and Wh2 Co PWM Fo 1000 AVS_GetDigIn can be used to control these mm Com PwM E ports Moreover 6 out of the 10 programmable pin12 7 DO4 output ports can be configured for pulse width ping Cp PwM E res modulation With the AVS_SetPwmOut function m D06 Cp fo a frequency and duty cycle can be programmed pni3 p DO PwM so for these 6 digital output ports E WIER The PWM functionality can be used e g in cromo controlling the intensity dutycycle of an ua eee AvaLight LED light source which receives input from DOI pin 11 of the DB26 connector pues in 24 DIT ge E DIZ Get Digital Inputs pini6 TD Close 3 5 Analog IO The USB2 platform spectrometers have 2 IBi xi s r Analog Output programmable analog output pins and 2 programmable analog input pins available at the DB26 connector The pn
37. call will return the error code ERR NO SPECTRA IN RAM which can be used by the application software as an additional stop condition for reading spectra from RAM However reading beyond the number of scans that can be stored in RAM is a time consuming event so it is not recommended to request more scans than the maximum that can be stored The StoreToRam functionality has been implemented in most sample programs that come with the as5216x64 dll interface package To illustrate how to use StoreTORAM in combination with ANS PollScan a simple LabView sample program has been added since as5216 dll version 1 7 0 0 56 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 3 Measurement result If a measurement is ready the windows message WM_MEAS_READY is sent to the application The Wparam value of the message should be OQ in regular measurements where the StoreToRam parameter is zero to indicate SUCCESS Um StoreToRam mode Wparam holds the number of spectra that were actually saved in RAM Oincase an error occurred see section section 2 4 1 The Lparam value of the message contains the devicehandle for the spectrometer for which the data is ready LabVIEW cannot easily respond to the incoming Windows message that signals the arrival of new data AVS Pollscan allows the application program to poll the arrival of data i e to actively get the st
38. char unsigned char device identifier returned by ANS Activate identifier of analog input 0 thermistor on optical bench NIR 2 0 NIR2 2 NIR 2 5 TEC 1 1V2 225VIO 3 5VUSB 4 AD2 pin 18 at 26 pins connector 5 All pin 9 at 26 pins connector 6 NTC1 onboard thermistor 7 Not used pointer to float for analog input value Volts ERR_SUCCESS ERR_DEVICE_NOT_FOUND ERR_INVALID_DEVICE_ID ERR_INVALID_PARAMETER invalid analog input id ERR_TIMEOUT error in communication a_hDevice a DigInld a pDigIn Blocking control function Returns the status of the specified digital input a hDevice a DigInId a pDiglIn On success On error 2 3 18 AVS GetVersionInfo Function Jun 12 Avantes device identifier returned by ANS Activate identifier of digital input 1 3 0 DII Pin 24 at 26 pins connector 1 DI2 Pin 7 at 26 pins connector 2 DI3 Pin 16 at 26 pins connector pointer to digital input status 0 1 ERR SUCCESS a pDiglIn contains valid value ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR INVALID PARAMETER invalid digital input id ERR TIMEOUT error in communication int AVS GetVersionInfo AvsHandle unsigned char unsigned char unsigned char a hDevice a pFPGAVersion a pFirmwareVersion a pDLLVersion AS 5216x64 DLL Manual docx 23 website http www avantes com email Info avantes com Group Description Parameters
39. ck pixels of the detector can be taken and subtracted from the raw scope data This will happen if the Correct for Dynamic Dark option is enabled Some detector types AvaSpec 2048 2048L 3648 include dedicated optical black pixels At these optical plack pixels the intensity and thermal behaviour is the same as the active data pixels if no light falls on the detector Enabling dynamic dark Jun 12 AS 5216x64 DLL Manual docx 49 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy correction will therefore result in a baseline fluctuating round zero and measurement data will be less sensitive for temperature changes than with dynamic dark correction off The back illuminated detectors in the AvaSpec 2048x14 2048x16 2048x64 1024x122 and 1024x58 don t include optical black pixels but a few elements in the shift register can also be used for correcting the raw data The intensity at these elements may be different from the intensity of the 2048 data pixels in the dark so the baseline may not fluctuate round zero but the correction will result in a much more linear behavior of the data pixels when exposed to light Therefore it is strongly recommended to leave the default Dynamic Dark Correction state Enabled The 2048XL uses 18 dummy pixels for correcting the raw data Since these 18 pixels are located at positions 2050 to 2067 the stoppixel in the measurement structure shou
40. copy Slitor AvaSpec AvaSpec AvaSpec AvaSpec AvaSpec AvaSpec AvaSpec Fiber 128 256 HS 2048 3648 NIR256 NIR512 1024 1024x58 2048L 1024x122 2048x14 2048x16 2048x64 2048XL Pixel Pixel Pixel Pixel Pixel Pixel Pixel 63 55 um 25 um 24 um 14 um 8 um 50 um 25 um 10um n a n a 0 0 0 n a n a 25um n a 0 0 0 1 1 n a 0 50um 0 0 1 0 1 1 2 2 3 0 0 1 100um 0 1 1 2 1 2 3 5 6 0 1 1 2 200um 1 3 4 3 4 6 7 12 1 2 3 4 400um 2 3 7 8 7 8 13 14 24 25 3 4 7 8 500um 3 4 9 10 9 10 17 31 4 5 9 10 600um 4 11 12 11 12 21 37 5 6 11 12 3 2 7 Measurement structure Saturation Detection The 16 bit A D converter in the AvaSpec results in raw Scope pixel values between 0 and 65535 counts If the value of 65535 counts is measured at one or more pixels then these pixels are called to be saturated or overexposed Saturation detection can be set off m_SaturationDetection 0 or on m_SaturationDetection 1 Saturation detection is done by the as5216x64 dll after a measurement result has been sent to the PC If a measurement is the result of a number of averages the as5216x64 dll can only detect saturation if all NrOfAverage scans in a measurement were saturated for one or more pixels Only for AvaSpec 2048 spectrometers the third level is available m SaturationDetection 2 autocorrect inverted pixels The reason for this is that if the detector type in the AvaSpec 2048 Sony IL
41. ction for this channel with the a_Enable flag set to 1 The trigger source for the Master channel should not be set to Synchronized but to External The trigger mode for the Master can be set to Software if a measurement should start after a measurement request in the software or to Hardware if a measurement should start after an external hardware trigger pulse at pin 6 of the Master DB26 connector All other slave spectrometers are set into Synchronized mode by setting the Trigger Source to Synchronized and the Trigger Mode to Hardware A synchronized measurement is started by calling AVS_Measure first for all slave channels As a result these channels start listening to their SYNC input port Secondly a measurement request call to AVS_Measure needs to be posted for the Master channel If the trigger mode for the Master is software this result in nrms measurements for all channels If the trigger mode for the Master is hardware the nrms measurements for all channels are started after an external trigger has been received at at pin 6 of the Master DB26 connector The nrms parameter in the AVS_Measure function should be set to the same value for all activated channels Source code for the sample programs that support synchronization of multichannel systems can be found in the following folders examples Borland Delphi 6 multichannel examples Codegear Delphi 2009 multichannel examples LabView pol
42. ctor output range with the ADC range unsigned short m DefectivePixels 30 defective pixel numbers j Size 2 188 bytes IrradianceType struct SpectrumCalibrationType m IntensityCalib Setting during intensity calibration unsigned char m CalibrationType Bare fiber diffusor integrating sphere unsigned int m FiberDiameter Fiber diameter during intensity calibration Size 16391 1 4 16396 bytes 38 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description MeasConfig struct Type unsigned short m_StartPixel 0 4095 first pixel to be sent to PC unsigned short m_StopPixel 0 4095 last pixel to be sent to PC float m IntegrationTime 0 002 600000 integration time in ms unsigned int m IntegrationDelay 0 OXFFFFFFFF integration delay unit is internal FPGA clock cycle 0 one unit before laser start unsigned int m NrAverages 1 OXFFFFFFFF number of averages in a single measurement DarkCorrectionType m CorDynDark dynamic dark correction parameters SmoothingType m Smoothing smoothing parameters unsigned char m SaturationDetection 0 2 0 disabled 1 enabled determines during each measurement if pixels are saturated ADC value 2 16 1 2 enabled and also corrects inverted pixels only ILX554 TriggerType m Trigger trigger parameters ControlSettingsType m Contro
43. cutive and processed scans very accurately 1 12 2 Synchronization in Multichannel systems There is a major difference between the USB1 and USB2 platform multichannel systems The USB1 platform multichannel systems always needs the same detectortype for each channel Also the integration time and number of averages in a measurement request is equal for all channels With the multiple usb support in the as161 dll v 1 5 and later spectrometers with different detectors and at different integration time or average can run simultaneously but in that case there is no synchronization between these spectrometers With the USB2 platform multichannel systems the advantage of the multiple USB implementation up to 127 spectrometers possibility of using different detectors integration time and averaging per channel has been combined with the advantage of the as161 multichannel systems synchronization All USB2 platform spectrometers can be connected by a SYNC cable In syncmode one spectrometer is configured as Master all other slave spectrometers are set into Trigger by SYNC mode After a measurement request for the slave spectrometer s these spectrometers will wait until they receive the trigger signal on the SYNC cable This SYNC signal will be started if a measurement request is posted for the Master spectrometer 1 12 3 Laser control and integration time delay e g for LIBS If the AvaSpec 2048FT USB1 platform is set in
44. dentified Publisher gt Cancel I don t know where this program is from or what it s for gt Allow I trust this program I know where it s From or I ve used it before Details User Account Control helps stop unauthorized changes to your computer This installation is password protected Enter the following password to proceed with the installation Password x Avantes6961LL4a This installation is password protected Please enter the installation password into the field below Password a Press the OK button to continue Press Cancel to abort the installation cancel The setup program will check the system configuration of the computer If no problems are detected the first dialog is the Welcome dialog with some general information 6 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy In the next dialog the destination directory for the AS5216x64 DLL software can be changed The default destination directory is C AS5216x64 SE Choose Destination Location Setup will install the AS 5216 64 DLL 64 bit interface package in the following folder To install into a different folder click Browse and select another folder DLL 2 3 If you want to install the software to a different directory click the Browse button select a new directory and click OK You can choose not to inst
45. ection 65 3 6 4 EEProm structure Temperature Sensors sss nennen rennen enne 66 3 6 5 BEProm structure Tec Control icr rt Ete ce OR EN r aE AE EE UE ees des 66 3 6 6 EEProm structure ProcessControl sess enne eren enne net nn nnne enne tenens 67 Jun 12 AS 5216x64 DLL Manual docx 5 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 0 Installation The AS5216x64 DLL is the 64 bit version of the AS5216 driver interface It is needed when you want the DLL to cooperate with 64 bit programs like self written 64 bit programs or the 64 bit versions of LabVIEW or MATLAB Note that the 32 bit versions of LabVIEW or MATLAB can run perfectly well on 64 bit versions of Windows You will have to determine your version generally this is displayed in the About box of each program The Visual Studio IDE is a 32 bit application that can generate either 32 or 64 bit programs The AS5216x64 DLL package version can be installed under the following operating systems e XP Vista Windows7 x64 64 bit O S The installation program can be started by running the file setup64 exe from the CD ROM Installation Dialogs X If you use Windows Vista and the UAC warning displayed to the left Please Don t run the program unless you know where it s from or you ve used it before select Allow to install the package D setup exe M Uni
46. ectroscopy unsigned short m StoreToRam 0 OxFFFF 0 nostorage to RAM gt 0 number of spectra to be stored Size 16 bytes DarkCorrection struct Type unsigned char m_Enable 0 1 disable enable dynamic dark correction sensor dependent unsigned char m ForgetPercentage 0 100 percentage of the new dark value pixels that has to be used e g a percentage of 100 means only new dark values are used A percentage of 10 means that 10 percent of the new dark values is used and 90 percent of the old values is used for drift correction Size 2 bytes 36 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description DeviceConfig struct Configuration data structure Type unsigned short m_Len 0 OxFFFF size of this structure in bytes unsigned short m ConfigVersion version of this structure char m aUserFriendlyId 64 user friendly identification string DetectorType m Detector sensor detector related parameters IrradianceType m Irradiance intensity calibration parameters SpectrumCalibrationType m Reflectance reflectance calibration parameters SpectrumCorrectionType m SpectrumCorrect correction parameters StandaloneTypem StandAlone stand alone related parameters e g measure mode control TempSensorType m Temperature 3 calibration parameters of three temperature sensors TecControlTy
47. ed for smoothing max has to be smaller than half the selected pixel range because both the pixels on the left and on the right are used Only one model defined so far Size 3 bytes Spectrum Calibration Type struct SmoothingType float float j m Smoothing m CalInttime m aCalibConvers 4096 0 002 600000 smoothing parameter during calibration integration time during calibration ms Conversion table from Scopedata to calibrated data Size 16391 bytes 40 Avantes AS 5216x64 DLL Manual docx website http www avantes com Jun 12 email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description Spectrum struct Correct pixel values e g for PRNU Correction Type float m_aSpectrumCorrect 4096 Size 16384 bytes Standalone struct Type bool m_Enable MeasConfigT ype m_Meas signed short m_Nmsr SDCardType m_SDCard Size 56 bytes TecControl struct Tec Control parameters for AvaSpec 256 NIR2 2 Type bool m_Enable Set to True if device supports TE Cooling float m_Setpoint SetPoint for detector temperature in degr Celsius float m aFit 2 DAC polynomial Size 13 bytes TempSensor struct Calibration coefficients temperature sensor Type float m_aFit 5 Size 20 bytes TimeStamp struct Type unsigned short m_Date bit 0 4 day 0 31 bit 5 8 month 1 12 bit 9 15
48. ee also section 3 2 9 about using the integration delay in combination with the control settings laser delay and pulse width Integration delay has been implemented and tested for the detectors that support fast triggering These Fast Triggering detectors Sony ILX554 Sony ILX511 and Hamamatsu 811155 in the AvaSpec 2048 USB2 AvaSpec 2048L USB2 and AvaSpec 2048XL can be reset in respectively 1 3 3 3 and 0 3 microseconds and start a new integration time immediately after this reset The Toshiba TCD1304 in the AvaSpec 3648 USB2 also supports fast triggering in clearbuffermode see also section 2 3 35 but because of the nonlinear behavior of the detector and the missing lower Counts in clearbuffer mode this detector is less suitable for the fast triggering than the Sony detectors and the Hamamatsu 811155 For the other detector types it is recommended to set the integration delay parameter to 0 FPGA cycles 3 2 4 Measurement structure Number of Averages The signal to noise ratio of the scope data is improved by the square root of NrOfAverage Averaging is done by the microcontroller at the as5216 board therefore no time is lost by sending the individual scans from the spectrometer to the PC 3 2 5 Measurement structure Dynamic Dark Correction The pixels of the CCD detector are thermally sensitive which causes a small dark current even without exposure to light To get an approximation of this dark current the signal of some optical bla
49. for nonlinear behavior of the detector The polynomial coefficients can be stored in the EEProm and used by the application software to correct the raw AD Counts The nonlinearity calibration service determination of the polynomial coefficients is included in the IRRAD CAL irradiance calibration service but can also be ordered separately NL Calibration The m aLowNLCounts and m aHighNL Counts parameters have been added since as5216 dll version 1 1 to be able to limit the range in counts for which the correction polynomial should be applied The correction that needs to be implemented in the application software can be illustrated by using an example Suppose the following nonlinearity polynomial has been calculated m aNLCorrect 0 9 93286529334744E 001 m_aNLCorrect 1 7 18891352982627E 006 m_aNLCorrect 2 4 65464905353804E 009 m_aNLCorrect 3 1 11258994803382E 012 m_aNLCorrect 4 1 42157972847117E 016 m_aNLCorrect 5 1 03925487491128E 020 m_aNLCorrect 6 4 02566735990250E 025 m_aNLCorrect 7 6 44850644473040E 030 m_aLowNLCounts 200 0 m aHighNLCounts 15500 0 The polynomial is calculated by measuring the AD Counts for a number of pixels 10 over different integration times to get the pixel data over a wide range from in this example 200 to 15500 counts The measured AD Counts are corrected for the offset value by subtracting the dark spectrum For each of the 10 pixels in the meas
50. ger The only setting in the as161 dll for external trigger functionality is to switch this mode on or off by calling the function AVS SetExternalTrigger In external trigger mode the USB1 platform spectrometer will start one single scan on the rising edge of the TTL pulse that is Jun 12 AS 5216x64 DLL Manual docx 13 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy sent to the external trigger input port of the spectrometer In the as5216x64 dll the USB2 platform spectrometer can be set into external trigger mode by setting the trigger mode parameter into hardware trigger mode If the trigger type parameter is set to EDGE the number of measurements to perform after receiving one TTL pulse can be specified by setting the nrms parameter in the AVS_Measure function If the trigger type parameter is set to LEVEL the spectrometer will keep scanning as long as the TTL input signal is HIGH and when the signal becomes LOW it will return the average scan over all scans that were performed during the HIGH time period 7 Integration time The integration time in the as161 dll can be set with a 1 ms resolution In the as5216x64 dll a 0 01 ms 10 us resolution is used for the integration time 8 Timestamp The ANS GetScopeData function in as5216x64 dll includes a timestamp in 10 us resolution ticks generated by the microcontroller which can be used to measure the time between two conse
51. he communication with the spectrometer and initialises internal data structures Parameters a Port id of port to be used use auto detect of USB or COM port use USB port use COMI port use COM2 port use CONG port use COM4 port etc Return On success number of connected devices On error ERR DEVICE NOT FOUND RUorl c 2 3 0 ANS Done Function int AVS Done Void Group Blocking control function Description Closes the communication and releases internal storage Parameters None Return SUCCESS 2 3 3 ANS GetNrOfDevices Function int AVS GetNrOfDevices void Group Blocking control function Description Internally checks the list of connected devices and returns the number of devices attached that have the status AVAILABLE Parameters None Return gt 0 number of devices in the list 0 no devices found Jun 12 AS 5216x64 DLL Manual docx 17 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 4 AVS GetList Function Group Description Parameters Return int AVS GetList unsigned int a ListSize unsigned int a pRequiredSize AvsldentityType a pList Blocking control function Returns device information for each spectrometer connected to the ports indicated at ANS Init a ListSize number of bytes allocated by the caller to store the list data a pRequiredSize number of bytes needed to store informati
52. indows Start Menu The source code of the example programs can be found in the Examples folder 8 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 1 Version History This section will be used to describe the new features in as5216x64 dll c q as5216 dll compared to the previous versions 1 1 New in version 2 3 0 0 A new function has been added for the NIR detectors all AvaSpec NIR models The AvaSpec NIR models can be operated in Low Noise or High Sensitivity mode The new function AVS_SetSensitivityMode can be used to switch between these modes See also section 2 3 37 1 2 New in version 2 2 0 0 Added support for the new detector in the AvaSpec 2048XL spectrometers the Hamamatsu 11155 The version of the Qt libraries was updated to 4 6 3 The AvaSpec HS 1024x58 and 1024x122 High Sensitivity series with Hamamatsu S7031 detector were already supported in as5216x64 dll v 2 1 but detector specific data such as minimum integration time smoothing and triggering characteristics were missing in the AS5216x64 DLL v2 1 manual 1 3 New in version 2 1 0 0 Added dynamic dark support for the new detectors in the AvaSpec 2048x16 and the AvaSpec 2048x64 spectrometers It is strongly recommended to keep dynamic dark correction enabled default state See also section 3 2 5 Minimum integration time for the AvaSpec 2048x16 changed from 0 91m
53. ing and start measuring with a call to AVS_Measure using 1 as the number of measurements a_Nmsr There is an amount of 4MB available for scans corresponding with 1013 scans of 2048 pixels Scanning less pixels will yield a larger capacity in scans The AVS_Measure message signaling the arrival of data will have a WParam value equal to the number of scans stored in RAM In regular measurements this value only signals success with value ERR_SUCCESS or failure with a negative error message Alternatively when using AVS_PollScan instead of a message driven interface the AVS_PollScan function will return 1 when the StoreToRam scans are available and 0 as long as they are not The scans can subsequently be read with a corresponding number of calls to AVS_GetScopeData If you request more scans than will fit in memory scanning will continue until the memory is fully used therefore you should always request the number of scans that is returned in Wparam when using Windows Messaging If using StoreTORAM in combination with AVS PollScan the number of scans that can be processed by subsequently calling AVS_GetScopeData will normally be equal to the requested number of scans in the StoreTORAM parameter If more scans are requested than can be stored e g 1500 scans of 2048 pixels it can happen that ANS GetScopeData will be called too many times In case of the example only the first 1013 calls to AVS GetScopeData will return SUCCESS The next
54. ion Group Description Remark Parameters Return Jun 12 Avantes int AVS_UseHighResAdc AvsHandle a_hDevice bool a_Enable Internal DLL write function With the as5216 electronic board revision 1D and later a 16bit resolution AD Converter is used instead of a 14bit in earlier hardware versions As a result the ADC Counts scale can be set to the full 16 bit 0 65535 Counts For compatibility reasons with previous hardware revisions the default range is set to 14 bit 0 16383 75 ADC Counts When using the 16 bit ADC in full High Resolution mode 0 65535 please note that the irradiance intensity calibration as well as the nonlinearity calibration are based on the 14bit ADC range Therefore if using the nonlinearity correction or irradiance calibration in your own software using the High Resolution mode you need to apply the additional correction with ADCFactor 4 0 as explained in detail in section 3 6 1 and 3 6 3 a_hDevice device identifier returned by AVS_Activate a_Enable True use 16bit resolution ADC Counts range 0 65535 False use 14bit resolution ADC Counts range 0 16383 75 On success ERR SUCCESS On error ERR OPERATION NOT SUPPORTED this function is not supported by as5216 hardware version R1C or earlier AS 5216x64 DLL Manual docx 33 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 37 ANS SetSensitivityMode Function G
55. ion 2 3 36 A minor bug in the smoothing routine has been solved The sample program in Visual Basic 6 0 has been modified because it crashed after running continuously for a number of hours The cause was found to be in the VB6 Timer function that was used to show some statistics about the measurement speed By eliminating the Timer function from the sample program this problem was solved Feedback from VB6 programmers who know how to use the Timer function or an equivalent without crashing the application is appreciated 1 10 New in version 1 2 0 0 Visual Basic 6 0 developers may have noticed that the programs developed with as5216 dll v 1 1 or earlier and Visual Basic 6 0 are stable but the Visual Basic 6 0 Integrated Development Environment IDE was not Running the program from the VB6 IDE caused the IDE to close down without saving any changes as soon as the program was closed To solve this problem a special as5216 dll version 1 2 0 1 has been created which can be used in the VB6 IDE to develop and debug your programs AS5216 dll version 1 2 0 1 will be installed in the VB6 example folder as well as a readme txt file with recommendations for redistributing programs developed with Visual Basic 6 0 Furthermore a parameter structure has been added to the EEProm to control the TEC cooling for the NIR spectrometer AvaSpec 256 NIR2 2 More detailed information about this TEC Control structure can be found in section 3 6 5
56. ision by zero no problems occurred in previous as5216 dll versions However if floating point exceptions did occur in the application or were thrown by other third party libraries this may have resulted in a fatal crash of the application In as5216 dll version 1 7 0 0 this rare problem has been solved by setting the FPU Control Word to the MicroSoft default This solved the fatal crash in the few occasions that were reported in the past 5 years Addition of new Delphi and C Builder sample programs The old Delphi 6 0 and C Builder 5 0 sample programs are not fully compatible with the most recent Delphi and C Builder versions Since the Codegear 2009 versions the character char type size is 2 bytes Unicode whereas in previous versions this type was only 1 byte If 1 byte characters need to be used the AnsiChar type should be used in the Codegear 2009 environment Addition of a simple Visual Basic 6 0 sample program which uses AVS PollScan instead of Windows Messaging Addition of a simple LabView sample program to illustrate how the StoreTORAM functionality can be implemented in combination with AVS PollScan Support of the new AvaSpec ULS 350F USB2 AvaSpec ULS 950F US B2 AvaSpec ULS 1350F USB2 and AvaSpec ULS 1650F USB2 spectrometers The F in the name refers to Fast because of the Fast minimum integration time that can be used for these spectrometers see also section 3 2 2 For example with the AvaSpec ULS 350F
57. ith their neighbor pixels Xn25 Xn ls Xn 1 ANG Xny2 The optimal smoothpix parameter depends on the distance between the pixels at the detector array and the light beam that enters the spectrometer For the AvaSpec 2048 the distance between the pixels on the CCD array is 14 micron With a 200 micron fiber no slit installed connected the optical pixel resolution is about 14 3 CCD pixels With a smoothing parameter set to 7 each pixel will be averaged with 7 left and 7 right neighbor pixels Averaging over 15 pixels with a pitch distance between the CCD pixels of 14 micron will cover 15 14 210 micron at the CCD array Using a fiber diameter of 200 micron means that we will lose resolution when setting the smoothing parameter to 7 Theoretically the optimal smoothing parameter is therefore 6 The formula is slit size pixel size 1 2 In the table below the recommended smoothing values for the AvaSpec spectrometer are listed as function of the light beam that enters the spectrometer This light beam is the fiber core diameter or if a smaller slit has been installed in the spectrometer the slit width Note that this table shows the optimal smoothing without losing resolution If resolution is not an important issue a higher smoothing parameter can be set to decrease noise at the price of less resolution 50 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectros
58. l control parameters Size 41 bytes ProcessControl struct Type Settings that can be used for the 2 analog and 10 digital output float m_AnalogLow 2 signals at the DB26 connector The analog settings can be used float m_AnalogHigh 2 to define a function output range that should correspond to the float m_DigitalLow 10 0 5V range of the analog output signals float m DigitalHigh 10 The digital output settings can be used as lower and upper thresholds Size 96 bytes SDCardType Struct Settings for SD Card needed in stand alone operation bool m_Enable unsigned char m_SpectrumType char m_aFileRootName 6 TimeStampType m_TimeStamp Size 12 bytes Jun 12 AS 5216x64 DLL Manual docx 39 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description SensorT ype unsigned char 0 Ox12 0x00 Reserved 0x01 2 Hams8378 256 0x02 Hams8378 1024 0x03 ILX554 0x04 Hams9201 0x05 Toshiba TCD1304 0x06 TSL1301 0x07 TSL1401 0x08 Hams8378 512 0x09 Hams9840 0x0A ILX511 OxOB Hams10420 2048x64 OxOC Hams11071 2048x64 0x0D Hams7031 1024x122 OxOE Hams7031 1024x58 OxOF Hams11071 2048x16 0x10 Hams11155 0x11 SU256LSB 0x12 SUSI2LDB Smoothing Type struct unsigned short unsigned char j m SmoothPix m SmoothModel 0 2048 number of neighbour pixels us
59. ld be set to 2067 Setting the stoppixel to a lower value for pixel reduction will have no effect with dynamic dark correction enabled because these last 18 pixels are needed for the correction algorithm Some NIR detector types NIR256 2 0TEC NIR256 2 5TEC also support dynamic dark because a few datapixels are blackened during fabrication of the optical bench These blackened pixels can then be used for dynamic dark correction If the spectrometer does not include blackened datapixels nor dedicated optical black pixels enabling the dynamic dark correction results in a return value of 116 when calling AVS_PrepareMeasure This error can be neglected by the application measurements can be proceeded but dynamic dark correction is not possible in that case The Dark Correction Type structure includes an m_enable and m_ForgetPercentage field see also section 2 4 Measurements have shown that taking into account the historical dark scans does not make much difference The recommended value for m_ForgetPercentage is therefore 100 3 2 6 Measurement structure Smoothing The smoothing type structure includes a smoothpix and a smoothmodel field In the current version of the as5216x64 dll there is just one smoothing model available 0 in which the spectral data is averaged over a number of pixels on the detector array For example if the smoothpix parameter is set to 2 the spectral data for all pixels x on the detector array will be averaged w
60. libration fj NTC2Calbraion M Thermistor Calibration Intercept 11868976E 2 Intercept 0 0000000E 0 Intercept 5 8700001 E xiI 7 0361015E 1 xi 0 0000000E 0 xi EIER x2 f2 1019672E 1 x2 0 0000000E 0 x2 0 0000000E 0 x3 3 6442714E 0 x3 0 0000000E 0 x3 0 0000000E 0 x4 1 9929810E 1 x4 0 0000000E 0 x4 0 0000000E 0 3 6 5 EEProm structure Tec Control Detector Stand lone Irradiance Calibration Reflectance Calibration Spectrum Correction Temperature Sensors Tec Control Enable SetPoint 1200 degree C DAC Coefficients x0 fi 510 xi 0 200 The TecControl parameters are used to control the cooling of the detector in the AvaSpec 256 NIR 2 0 2 2 2 5 the AvaSpec 2048TEC US B2 and AvaSpec 3648TEC USB2 For these spectrometer types the m Enable flag will be set to true The default setpoint in degrees Celsius is 20 C for the AvaSpec 256 NIR two stage cooling and 5 C for the 2048TEC and 3648TEC one stage cooling but it can be changed if needed It is not recommended to change the DAC polynomial m aFit which has been optimized for the detector type For recent models AvaSpec ULS2048 TEC and for the ASM5216 boards the XO and X1 coefficients in the m aFit polynomial are 0 0 because the PID control has been entirely implemented in the firmware 66 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avante
61. ling_mc Synchronization is done at a measurement level A measurement can include a number of scans to average This number of average scans is only synchronized for the first scan For example if the number of measurements integration time and number of average for two channels are set to Channel A nrms 2 integration time 100ms average 3 Channel B nrms 2 integration time 65ms average 2 then the data acquisition timing and response in synchronized mode will look like Idle time channel B Idle time channel B Measurement Measurement Request Result channel A Channel A Measurement easurement Channel B Result channel B Synchronized Result channel B Measurement Start n 2 Measurement Result channel A All nrms 2 ready Note that in the example above the number of averages for channel B can be set to 4 without losing time because the extra two scans will be taken in the idle time for channel B 54 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 2 9 Measurement structure Control Settings Control Settings Flashes per Scan 0 Laser delay o n 0 be Laser width ns Laser wavelength 0 000 ES Spectra stored to RAM fi opoo The Control Settings include parameters to control A pulsed lightsource m StrobeControl A laser pulse m LaserDelay and m LaserWidth e The Number of S
62. ll such as start and stoppixel AVS GetStartStopPixel and ANS SetStartStopPixel wavelength calibration coefficients ANS GetWLCoef and ANS SetWLCoef gain ANS GetGain and ANS SetGain and offset AVS GetOffset and AVS_SetOffset The Eeprom for the USB2 spectrometers has a lot more memory available to store all kind of parameters These parameters have been defined in the DeviceConfigT ype structure see section 2 4 The functions ANS GetParameter and AVS SetParameter in as5216x64 dll can be used to read write the DeviceConfigType structure from to Eeprom Jun 12 AS 5216x64 DLL Manual docx 15 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 ASS216x64 DLL description 2 1 Interface overview The interface from the PC to the DLL is based on a function interface The interface allows the application to configure a spectrometer and to receive and send data from and to the spectrometer 2 2 Usage of the AS5216x64 DLL The DLL uses a single pair of open and close functions AVS_Init and AVS_Done that have to be called by an application As long as the open function is not yet called or not successfully called all other functions will return an error code The open function AVS_Init tries to open a communication port for all connected devices The close function AVS_Done closes the communication port s and releases all internal data storage The interface between the
63. ltiple spectrometers Synchronized Single channel spectrometers or multiple spectrometers in ASYNC mode can operate in one of the three following Trigger settings Trigger Source should be set to External Trigger Mode Software This Trigger setting is used when one or more nrms measurements should start after a measurement request in the software AVS Measure call The Edge Level is irrelevant because this only applies to an external hardware trigger Trigger Mode Hardware Edge triggered This trigger setting is used when one or more nrms measurements should start after an external hardware trigger pulse has been received at pin 6 of the DB26 connector First a measurement request is posted in the software AVS Measure call Then the spectrometer waits until a rising edge of the TTL input pulse is detected at pin 6 of the DB26 connector before nrms scans are started The delay between the rising edge of the TTL pulse and the start of the integration time cycle depends on the spectrometer type as shown in the table below Spectrometer Type Minimum Delay us Maximum Delay ps AvaSpec 128 USB2 9 60 AvaSpec 256 USB2 0 80 0 84 AvaSpec 1024 USB2 0 80 0 84 AvaSpec 2048 US B2 1 28 1 30 AvaSpec 2048L USB2 3 28 3 30 AvaSpec 3648 USB2 clearbuffer mode 0 28 0 30 AvaSpec NIR256 1 7 AvaSpec NIR256 2 0TEC AvaSpec NIR256 2 5TEC 0 600 AvaSpec NIR256 1 7TEC AvaSpec NIR2
64. n installed the Installation Complete dialog shows up Click Finish Connecting the hardware Connect the USB connector to a USB port on your computer with the supplied USB cable Windows XP will display the Found New Hardware dialog Select the default option to install the software automatically and click next Jun 12 AS 5216x64 DLL Manual docx y Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy After the Hardware Wizard has completed the following dialog is displayed under Windows XP Found New Hardware Wizard Completing the Found New Hardware Wizard uf The wizard has finished installing the software for Sai AvaSpec USB2 Click Finish to close the wizard lt Back Click Finish to complete the installation Please note that if the spectrometer is Connected to another USB port to which it has not been connected before the Found New Hardware Wizard will need to install the software for this port as well For this reason this Wizard will run NrOfChannel times for a multichannel AvaSpec USB2 spectrometer system This happens because inside the housing the USB ports for each spectrometer channel are connected to a USB Hub Windows Vista or Windows 7 will install the driver silently without displaying the Found New Hardware Wizard dialogs Launching the software This AS5216x64 DLL manual can be started from the W
65. n yet ERR_INVALID_DEVICE_ID device handle is not known in DLL ERR_TIMEOUT error in communication ERR_INVALID_PARAMETER no SD card present AS 5216x64 DLL Manual docx 27 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 08 AVS SaveSpectraToSDCard Function Group Description Parameters Return 28 Avantes int AVS SaveSpectraToSDCard AvsHandle bool unsigned char char TimeStampType a hDevice a Enable a SpectrumType a aFileRootName 6 a TimeStamp Blocking data send function Enables disables writing spectra to file if disabled the other parameters are neglected a hDevice a Enable a SpectrumType a aFileRootName 6 a TimeStamp On success On error device identifier returned by ANS Activate enable disable storage of spectra to SD card 0 Dark Spectrum 1 Reference Spectrum 2 Normal Spectrum The spectrumtype determines the file extension drk ref or roh string that is used as first part of the name of the stored spectra file time and date that will be used when the spectra are stored ERR SUCCESS ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER ERR OPERATION NOT SUPPORTED SD Card not present AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 29 AVS_SetParameter
66. nd will be sent to the PC This prescan mode is default and should be used in most applications like with averaging only one prescan is generated for a nr of averages with the use of an AvaLight XE one or more flashes per scan and with multichannel spectrometers The advantage of this mode is a very stable and linear spectrum The disadvantage of this mode is that a minor lt 5 image of the previous scan ghostspectrum is included in the signal This mode cannot be used if the integration time cycle needs to start within microseconds after the spectrometer is externally triggered but since the prescan duration is exactly known at each integration time accurate timing 21 nanoseconds precision in external trigger mode is very well possible in prescan mode The Clear Buffer mode In this mode the Toshiba detector buffer will be cleared before a scan is taken This clear buffer mode should be used when timing is important like with fast external triggering The advantage of this mode is that a scan will start at the time of an external trigger the disadvantage of this mode is that after clearing the buffer the detector will have a minor threshold in which small signals 500 counts will not appear and with different integration times the detector is not linear 32 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 36 AVS_UseHighResAdc Funct
67. ng Out of Range ERR INVALID MEASPARAM AVG SAT2 110 Use of Saturation Detection Level 2 is not Jun 12 AS 5216x64 DLL Manual docx 43 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Return code Value Description compatible with the Averaging function ERR INVALID MEASPARAM AVG RAM 111 Use of Averaging is not compatible with the StoreToRam function ERR INVALID MEASPARAM SYNC RAM 112 Use of the Synchronize setting is not compatible with the StoreToRam function ERR INVALID MEASPARAM LEVEL RAM 113 Use of Level Triggering is not compatible with the StoreToRam function ERR INVALID MEASPARAM SAT2 RAM 114 Use of Saturation Detection Level 2 Parameter is not compatible with the StoreToRam function ERR INVALID MEASPARAM FWVER RAM 115 The StoreToRam function is only supported with firmware version 0 20 0 0 or later ERR INVALID MEASPARAM DYNDARK 116 Dynamic Dark Correction not supported ERR_NOT_SUPPORTED_BY_SENSOR_TYPE 120 Use of AVS_SetSensitivityMode not supported by detector type ERR_NOT_SUPPORTED_BY_FW_VER 121 Use of AVS_SetSensitivityMode not supported by firmware version ERR_NOT_SUPPORTED_BY_FPGA_VER 122 Use of AVS_SetSensitivityMode not supported by FPGA version 44 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spect
68. o be used to stop a pending measurement with long integrationtime and or high number of averages a_hDevice device identifier returned by AVS_Activate On success ERR SUCCESS On error ERR_DEVICE_NOT_FOUND ERR_INVALID_DEVICE_ID ERR_TIMEOUT error in communication ERR INVALID PARAMETER AS 5216x64 DLL Manual docx 31 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 35 AVS_SetPrescanMode Function int AVS_SetPrescanMode AvsHandle a hDevice bool a Prescan Group Blocking data send function Description If a Prescan is set the first measurement result will be skipped This function is only useful for the AvaSpec 3648 because this detector can be operated in prescan mode or clearbuffer mode see below Parameters a hDevice device identifier returned by ANS Activate a Prescan If true the first measurement result will be skipped prescan mode else the detector will be cleared before each new scan clearbuffer mode Return On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication The Toshiba detector in the AvaSpec 3648 can be used in 2 different control modes The Prescan mode default mode In this mode the Toshiba detector will automatically generate an additional prescan for every request from the PC the first scan contains non linear data and will be rejected the 2 scan contains linear data a
69. o clarified by using an event structure for the different command buttons The VB net VC and VC samples were adapted for 64 bit Visual Studio 2008 These are all managed code samples The marshalling code of the VB sample was extensively changed which allows it to now directly pass structures to the DLL without translation to a linear array of bytes AS 5216x64 DLL Manual docx 9 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy The 32 bit only samples for Delphi C Builder VB6 and VC 6 were removed from the 64 bit DLL package Addition of support for the new detectors in the AvaSpec 2048x16 and the AvaSpec 2048x64 spectrometers 1 5 New in version 1 7 0 0 Support of Dynamic Dark Correction for AvaSpec NIR 2 0 2 2 2 5 The offset level for the cooled NIR detectors strongly depends on the ambient temperature By using Dynamic Dark Correction the offset level is measured with each new scan at a few blocked data pixels and the measured signal is subtracted from all other data pixels See also section 3 2 5 Floating Point Exceptions handling The program environment in which the as5216 dll is written C Builder uses by default another way of handling floating point exceptions than the MicroSoft Visual Studio programming environment in which the application software can be developed As long as no floating point exceptions are created by the application e g because of div
70. ode for each detector type This is the mode in which the detector operates if the function AVS SetSensitivityMode is not called The default mode is also the mode that is used in models with older firmware and FPGA versions Note that irradiance calibrated systems are calibrated in the default mode Changing the sensitivity mode for an irradiance and or nonlinearity calibrated system requires a recalibration of the system Spectrometer Detector Type FPGA version Default Mode AvaSpec NIR256 1 7 AvaSpec NIR256 2 0TEC AvaSpec NIR256 2 5TEC SENS HAMS9201 x 13 x x Low Noise AvaSpec NIR256 1 7TEC AvaSpec NIR256 2 2TEC SENS SU256LSB x 5 x x High Sensitivity AvaSpec NIR512 1 7TEC AvaSpec NIR512 2 2TEC SENS SUSI2LDB x 4 x x High Sensitivity AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com 2 4 Data Elements Several data types used by the DLL and necessary for the application interface are given below Note Table 1 API data elements AVAN TES solutions in spectroscopy To match the structures that are used in the AS5216 firmware the structures mentioned here have to be compiled with byte alignment Type Format Value Range Description bool 8 bits value 0 1 false true char 8 bits value 128 lt x lt 127 signed character unsigned char 8 bits value 0 lt x lt 255 unsigned character short 16 bits value 32768 lt x
71. on a pList pointer to allocated buffer to store identity information 20 number of devices in the list 0 no devices found ERROR INVALID SIZE if a pRequiredSize gt a ListSize then allocate larger buffer and retry operation 2 3 5 ANS Activate Function Group Description Parameters Return AvsHandle AVS Activate AvsIdentityType a_pDeviceld Blocking control function Activates selected spectrometer for communication and reads device configuration data from Eeprom On success AvsHandle handle to be used in subsequent function calls On error INVALID_AVS_HANDLE_VALUE 2 3 6 AVS_Deactivate Function Group Description Parameters Return 18 bool AVS_Deactivate AvsHandle a_hDeviceld Blocking control function Closes communication with selected spectrometer a_hDeviceld device identifier returned by AVS_Activate true device successfully closed false device identifier not found AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com Avantes AVAN TES solutions in spectroscopy 2 3 7 ANS Register Function Group Description Parameters Return bool AVS_Register HWND a_hWnd Blocking control function Installs an application windows handle to which device attachment removal messages have to be sent a_hWnd Application window handle true Registration successful false registration failed or function not supported
72. onTime Stop pixel 2047 SS unsigned int m IntegrationDelay Integratontime 300 bed 100 unsigned int m NrAverages ER DarkCorrectionType m CorDynDark Cl RM ns Smoothing Settings SmoothingType m Smoothing Number of averages 1 Model 0 unsigned char m SaturationDetection Saturation detection 1 Nr Of Pixels 0 TriggerType m Trigger s ControlSettingsType m Control Trigger Settings Control Settings E Trigger mode Hardware Flashes per Scan H v Software Laser delay 0 re Trigger source V External Laser width 0 ns I Synchronized W Edge Laser wavelength 785 000 am rigger type bud FI Spectra stored to RAM 0 The parameters in the measurement structure have been briefly described in section 2 4 In this section a more detailed description will be given 3 2 1 Measurement structure Start and Stoppixel The start and stoppixel are the first and last pixel to be sent to the PC The full range for a spectrometer is between startpixel 0 and stoppixel NrOfPixels 1 where NrOfPixels specifies the total pixels available for the detectortype used in the spectrometer see also ANS GetNumbPixels If the wavelength range of a spectrometer exceeds 1100nm 1160nm for the AvaSpec 2048x14 and the detectortype is different from HAMS9201 AvaSpec NIR the stoppixel can be set to the pixelnumber that corresponds to a wavelength of 1100 1160 nm because the sensitivity is almost zero at this wavelength range Reducing the range increases the data tran
73. one single call to ANS Measure 1 1s infinite On success ERR SUCCESS On error ERR OPERATION PENDING ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR INVALID PARAMETER ERR INVALID STATE 2 3 10 AVS_GetLambda Function Group Description Parameters Return int AVS_GetLambda AvsHandle a_hDevice double a_pWavelength Internal data read function Returns the wavelength values corresponding to the pixels if available This information is stored in the DLL during the AVS Activate procedure The DLL does not test if a_pWaveLength is correctly allocated by the caller a_hDevice device identifier returned by AVS Activate a pWaveLength array of double with array size equal to number of pixels On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID 2 3 11 ANS GetNumpPixels Function Group Description Parameters Return 20 Avantes int AVS GetNumPixels d AvsHandle a_hDevice unsigned short a_pNumPixels Internal data read function Returns the number of pixels of a spectrometer This information is stored in the DLL during the AVS_Activate procedure a_hDevice device identifier returned by AVS Activate a_pNumPixels pointer to unsigned integer to store number of pixels On success ERR_SUCCESS On error ERR_DEVICE_NOT_FOUND ERR_INVALID_DEVICE_ID AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com AVAN TES
74. ors Enable gt Measurement Settings BD and Settings Start pixel o Dark Correction Settings WC Enable Stop pixel 127 Spectrum Type H Integration time 0 50 ms FileRootN D ileRootName Integration Delay 21 ns Smoothing Settings r TimeStamp Number of averages 1 Model D Saturation detection 0 Nr Of Pixels H DateN 13398 ateNr Trigger Settings 3 Control Settings Day 0 31 j2 Trigger mode Hardware Flashes per Scan E Month 112 P IV Software Laser delay 0 ns Years 1980 28 Trigger source v Extemal Laser width 0 ns I Synchronized E Laser wavelength 0 000 m T scht 20836 Trigger type w Edge z T T Level Spectra stored to RAM 0 5 Sec 0 30 20 Minutes 0 59 D Hous 0 23 I5 Nr Of Measurements j The Measurement parameter structure MeasConfigType has been described in detail in section 3 2 as well as the Number of Measurements parameter m_Nmsr The SDCardType structure includes the following parameters bool unsigned char char TimeStampType m_Enable m_SpectrumType m_aFileRootName 6 m_TimeStamp These are the same parameters that have been defined in the function AVS_SaveSpectraToSDCard The boolean m Enable is not used but has been added for possible future standalone functionality to start saving spectra to the SDCard if m Enable becomes true The m SpectrumType can be set to 0 1 or 2 to indicate that a
75. ot received yet ERR_TIMEOUT 6 No answer received from device Reserved 7 ERR INVALID MEAS DATA 8 No measurement data is received at the point ANS GetScopeData is called ERR INVALID SIZE 9 Allocated buffer size too small ERR INVALID PIXEL RANGE 10 Measurement preparation failed because pixel range is invalid ERR INVALID INT TIME 11 Measurement preparation failed because integration time is invalid for selected sensor ERR_INVALID_COMBINATION 12 Measurement preparation failed because of an invalid combination of parameters e g integration time of 600000 and Navg gt 5000 Reserved 13 ERR NO MEAS BUFFER AVAIL 14 Measurement preparation failed because no measurement buffers available ERR UNKNOWN 15 Unknown error reason received from spectrometer ERR COMMUNICATION 16 Error in communication occured ERR NO SPECTRA IN RAM 17 No more spectra available in RAM all read or measurement not started yet ERR INVALID DLL VERSION 18 DLL version information can not be retrieved ERR NO MEMORY 19 Memory allocation error in the DLL ERR DLL INITIALISATION 20 Function called before AVS_Init is called ERR INVALID STATE 21 Function failed because AS5216 is in wrong state e g AVS_Measure without calling AVS_PrepareMeasurement first ERR INVALID PARAMETER NR PIXEL 100 NrOfPixel in Device data incorrect ERR INVALID PARAMETER ADC GAIN 101 Gain Setting Out of Range ERR INVALID PARAMETER ADC OFFSET 102 OffSet Setti
76. our sample programs are available A comprehensive program for a single channel AvaSpec USB2 which also includes subvi s for all functions in the as55216x64 dll LabViewSingleChan folder A simple sample program that uses AVS PollScan instead of Windows Messaging polling folder A multichannel example program which illustrates how to run multiple spectrometer channels fixed to 2 channels in the example program in SYNC mode as well as ASYNC mode polling mc folder A simple sample program that illustrates how the StoreToRam functionality can be implemented in combination with ANS PollScan polling StoreTORAM folder 3 1 Initialization and Activation of a spectrometer After starting the full QtDemo program located in the Qtdemo full demo folder the main window will be displayed By clicking the Open Communication button the AVS Init function is called and if successful the serial number and status for the connected spectrometer s is collected AVS GetNrOfDevices and ANS GetList The result is displayed in the list at the top left of the window as shown in the figure below 46 Avantes AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy j MainForm E E ni x M Prepare Measurement Setting Measure L Start pixel Dark Correction Settings Enable Nr Of Scan
77. pe m TecControl TecControl parameters ProcessControlType m ProcessControl ProcessControl parameters unsigned char m aReserved 13832 makes structure size equal to 63484 bytes Size 63484 DeviceStatus enum UNKNOWN 0 initial state AVAILABLE 1 device is connected to PC and not in use IN_USE_BY_APPLICATION 2 device is connected to PC and in use by caller IN_USE_BY_OTHER 3 device is connected to PC and in use by other application Jun 12 AS 5216x64 DLL Manual docx 37 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description DetectorT ype struct Sensor configuration structure SensorT ype m_SensorType sensor identification unsigned short m_NrPixels 0 4096 number of pixels of sensor float m aFit 5 polynomial coefficients needed to determine wavelength bool m_NLEnable enable disable nonlinearity correction double m aNLCorrect 8 polynomial coefficients needed for non linearity correction double m aLowNLCounts lower counts limit for nonlinearity correction double m aHighNLCounts higher counts limit for nonlinearity correction float m Gain 2 1 5 7 gain correction for spectrometer ADC range is divided in 64 steps float m Reserved not used float m Offset 2 0 350 40 350 offset correction for spectrometer ADC in Volt range is divided in 512 steps float m ExtOffset 0 0 2 0 offset to match the dete
78. pectra that will be stored to onboard RAM m_StoreToRam Pulsed lightsource control A pulsed light source like the AvaLight XE needs to be synchronized with the integration time cycle The m_StrobeControl parameter determines the number of pulses the spectrometer sends out at pin 5 at the DB26 connector during one integration time cycle The maximum frequency at which the AvaLight XE operates is 100 Hz This means that the minimum integration time for 1 pulse per scan is 10 ms When setting the number of pulses e g to 3 the minimum integration time should be 30 ms The as5216x64 dll does not check for this limitation because other light sources may operate at higher frequencies and should also be controllable by the AvaSpec and as5216x64 dll Laser pulse control For the fast trigger detectors ILX554 and ILX511 in the AvaSpec 2048 and AvaSpec2048L pin 23 at the DB26 connector can be used to send out a TTL signal which is related to the start of the integration time cycle In the figure below a measurement is started at the rising edge of the Trig signal This can be a hardware or software trigger see also section 3 2 8 The TTL signal at pin 23 Laser is set after the laserdelay T1 expires The pulsewidth for the laser pulse T3 is set by the m_LaserWidth parameter The integration time cycle starts after the integration delay parameter see section 3 2 3 expires Trig Integration The unit for T1 T2 and T3 is FPGA clock cycles
79. rameters Return int ANS GetFirstDirectory AvsHandle a hDevice unsigned char a pName Blocking read function Returns the name of the directory in the root directory of the SD card a hDevice device identifier returned by ANS Activate 1 for first active device a pName directory name 14 characters including terminating zero On success ERR SUCCESS a pName buffer contains valid info On error ERR DEVICE NOT FOUND communication not open yet ERR INVALID DEVICE ID device handle is not known in DLL ERR TIMEOUT error in communication ERR INVALID PARAMETER no SD card present or no directory found on the SD card 2 3 25 AVS GetNextDirectory Function Group Description Parameters 26 Avantes int AVS_GetNextDirectory AvsHandle a hDevice unsigned char a pPrevName unsigned char a pNextName Blocking read function Returns the name of the next directory in the root directory after a pPrevName a hDevice device identifier returned by ANS Activate 1 for first active device a pPrevName directory name 14 characters including terminating zero this is the name returned by AVS GetFirstDirectory or by the previous call to AS 5216x64 DLL Manual docx Jun 12 website http www avantes com email Info avantes com Return AVAN TES solutions in spectroscopy AVS_GetNextDirectory a_pNextName directory name 14 characters including terminating zero On success ERR_SUCCESS
80. request 3 Stopping a measurement A measurement in as161 dll cannot be interrupted After a measurement request the application must wait for the response before changing measurement parameters or sending other commands to the spectrometer The as5216x64 dll includes a function AVS StopMeasure that can be called to interrupt a measurement request 4 Spectrometer not blocked while measurement is pending With the USB1 platform spectrometers the spectrometer is blocked for receiving commands as long as a measurement is pending A measurement is pending between the call to AVS Measure and the DATA READY message from the as161 dll to the application The USB2 platform spectrometers are not blocked from receiving commands while a measurement is pending This means that you can e g control the digital and analog IO ports while a measurement is pending 5 Measurement parameters There are a lot of parameters involved that determine the result of a scan such as integration time number of averages smoothing pixelselection dark correction etc In the as161 dll a lot of different functions are used to set these parameters integration time and averaging are set in ANS Measure smoothing in ANS SetSmoothing Pixelselection in AVS SetPixelSelection etc The as5216x64 dll uses a measurement structure which includes all measurement parameters and uses only one function ANS PrepareMeasure to send these parameters to the spectrometer 6 External Trig
81. roscopy 2 4 2 Windows messages The following table gives an overview of window messages Windows message WPARM identifier LPARM Description WM_MEAS_READY 0 on success lt 0 one of the above error reasons gt 0 in StoreTORAM mode device handle After measurement data is available the DLL sends this message to the application The command value used is WM MEAS READY which is defined as WM APP 1 for the 64 bit version of the DLL as5216x64 dll WM DEVICECHANGE DBT DEVNODES CHANGED 7 After device attachment removal Windows sends this message to the application Jun 12 AS 5216x64 DLL Manual docx 45 email Info avantes com Avantes website http www avantes com AVAN TES solutions in spectroscopy 3 Example source code Example source code can be found in the directory tree of the driver Sample programs including header files and link libraries where appropriate are provided for the following programming environments Microsoft Visual C 2008 combined with the Qt4 framework native code LabVIEW 20090 64 bit version native code MATLAB R2010a 64 bit version native code Microsoft Visual Basic 2008 managed code for net version 3 5 Microsoft Visual Cft 2008 managed code for net version 3 5 Microsoft Visual C 2008 managed code for net version 3 5 For VC 2008 Qt4 both a comprehensive and a simple sample are provided For LabView f
82. roup Description Parameters Return Remark 34 Avantes int AVS SetSensitivityMode AvsHandle a hDevice unsigned mt a SensitivityMode Blocking data send function The AvaSpec NIR models can be operated in LowNoise a SensitivityMode 0 or High Sensitivity Mode a SensitivityMode 0 a hDevice device identifier returned by AVS Activate a SensitivityMode 0 LowNoise gt 0 High Sensitivity On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR NOT SUPPORTED BY SENSOR TYPE ERR NOT SUPPORTED BY FW VER ERR NOT SUPPORTED BY FPGA VER AVS SetSensitivityMode is supported by the following detector types HAMS9201 SU256LSB and SU512LDB Calling this function for another detectortype will result in a return value of 120 ERR NOT SUPPORTED BY SENSOR TYPE This function requires a firmware function x 30 x x or later Calling this function for a spectrometer for which an older firmware version is loaded will result in a return value of 121 ERR NOT SUPPORTED BY FW VER The detector specific FPGA needs to support the sensitivity selection feature as well The table below shows the minimum required version for the 3 detector types Calling AVS SetSensitivityMode for a spectrometer for which an older FPGA version is loaded will result in a return value of 122 ERR NOT SUPPORTED BY FPGA VER The table below also lists the Default M
83. rradiance spectrum How to convert ScopeData A D Counts to a power distribution pWatt cm nm In the application software the smoothpix value in the preparemeasurement structure should be set to the same value as the smoothpix during the intensity calibration This value can be found in m Irradiance m IntensityCalib m Smoothing m SmoothPix Also before the irradiance intensity for a pixel i can be calculated a dark spectrum 2 A D Counts with no light exposed to spectrometer should be saved once at the integration time that will be used in the measurements The dark spectrum for each pixel i can be called e g darkdata i The irradiance intensity at a certain pixel i i 0 totalpixels 1 can then be calculated from ScopeData i Measured A D Counts at pixel i AVS_GetScopeData DarkData i Dark data at pixel i saved in application software IntensityCal i m Irradiance m IntensityCalib m aCalibConvers i CalInttime m Irradiance m IntensityCalib m CallInttime CurInttime Integration time in measurement used in the PrepareMeasurement structure The equation for irradiance intensity at pixel i then becomes Inttimefactor CalInttime CurInttime Irradiance Intensity Inttimefactor ScopeData i DarkData i IntensityCal i If Scopedata i and Darkdata i are taken with the 16bit ADC Counts range see also section 2 3 36 function AVS_UseHighResAdc an additional ADCFactor needs to be added to the equation
84. rsion and InfoString m_aUserFriendlyId 64 are shown on top of the tabs that correspond to the structures that are used to group the parameters into the following categories DetectorType m Detector IrradianceType m Irradiance SpectrumCalibrationType m Reflectance SpectrumCorrectionType m SpectrumCorrect StandaloneType m StandAlone TempSensorType m Temperature 3 TecControlT ype m_TecControl ProcessControlT ype m_ProcessControl not displayed in sample program lolx Structure Length E3464 bytes Structure Version E Information 070203301 Detector Standalone Irradiance Calibration Reflectance Calibration Spectrum Correction Temperature Sensors Tec Control The structure version is used internally to maintain compatible between different versions of the dll and firmware The Information character string can be used e g to write a user friendly name for the spectrometer 3 6 1 EEProm structure Detector Parameters Detector Stand lone Imradiance Calibration Reflectance Calibration Spectrum Correctic The detector parameters are defined in the DetectorT ype EMEN D gesam structure which includes the following elements vac a ues SensorT ype m SensorT ype WaveLength Calibration x3 Dmzeesrz unsigned short m NrPixels Interven ium au bam 7 float m aFit 5 m xg 1 0882548E 20 double m aNLCorrect 8 00000000 IS double m aLowNLCount
85. rwise be lent re sold hired out or otherwise circulated without the prior consent of Avantes bv in any form of binding or cover other than that in which it is published Every effort has been made to make this manual as complete and as accurate as possible but no warranty or fitness is implied The information provided is on an as is basis Avantes bv shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this manual 2 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Software License THE INFORMATION AND CODE PROVIDED HEREUNDER COLLECTIVELY REFERRED TO AS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE IN NO EVENT SHALL AVANTES BV OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT INDIRECT INCIDENTAL CONSEQUENTIAL LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES EVEN IF AVANTES BV OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY This Software gives you the ability to write applications to acquire and process data
86. s 1 Update List Stop pixel 2047 1 infinite 100 P ion ti 100 Intearationitime Js Start Measurement Integration Delay 0 ns Smoothing Settings 060100101 AVAILABLE Number of averages DO Model poo Stop Measurement Saturation detection 0 Nr Of Pixels 0 Trigger Settings Control Settings Trigger mode Hardware Flashes per Scan 0 M Software Laser delay W firs Trigger source v External d Laser width 10000 n Synchronized zl V Ed Laser wavelength 785 nm Trigger t v e ood P GE Spectra stored to RAM U Activate Deactivate Head Measurement Settings from EEPROM Write Measurement Settings to EEPROM Selected Device Info M Measurement Statistics Detector Time Since Start D Nr Of Pixels Nr Of Scans FPGA Version Nr Of Failures AS55216 Fw Version Avg Time Scan ms A55215 DLL Version Last scan in ms Digital G Analog IG Show EEProm parameters Disable Graphical Output Connected USB Device arrival After selecting a spectrometer from the list clicking the Activate button results in a call to the AVS Activate function This function returns a DeviceHandle which needs to be used in further communication between the dll and this device After a successful call to AVS Activate the status for the selected device will change from AVAILABLE to IN USE BY APPLICATION The sample program
87. s LoCounts 2000000082 double m aHighNLCounts Defective Pixels 3 HiCounts 15500000E 4 float m Gain 2 IV Enable NonLinearily Correction float m Reserved Uu float m Offset 2 mmm float m ExtOffset unsigned short m DefectivePixels 30 Offset 00 i Deet 1000 Ext Offset 000 Jun 12 AS 5216x64 DLL Manual docx 59 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy SensorType and Number of Pixels The as5216 board supports many different detectors which are used in the AvaSpec spectrometers as shown in the table below Spectrometer DetectorType Number of Pixels AvaSpec 102 USB2 SENS_TSL1301 102 AvaSpec 128 USB2 SENS_TSL1401 128 AvaSpec 256 USB2 SENS_HAMS8378_256 256 AvaSpec 1024 USB2 SENS_HAMS8378_1024 1024 AvaSpec 2048x 14 USB2 SENS_HAMS9840 2048 AvaSpec 2048x 16 USB2 SENS_HAMS11071_2048X16 2048 AvaSpec 2048x64 USB2 SENS_HAMS11071_2048X64 2048 AvaSpec NIR256 1 7 AvaSpec NIR256 2 0TEC AvaSpec NIR256 2 5TEC SENS_HAMS9201 256 AvaSpec NIR256 1 7TEC AvaSpec NIR256 2 2TEC PENS 30 250L96 298 AvaSpec NIR512 1 7TEC AvaSpec NIR512 2 2TEC SENPSUS LDB iia AvaSpec 2048 USB2 SENS ILX554 2048 AvaSpec 350F USB2 SENS ILX554 350 AvaSpec 950F USB2 SENS ILX554 950 AvaSpec 1350F USB2 SENS ILX554 1350 AvaSpec 1650F USB2 SENS ILX554 1650 AvaSpec 2048L USB2 SENS ILX5
88. s 9 1 3 New in VErsiOn 2 1 0 0 9 1 4 Nemin yersion 20 0 0 mE A 9 1 5 NEW m version 157 020 B 10 1 6 New Il yersion 16 0 m 10 1 7 NEW im Version 1 5 0 O scsi cescecsissiscccsdeasiccaccssescaccesevessessescccsavdeuccessescecsessuessenssessvustess cuasessacteceseactesescactasessass 11 1 8 New In yersion LIKE tege 11 1 9 NEW m yersion 1 30 O p 11 LI Newin v rsion 1 20 05 etieegegek deeg dee gedoe dee ENNEN deeg EENEG deed d en 12 1 11 New COM BIET VESS 12 1 12 New in version 1 0 0 0 as5216 dll versus as161 dll 4 eren eese eren ee ee eren eese enne eee tn see en a 13 1 12 Data acg isition css EI 13 1 12 2 Synchronization in Multichannel systems nennen eene eene 14 1 12 3 Laser control and integration time delay e g for LIBS eee eeceeeceeeceseceecaaecaeecaeesaeeeeeeeeeeneees 14 1 12 4 USB2 platform specific funepong essere nennen teen nren eene rennen tnnt trennen 15 2 AS5216X64 DLL DESCRIPTION 1e ceeeeeeeee enne nnna ranura nna aun 16 2 1 Titer face OVERVIEW P T 16 22 Usage of the AS5216x64 DLL NEE 16 2 3 Exported TUNCUHONS AE 17 2 3 1 PS MIETEN P
89. s com AVAN TES solutions in spectroscopy To monitor the detector temperature use the AVS_GetAnalogIn function with a_AnalogInId set to 0 see also section 2 3 16 and 3 5 The polynomial coefficients for converting the measured voltage U to degrees Celsius can be found in the table below Spectrometer DetectorType m aTemperature 2 m aTemperature 2 m aFit 0 m aFit 1 AvaSpec NIR 2 0 2 5TEC SENS HAMS9201 58 70 20 48 AvaSpec NIR256 1 7 2 2TEC SENS_SU256LSB 56 60 18 58 AvaSpec NIR512 1 7 2 2TEC SENS_SU512LDB_ 56 60 18 58 AvaSpec 2048TEC SENS_ILX554 51 4 16 38 AvaSpec 3648TEC SENS_TCD1304 51 4 16 38 AvaSpec HS 1024x58 SENS HAMS11155 82 15 22 43 AvaSpec HS 1024x122 SENS HAMS11155 82 15 22 43 These coefficients are stored in the TempSensorType structure in the eeprom as described in section 3 6 4 3 6 6 EEProm structure ProcessControl The settings in the ProcessControl structure can be used for the 2 analog and 10 digital output signals at the DB26 connector The analog settings can be used to store a function output range that should correspond to the 0 5V range of the analog output signals For example if the measured function output is expected to be in a range between 1000 and 2000 these values can be stored in the m AnalogLow 0 and m AnalogHigh 0 parameters The function output can then be converted to a 0 5V analog output at pin 17 by using the range
90. s to 1 82 ms see also section 3 2 2 Minimum integration time for the AvaSpec 2048x64 changed from 1 75ms to 2 40 ms see also section 3 2 2 The Qt samples were extended with a full featured graph from the open source Qwt library A distribution file for this library is included 1 4 New in version 2 0 0 0 Jun 12 Avantes Support for 64 bit programs for both native and managed code The 64 bit DLL is now written in Microsoft Visual C 2008 combined with the Qt4 framework The 64 bit DLL requires the Microsoft Visual C 2008 and Qt4 runtimes to function The setup program installs the VC 2008 runtime which is called vcredist x64 exe You may need to run this file yourself on other PC s that do not have VC4 2008 installed The Qt4 runtime is called QtCore4 dll and is best located in the same directory as as5216x64 dll As the Qt4 framework uses the WM USER 1 message itself the DLL now uses the WM_APP 1 windows message to signal the arrival of new data Addition of two samples written in Microsoft Visual C 2008 combined with the Qt4 framework These are 64 bit native code samples Addition of a Matlab sample for 64 bit Matlab R2010a The LabView samples were adapted for 64 bit LabView 2009 In the large sample the Measurement Configuration structure is now also translated to a linear array of bytes before being transferred to the DLL In previous versions this was not necessary The large LabView sample was als
91. sfer speed and allows you to transfer only the data that is relevant to the application Note that if m StartPixel is not equal to zero then a pSpectrum n see ANS GetScopeData represents the measured data at pixel number m StartPixel n Also pSaturated n see ANS GetSaturatedPixels represents pixel number m StartPixel n For example if m StartPixel 10 then a pSpectrum 0 represents the measured data at pixel number 10 3 2 2 Measurement structure Integration Time The integration time is the exposure time during one scan The longer the integration time the more light is exposed to the detector during a single scan and therefore the higher the signal The unit is milliseconds ms and the resolution 0 001 ms steps The minimum integration time is detector dependent The table below shows the values for the different detector types Spectrometer Detector Type Min Integration time ms AvaSpec 256 USB2 SENS HAMS8378 256 0 56 AvaSpec 1024 USB2 SENS HAMS8378 1024 2 20 AvaSpec 2048 USB2 SENS ILX554 1 05 AvaSpec 2048L USB2 SENS ILX511 1 05 AvaSpec NIR256 1 7 AvaSpec NIR256 2 0TEC AvaSpec NIR256 2 5 TEC SENS HAMS9201 0 01 AvaSpec NIR256 1 7TEC AvaSpec NIR256 2 2TEC SENS SU256LSB 0 02 AvaSpec NIR512 1 7TEC AvaSpec NIR512 2 2TEC SENS_SU512LDB 0 02 48 Avantes AS 5216x64 DLL Manual docx website http www avantes com Jun 12 email Info avantes com AVAN TES
92. sscsscssssssssssssesscssssesessessnesscsnssesesssesseseneseesoeres 46 3 2 Starting a measurement EE 47 32 1 Measurement structure Start and Sroppxel ene eneeeneenne 48 322 Measurement structure Integration Tmme nennen eene enne enne 48 3 2 3 Measurement structure Integration Delay essere eene eene enne 49 32 4 Measurement structure Number of Averages nennen eene een rennen 49 32 5 Measurement structure Dynamic Dark Correctpon 49 3 2 6 Measurement structure Smoothing ee ee ee ceee cee ceeeceeceeeeeeeeeeeeeeeeeeeseceaecsecaecsaecsaessaecaeeeaeeeneeegs 50 3 2 7 Measurement structure Saturation Detecton 51 3 2 8 Measurement structure Trigger Type nennen nennen rennen enne 52 3 2 9 Measurement structure Control Settings 20 0 ee ee cesecssecseecseeceeeseeeeeeeeeeeeeesecaeceaecsaecsueeseeeaeeeaeeees 55 3 3 Measurement reSUll c cecracorscceosonscssscerconssconsassesvssesesssasasecssssasosssosasoesssscsonssesasessessocessoneassasosaccesseasecesseaces 57 3 4 Irure 58 ZEE wr alo 58 EE MD ur CR M 59 3 6 1 EEProm structure Detector Parameters noosesnnnnsnsseoroeeresresererenrsssrernesnnserroernesresererenssssrerrnesnnsee 59 3 6 2 EEProm structure Standalone Parameters essere ennemis 64 3 6 3 EEProm structure Irradiance Reflectance Calibration and Spectrum Corr
93. stored in eeprom The digital output settings can be used as lower and upper thresholds to set the corresponding pins to 0 or 5V if these thresholds are exceeded The Process Control structure has been successfully used in applications in which the spectrometer runs completely standalone without a connection to a PC Data processing is in that case done onboard by dedicated firmware and the analog and digital outputs are used to signal the function output Jun 12 AS 5216x64 DLL Manual docx 67 Avantes website http www avantes com email Info avantes com
94. the following categories e Analog IO e Digital IO and Pulse Width Modulation e SDCard support e Eeprom IO 1 Analog IO The USB2 platform spectrometers have 2 programmable analog output pins and 2 programmable analog input pins available at the DB26 connector The functions AVS_SetAnalogOut and AVS_GetAnalogIn can be used to control these ports Moreover a number of onboard analog signals can be retrieved with the AVS_GetAnalogIn function One of these onboard signals is an NTC thermistor which can be used for onboard temperature measurements 2 Digital IO and Pulse Width Modulation The USB2 platform spectrometers have 10 programmable digital output pins and 3 programmable input pins available at the DB26 connector The function ANS SetDigOut and AVS_GetDigIn can be used to control these ports Moreover 6 out of the 10 programmable ouput ports can be configured for pulse width modulation With the ANS SetPwmOut function a frequency and duty cycle can be programmed for these 6 digital output ports 3 SDCard support If the spectrometer was ordered with an SDxxx card the function ANS SaveSpectraToSDCard can be used to save spectra at the SDCard To access the files that are saved at the SDCard the functions ANS GetFileSize AVS_GetFile ANS GetFirstFile ANS GetNextFile and ANS DeleteFile can be used 4 Eeprom IO With the USB1 platform spectrometers it is also possible to read write a number of parameters from to Eeprom with the as161 d
95. ts range and section 3 6 3 under How to convert ScopeData A D Counts to a power distribution u Watt cm nm 1 9 New in version 1 3 0 0 Jun 12 Windows Vista support AS 5216x64 DLL Manual docx 11 website http www avantes com email Info avantes com Avantes AVAN TES solutions in spectroscopy New Sample programs in Visual Cft and Visual Basic NET 2001 These sample programs can also be used in more recent NET versions 2005 in which case the Visual Studio Conversion Wizard will convert the project to the new version Note that for Visual Basic NET there was already a VB NET 2005 sample program available ProcessControl Structure added for standalone functionality see section 3 6 6 Stability issues solved Some spectrometer types mainly the AvaSpec 102 USB2 have shown a lock up in continuous measurements over a long period at short integration time Another problem that showed up very rarely concerns multichannel spectrometers running in synchronization mode Both problems have been solved in as5216 dll version 1 3 Support for the AvaSpec 2048x14 High UV sensitivity back thinned CCD Spectrometer The new detector type used in this spectrometer is the HAMS9840 and is supported in as5216 dll version 1 3 and all the sample programs The new function ANS UseHighResAdc has been added to enable the full 16 bit ADC range which is available with a 16 bit ADC on the as5216 board as of revision 1D See also sect
96. turn Jun 12 Avantes int AVS GetNextFile AvsHandle a hDevice unsigned char a pPrevName unsigned char a pNextName Blocking read function Returns the name of the next file in root directory after a pPrevName a hDevice device identifier returned by ANS Activate a pPrevName file name 14 characters including terminating zero this is the name returned by AVS GetFirstFile or by the previous call to AVS_GetNextFileQ a_pNextName file name 14 characters including terminating zero On success ERR_SUCCESS buffer contains valid value On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER no SD card present or no more files on the SD card AS 5216x64 DLL Manual docx 25 website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 3 23 AVS_DeleteFile Function Group Description Parameters Return int AVS_DeleteFile AvsHandle a_hDevice unsigned char a_pName Blocking read function Deletes a file from the SD card a_hDevice device identifier returned by AVS_Activate a_pName file name 14 characters including terminating zero On success ERR SUCCESS On error ERR DEVICE NOT FOUND ERR INVALID DEVICE ID ERR TIMEOUT error in communication ERR INVALID PARAMETER no SD card present or no more files on the SD card 2 3 24 AVS GetFirstDirectory Function Group Description Pa
97. ual C 2005 sample program has been created in the Express version o A few sample programs in Delphi have been added besides the comprehensive sample program that was already available in earlier as5216 dll versions 3 new sample programs have been added A multichannel sample program in which up to 16 spectrometer channels can run simultaneously in SYNC mode or ASYNC mode An sdcard sample program which demonstrates how to save spectra to an onboard sdcard A simple program with only a few lines of code which demonstrates the basic data acquisition for a single channel AvaSpec USB2 spectrometer o The LabView sample programs have been updated to LabView version 8 2 earlier versions can be obtained on request There are 4 sample programs acomprehensive program for a single channel AvaSpec USB2 which also includes subvi s for all functions in the as5216 dll a program that illustrates the use of Windows Messaging in LabView asimple sample program that uses AVS PollScan instead of Windows Messaging a multichannel example program which illustrates how to run multiple spectrometer channels fixed to 2 channels in the example program in SYNC mode as well as ASYNC mode In this manual examples have been added for using the function AVS_UseHighResAdc in combination with nonlinearity correction and or irradiance calibration see section 3 6 1 under Using the nonlinearity correction polynomial in combination with the 16bit ADC Coun
98. urement the counts per second is calculated and normalized to its maximum value which is set to 100 In the left figure below the normalized counts per second are displayed against the measured AD Counts corrected for dark The polynomial is the best fit through these measured points The right figure below has been created by applying the polynomial to the measured points and recalculating the normalized counts per second It is important to realize that the polynomial should be applied to the AD Counts that have been corrected for the dark counts 0 2 000 4 000 6 000 8 000 10 000 12 000 14 000 16 000 0 2 000 4 000 6 000 8 000 10 000 12 000 14 000 16 000 Counts Counts Before linearization After linearization Jun 12 AS 5216x64 DLL Manual docx 61 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy In the application software a dark spectrum needs to be saved first and subtracted from the measured AD Counts before the correction is applied For example suppose the measured AD Counts in the dark for a pixel is a value of 300 Counts At a certain light intensity the measured AD Counts for this pixel becomes a value of 14000 Counts The AD Counts corrected for dark therefore becomes 13700 The Normalized Counts Per Second can be calculated from the polynomial NCPS mn z LCorrect 0 LCorrect 1 13700 LCorrect 2 13700 LCorrect 3 13700 LCorrect 4 1
99. years since 1980 0 119 unsigned short m Time bit 0 4 2 second unit O 30 bit 5 10 minutes 0 59 bit 11 15 hours 0 23 Jun 12 AS 5216x64 DLL Manual docx 41 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy Type Format Value Range Description TriggerType struct Trigger parameters unsigned char m Mode 0 1 mode 0 Software 1 Hardware unsigned char m Source 0 1 trigger source 0 external trigger 1 sync input unsigned char m_SourceType 0 1 source type 0 edge trigger 1 level trigger Size 3 bytes 42 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 2 4 1 Return value constants The following table gives an overview of possible integer return codes Return code Value Description ERR_SUCCESS 0 Operation succeeded ERR INVALID PARAMETER 1 Function called with invalid parameter value ERR_OPERATION_NOT_SUPPORTED 2 e g Function called to use 16bit ADC mode with 14bit ADC hardware ERR_DEVICE_NOT_FOUND 3 Opening communication failed or time out during communication occurred ERR_INVALID_DEVICE_ID 4 AvsHandle is unknown in the DLL ERR_OPERATION_PENDING 5 Function is called while result of previous call to AVS_Measure is n
100. zon P Set Analog Dut functions AVS_SetAnalogOut and AVS GetAnalogIn pin 26 402 can be used to control these ports For the Analog Out signals an 8 bit DAC is used The Analog In signals are converted by the internal 10 bit ADC s j Analog Input SUBD26 F connector A number of onboard analog signals can be retrieved as well with the AVS_GetAnalogIn function One of pin 3 AH 200 Get Analog In these onboard signals is the NTC1 X8 thermistor pnis 298 which can be used for onboard temperature measurements The polynomial for converting the Onboard Analog Input voltage U to degrees Celsius for NTC1 is EE 122 Temp C 118 69 70 361 U ne Ex 21 02 U 3 6443 U 0 1993 U M The thermistor X11 is the signal received from a TE wrcixg 12A cooled detector and can be used to monitor the detector van bm temperature NTC2 X9 is not mounted The 1V2 5VIO and 5VUSB are used internally to test the power supply Close 58 AS 5216x64 DLL Manual docx Jun 12 Avantes website http www avantes com email Info avantes com AVAN TES solutions in spectroscopy 3 6 EEProm The EEProm parameters in the DeviceConfigType structure have been briefly described in section 2 4 In this section a more detailed description will be given The main sample program display most of the parameters in the structure The Structure Length m_Len Structure Version m_ConfigVe

Download Pdf Manuals

image

Related Search

Related Contents

Benutzerhandbuch für Polycom HDX  Benq 9J.0BJ72.JSE  夏の特集“美”活 夏の特集“美”活  Manual bomba calor piscinas  2 MB PDF  Retraite: mode d`emploi Ressources Humaines  QUICK START GUIDE - Timex.com assets  Cisco Systems 4900 Series Switch User Manual  AM4150 U-Boot Bootloader User Guide, Rev. 1.0  Trust Leather Protective Sleeve  

Copyright © All rights reserved.
Failed to retrieve file