02-04-2013 09:27 AM
Hi,
We recently procured USB-6009 board for our DAQ Projects. We have LabView 7.1 installed on ur computer and we installed the DAQmx (9 version) Drivers that came along with the board.
We have a running program that uses another DAQ board (DT-3016 from Data Translation). Now, sice the acuisition rate is not very high, we wnat to use thid USB-6009 card for the ADC purpose instead of costly PCI board. Thus, we want to just change data aquisition module of our running program with this card. Our program was developed in Visual C++ 2005 version. We dont want to use the LabView, with which programming thse NI card seems very easy. Though, I can program abit in LabView, but my forte is VC++, bot LabView. At this point of time, we can't write the whole application in LabView as the program contains much working VC++ code with a lot of custom built graphs etc.
Hence, I have trying to understand DAQmx ANSI C Examples given. In particular, I am trying to run the Event based data acquisition example that was shipped. The console based program was not working properly. This Event based application sends the event of acquisition of preset number of samples via a callback function. The program compiled properly. Upon running the program, it terminates stating error that continous acquisition of could not succees as the samples that were available were rewritten and so on. It also states that incrreasing the buffer size or reading the samples more frequently may solve the issue. The program uses 10K sampling with internal clock and fires a event upon acquisition of 1000 samples. As this is continous acquisition, the buffer is automatically decided by the driver. I tried with different sampling rates etc., but could not succeed.
Where as the continous acquisition in a loop (instead of event mechanism) seems to work with out any error.
Could any one explain, what could be cause of misbehaviour?
Regards,
Nageswara Rao