User`s guide
5 Connecting to Hardware
5-14
To illustrate, this example lists the video source objects associated with the video input
object vid.
vid.Source
Display Summary for Video Source Object Array:
Index: SourceName: Selected:
1 'CH0' 'on'
2 'CH1' 'off'
3 'CH2' 'off'
4 'CH3' 'off'
5 'CH4' 'off'
6 'CH5' 'off'
7 'CH6' 'off'
8 'CH7' 'off'
By default, the video input object makes the first video source object in the
array the selected source. To use another video source, change the value of the
SelectedSourceName property.
This example changes the currently selected video source object from CH0 to CH1 by
setting the value of the SelectedSourceName property.
vid.SelectedSourceName = 'CH1';
Note The getselectedsource function returns the video source object that is
currently selected at the time the function is called. If you change the value of the
SelectedSourceName property, you must call the getselectedsource function again
to retrieve the new selected video source object.
Getting Information About a Video Input Object
After creating a video input object, you can get information about the device it represents
using the imaqhwinfo function. When called with a video input object as an argument,
imaqhwinfo returns a structure containing information about the object such as the
name of the adaptor, name of the device, video resolution, and details of the vendor's
device driver and version.
out = imaqhwinfo(vid)
out =