ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCIe-6321 hardware failure when using hardware timing

Solved!
Go to solution

Hello, I am a nidaq beginner, so this question may have a very simple answer. I am using a PCIe-6321, and trying to use the hardware timing feature. I am controlling it with python (nidaqmx). 

 

When I run the following code (snippet from the ao_voltage_hw_timed.py example), I get an error:



"""Example of AO voltage hw operation."""
import nidaqmx


with nidaqmx.Task() as task:
    task.ao_channels.add_ao_voltage_chan("Dev1/ao0")

    task.timing.cfg_samp_clk_timing(1000)

    print("1 Channel N Samples Write: ")
    print(task.write([1.1, 2.2, 3.3, 4.4, 5.5], auto_start=True))
    task.wait_until_done()
    task.stop()


error message:


1 Channel N Samples Write:
Traceback (most recent call last):
File "/home/oconnorlabmatlab/Code/libfranka/python/nidaq/ao_voltage_hw_timed.py", line 11, in <module>
print(task.write([1.1, 2.2, 3.3, 4.4, 5.5], auto_start=True))
File "/home/oconnorlabmatlab/miniconda3/envs/robot_venv/lib/python3.9/site-packages/nidaqmx/task.py", line 1274, in write
return _write_analog_f_64(
File "/home/oconnorlabmatlab/miniconda3/envs/robot_venv/lib/python3.9/site-packages/nidaqmx/_task_modules/write_functions.py", line 28, in _write_analog_f_64
check_for_error(error_code, samps_per_chan_written=samps_per_chan_written.value)
File "/home/oconnorlabmatlab/miniconda3/envs/robot_venv/lib/python3.9/site-packages/nidaqmx/errors.py", line 181, in check_for_error
raise DaqWriteError(error_buffer.value.decode("utf-8"), error_code, samps_per_chan_written)
nidaqmx.errors.DaqWriteError: A hardware failure has occurred. The operation could not be completed as specified.
Task Name: _unnamedTask<0>

Status Code: -50152


When I comment out the cfg_samp_clk_timing line (i.e. not using hardware timing), I do not get the error message:


1 Channel N Samples Write:
5


How can I troubleshoot this?

0 Kudos
Message 1 of 3
(1,189 Views)

Error -50152: "A Hardware Failure Has Occurred"

Try changing PCI/PCIe slots inside the computer.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 3
(1,175 Views)
Solution
Accepted by willsni

The solution was to disable IOMMU in BIOS / linux kernel bootup parameters. This known issues page has the solution https://www.ni.com/en/support/documentation/bugs/23/ni-linux-device-drivers-2023-q2-known-issues.htm...

Message 3 of 3
(1,103 Views)