Home
SR3 DAQ driver User`s manual
Contents
1. s Manual 5 aa Soft DIE 2 1 Acquisition Set up Tab Sampling Rate 48 kHz Sampling rate The sampling rate can be adjusted from A kHz to 96 kHz Some sampling rate selections used the double speed mode DSM At 96 KHz the real time acquisition is not possible when all inputs and outputs are selected because of the USB bandwidth a maximum total of 9 inputs and outputs can be used at 96 kHz Input Set up ON OFF J Input 1 2 Input 2 2 Input 3 J Input 5 Dir C_J Mic 7 Input 6 Dir Mic ON OFF This green dot includes or excludes an input during the acquisition Input Select This control is available for inputs 5 and 6 only The input type selection can be either direct or microphone independently on both inputs The microphone input includes a 3 Hz high pass filter and can drive an electret type microphone 1 kOhms load Input file Path Input File Path Use input file Q C Documents and Settings 4lexiMy Documents emp In Weary The acquisition can be done with a log in a wav file To do that the button Use input file must be set and a file path must be specified Use the folder icon to specify the path of the wav file If the acquisition is started with the button Start Stop with input log the interface creates a wav file and saves the input signals in a 32 bits format 24 bits right justified The interface uses the extended wave format that supports multi channels and continuo
2. Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number len This is the size of the Saturations array This parameter must be set to 6 Outputs Saturations This array contains the saturation state of the 6 input channels since the last time the function was run or since the acquisition has been started 0 No saturation 1 Saturation detected Return The error code 0 No error 1 Communication error SR3_DAQdriver_GetCorrectFlFOcnt_DLL intos t _ cdecl SRS DAOdriaver GevcCorrectPirOcnt DLL into2 t BoardRef uint32 t DesiredBlockLength uint32 t currentFIFOcnt Description This function waits for the amount of data requested DesiredBlockLength The function SR3_DAQdriver_OneDAQblockLL_ DLL already uses this function This function can also be used at the end of the acquisition process to wait for the filling up of the inputs FIFO and the emptying of the outputs FIFO Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQadriver_Connect_DLL to obtain this reference number SRMk3 DAQ Driver Datalogger Leer e Manual 23 aa Soft DIE DesiredBlockLength This is the length of the desired acquisition block inputs and outputs This value should be at least less than the FiFOcntMaxPerCh parameter Outputs currentFlFOcnt This is the number of samples per channel contained in the input FIFO When FlFO
3. dupBoardRef error in jee error out Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_ Base _Open_Next_Avail_Board vi error in LabView instrument style error cluster Contains error number and description of the previously running VI SRMk3 DAQ Driver Datalogger User e Manual 14 aa Soft Ki Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs error out LabView instrument style error cluster Contains error number and description SR3_DAQdriver_OneDAQblockLL This VI should be used in a loop in the main application to read data from the input FIFO and to write data to the output FIFO Before running this VI in the main loop the analog I Os and the acquisition must be started The length of the blocks inputs and outputs is equal to BlockLength 5R3_DAQdriver_OneDAQblockLLvi NbChin BoardRet dupBoardRef Write Data 32 Array of n a Read Data 2 Array of 1 current FIFOcnt error out BlockLength per channel error in mo error Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_N
4. either in input or in output InitialOutputSignals This is an array of output signals that initializes the output FIFO before starting the acquisition process It must fit the number of output channels enabled and the maximum FIFO length FlFOcntMaxPerCh If the array is empty length zero the output FIFO will be initialized with zeros If no output channel is enabled this control will be ignored The data are 32 bits 24 bits right justified and signed between 8388607 and 8388607 The array is a one dimension vector containing the output data channel by channel one after the others IN Enable This is an array of 6 enable controls Use 0 to disable a specific channel and 1 to enable a specific channel OUT Enable This is an array of 6 enable controls Use 0 to disable a specific channel and 1 to enable a specific channel len This is the size of the InitialOutputSignals array This parameter must be set to FiFOcntMaxPerCh x Number of output channel enabled For instance if 6 output channels are enabled and the FIFO size is 128000 the len parameters must be set to 768000 128000 6 ___len2 This is the size of the IN_Enable array This parameter must be set to 6 SRMk3 DAQ Driver Datalogger Leer e Manual 21 aa 2 OT L DIE len3 This is the size of the OUT_Enable array This parameter must be set to 6 Outputs No outputs Return The error code 0 No error 1 Communication error SR3_DAQdriv
5. error out Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_ Base _Open_Next_Avail_Board vi error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs MissedSampleCnt This is the number of missed samples since the last time the VI was run or since the acquisition has been started error out LabView instrument style error cluster Contains error number and description SRMk3 DAQ Driver Datalogger Leer e Manual 17 aa SOFt DIE 3 2 DLL Version of the DAQ Driver The DLL version of the acquisition driver has been designed with C C development in mind and has only been tested on the version 2005 of Microsoft s Visual Studio However it may be possible to use it with other development environments allowing the use of DLLs The C C interface is provided in the form of a DLL named SR3_DAQdriver dil To work at run time this DLL requires that the following file be in the same directory as the user application that uses It e SR3_DAQdriver dll The main DLL of the acquisition driver API Furtherm
6. DAQ Driver and Data Logger for Signal Ranger Mk User s Manual D 83 MacDalaleoger e Setan Armgen Sampling Rate S tr bp Setup OM OFF T bast 2 input ra TI input en Input 4 2 pen A input ne Cer Anm Douman n gn ulb ker wu siet z n a Dereapmen ARS DAQdriver Datahecseded Sample Input Selection al s input mer Bale pes Aliaj Bot in real time H full arema n Dim E Quiputietecion 1 os mo BEEN mae e Ai Tc donc 12455 Not in real bine if empty ampase Ez AlHig Soft EI In association with er Convergence Instruments October 30 2009 1040 avenue Belv d re suite 215 Qu bec Qu bec G1S 3G3 Canada T l 418 686 0993 Fax 418 686 2043 aa Soft DIE Contents 1 0 Main Features ccc ccc cece cece cece ee eee ee ee eeeeese esse eeseeeaeesaeeseeeseeeaeeeaes 3 1 1 Software Technical Data cece cence ceaeeeneeceaeeeseeseeennees 3 1 2 Hardware Technical Data o2 o00 cece cence ceneeeneeseaeeeseeeeeeneees 3 2 0 Data Logger Interface eee eeeeteeeeteeseceeaeteesetseseeseseeaeeees 4 2 1 Acquisition Set up Tab o oo ceeecscccceeeesesesseeeeeeeeeeeeees 6 2 2 Acquisition ME 8 30 DAQ WE 11 3 1 LabView DAQ Driver nooo ccc cence ceseecseecseneensneceeneeesaeeesaeeeseeesas 11 3 1 1 LabView DAQ driver Example 0 0 cccccccccccccccecccsesceecccseceesseesseeeceuess 11 3 1 2 Descrip
7. DAQDriver vlib One package for the Visual Studio developers or others programming languages that support the DLL function calls that includes a library DLL for the DAQDriver and an executable version of the data logger application Also a Visual Studio example that illustrates the use of the DAQDriver library 1 1 Software Technical Data Compatible Windows 2000 XP and Vista 32 bits and 64 bits version Audio bandwidth real time acquisition data logging for up to 6 inputs 6 outputs through a USB link Data logging in a wav file format Easy to use configuration and acquisition interface Real time saturation monitoring for all 6 input channels Real time monitoring of input and output time signals Open source DAQ driver API for custom acquisition applications LabView Visual Studio C C Visual Basic etc 1 2 Hardware Technical Data High speed USB 2 0 for real time acquisition 6 analog I Os 24 bits Sampling rate up to 96 KHz per channel SNR 100 dB input and output 2 input types on inputs 5 and 6 Direct or Microphone Anti aliasing filter on all outputs and inputs Input dynamic range 3 0 V Output dynamic range 2 1 V SRMk3 DAQ Driver Datalogger Leer e Manual 3 aa Soft Ki 2 0 Data Logger Interface The data logger application can be found in the folder c Program Files SR3_DAQDriver The data logger program file is named SR3_Datalogger exe This application has two tabs one for
8. aLogProject lvproj My Computer SECH BS a a m File Edit View Project Operate Tools Window Help omede cs Acquisition loop the input and output FIFOsare updated This example simply sends the input signals to the outputs Input Selection Waveform Graph D a json CoH equi aq SRY era yr KZZZZZZZZZZZZZZZZZZA kritt Input FIFO Stop the acquisition stop and close the connection SOE with the SR3 H D SR3_DataLogProject lvproj My Computer 4 LabView Acquisition driver example Diagram In this example all input signals are read by the PC and sent back to the outputs Before the acquisition while loop the following steps are performed 1 Connect the PC with the SignalRangerMk3 board 2 Configure of the ADC DAC with the VI SR3_DAQdriver_StartAlIC vi 3 Start the acquisition process with the VI SR3_DAQdriver_StartAcquisition vi The size of the buffers for both inputs and outputs is specified here The maximum size for the buffers FIFOs is 16777212 number of channels For instance with 6 channels the maximum size for the buffers is 2796202 samples per channel Here we used 128000 samples per channel At 48 kHz it means 2 67 seconds The acquisition loop reads and writes all input and output signals by blocks of 4096 The user can stop the acquisition with the stop control button After the loop the acquisition is stopped with the VI SR3_DAQdriv
9. add SR3_DAQdriver lib to the project e The following files must be placed in the folder containing the project sources these files can be found in the folder C Program Files SR3_DAQdriver SR3_DAQdriver_DLL cvilvsb h extcode h fundtypes h hosttype h LVDatalnterface h ILVTypelnterface h platdefines h SR3_DAQdriver h SR3_DAQdriver lib 3 2 4 Description of the DLL API Functions The next paragraphs present the detailed description of each exported functions of the DLL API Here are some important notes before the descriptions Notes FlFOcntMax is the maximum number of samples per channel for both input FIFO and output FIFO This determines the delay of the FIFO The maximum value that FIFOcntMax can take is equal to 16777212 size of each FIFO divided by the highest number of enabled channels either in input or in output For instance if 2 inputs and 5 outputs are used the maximum value that can be used is floor 16777212 5 3355442 For a sampling frequency of 48 kHz this would allow a FIFO delay of 69 9 seconds For proper use of the acquisition driver care should be taken to ensure than the BlockLength parameter during the acquisition stays below the FlFOcntMax parameter Both the BlockLength and the FlFOcntMax must be an even number SR3_DAQdriver_Connect_DLL int32 t _ cdecl SR3 DAQdriver Connect DLL int32 t BoardRef Out Description This function performs the following operations Tries to find a Signal Ra
10. an use the Signal Ranger Mk3 DSP board to develop a custom instrument or data logger To support the developer a simple acquisition example based on the driver is provided This example is available in LabView and in Visual Studio Also all LabView sources of the Data Logger described before in this document are also available as reference 3 1 LabView DAQ Driver LabView version 2009 has been used to develop the acquisition driver The LabView functions are in the SR3_DAQdriver_Vis virtual folder of the SR3_DAQDriver Ivlib The next paragraphs describe the LabView example and the acquisition LabView driver 3 1 1 LabView DAQ driver Example In addition to the acquisition functions the driver includes a simple example see VI SR3_DAQdriver_Example vi Here is the front panel of the example VI TA SR3_DAQdriver_Example i Front Panel on SR3_DataLogProjectvproj File Edit View Project Operate Tools Window Help SA 15pt Application Font sam Gi E st 27300 l l l I l l I l l I 0 500 1000 1500 2000 2500 3000 3500 4000 4500 Sample Input FIFO ie When started all inputs are STOP read by the PC and sent back to Output FIFO EES the outputs SR3_DataLogProject hvpro My Computer 4 LabView Acquisition driver example Front Panel SRMk3 DAQ Driver Datalogger User s Manual 11 aa Soft DIE The VI diagram looks like this r F T mm m m 44 SR3_DAQdriver_Example vi Block Diagram on SR3_Dat
11. cnt reaches FilFOcntMaxPerCh the input FIFO is full and the output FIFO is empty Return The error code 0 No error 1 Communication error SR3_DAQdriver_ReadMissedSampleCnt_DLL int32 t cdecl SR3 DAQdriver ReadMissedSampleCnt DLL int32 t BoardRef uint32 t MissedSampleCnt Description This function reads the number of missed samples per channel and resets the DSP counter of missed samples for the next read The value read is zero when the acquisition process is in real time FlFOcnt always less than FiIFOcntMaxPerCh Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number Outputs MissedSampleCnt This is the number of missed samples since the last time the function was run or since the acquisition has been started Return The error code 0 No error 1 Communication error SR3_DAQdriver_StopAcquisition DLL int32 t cdecl SR3 DAQdriver StopAcquisition DLL int32 t BoardRef Description This function stops the acquisition process Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number SRMk3 DAQ Driver Datalogger Leer e Manual 24 aa Soft DIE Outputs No outputs Return The error code 0 No error 1 Communication error SR3_DAQdriver_CloseConnecti
12. ed blocks by blocks 4096 samples The user can adjust the Y scale by editing the maximum and minimum values directly on the Y scale of the graph SRMk3 DAQ Driver Datalogger Leer e Manual 8 aa Soft DIE Edit the maximum of Y scale Amolitude The user can also use the auto scale mode by clicking on the small padlock under the time graph Sample LE ay Amplitude Bey Mode AutoScale ON for Y scale Input saturation indicators 1 2 3 4 5 6 gt O O These indicators turn red if saturation occurs on a specific input Input and output FIFO indicators Input FIFO jj Output FIFO Feed These bars indicate if the acquisition is in real time The acquisition uses a FIFO buffer First In First Out to achieve the real time transfer of input and output data through the USB link For the input FIFO the acquisition board places all input data read in a buffer Then the PC reads this data when there is enough data in the buffer by blocks of 4096 samples per channel For the output FIFO the PC places all data to be sent by the outputs in a buffer in the memory of the acquisition board The acquisition board empties the output FIFO sample by sample at the sampling rate For the data logger application the input and output FIFOs have a size of 128000 samples per channel Before launching the acquisition the output FIFO is filled with 128000 samples and the input FIFO is emptied During the acquis
13. er_ OneDAQblockLL_ DLL int32 t cdecl SR3 DAQdriver OneDAQblockLL DLL uint16 t NbChOut uint32 t BleklengthPerCh uintlo t NbChIn int32 t OutputSignals int32 t BoardRef uint32 t currentFIFOcnt int32 t ArrayInputSignals int32 t len int32 t len2 Description This function should be used periodically to read data from the input FIFO and to write data to the output FIFO Before running this function the SR3 DAQdriver_StartAIC_DLL and SR3_DAQdriver_StartAcquisition _ DLL functions must be called before using this function Inputs NbChOut This is the number of outputs enabled BicklengthPerCh This is the length of the acquisition block inputs and outputs This value should be at least less than or equal to the FiFOcntMaxPerCh parameter set with the function SR3_DAQdriver_StartAcquisition_DLL NbChlin This is the number of inputs enabled OutputSignals This is an array of output signals that will be written in the output FIFO It must fit the number of output channels enabled and the BicklengthPerCh parameter The data are 32 bits 24 bits right justified and signed between 8388607 and 8388607 The array is a one dimension vector containing the output data channel by channel one after the others BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number len This is the size of the OutputSignals array This pa
14. er_StopAcquisition vi and the connection with the Signal Ranger Mk3 board is closed SRMk3 DAQ Driver Datalogger Leer e Manual 12 aa Soft Ki 3 1 2 Description of LabView DAQ driver functions The next paragraphs present the detailed descriptions of the LabView acquisition driver functions Here are some important notes before the descriptions Notes FlFOcntMax is the maximum number of samples per channel for both input FIFO and output FIFO This determines the delay of the FIFO The maximum value that FlFOcntMax can take is equal to 16777212 size of each FIFO divided by the highest number of enabled channels either in input or in output For instance if 2 inputs and 5 outputs are used the maximum value that can be used is floor 16777212 5 3355442 For a sampling frequency of 48 kHz this would allow a FIFO delay of 69 9 seconds For proper use of the acquisition driver care should be taken to ensure than the BlockLength parameter during the acquisition stays below the FlFOcntMax parameter Both the BlockLength and the FlFOcntMax must be an even number SR3_DAQdriver_StartAIC This VI sets the analog I Os parameters and the sampling frequency and loads the DSP code This function starts the analog I Os and the DSP main function but the acquisition is not started yet use SR3_DAQdriver_StartAcquisition vi to start the acquisition 5R3_DAQdriver_StartAlCvi BoardRet dupBoardRet AIC CFG Ke Fs Hz error in
15. error out Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Aval Board vi AIC CFG This is a cluster of the parameters for the 6 analog I Os error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs Fs Hz This is the exact sampling frequency used error out LabView instrument style error cluster Contains error number and description SRMk3 DAQ Driver Datalogger User e Manual 13 aa Soft DIE SR3_DAQdriver_StartAcquisition This VI sets the acquisition parameters of the driver and starts the acquisition If the outputs are used this VI fills up the output FIFO FlFOcntMax samples per channel R3_DAQdriver_StartAcquisition vi FIFOcntMax max samples per BoardRet dupBoardRef In Enable array ee Out Enable array ER error in Channels Data Array of 1D Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next_Avail_Board vi FiFOcntMax This is the ma
16. ext Aval Board vi NbChin This is the number of inputs enabled Write Data 132 This is an array of output signals that will be written in the output FIFO It must fit the number of output channels enabled and the BlockLength control The format is 32 bits 24 bits right justified e BlockLength This is the desired block length for the the inputs and the outputs This value should be less than the FIFOcntMax parameter error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs e Read Data 132 This is an array of input signals that has been read from the input FIFO The length of each channel block is equal to the BlockLength control The format is 32 bits 24 bits right justified e current FlFOcnt This is the number of samples per channel in the input FIFO just before the PC reads the input FIFO When FlFOcnt reaches FlFOcntMax the input FIFO is full and the output FIFO is empty e error out LabView instrument style error cluster Contains error number and description SRMk3 DAQ Driver Datalogger Leer e Manual 15 aa Soft DIE SR3_DAQdriver_GetCorrectFlFOcnt This VI waits for the amount of data reque
17. he file is encountered The wav file must be the extended wave format 32 bits and 24 bits right justified that supports the multi channels and the continuous sampling frequency adjustment LabView 8 0 and later supports this wav format Windows with DirectX 8 0 module also supports this format Save and recall a configuration Open o These functions allow saving and recalling a configuration of the data logger Note that the configuration file does not include the path of the wav files for both input and output SRMk3 DAQ Driver Datalogger User e Manual 7 aa Soft Ki 2 2 Acquisition Starting the acquisition When all acquisition parameters are set the user can start the acquisition The acquisition can be started with or without log using theses controls with input log Acquisition Tab During the acquisition process only the acquisition tab is available This tab shows the time signals for selected input and output channels Also the saturation of all 6 input channels is monitored Input and Output selection Input Selection 1 S Output Selection 1 These controls selects the signals to show in the time graphs 32700 We ee SS E 10000 20000 Amplitude 32700 0 200 400 ER lgl Sample LE Ha Amplitude aff The time signal is in 32 bit format 24 bits right justified integer values between 8388607 and 8388607 The time signal is present
18. ition the input FIFO is emptied by the PC and the output FIFO is filled by the PC In most cases the output FIFO stays full and the input FIFO stays empty and the acquisition process is in real time But when the acquisition is done at high sampling frequency and with many channels or if another programs running on the PC request a portion of the CPU time a real time acquisition problem can occur If the acquisition cannot be achieved in real time the input FIFO will grows full and the output FIFO will goes empty In this case we SRMk3 DAQ Driver Datalogger Leer e Manual 9 aa Soft Ki suggest closing all other programs in the memory of the PC and retrying the acquisition The monitoring of time signals and saturations can also be turned off to achieve a real time acquisition in critical situation by setting the button Show time signal to OFF Note At 96 kHz the real time acquisition is not possible when all inputs and outputs are selected because of the USB bandwidth a maximum total of 9 inputs and outputs can be used at 96 kHz SRMk3 DAQ Driver Datalogger Leer e Manual 10 aa Soft DIE 3 0DAQ Driver The DAQ driver provided with the Signal Ranger Mk3 DSP board allows the development of custom acquisition applications This driver is available in a LabView format and in a standard DLL format Visual Studio or others programming languages that support the DLL function calls With the DAQ driver the developer c
19. nd 1 to select the microphone input Outputs SamplingFrequencyHzOut This is the exact sampling frequency used Return The error code 0 No error 1 Communication error Sampling frequency selection Use the following list to select the sampling frequency Value for SamplingRate SRMk3 DAQ Driver Datalogger Leer e Manual 20 aa Soft Ki pO 96 kHz mode DSM 48 kHz 3 32 kHz mode DSM 24 kHz A 9 2 kHz mode DSM 16 kHz 9 6 KHz 4 kHz Note DSM Double Speed Mode is used where specified otherwise the Simple Speed Mode SSM is used SR3_DAQdriver_StartAcquisition DLL int32 t cdecl SR3 DAQdriver StartAcquisition DLL int32 t BoardRef uint32 t FIFOcntMaxPerCh int32 t InitialOutputSignals uintlo t INEnable uintlo t OUTEnable int32 t len int32 t len2 int32 t len3 Description This function sets the acquisition parameters of the driver and starts the acquisition If the outputs are used this function fills up the output FIFO FlFOcntMax samples per channel Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number FlFOcntMaxPerCh This is the maximum number of samples per channel for both input FIFO and output FIFO This determines the delay of the FIFO The maximum value is equal to 16777212 size of each FIFO divided by the highest number of enabled channels
20. nger Mk3 DSP board that is connected but presently free on the PC Updates the outputs BoardRef Out SRMk3 DAQ Driver Datalogger Leer e Manual 19 aa Soft DIE Returns an error code 0 if no error 1 if no DSP board is detected Inputs No input Outputs BoardRef_Out This is a reference number allowing access to the Signal Ranger Mk3 board All other interface functions use this number to access the board Return The function returns the following error code 0 No error 1 Signal Ranger mk3 board not found SR3_DAQdriver_StartAlC_DLL int32 t cdecl SR3 DAQdriver StartAIC DLL int32 t BoardRef uintlo t SamplingRate uintl6 t ADC _5 MUX uintl6 t ADC 6 MUX double SamplingFrequencyHzOut Description This function sets the analog I Os AIC parameters and the sampling frequency and loads the DSP code This function starts the analog I Os and the DSP main function but the acquisition is not started yet use SR3_ DAQdriver_StartAcquisition DLL function to start Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number SamplingRate This is the sampling rate selection See below for a detailed description of how to select the sampling rate with this parameter ADC _5 MUX use 0 to select the direct input and 1 to select the microphone input ADC 6 MUX use 0 to select the direct input a
21. on DLL void cdecl SR3 DAQdriver CloseConnection DLL int32 t BoardRef Description This function closes the connection with the Signal Ranger Mk3 board Inputs BoardRef This is a reference number allowing access to the Signal Ranger Mk3 board Use the function SR3_DAQdriver_Connect_DLL to obtain this reference number Outputs No outputs SRMk3 DAQ Driver Datalogger Leer e Manual 25 aa Soft DIE 3 2 5 Visual Studio 2005 Example The folder c Program Files SR3_DAQdriver SR3_DAQdriverVSExample contains the sources of a Visual Studio example The Visual Studio example is a very simple interface that illustrates the use of the DAQ driver DLL The example makes the connection with the DSP board configures the analog I Os and the acquisition process and launches the acquisition Then by calling periodically the function SR3_DAQdriver_OneDAQblockLL_DLL the interface reads the input signals and sent it back to the outputs It is a simple example but it covers the whole acquisition process with the use of the DLL d i DAQExample When the acquisition is started all inputs are read by the PC and sent back to the outputs Error 0 no error 1 error 0 eee Visual Studio example The source files of this example have been created using the MFC wizard The parts added by Soft dB are identified with the comment Added by Soft dB SRMk3 DAQ Driver Datalogger Leer e Manual 26
22. on flags on the acquisition board for the next saturation read R3_DAQdriver_ReadSaturation vi BoardRef ian dupBoardRef ZAT error in no error Daq Sr Saturation State error out Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_ Base _Open_Next_Avail_Board vi error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs Saturation State This array contains the saturation state of the 6 input channels since the last time the VI was run or since the acquisition has been started e error out LabView instrument style error cluster Contains error number and description SRMk3 DAQ Driver Datalogger Leer e Manual 16 aa 2 OT L DIE SR3_DAQdriver_ReadMissedSampleCnt vi This VI reads the number of missed samples per channel and resets the DSP counter of missed samples for the next read The value read is zero when the acquisition process is in real time FlFOcnt always less than FlFOcntMax 5R3_DAQdriver_ReadMissedSampleCnt vi EoardRef dupBoardRet error in no error Daa SC MissedSampleCnt
23. ore the LabView 2009 run time engine must be installed on the computer that needs to use the DLL The LabView 2009 run time engine is installed automatically during the SignalRangerMk3 software installation However if the user wants to deploy an application using the C C interface which is required to run on computers other than those on which it was developed the LabView 2009 run time engine should be installed separately on those computers A run time engine installer is available for free from the National Instruments web site www ni com An example is provided which covers the development of code in Visual Studio This example is discussed at the end of this chapter 3 2 1 Execution Timing and Thread management Two functions of the DAQ Driver DLL accessing the same SignalRanger_mk3 DSP board cannot execute concurrently The first function must complete before the second one can be called Care should be taken in multi threaded environments to ensure that separate functions of the DLL do not run at the same time in separate threads The simplest method is to ensure that all calls to the DLL functions are done in the same thread However functions of the interface accessing different boards can be called concurrently All the functions of the DAQ Driver DLL are blocking They do not return until the requested action has been performed on the board 3 2 2 Calling Conventions The functions are called using the C calling conventions ra
24. rameter must be set to BicklengthPerCh x Number of output channel enabled For instance if 6 output channels are enabled and the BlcklengthPerCh is 4096 the len parameters must be set to 24576 4096 6 len2 This is the size of the ArraylnputSignals array an output parameter of the function This parameter must be set with the same value than len Outputs currentFlFOcnt This is the number of samples per channel contained in the input FIFO just before the PC reads the input FIFO When FlFOcnt reaches FlFOcntMaxPerCh the input FIFO is full and the output FIFO is empty ArraylnputSignals This is an array of input signals that has been read from the input FIFO The length of each channel block is equal to the BlcklengthPerCh control The data are 32 bits 24 bits right justified and signed between 8388607 and 8388607 SRMk3 DAQ Driver Datalogger User s Manual 22 aa 2 OT L DIE The array is a one dimension vector containing the input data channel by channel one after the others Return The error code 0 No error 1 Communication error SR3_DAQdriver_ReadSaturation DLL int32 t cdecl SR3 DAQdriver ReadSaturation DLL int32 t BoardRef InCo C Arrayoaturation ly CoA C Leni Description This function reads the saturation state of the inputs and resets the saturation flags on the acquisition board for the next saturation read Inputs BoardRef This is a reference number allowing access to the Signal
25. sted desired BlockLength The VI SR3_DAQdriver_OneDAQbIockLL vi already uses this VI This VI can also be used at the end of the acquisition process to wait for the filling up of the inputs FIFO and the emptying of the outputs FIFO SR3_DAQdriver_GetCorrectFlFOcnt vi BoardRef K dupBoardRef Desired BlockLength Reg current HFOcnt error in no error error out Controls BoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Aval Board vi Desired BlockLength This is the length of the desired acquisition block inputs and outputs This value should be at least less than the FlFOcntMax parameter error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators e dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by Gi Base Open_Next_Avail_Board vi Use this output to propagate the reference number to other VIs e current FlFOcnt This is the number of samples per channel contained in the input FIFO When FlFOcnt reaches FlFOcntMax the input FIFO is full and the output FIFO is empty e error out LabView instrument style error cluster Contains error number and description SR3_DAQdriver_ReadSaturation This VI reads the saturation state of the inputs and resets the saturati
26. the Set up and one for the Acquisition Number of Input Number of Output Input Set up Output Set up G Wsers Alexb Documents Signal Rangersi l G Wsers Alexb Documents SignalRangers Development SR3_DAQdriver DataRecorded Development SR3_DAQdriver DataRecorded Teh Tew mirte ssamsa Tarti Tem mrte T srama Data logger interface Set up tab Note Run this application in administrator mode if you use Windows Vista Without this precaution the data logger application will not be able to save recorded data in the folder c Program Files SR3_DAQDriver SRMk3 DAQ Driver Datalogger Leer e Manual 4 aa Soft DIE put me l l l l l l l l l l l l l l l l 250 500 750 1000 1250 1500 1750 2000 2250 2500 2750 3000 3250 3500 3750 4000 4250 Sample Input Selection 1 e InputFIFO H Ae l Sample BS ru Not in real time if full Amplitude 62 pa L KM Output Signal Amplitude 62 250 500 750 1000 1250 1500 1750 2000 2250 2500 2750 3000 3250 3500 3750 4000 4250 Sample Output Selection 4 outputrro TT EI ai mi Gomes 6 Gin Time done s 8 161 s EEN Amplitude 3 BAD Start Stop with input log Data logger interface Acquisition tab When launched the Data Logger interface loads the SignalRangerMk3 board with the DSP code SR3_DAQDriver out Before starting the acquisition the user has to set his acquisition parameters in the Set up tab SRMk3 DAQ Driver Datalogger User
27. ther than the standard Windows API Pascal conventions Whenever a function must return a number array or string the corresponding space of sufficient size must be allocated by the caller and a reference to this space must be passed to the function Whenever a function must return an element of variable size an array or a string the size of the element that has been allocated by the caller is also passed to the function 3 2 3 Building A Project Using Visual Studio To build a project using Visual Studio the following guidelines should be followed An example is provided to accelerate the learning curve see last section of the current chapter e lf the project is linked statically to the SR3_DAQdriver lib library it must be loaded using the DELAYLOAD function of Visual C To use DELAYLOAD add delayimp lib to the SRMk3 DAQ Driver Datalogger User s Manual 18 aa Soft Ki project in Visual Studio 2005 it can be found in Program Files Microsoft Visual Studio 8 VCVib in Project Properties under Linker Command Line Additional Options add the command DELAYLOAD SR3_DAQdriver dll e Alternately the DLL may be loaded dynamically using LoadLibrary and DLL functions must be called using GetProcAddress Do not link statically with the SR3_DAQdriver lib library without using the DELAYLOAD function e Add include SR3_DAQdriver h in the main e f using the DELAYLOAD function to link statically to the SR3_DAQdriver lib library
28. tion of LabView DAQ driver functions cece 13 3 2 DLL Version of the DAQ Driver 2 000000 cece ceeteeeeeeeeeeeseeeses 18 3 2 1 Execution Timing and Thread management 18 3 2 2 Calling Conventions 00 0 0 ccc ccccccceeccceeccceeeceeeecseeesseensseeueseeeeseeeesens 18 3 2 3 Building A Project Using Visual Studio 18 3 2 4 Description of the DLL API Functtons ccc ceccceeccensseeeceeees 19 3 2 5 Visual Studio 2005 Example 0 cccc ccc cccccsecceecccesccesccescccusccesseeesceuecs 26 SRMk3 DAQ Driver Datalogger User s Manual 2 aa Soft DIE 1 0Main Features The DAQ Driver and Data Logger presented in this document are multi purpose software tools allowing a real time multi channel acquisition while connected with the USB Signal Ranger Mk3 DSP board from Soft dB see http www softdb com a dsp 30 0 1 html This software includes a ready to use data logger application and a general purpose DAQ driver API for the development of custom acquisition applications This manual describes the data logger interface and the DAQ driver API Before going to a detailed description of the software here is the technical data for both software and hardware Note There are two software installers 1 2 One package for the LabView developer that includes all DAQ driver and data logger VIs The installation file is a simple zip file named SR3_ DAQdriver_Labview zip This zip file contains the SR3_
29. us sampling frequency adjustment LabView 8 0 and later supports this wav format Windows with DirectX 8 0 module also supports this format SRMk3 DAQ Driver Datalogger Leer e Manual 6 aa Soft DIE Output Set up ONZOEF ON OFF This green dot includes or excludes a specific output during the acquisition Note that a wav file must be specified to allow the generation of an output signal If no wav file is specified no signal will be generated even if outputs are ON Also the sampling frequency used for the generation is the sampling frequency of the acquisition board not the sampling frequency specified in the wav file Output file Path Output File Path Use output file QJ C Documents and Settings Alex My Documents temp i Our waw If an output wav file is specified the outputs generate the 32 bit format signals read in the file during the acquisition To do that the Use output file button must be set and a file path must be specified Use the folder icon to specify the path of the wav file Note that the number of channels in the wav file must be the same as the number of channels selected in the data logger interface see the Current Output File Info indicator Also the sampling frequency used for the generation is the sampling frequency of the acquisition board not the sampling frequency specified in the wav file When a wav file is used for the outputs the acquisition stops by itself when the end of t
30. ximum number of samples per channel for both input FIFO and output FIFO This determines the delay of the FIFO The maximum value is equal to 16777212 size of each FIFO divided by the highest number of enabled channels either in input or in output e In Enable array This is an array of 6 enable controls one for each of the potential input channels of the Signal RangerMk3 board e Out Enable array This is an array of 6 enable controls one for each of the potential output channels of the SignalRangerMk3 board e Channels Data This is an array of output signals that initializes the output FIFO before starting the acquisition process It must fit the number of output channels enabled and the maximum FIFO length FlIFOcntMax If this control is unwired the output FIFO will be initialized with zeros If no output channel is enabled this control will be ignored error in LabView instrument style error cluster Contains error number and description of the previously running VI Indicators dupBoardRef This is the number pointing to the entry corresponding to the board in the Global Board Information Structure It is created by SR3_Base_Open_Next Avail_Board vi Use this output to propagate the reference number to other VIs error out LabView instrument style error cluster Contains error number and description SR3_DAQdriver_StopAcquisition This VI stops the acquisition process 5R3_DAQdriver_StopAcquisition vi BoardRef T l
Download Pdf Manuals
Related Search
Related Contents
Untitled Samsung MW71X Manuel de l'utilisateur WEB - 免税店.jp taxfree.jp Calendrier et mode d`emploi 2015 CHARGEUSE SUR PNEUS Philips ini AE 3905/08 User's Manual MAKOMC - Engage Agro Temporizador analógico / digital Manual de instruções Copyright © All rights reserved.
Failed to retrieve file