Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous acquisition with daq card 6533

Hi,

i'm trying to develop an application that acquires 8 digital signals using a daqcard 6533 pcmcia. I'm using winxp, visual studio .net, and traditional NIDAQ, since apparently this card is not supported under nidaqmx (is that correct?).

Acquisition is software-triggered via a gui event, and is performed continuosly at a sampling rate of 10Khz. Stop occurs after user input.

I'm using the example program DIdoubleBufPatternGen653x.c as a template, but i would need a few clarifications:

1) Why the circular acquisition buffer is declared within the program (i.e., in main computer memory). It should not be a card buffer? Also, is it correct that the "useful" data are only contained in the half buffer returned by DIG_DB_Transfer function? In other words, this is the only buffer of my concern, right?

2) I'm using a group of size 1 (1 port, grp 1).  I would expect that the  half buffer need to be half the size of the circular buffer.  However, after every DIG_DB_Transfer operation, at most a buffer of size 1/4 of the circular buffer is filled with "useful" data..the rest is 0. What am i missing?

Thanks for any help or suggestion, and please forgive me if used inappropriate language, since i'm not expert in data acquisition problems.

walter 
0 Kudos
Message 1 of 3
(3,326 Views)
Hi,
 
have you already read the chapter 4 of the traditional NI-DAQ usem manual?
You will find some useful information about double buffering. If it doesn't help,
let me know and I will try to find new resources to solve your problem. Thanks.
Bye,
 
Matteo F.
0 Kudos
Message 2 of 3
(3,287 Views)
Hi Matteo,

i did read that chapter, and that's what actually is confusing me! As i said in the message, i don't understand why one has to allocate explicitly the circular buffer (which should be in the card memory).

In practice, what is not clear to me is how i get exactly 10K samples per second with that mechanism. If i set the frequency samples to 10Khz, i got an half buffer of 5000 samples for each reading. If i increase the frequency to 20khz to get 10000 samples, i'm oversampling. Now i'm trying with an "half buffer" exactly the same size of the circular buffer, but i'm not sure is giving me the right samples!

thanks for the help,

ciao
0 Kudos
Message 3 of 3
(3,281 Views)