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 Center および File ExchangeSimultaneous and Synchronized Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by