User`s guide

4 Connecting to Hardware
visit the Image Acquisition Toolbox product page at the MathWorks Web site
(
www.mathworks.com/products/imaq).
To determin e which adaptors are available on your system, call the
imaqhwinfo function. The imaq hwinfo function returns information about
the toolbox software and lists the adaptors available on the system in the
InstalledAdaptors field. In this example, there are two adaptors available
on the system.
imaqhwinfo
ans =
InstalledAdaptors: {'matrox' 'winvideo'}
MATLABVersion: '7 .4 (R2007a)'
ToolboxName: 'Imag e Acquisition Toolbox'
ToolboxVersion: '2 .1 (R2007a)'
Note While every adaptor supported by Image Acquisition Toolbox is installed
with the toolbox,
imaqhwinfo lists only adap tors in the Install edAd aptors
field that are loadable. That is, the device drivers required by the
vendor are installed on the system. Note, however, that inclusion in the
InstalledAdaptors field does not nece ssarily mean that an adaptor is
connected to a device.
Determining the Device ID
The adaptor assigns a unique number to each device with which it can
communicate. The adaptor assigns the firstdeviceitdetectsthedeviceID
1, the second it detects the d ev ice ID 2, and so on.
To find the device ID of a particular image acquisition device, call the
imaqhwinfo function, specifying the name of the adaptor as the only
argument. When called with this syntax,
imaqhwinfo returns a structure
containing information about all the devices available through the specified
adaptor.
In this example, the
imaqhwinfo function returns information about all the
devices available through the Matrox adaptor.
4-4