Why am I unable to trigger my data acquisition device when I set the "TriggerType" property to "HwDigital"?

2 次查看(过去 30 天)
I am using a NI-DAQ device with the Data Acquisition Toolbox. I have set the "TriggerType" property of my ANALOGINPUT object “ai” to "HwDigital" :
ai = analoginput('nidaq','Dev1');
addchannel(ai,0);
set(ai,'TriggerType','HwDigital')
However, the acquisition starts immediately. I am unable to trigger the device.

采纳的回答

MathWorks Support Team
This change has been incorporated into the documentation in Data Acquisition Toolbox 2.15 (R2009b). For previous releases, read below for any additional information:
For data acquisition objects created using NI-DAQ, there is an additional device specific property called as "HwDigitalTriggerSource" which has to be set when the "TriggerType" property is set to "HwDigital".
"HwDigitalTriggerSource" defines which pin is used to initiate a data acquisition when the "TriggerType" property is set to "HwDigital".
ai = analoginput('nidaq','Dev1');
addchannel(ai,0);
set(ai,'TriggerType','HwDigital')
set(ai,'HWDigitalTriggerSource','PFI0');
"HwDigitalTriggerSource" can take values from PFI0 to PFI9 or RTSI0 to RTSI6.
(Consult the manual for the specific pin of the board being used)
Please note that the "HWDigitalTriggerSource" property is only implemented for the Analog Input object and not for the Analog Output object.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simultaneous and Synchronized Operations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by