Hello,
For documentation on NI-DAQ function calls, please refer to
C:\Program Files\National Instruments\NI-DAQ\Docs\nidaqpc.chm
This is the Traditional NI-DAQ function reference help.
As far as programming 32 digital lines at once, here is the function call
DIG_Grp_Config (iDevice, 1, 4, 0, iDir);
Exactly what error are we seeing in the application? Does the program just freeze? What happens?
My initial guess would be that you are getting an overwriting error from the hardware, and the usual reason that this happens is that your double buffering system from the card is not big enough to operate at the speeds that we are acquiring at. A good rule of thumb is to have a buffer that is capable of storing at least two tenths of a second worth of d
ata. That way one half buffer is one tenth of a second worth of data.
As an example, if I am acquiring at 5 MHz, I want a buffer that can hold one million samples. Since the buffer is stored as an i16, then we want a buffer that holds a count of two million, since our data takes two elements of the array for one 32 bit sample. So at 5 MHz, a buffer could be set up like so�
u32 ulCount = 1000000;
static i16 piBuffer[2000000] = {0}; // 1 million samples
static i16 piHalfBuffer[1000000] = {0}; //500,000 samples
Notice that the data is interleaved, if you wish, you could declare the arrays as 32-bit, and then type cast them to short arrays when passing them into NI-DAQ function calls.
Lastly, I would like to reiterate that our supplied programs are not meant to be used as final applications, they are simply meant as a single example of what you could do.
Let me know if you have any further questions.
Best regards,
Justin T.
National Instruments