Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Less then NIHSDIO_ATTR_TOTAL_ACQUISITION_MEMORY_SIZE maximum acquisition size

Solved!
Go to solution
Hello,

We have a NI-PCI 6541 card with some code like:

// Set data width to be 2 bytes / 16 bits
niHSDIO_SetAttributeViInt32( RxSession, VI_NULL, NIHSDIO_ATTR_DATA_WIDTH, 2 );

// Get maximum number of samples (times two as only 16 bit)
niHSDIO_GetAttributeViInt32( RxSession, VI_NULL, NIHSDIO_ATTR_TOTAL_ACQUISITION_MEMORY_SIZE, &value );
value = value * 2


niHSDIO_GetAttributeViInt32 returns values is 8388608, so 2 * 8388608 = 16777216


niHSDIO_ConfigureAcquisitionSize( RxSession, value, 1 );
niHSDIO_Initiate( RxSession );


Now niHSDIO_Initiate returns an error saying:

DAQmx Error -200413 occurred:
Insufficient onboard memory for requested Number of Records and Samples per Channel combination.

Reduce the Number of Records and/or Samples per Channel.

Requested Number of Samples: 16777216
Maximum Supported Value: 16777040

Status Code: -200413

Why do I have 176 less samples then reported by NIHSDIO_ATTR_TOTAL_ACQUISITION_MEMORY_SIZE?
Is this difference always the same?
0 Kudos
Message 1 of 2
(3,215 Views)
Solution
Accepted by topic author emvee
Hi emvee,
 
The acquisition size attribute is intended more for distinguishing between the different memory options as opposed to telling you the exact number of samples that are available for acquired data.  An acquisition or generation session uses some amount of the memory for purposes of managing the session, which is why you are not able to completely fill 2^24 samples with your data.
 
Also, the amount of padding required may vary slightly depending on the settings you choose, but it should always be less than about 300 samples.
 
I hope that helps,
Allen
Message 2 of 2
(3,203 Views)