User`s guide

6 Acquiring Image Data
6-36
imaqhwinfo function to get the object constructor for your image acquisition device
and substitute that syntax for the following code.
vid = videoinput('matrox',1);
2
Configure a hardware trigger — Use the triggerinfo function to determine
valid configurations of the TriggerSource and TriggerCondition properties.
See “Determining Valid Configurations” on page 6-6 for more information. In this
example, triggerinfo returns the following valid trigger configurations.
triggerinfo(vid)
Valid Trigger Configurations:
TriggerType: TriggerCondition: TriggerSource:
'immediate' 'none' '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 value as an argument to
the 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 example also sets the value of the
FramesPerTrigger property to configure an acquisition large enough to produce a
noticeable duration. (The default is 10 frames per trigger.)
vid.FramesPerTrigger = 100
4
Start the image acquisition object — Call the start function to start the image
acquisition object.
start(vid)
The start function sets the object running and returns control to the command line.
5
Block the command line until the acquisition finishes — After the start
function returns, call the wait function.