User`s guide

Waiting for an Acquisitio n to Finish
1 Create an im age acquisition object Th i s example creates a video
input o bj ect for a M atrox ima ge acquisition device. To run th is example on
your system, use the
imaqhwinfo function to get the object constructor for
your image acquisition device and substitute that syntax for the following
code.
vid = videoinput('mat rox',1);
2 Configure a hardware trigger —Usethetriggerin fo function
to determine valid configurations of the
TriggerSource and
TriggerCondition properties. See “Determining Valid Configurations” on
page 5-7 for more information. In this example,
triggerinfo returns the
following valid trigger configurations.
triggerinfo(vid)
Valid Trigger Configur ations:
TriggerType: TriggerCondition: TriggerSource:
'immediate' 'no ne' 'none'
'manual' 'none' 'none'
'hardware' 'risingEdge' 'TTL'
'hardware' 'fallingEdge' 'TTL'
Configure the video input object trigger properties to one of the valid
combinations returned by
triggerinfo. You can specify each property
valueasanargumenttothe
triggerconfig function
triggerconfig(vid, 'hardware','risingEdge','TTL')
Alternatively, you can set these values by passing one of the structures
returned by the
triggerinfo function to the triggerconfig function.
configs = triggerinfo (vid);
triggerconfig(vid,configs(3));
3 Configure other object properties This exam ple also sets the value
of the
FramesPerTrigger property to configure an acquisition large enough
to produce a noticeable duration. (Th e default is 10 frames per trigger.)
set(vid,'FramesPerTrigger',100)
5-33