Specify voltage value(s) that must be satisfied before trigger executes
Note: You cannot use the legacy interface on 64-bit MATLAB®. See Working with the Session-Based Interface to acquire and generate data on a 64-bit MATLAB.
For all hardware TriggerConditionValue is used when TriggerType is Software, and is ignored when TriggerCondition is None. For vendor specific triggers, refer to the TriggerCondition and the TriggerType properties.
To execute a software trigger, the values specified for TriggerCondition and TriggerConditionValue must be satisfied. When TriggerCondition is Rising or Falling, TriggerConditionValue accepts a single value. When TriggerCondition is Entering or Leaving, TriggerConditionValue accepts a two-element vector of values. For vendor specific values, refer to the TriggerCondition property.
AI, common to all channels
Double (or a two-element vector of doubles)
Read-only when running
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