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

2 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 14 de En. de 2010
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.

Más respuestas (0)

Categorías

Más información sobre Simultaneous and Synchronized Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by