10-19-2006 01:12 AM
10-19-2006 01:15 AM
10-19-2006 01:28 AM
Kind of confusing statement!
DAQmx is a Device Driver version and LabVIEW is a programming Language/Tool which uses that Device Driver's functions
Do you mean to tell that using a programming language other than LabVIEW?? like CVI/ LabWINDOWS??
Kindly clarify, so that we can suggest better
Regards,
Dev
10-19-2006 02:20 AM
Hi,
I am using the DAQmx ANSI C, not CVI, not Labview. And the search results of streaming data to disk in the forum are done by Labview. Hopefully I made myself clear this time.
Thank you very much.
David
10-20-2006 06:08 AM
10-20-2006 11:27 AM
David,
The most efficient way to stream data to disk is in raw binary format. You can then do the conversion from binary into real data during post-processing, when more processor time is available.
I'm assuming that you're somewhat familiar with the DAQ ANSI C API and programming structure of an analog acquisition program. What you would need to do is Set up your task and task timing the usual way, but instead of reading a double value, you would want to use the DAQmxReadRaw function to read the raw digital data from the card and stream it to disk.
The functions for streaming to disk are going to be specific to your programming environment. I understand that you are using the DAQmx ANSI C API; what is your programming language and environment?
For more information on the DAQmxReadRaw function and on reading raw data, please refer to the NI-DAQmx C Reference help, which you can find on your start menu under Programs>>National Instruments>>NI-DAQ>>NI-DAQmx C Reference Help.
Let me know if there's anything else I can help you with.
Regards,
Josh W. | National Instruments | Applications Engineer
10-22-2006 08:22 PM
10-23-2006 09:24 AM
10-23-2006
03:11 PM
- last edited on
07-21-2026
10:08 AM
by
Content Cleaner
Hello Everyone,
The NI-DAQmx driver uses a polynomial equation to convert unscaled data acquired directly from the DAQ device to scaled readings in terms of voltage, temperature, strain, etc. (depending on the type of task). The best way to manually convert the unscaled readings into scaled readings at a later time is to record the coefficients of the polynomial the DAQmx driver uses to scale those readings, and then construct your own scaling equation using those coefficients. You can retrieve the scaling coefficients by reading the Device Scaling Coefficients property using the DAQmxGetAIDevScalingCoeff function. This property can be found in the NI-DAQmx C Reference Help under the list of Channel Properties, under Analog Input > General Properties > Advanced > Device Scaling Coefficients. The following Knowledgebase describes how to use those coefficients to manually scale your measurements, and although the process is described for programming with DAQmx in LabVIEW, the same concepts apply for programming with the DAQmx C API.
KB 3SKGA409: Converting Raw Values of DAQmx Read.vi to Scaled Readings
As far as whether to scale the readings as they are acquired, or after saving them to disk, this really depends on the constraints of your system and acquisition task. The easiest method from a programming standpoint is to just read scaled data and save that scaled data to disk. This allows you to both view and save your data at the same time. If however your saving to disk cannot keep up with your acquisition, you will then need to read unscaled data. Unscaled data is smaller and can be written to disk faster, but you then need to scale the data at a later time.
If your streaming to disk still cannot keep up with your acquisition speed, there is an advanced feature of the DAQmx driver that will compact the data in either a lossy or lossless fashion.
I hope this helps,
Travis G.
Applications Engineering
National Instruments