nidaqmx-python icon indicating copy to clipboard operation
nidaqmx-python copied to clipboard

Raw reads should use `RawDataWidthInBits` on DAQmx versions that support it

Open bkeryan opened this issue 4 months ago • 0 comments

Problem to Solve

Raw read methods like InStream.read and InStream.read_into do a lot of work to calculate the raw sample size, but this code is incomplete and does not account for these cases:

  • DIO and CI channels
  • Compressed AI data
  • Reading before the task is verified

Proposed Solution

NI-DAQmx 24.5 or 24.8 added support for a new internal attribute, RawDataWidthInBits, which indicates the raw data size in bits. I think the corresponding C API function name is DAQmxGetRawDataWidthInBits. If this function is available, nidaqmx-python should use it instead of calculating based on AI channel attributes.

AB#3240024

bkeryan avatar Aug 22 '25 16:08 bkeryan