User`s guide

5 Connecting to Hardware
5-22
Starting and Stopping a Video Input Object
When you create a video input object, you establish a connection between MATLAB and
an image acquisition device. However, before you can acquire data from the device, you
must start the object, using the start function.
start(vid);
When you start an object, you reserve the device for your exclusive use and lock the
configuration. Thus, certain properties become read only while running.
An image acquisition object stops running when any of the following conditions is met:
The requested number of frames is acquired. This occurs when
FramesAcquired = FramesPerTrigger * (TriggerRepeat + 1)
where FramesAcquired, FramesPerTrigger, and TriggerRepeat are properties
of the video input object. For information about these properties, see “Acquiring
Image Data” on page 6-2.
A run-time error occurs.
The object's Timeout value is reached.
You issue the stop function.
When an object is started, the toolbox sets the object's Running property to 'on'. When
an object is not running, the toolbox sets the object's Running property to 'off'; this
state is called stopped.
The following figure illustrates how an object moves from a running to a stopped state.
Transitions from Running to Stopped States