模拟输出数字触发器

2024-04-24 22:49:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从NI PCI 6713上的数字触发器触发模拟输出

http://www.ni.com/pdf/manuals/371011c.pdf

根据数据表,我可以使用PFI<;0..9>;,这些引脚在带有ao/StartTrigger的NI MAX中确实显示为绿色

我的代码如下:

    task = nidaqmx.Task()
    task.ao_channels.add_ao_voltage_chan("Dev12/ao0")
    task.triggers.start_trigger.cfg_dig_edge_start_trig("Dev12/PFI0")
    task.timing.cfg_samp_clk_timing(rate=1)
    task.start()
    task.write([1,2,3,4,5,6,7,8,9,10,0])

我收到以下错误:

DaqError: Source terminal to be routed could not be found on the device.

Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names.
Property: DAQmx_DigEdge_StartTrig_Src
Property: DAQmx_DigEdge_StartTrig_Edge
Source Device: Dev12
Source Terminal: Dev12/PFI0

Channel Name: Dev12/ao0

Task Name: _unnamedTask<1C>

Status Code: -89120

我使用python3.7


Tags: thetosourcetaskpdfcfgstartterminal
1条回答
网友
1楼 · 发布于 2024-04-24 22:49:57
  • channels指定名称时,格式为device_name/channel_name。你知道吗
  • 对于physical terminals,格式是/device_name/terminal。你知道吗

请注意端子的前斜杠:

task.ao_channels.add_ao_voltage_chan("Dev12/ao0")
task.triggers.start_trigger.cfg_dig_edge_start_trig("/Dev12/PFI0")
                                                     ^
                                                    Here

相关问题 更多 >