Skip to content

Raw reads should use RawDataWidthInBits on DAQmx versions that support it #811

@bkeryan

Description

@bkeryan

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions