DSA Continuous Acquisition Data Logging & Graph example
The technique used here is not a double buffered acquisition but a multiple buffered acquisition which allows faster scan rates in slower computers without having overflow problems.
The example uses events and popup up a graph and shows two channels being acquired, until a Quit button is pressed.
The program logs the selected channel in the selected binary file in either 16 bits not scaled data or 32 bits scaled voltage data.
/*********************************************************************
*
* Example program:
* file.c
*
* Description:
* Read a waveform from two analog input channels continuously using
* internal timing (uses low-level NI-DAQ functions) on 4451/4452
* DSA Boards.
* This example uses a multi buffered technique, a buffer is allocated and
* the data is transfered to that buffer, then 1/10 of that buffer is
* copied to an other buffer at the time to be converted into voltages and
* to be displayed while the original buffer is filled up with new data.
* This allows high sampling rates.
*
* The program logs the selected channel in the selected binary file
* in either 16 bits not scaled data or 32 bits scaled voltage data.
*
*
* NOTE: if ulCount=1000000 samples, on two channels, and
* dSampRate=100000 this means each complete buffer will take 5sec
* so you 'll have a half buffer ready each 2.5sec
*
*********************************************************************/
files :
file.zip : main program.
6.6fix_NT.zip :
Contains the NI-DAQ 6.6 DLL's you need to replace in your system in order for the DAQ_Monitor function used in this example to work. You only need to replace the files if you have NI-DAQ 6.6.0. If you have a newer version forget about the fix. These files are for Windows NT machines they will go into your Winnt\system32 and Winnt\system32\drivers directories. Just find the exiting files and replace them with these ones.
6.6fix_98.zip :
Same files that 6.6fix_NT but for machines with Windows 98 or Windows 95. The files will go into your Windows\system directory. Just find the exiting files and replace them with these files.
Requirements
Filename: file.zip
Software Requirements
Application Software: LabWindows/CVI Full Development System 5.0.1
Language(s): C
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy) 6.6.0
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
