I am using a DAQ device with the session interface in Data Acquisition Toolbox. Is there a way to configure the acquisition to start on an analog trigger event?
For example, when a signal satisfying a specified condition is detected in software (software analog triggering), which I was able to do in the legacy interface with the following code:
ai = analoginput('nidaq', 'Dev1');ch = addchannel(ai,0:1);ai.TriggerChannel = ch(1);ai.TriggerType = 'Software';ai.TriggerCondition = 'Rising'ai.TriggerConditionValue = 0.2;
or, with a hardware analog triggering mode supported by certain DAQ device models (such as NI PXIe-6368), which could be configured in the legacy interface with the following code:
ai = analoginput('nidaq','Dev1');ch = addchannel(ai,0:1);ai.TriggerChannel = ch(1);ai.TriggerType = 'HwAnalogChannel';ai.TriggerConditionValue = 0.2;
Best Answer