Most trigger properties can be set in the same way you set any
other image acquisition object property: referencing the property
as you would a field in a structure using dot notation. For example,
you can specify the value of the
vid is a video input object created using
vid.TriggerRepeat = Inf
For more information, see Configuring Image Acquisition Object Properties.
Some trigger properties, however, are interrelated and require
the use of the
triggerconfig function to set their
values. These properties are the
TriggerSource properties. For example, some
are only valid when the value of the
Setting the values of the
TriggerCondition properties can be a two-step
Determine valid configurations of
these properties by calling the
Set the values of these properties
by calling the
For an example of using these functions, see Using a Hardware Trigger.
To find all the valid configurations of the
TriggerCondition properties, use the
specifying a video input object as an argument.
config = triggerinfo(vid);
This function returns an array of structures, one structure for each valid combination of property values. Each structure in the array is made up of three fields that contain the values of each of these trigger properties. For example, the structure returned for an immediate trigger always has these values:
TriggerType: 'immediate' TriggerCondition: 'none' TriggerSource: 'none'
A device that supports hardware configurations might return the following structure.
TriggerType: 'hardware' TriggerCondition: 'risingEdge' TriggerSource: 'TTL'
The text strings used as the values of the
To set the values of the
TriggerCondition properties, you must use the
You specify the value of the property as an argument to the function.
For example, this code sets the values of these properties for a hardware trigger.
If you are specifying a manual trigger, you only need to specify the trigger type value as an argument.
You can also pass one of the structures returned by the
triggerconfig function and set all three
properties at once.
documentation for more information.