Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in the example "do_sw_timed.py" #447

Open
QDO164 opened this issue Aug 2, 2023 · 3 comments
Open

Error in the example "do_sw_timed.py" #447

QDO164 opened this issue Aug 2, 2023 · 3 comments

Comments

@QDO164
Copy link

QDO164 commented Aug 2, 2023

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

@bkeryan
Copy link
Collaborator

bkeryan commented Aug 2, 2023

@QDO164, thanks for reporting this. I think the "error expected" code is confusing and should be removed from the example. Examples should demonstrate what to do, not what not to do.

@QDO164
Copy link
Author

QDO164 commented Aug 8, 2023

Thank you, @bkeryan.

@QDO164 QDO164 closed this as completed Aug 8, 2023
@bkeryan
Copy link
Collaborator

bkeryan commented Aug 8, 2023

I think we should keep this issue open until this code is removed from the example.

@bkeryan bkeryan reopened this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants