Specify voltage value(s) that must be satisfied before trigger executes
Note: You cannot use the legacy interface on 64-bit MATLAB®. See About the Session-Based Interface to acquire and generate data on a 64-bit MATLAB.
For all hardware
and is ignored when
For vendor specific triggers, refer to the
To execute a software trigger, the values specified for
be satisfied. When
a single value. When
a two-element vector of values. For vendor specific values, refer
AI, common to all channels
Double (or a two-element vector of doubles)
Read-only when running
The default value is zero.
Create the analog input object
ai and add
one channel to it.
ai = analoginput('winsound'); ch = addchannel(ai,1);
The trigger executes when a signal with a negative slope passing through 0.2 volts is detected on channel 1.
ai.TriggerChannel = ch ai.TriggerType = 'Software' ai.TriggerCondition = 'Falling' ai.TriggerConditionValue = 0.2
Create the analog input object ai for a National Instruments device and add four channels to it.
ai = analoginput('nidaq', 'Dev1'); ch = addchannel(ai,0:3);
The trigger executes when a signal with a positive slope passing through 4.5 volts is detected on PFI2.
ai.TriggerType = 'HwDigital' ai.HwDigitalTriggerSource = 'PFI2' ai.TriggerCondition = 'PositiveEdge' ai.TriggerConditionValue = 4.5