Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

task was done within the specified timeout

$
0
0

I was trying to generate a 50ms pulse on the PFI12 line using counter-0 in the NI-6345 card. The following code from the NI git repository giving a timeout error

https://github.com/ni/nidaqmx-python/blob/master/examples/counter_out/write_single_dig_pulse.py

 

"""Example for generating a single digital pulse. This example demonstrates how to generate a single digital pulse from a Counter Output Channel. The Initial Delay, High Time, Low Time, and Idle State are all configurable. """ import nidaqmx from nidaqmx.constants import Level with nidaqmx.Task() as task: channel = task.co_channels.add_co_pulse_chan_time( "Dev1/ctr0", idle_state=Level.LOW, initial_delay=0.0, low_time=0.05, high_time=0.05 ) channel.co_pulse_term = "/Dev1/PFI12" task.start() task.wait_until_done(timeout=10) task.stop()

 

 

Error :

task.wait_until_done(timeout=2) File "/home/user/.pyenv/versions/3.10.7/lib/python3.10/site-packages/nidaqmx/task/_task.py", line 1061, in wait_until_done self._interpreter.wait_until_task_done(self._handle, timeout) File "/home/user/.pyenv/versions/3.10.7/lib/python3.10/site-packages/nidaqmx/_library_interpreter.py", line 5914, in wait_until_task_done self.check_for_error(error_code) File "/home/user/.pyenv/versions/3.10.7/lib/python3.10/site-packages/nidaqmx/_library_interpreter.py", line 6412, in check_for_error raise DaqError(extended_error_info, error_code) nidaqmx.errors.DaqError: Wait Until Done did not indicate that the task was done within the specified timeout. Increase the timeout, check the program, and make sure connections for external timing and triggering are in place. Task Name: _unnamedTask<0> Status Code: -200560

 am I missing any configuration here?

Any help on this issue will be greatly appreciated


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>