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

Status Code -50405

Open keith331 opened this issue 1 year ago • 2 comments

Hi Senior

I'm experiencing 50405 occurred when reading. The task only created once when app launch. and then reading io status when ever I want. It runs many times perfectly. but sometimes occurs that error. my nidaqmx version is 0.7.0. I would like to update the version. but this equipment is in the other country. I'm worried about other side effects. Could somebody help Thanks in advance task_in = nidaqmx.Task() task_in.di_channels.add_di_chan('Dev1/port0/line0:7', line_grouping=LineGrouping.CHAN_PER_LINE) task_in.di_channels.add_di_chan('Dev1/port1/line0')

'call task_in.read() frequently'

keith331 avatar Oct 08 '24 08:10 keith331

Update: NI said that it's related to USB power. I already used an independent USB port. Would It be helpful if I close task and re-create task regularly ? https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MucSAE&l=zh-TW

keith331 avatar Oct 08 '24 09:10 keith331

Not nearly enough information to help you. Some questions:

  • What version of NI-DAQmx driver is installed? Try running this example: system_properties.py
  • What device is "Dev1"?
  • What does your actual code look like? Just paste it all.
  • What Operating System are you using?

zhindes avatar Oct 08 '24 15:10 zhindes

nidaqmx.errors.DaqError: -50405: No transfer is in progress or transfer was aborted.Task Name: _unnamedTask<X>Status Code: -50405

The only way to recover is to physically disconnect and reconnect the USB-6009 device.

Environment

  • Python Version: 3.11.9
  • nidaqmx Package Version: 1.2.0
  • NI-DAQmx Driver Version: 2024 Release (exact version number not specified)
  • Operating System: Windows 10 64-bit
  • Hardware: NI USB-6009

Additional Information

  • I have double-checked my task configuration parameters (sample rate, number of samples to read, etc.) and they seem correct.
  • The issue is intermittent and not easily reproducible on demand.
  • Restarting the Python script without unplugging the device does not resolve the issue. A physical reconnection is required.

Has anyone else encountered this specific issue with the USB-6009 and found a solution? Any help would be greatly appreciated.

wanghuqiang123 avatar Nov 21 '25 08:11 wanghuqiang123

The issue's discussion is continued over at #893 due to high similarity to it and the information here is stale and insufficient.

@keith331 @wanghuqiang123

EnYi-ni avatar Dec 05 '25 08:12 EnYi-ni