Specifications
sharpVISION™ Camera
sharpVISION™ VISION SDK
85
6.6. How to use the VIs
6.6.1. Snapping an image
The easiest way to acquire an image is to use the IDT Snap VI. It opens the first available
camera, configures it, acquires an image and then closes the camera. Optionally you may set
the exposure, binning and ROI parameters.
6.6.2. Opening and closing a camera
A camera must be opened before using its functions and then it must be closed. To open a
specific camera you have to supply to the Open VI the unique ID of that camera. You can
also supply 0 to open the first available camera. To obtain the list of all available cameras you
can use the “IDT List Cameras” VI.
6.6.3. Configuring a camera
The camera configuration parameters may be set using a single VI which configures all the
camera parameters (IDT Setup). The parameters that may be written by this VI are: exposure
time; contrast and brightness [-100,100]; binning; ROI (X, Y, width, height) as an array of four
unsigned long. If you want to read or write a single parameter you may respectively use the
“IDT Get Param” VI or the “IDT Set Param”.
6.6.4. Acquiring images
The correct sequence to grab an image is to setup the driver to capture the image (IDT Grab
Setup VI), acquire the image (IDT Grab) and stop the acquisition (IDT Grab Stop). You may
obtain better performance in acquiring multiple images if you run the IDT Grab Setup VI once,
then a loop of IDT Grab Acquire, followed by one IDT Grab Stop. If you need to abort the
acquisition of an image you can set the global variable IDT Grab Abort to TRUE. This variable
will reset itself after the image is aborted.
6.6.5. Triggering
Trigger modes can be set to five different values (internal, external edge-low, external edge-
high, external pulse-low, external pulse-high). In internal mode the camera acquires images
using internal frame rate, while in external modes it requires an external TTL-level trigger
signal.
6.6.6. Error handling
The LabVIEW interface uses the standard error cluster found in many LabVIEW Vis. The
error cluster includes status, code and source parameters. When an error occurs, status is
set to TRUE, source is set to the VI that caused the error, and code is set to one of the values
in the table below.
Error Code Description
1 Driver Fault
2 Camera not found
3 Bad image format
4 Invalid parameter value
5 Parameter or info not supported
100 Generic error