The three most important types of digital signals that come out of a digital camera are the data lines, the pixel clock, and the enable lines.
Most digital cameras use a CCD (Charge Coupled Device) sensor to acquire images. The CCD is composed of thousands of small sensors that absorb photons while the shutter is open and build up an electrical charge. When the camera takes a picture, it discharges the CCD elements and converts the voltages into digital data in the camera. The CCD elements form a square or line with each element corresponding to a pixel.
There are two major classes of cameras -- Line Scan and Area Scan. Line Scan cameras use a single row of CCD elements. Also, since there are only lines, Line Scan cameras only require the H-Enable signal. Area Scan cameras feature frames with a defined width and height and use both the H-Enable and V-Enable signals to construct their frames. Below is an image of these two types of cameras with the enable signals and pixel clock. The following figure represents the enable signals and pixel clock signals for Line Scan and Area Scan cameras. Note that the data lines in the figure may change between each active edge of the pixel clock. The data on the lines during the active edge of the pixel clock, when the H-Enable and V-Enable signals are active, will be latched into the image acquisition device.
Increasing the speed of a digital camera's pixel clock or acquiring more than one pixel at a time can greatly increase the camera's acquisition speed. A camera that latches only one pixel on the active edge of the pixel clock is known as a single tap camera. A tap, or channel, is defined as a group of data lines that bring in one pixel each. Some cameras have multiple pixels on separate data lines that are all available on the same active edge of the pixel clock. These cameras are called multi-tap cameras, and digital cameras are available with as many as 4 taps. This technique requires more data lines, but allows for faster transfers.
The IMAQ 1422 Series devices features 16 digital lines, and the IMAQ 1424 Series devices features 32 digital lines. Therefore, an IMAQ 1422 device can support cameras with one 16- bit tap or two 8-bit taps, and an IMAQ 1424 device can handle a single 32-bit tap, two 16-bit taps, or four 8-bit taps. IMAQ devices require a tap to be a multiple of 8 bits, so that even if a camera only has 10 bits per pixel, the device will require a tap of 16 bits to handle the data and ignore the upper 6 bits.
There are several different configurations multi-tap cameras use to store data. A single tap camera stores data beginning with the top left pixel and moves to the right before moving down to the next line, continuing in this manner until the last line is completed for that frame. The camera then starts acquiring the pixels at the top of the next frame. The following figures illustrate different storage configurations used by multi-tap cameras.
Digital cameras often allow you to change their functionality through serial commands or control signals. You can modify camera attributes through Measurement & Automation Explorer (MAX) by right-clicking on the camera, selecting Properties, and clicking on the Advanced tab. You can view and change all of your camera's properties on this tab. You can also access these properties programmatically using the function imgSetCameraAttributeString or the IMAQ Set Camera Attribute VI in LabVIEW.
Note: Be sure to check for the correct spelling and attribute order when you are setting your camera properties. Always set higher-level attributes first(i.e. before changing the Pulse Width, set the Shutter Control and Shutter Speed to the correct settings.)
Digital cameras are controlled using either serial commands or control pulses. These methods use the same VIs or function calls. NI-IMAQ and your camera's camera file manage the serial commands and control pulses as required by your camera. The IMAQ 1422 and 1424 Series devices feature a UART chip designed for serial communication with digital cameras. The high-level commands called with the Camera Attribute functions allow you to set these properties without explicit knowledge of the low-level commands. The camera file also makes the use of serial commands and control pulses transparent.
Another method for controlling the camera is to send digital control pulses. Exposure time is a good example of an attribute that may be controlled with control signals. Some cameras may expect a rising edge before they open the shutter and the shutter stays open until the signal has a falling edge. As soon as the falling edge occurs, the shutter closes and the camera begins transferring the digital data to the image acquisition device. The length of the control pulse determines the shutter time, while the control pulse frequency determines the frame rate.
Note: You can set the shutter with serial commands, control pulses, or both. See your camera documentation for more information on which method your camera uses.
Some properties change how the image is formatted. These changes can cause timeout errors. For example, if you are expecting a 1000 x 1000 image, and you change an attribute that changes the image size to 500 x 500, NI-IMAQ will continue to look for a 1000 x 1000 image, resulting in the error message.
A common example of an attribute that changes the images size is the binning attribute. Binning is a method of combining the charge of two consecutive pixels and returning a single pixel value with a greater charge, producing a smaller, brighter image. Since this attribute affects the image, make sure your window is reduced appropriately so that the reduced image size does not cause an error. While camera attribute functions send the serial command or control pulse and notify NI-IMAQ of the attribute change, you must still change the acquisition size.
Note: If the cable coming from the image acquisition device does not have the serial lines connected (often because the serial lines are housed in the power connector of the camera), change the window size to fit the image and then send the serial command using your operating system's COM port.
A camera file tells NI-IMAQ how the camera organizes the pixels, what attributes the camera supports and how to change them, either using serial commands or control pulses.
Due to all the variations in digital cameras, such as how they format the data and the modes they support, NI-IMAQ requires a camera file to specify how the data is coming in and what serial commands and control pulses should be sent to the camera to change the mode or attributes of the acquisition. You can check the list of Compatible Digital Camera Files to see if there is a digital camera file available for your camera. If you do not see the camera listed here, the NI Camera File Generator can help you create your own custom camera files with an easy to use user interface.
NI Camera File Generator
There are four types of digital signals used to send the image data to your image acquisition device.
The table below lists the boards that support the four digital formats.
Note: The IMAQ 1424 and 1422 Series devices each have a RS-422 and LVDS version.
Camera Link 777315-01