ni / ni/nidaqmx-python

Digital reader/writer classes don't support multi-sample line reads/writes

Open
#584 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
592
Forks
199
Avg merge
1d 16h
Merged PRs (30d)
10

Description

The digital line read/write methods in DigitalSingleChannelReader, DigitalMultiChannelReader, DigitalSingleChannelWriter, and DigitalMultiChannelWriter only support single-sample reads/writes, not multi-sample reads/writes.

Note: The underlying C API functions, DAQmxReadDigitalLines and DAQmxWriteDigitalLines, support multi-channel, multi-sample, multi-line reads and writes, where the data is basically a 3D array of (channels, samples, lines) or (samples, channels, lines) depending on fill mode.

Workaround: use the simplified task.read() and task.write() methods.

When this is fixed, we should update the internal test_cached_samples.py test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the four named DigitalSingleChannelReader, DigitalMultiChannelReader, DigitalSingleChannelWriter, and DigitalMultiChannelWriter classes, then compare their digital line methods with DAQmxReadDigitalLines and DAQmxWriteDigitalLines. Use the existing task.read() and task.write() behavior as a reference, and update test_cached_samples.py so multi-channel, multi-sample, multi-line reads and writes are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.