Metrologic Instruments IS4910 User Manual

METROLOGIC INSTRUMENTS, INC.
IS4910 Series
Area Imaging Engine
Programmer’s Manual
Copyright
Trademarks
Metrologic is a registered trademark of Metrologic Instruments, Inc. Products identified in this document are hereby acknowledged as trademarks, registered or otherwise, of Metrologic Instruments, Inc. or their respective companies.
T
ABLE OF CONTENTS
IS4910 S
O
VERVIEW OF THE
IS4910 Device Driver and Its Configuration Parameters ..........................................................................3
Camera Support Library CamLib............................................................................................................... 5
Omniplanar Barcode Decoding Library SwiftDecoder............................................................................... 5
Metrologic Demo Application..................................................................................................................... 5
I
NSTALLING
YSTEM HARDWARE ARCHITECTURE
IS4910 S
Minimum and Maximum Illumination Times ......................................................................................... 4
Image Sensor Gain............................................................................................................................... 4
Pixel Clock............................................................................................................................................ 4
Data Readout Order ............................................................................................................................. 5
Image Size............................................................................................................................................ 5
IS4910 S
OFTWARE COMPONENTS
OFTWARE
................................................................................................... 1
Downloading Software to the Target Device ............................................................................................. 6
Easy Downloading Using Device Setup Tool and MS ActiveSync Connection ................................... 7
Manual Downloading Using MS ActiveSync Connection ..................................................................... 8
C
AMERA SUPPORT LIBRARY CAMLIB
Camera Initialization APIs .........................................................................................................................9
camInit .................................................................................................................................................. 9
camFree................................................................................................................................................ 9
camOpen ............................................................................................................................................ 10
camClose............................................................................................................................................ 10
Camera Properties APIs..........................................................................................................................10
Clocks ................................................................................................................................................. 11
camSetClocks................................................................................................................................................11
camGetClocks ...............................................................................................................................................11
ii
T
ABLE OF CONTENTS
Window of Interest.............................................................................................................................. 11
camSetCenteredWOI..................................................................................................................................... 12
camSetWOI ...................................................................................................................................................12
camGetWOI ...................................................................................................................................................12
camGetImageSize .........................................................................................................................................13
Gain .................................................................................................................................................... 13
camSetGain_db .............................................................................................................................................13
camGetGain_db.............................................................................................................................................13
camSetAutoGainRange_db ...........................................................................................................................14
camGetAutoGainRange_db........................................................................................................................... 14
Image Integration Time (Exposure).................................................................................................... 14
camSetIntegrationDuration ............................................................................................................................15
camGetIntegrationDuration............................................................................................................................15
camSetAutoExpoRange.................................................................................................................................15
camGetAutoExpoRange ................................................................................................................................ 16
Readout Order.................................................................................................................................... 16
camSetReadoutOrder ....................................................................................................................................16
camGetReadoutOrder....................................................................................................................................16
Illumination ......................................................................................................................................... 17
camSetIllumControl .......................................................................................................................................17
camGetIllumControl ....................................................................................................................................... 17
camSetMinFlashTimer ...................................................................................................................................17
camGetMinFlashTimer...................................................................................................................................18
Image Acquisition APIs............................................................................................................................ 18
camAcquireImage............................................................................................................................... 19
camAcquireImageEx .......................................................................................................................... 19
camStartVideo .................................................................................................................................... 20
camStopVideo .................................................................................................................................... 21
camPauseVideo ................................................................................................................................. 21
camResumeVideo .............................................................................................................................. 21
iii
T
ABLE OF CONTENTS
Aiming APIs ............................................................................................................................................. 22
camTurnAimingOn.............................................................................................................................. 22
camTurnAimingOff.............................................................................................................................. 22
camGetAimingStatus.......................................................................................................................... 22
Automatic Brightness Adjustment APIs................................................................................................... 23
camAdjustBrightness.......................................................................................................................... 23
camSetAutoBrightnessControl ........................................................................................................... 23
camGetAutoBrightnessControl........................................................................................................... 24
IS4910 D
Installation Procedure.............................................................................................................................. 25
EVICE DRIVER
Installing Driver in the Running OS .................................................................................................... 25
Including Driver in the Target OS Image ............................................................................................ 25
Registry Settings ................................................................................................................................ 26
................................................................................................................................. 25
Power Management ................................................................................................................................ 29
A
PPENDIX A: DRIVER REGISTRATION APPLICATION
A
PPENDIX B:
A
PPENDIX C: DEMO APPLICATION
O
FFICE LOCATIONS AND CONTACT INFORMATION
IS4910 D
RIVER INITIALIZATION FILE
................................................................................................................. 34
....................................................................................... 30
......................................................................................... 31
........................................................................................... 35
iv
IS4910 S
YSTEM HARDWARE ARCHITECTURE
Figure 1:
Communication with the image sensor is done over two buses – the control bus (I2C) and the data bus. The control bus is used to send commands to the image sensor, and the data bus is used to transfer images from the image sensor to the host system.
The image sensor can operate in two modes – snapshot mode and video mode.
In snapshot mode, the image sensor acquires and transfers a single image. The IS4910 illumination system can be used to illuminate (flash) an object.
In video mode, the image sensor continuously acquires and transfers images, row by row. The IS4910 illumination system can either be constantly ON or OFF during the image acquisition in video mode.
The Trigger signal is used to initiate image acquisition in snapshot mode. The Trigger signal is also connected to the Illumination system, thus, automatically initiating the flash illumination. Duration of the flash and the image sensor’s exposure to it depends on the duration of the Trigger pulse, which is controlled by software. Actual duration of the flash also depends on such signals as Minimum Illumination (Illum_ON), controlled by software, and the signal from the FirstFlash
In video mode, the Trigger signal is always de-asserted. Image acquisition in video mode is initiated by a command sent to the image sensor by software over control bus (I constantly kept on or off by keeping the signal Minimum Illumination (Illum_ON) on or off.
For more details on IS4910 hardware system, please refer to the IS4910 User Manual.

IS4910 System Hardware Architecture

2
C). Illumination in video mode can be
®
hardware circuitry.
1
O
VERVIEW OF THE
IS4910 S
OFTWARE COMPONENTS
The IS4910 camera engine cannot operate on its own and must be supported by the underlying hardware and software systems. The IS4910 user system software architecture is shown on Figure 2.
Figure 2:
Metrologic is currently targeting user systems that run Microsoft Windows CE Metrologic is fully supporting an Intel PXA270 processing platform. The software system can be easily ported to any other processing platform that has camera interface controller and can run Windows CE operating system.
The detailed description of the IS4910 software development kit (SDK) is provided in this document. The IS4910 software package has the following major components:
1. IS4910 Device Driver
2. Camera Support Library CamLib
®
3. Optionally, Omniplanar
4. Metrologic Demo Application
Barcode Decoding Library SwiftDecoder®
IS4910 User System Architecture
®
operating system.
2
O
VERVIEW OF THE
IS4910 S
OFTWARE COMPONENTS
IS4910 Device Driver and Its Configuration Parameters
IS4910 Device Driver is a software component that does all the physical communications with IS4910 camera device. It is pre-compiled as a DLL (vuqdrv.dll) for Windows CE OS and a particular processing platform and must be properly installed on the target device – please refer to the software installation instructions below in this document.
The driver provides a set of device-specific functions and so-called IOCTLs, which can be used by the upper-level software components to communicate with the IS4910 camera. Even though any application can call these functions, we recommend that user applications use the Camera Support Library APIs instead of directly calling the driver. The Camera Support Library APIs are described in detail in the IS4910 Camera Support Library section of this document.
The driver initialization file VuQuest2D.ini can be used by a user to configure the driver per specific requirements of the user system. This file has the following sections:
Device
Pins
Resources
Settings
In the Device section, a user can specify the name of sub-key, under which the IS4910 software is going to be registered in Windows Registry, and the index of the device. The index is used in composition of the name of the IS4910 device as referenced by the applications. The default name is “VUQ1:”, where “1” is the default device index. (Note: Changing the device index from default will make the pre-compiled Metrologic Demo Application inoperable). Also in this section, the user can specify in what directory on the target device the driver should be installed. By default, the driver is installed in the \windows directory.
In the Pins section, the user can change the designation of the processor’s general purpose input-output (GPIO) pins used for communication with the IS4910 camera.
The Resources section can be used to alter the usage of the system resources, such as system interrupts and DMA channels. In the system for PXA270 processing platform, the SysIntr value specifies the system interrupt number corresponding to the image capture interface IRQ. If it is not defined or is -1, the driver obtains it automatically by requesting the IRQ-to-SYSINTR mapping. The DMAChannel value specifies the DMA channel to be used by the driver for DMA operations. If it is not defined or is -1, then the first found free DMA channel will be used.
Finally, in the Settings section, the user can change some of the camera’s default parameters, such as minimum and maximum illumination time, image sensor gain, pixel clock, data read-out order, image width and height. Specifying these parameters makes them de-facto defaults, although they can be changed by the applications during run-time.
In the following subsections, we describe some of the camera settings that can be specified in the Settings section of the VuQuest2D.ini file. More details about all camera settings and all other configuration parameters that can be specified in the VuQuest2D.ini file and registered in the Windows CE registry can be found in the IS4910 Device Driver section of this document.
3
O
VERVIEW OF THE
IS4910 S
OFTWARE COMPONENTS
Minimum and Maximum Illumination Times
These values, specified in microseconds, control the IS4910 illumination system in the snapshot mode.
The minimum illumination time specifies the minimum time the illumination flash should last when the camera is operating in the snapshot mode.
The maximum illumination time specifies the maximum time the illumination flash should last when the camera is operating in the snapshot mode. Note that the maximum illumination flash time always equals the image integration (exposure) time the image sensor is automatically programmed to. Although there is no physical limit to the maximum illumination time, it is not recommended to use the values longer than 8000 µs due to potential image blurring problems.
Note also that the actual illumination flash time in the snapshot mode can be in-between the specified minimum and maximum values. The IS4910 camera is equipped with the FirstFlash circuitry, which ensures that the illumination flash does not last too long resulting in the image saturation. Specifying the minimum and maximum illumination time provides the timing boundaries for the FirstFlash circuitry.
Image Sensor Gain
The gain is specified in absolute units of measure multiplied by 1000. It ranges from 1000, which corresponds to an absolute gain value of 1 (or 0 dB), to 16000, which corresponds to an absolute gain value of 16 (or 24.08 dB). Default is 10000, which corresponds to an absolute gain value of 10 (or 20 dB). More accurately, the conversion formulas between the Absolute Gain and the Gain in dB are as follows:
=
lg
AbsGain
1000
GaindB
20
=
10
GaindB
AbsGain
GaindB is the gain value measured in decibels (dB); AbsGain is the gain value measured in absolute units multiplied by 1000.
Note that the IS4910 Camera Support Library software provides the set of APIs for automatic gain control and image brightness adjustments. See description of the Camera Support Library APIs for details.
20
1000
Pixel Clock
The image sensor used in the IS4910 camera supports pixel clock of up to 48 MHz. Not all processing platforms, however, can keep up with the image data coming in with such high speed. The Intel PXA270 Xscale architecture, for example, cannot. In that case, the pixel clock must be lowered. For PXA270, we use 24000000 Hz (or 24 MHz) as default pixel clock.
4
O
VERVIEW OF THE
IS4910 S
OFTWARE COMPONENTS
Data Readout Order
ReverseRows and ReverseCols entries in the VuQuest2D.ini file provide information on whether the pixel read-out order for the image sensor rows and columns respectively should be reversed. The specified value can be either 0 (FALSE) or 1 (TRUE). By default, both values are set to 0 (FALSE), meaning that the read-out orders are not reversed.
Image Size
The maximum (which is also a default) image size supported by the IS4910 camera is 1280 x 960 (1280 columns by 960 rows). The number of rows and columns can be changed using the entries ImgHeight and ImgWidth respectively.
Camera Support Library CamLib
The Camera Support Library CamLib provides a set of convenient APIs, which a user application can call to easily acquire images, inquire or change the camera parameters. The library comes in two formats – as a static library camlib.lib and as a DLL camdll.dll. A decision whether to use the static or dynamic library is made by a user-programmer depending on his/her preferences and tools used to compile and build user applications. Note that the Metrologic Demo Application is linked statically with CamLib, and therefore, does not require the CamLib DLL to be installed on the target device. If a user application is designed to use CamLib DLL, then the CamLib DLL must be installed on the target device. Details on how to install IS4910 software on the target device are described in the Downloading Software to the Target Device section of this document.
Omniplanar® Barcode Decoding Library SwiftDecoder®
An optional decoding library SwiftDecoder is available upon request under a license agreement. Please contact your sales representative at Metrologic Instruments, Inc. (www.metrologic.com Omniplanar, Inc. (www.omniplanar.com
) for details.
), or
Metrologic Demo Application
The Metrologic Demo Application is a pre-compiled executable program demonstrating the basic capabilities of the IS4910 camera. The source code of the Demo Application is also provided in the IS4910 installation package.
5
I
NSTALLING
Installation of the IS4910 software is a two-stage process. In the first stage, the IS4910 software development kit (SDK) must be installed on a Windows PC. To perform the first-stage installation, insert the IS4910 CD into the CD drive of the Windows PC and follow the on-screen instructions. (If the auto­run feature is disabled on your Windows PC, run setup.exe from the root directory on the CD.)
Upon installation of the IS4910 SDK, the folder “VuQuest2D SDK” is created in the Windows “Start\Programs” menu. This folder contains the shortcuts to
Device Setup Tool, which can be used to download IS4910 software components to the target device
The file VuQuest2D.ini, used in configuring the IS4910 device driver
The file vuqdemo.vcw, which is the Embedded Visual C++ project workspace file of the Demo
Application
IS4910 SDK License Agreement
About application, which can be used to display version information of the installed IS4910 SDK
IS4910 SDK Programmer's manual
Once the IS4910 SDK is installed, the target device-specific software components must be transferred and installed on the target device. Please refer to the following subsection Downloading Software to the Target Device for details.
IS4910 S
OFTWARE
Downloading Software to the Target Device
The IS4910 camera software components that may need to be transferred to the target device are:
Image Acquisition Device Driver DLL (vuqdrv.dll);
Camera Support Library DLL (camdll.dll);
Driver Registration Application (vuqreg.exe) along with the target-specific
Driver Initialization File (VuQuest2D.ini)
Demo Application (camtest.exe).
Note that the pre-compiled Demo Application is statically linked with the Camera Support Library, which means that it does not require the Camera Support Library DLL to be installed on the target device. Downloading the Camera Support Library DLL to the target device, however, may be necessary if a user application is using it.
There are many ways of downloading software files to a target device, depending on software and hardware options supported by the target system. For example, software files can be downloaded to the target device using MS ActiveSync connection, Ethernet, RS232, Media card and so on. The easiest way is to use MS ActiveSync connection.
6
I
NSTALLING
IS4910 S
OFTWARE
Easy Downloading Using Device Setup Tool and MS ActiveSync Connection
The easiest way to download software to the target device is to use the installation program "Device Setup Tool", which is installed on the host Windows PC during the first-stage installation of the IS4910 SDK.
To download IS4910 software to the target device using Device Setup Tool, follow this procedure.
1. Make sure that Microsoft ActiveSync software is installed on your Windows PC. Note that the IS4910 Software Installation CD contains MS ActiveSync installation package and provides an option to install it on your PC during the IS4910 software installation procedure.
2. Connect the USB cable from the target device to your Windows PC.
3. Make sure that the USB function driver shipped with your target device is installed on your Windows PC. Note that usually the USB function driver is installed automatically during installation of MS ActiveSync software. Now your Windows PC will be able to connect the target device over ActiveSync.
4. At this point a dialog window should appear on the screen of your PC, asking you to set up a connection partnership. Select “No” and connect as a guest. Now your Window PC is connected to the target device over ActiveSync.
5. Start the installation program Device Setup Tool on your Windows PC. You can launch it from the Start menu by going to “Programs\VuQuest2D SDK\”. Note that the Image Acquisition Device Driver (vuqdrv.dll) will be placed in the directory specified by the “Path” key in the Device section of the Driver Initialization File VuQuest2D.ini (the default location is \windows). Other software components can be placed anywhere.
6. At this point the “Add/Remove Programs” window should appear on the screen of your target device, asking you whether you want to install software in the default directory. If you select “Yes”, the software will be installed under the “\Program Files\VuQuest2D Software”.
7. Launch the Demo Application (camtest.exe) from within the target device. Tip: On the device’s desktop there is a shortcut to the Demo Application.
Here is how the Device Setup Tool works. First, it packages IS4910 software files into a single .cab file by using the CabWiz utility. Then, if the MS ActiveSync is installed, it passes the generated cab-file to the Application Manager program which takes care of adding and removing software on the target device via ActiveSync connection. Note that even if the MS ActiveSync is not installed, the generated cab-file can be manually copied to the target device (for example, through a media card). The WinCE installation program (WCELoad.exe) can be used to install software from a cab-file, regardless of how that cab-file was transmitted to the device. To start the installation process, just double click the cab-file on the device. Note also that the cab-file will be dynamically deleted during installation. To prevent deleting the cab-file, you can make it read-only.
7
Loading...
+ 29 hidden pages