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
MathWorks Support Team 2010년 1월 14일
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