User`s guide
6 Acquiring Image Data
6-12
Manual Trigger
The following example illustrates how to use a manual trigger:
1
Create an image acquisition object — This example creates a video input object
for a webcam image acquisition device. To run this 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('winvideo',1);
Verify that the object has not acquired any frames.
vid.FramesAcquired
ans =
0
2
Configure properties — Set the video input object's TriggerType property
to 'Manual'. To set the values of certain trigger properties, including the
TriggerType property, you must use the triggerconfig function. See “Setting
the Values of Trigger Properties” on page 6-6 for more information.
triggerconfig(vid, 'Manual')
This example also sets the value of the FramesPerTrigger property to 5. (The
default is 10 frames per trigger.)
vid.FramesPerTrigger = 5