ni / ni/nidaqmx-python

Error in the example "do_sw_timed.py"

Open
#447 3 comments 0 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

An error occurs in execution of the example "do_sw_timed.py"

"Write cannot be performed when the auto start input to DAQmx Write is false, task is not running, and timing for the task is not configured or Timing Type is set to On Demand.
Set auto start to true, start the task, or configure timing and specify Timing Type other than On Demand.
Task Name: _unnamedTask<0>
Status Code: -200846"

A Boolean list is not accepted.
NG: task.write([True, False, True, False]) # error expected!!
A decimal number or Boolean is accepted.
OK: task.write(8)
OK: task.write(True)

python 3.11.3, nidaqmx 0.8.0, numpy 1.24.3, NI-DAQmx 2023 Q3, Windows 10, NI USB-6218

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 by running the do_sw_timed.py example with the reported Python, nidaqmx, NumPy, NI-DAQmx, and Windows versions, then inspect its task.write calls. Compare the Boolean-list case with the scalar cases and the reported DAQmx error. Done means the example's expected write behavior is established and the issue has a reproducible, verified outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.