LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Data problem with DAQmx function

Hello,


I want to save data that acquired by DAQmx function "DAQmxReadAnalogF64" the function is guided by internal clock created by function "DAQmxCfgSampClkTiming" .
Timing Parameter:
samples per channel:1000
sample rate:20k Hz
Does the "ArrayToFile" can save the data to a file while the data acquiring process is going on OR there is another way to do this
Before I use DAQmx function to make my program realize the data acquisition ,I use a timer control and Easy I/O function to realize the data acquisition and when the event Timer_tick is enabled ,the ArrayToFile save data acquired to a file with append mode .the data can be saved
But with DAQmx ,the sample rate is much higher than a Timer control
How can I save data when use the DAQmx ??
If I still have to use ArrayToFile OR there're some other methods?

CVI7.1.1 NI-DAQ 7.4
NI PCI-6014
WinXP sp2

thank you
-Guan
0 Kudos
Message 1 of 4
(3,352 Views)
Did'nt do the math, but at trat rate and number of samples the hard drive acess speed is teh bottleneck.

Also the second issue you already defined. The PC timer cycle is very slow.

I would create a trigger from the hardware and let that drive the event rather than a timer.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 4
(3,340 Views)
Hi Guan-

I would suggest starting from a DAQmx Example in CVI. In order to continuously acquire data from your card, I would suggest the example ContAcq-IntClk.prj in the NI Example Finder (Help>Find Examples in CVI and then Hardware Input and Output>DAQmx>Analog Measurements>Voltage).

This example is optimized for performance in DAQmx and shows the proper programming paradigm to follow when developing for DAQmx.

Thanks-
Tom W
National Instruments
0 Kudos
Message 3 of 4
(3,327 Views)
If you are using NTFS, while saving data on your hard disk make sure to save them in group of 512 bytes

For more information, take some time and read this article :
http://zone.ni.com/devzone%5Cconceptd.nsf/webmain/7134EFC95243E39286256AE2004F9386#3

And then, take 2 min and read this one : http://www.ntfs.com/partition-table-heads.htm

Otherwise if you don't use NTFS, make sure to know the size of the sector (in bytes) and to save data in "chunk" of that size.
Regards, Philippe proud to be using LabWindows since version 1.2
// --------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 4
(3,319 Views)