Справочник Пользователя для National Instruments Image Acqusition Software NI-IMAQdx

Скачать
Страница из 65
Chapter 2
Basic Acquisition with NI-IMAQdx
2-4
ni.com
When you open a camera session with the Camera Open function, the 
camera with the unique serial number described by the interface file 
cam
n.iid
 opens, where 
n
 is the reference to the camera. If the camera
is not present and a camera of the same make and model is present, as 
described in the interface file, the driver opens the available camera. The 
interface file updates to use the new camera. The camera file described by 
the interface file opens, and all the user attributes are set in the driver. If no 
camera of the same make and model is present, the Camera Open function 
returns an error.
Camera Control Mode
The camera control mode parameter has two options: controller and 
listener. The default option—controller—controls the camera and receives 
video data. The listener only receives video data. Use the listener option in 
broadcasting applications. Refer to the 
 section of Chapter 3, 
, for more information about 
broadcasting.
Configure the Acquisition
After opening the camera, configure the camera for acquisition by 
specifying the following parameters: whether the acquisition is one-shot
or continuous, and the number of internal buffers to use.
While configuring the camera, the driver validates all the user-configurable 
attributes. If any attributes are invalid or out of range, the driver returns an 
error and does not configure the acquisition.
If you want to reconfigure the acquisition, call the Unconfigure Acquisition 
function before calling the Configure function again.
Note
National Instruments recommends that you do not configure an acquisition in a loop 
because doing so is time-intensive.
One-Shot/Continuous Acquisition
Use a one-shot acquisition to start an acquisition, perform the acquisition, 
and stop the acquisition using a single function. The number of images 
acquired is equal to the number of images in the images collection.
With a one-shot acquisition, you specify a certain number of internal 
buffers. The camera transfers each image up to and including the specified 
number of buffers. The driver acquires every image during a one-shot