Genlocking Multiple JAI CV-M1 Cameras
Overview
This article explains how to genlock (synchronize) multiple JAI CV-M1 cameras to acquire images using the National Instruments IMAQ 1409 image acquisition device. This document also contains an example of a ring acquisition that alternatively acquires an image from each channel.
Table of Contents
Introduction
The National Instruments IMAQ 1409 features four multiplexed analog inputs. Acquiring from the four channels simultaneously is impossible, but the IMAQ 1409 can switch channels to acquire images alternatively on each channel. If the cameras’ video signals are not synchronized, the acquisition device must wait for at least one frame to lock to the new video signal and acquire an incoming image. As a result, one image is lost each time the acquisition device switches channels. This document describes how to genlock cameras in order to avoid this problem.
Genlocking
Genlocking is the external synchronization of cameras’ HD and VD signals. Most cameras can be externally synchronized using the following methods:
- Use one camera as master. The master camera must be able to output the HD and VD synchronization signals and provide them to the acquisition device and to the slave cameras.
- Provide synchronization signals to the cameras. Most cameras can be set up to input HD and VD signals. With this method, the image acquisition device generates the HD and VD signals and provides them to the cameras to be genlocked.
Genlocking Multiple JAI CV-M1 Cameras
Camera Switches Setup
This section explains how to set up the JAI CV-M1 cameras, and requires that you modify the internal camera switches.
Note: If you are unsure of how to modify jumpers inside the cameras, contact JAI technical support for more information.
Internal Switches
Figure 1 illustrates the switches and jumpers on the PK8105 board inside the cameras. Tables 1and 2 at the end of this section summarize the camera switch and jumper configuration. These settings are valid for the revision D of the JAI CV-M1.

Figure 1: PK8105 board, side A (from JAI CV-M1 Operation Manual, Revision D)
On all cameras, make the following modifications to the internal camera switches:
- To set the termination of the external synchronization signals to TTL, verify that switches SW3–1 and SW3–2 are set to OFF. This setting is the factory default.
- To output the synchronization signals (HSYNC and VSYNC), make jumper JP3/JP6 short-circuited, and JP2/JP4/JP5 open-circuited.
- To output the pixel clock pulse, make jumper JP7 short-circuited. Pixel clock pulse is output from pin 9 of the 12-pin multi-connector.
- To input the synchronization signals (HSYNC and VSYNC), verify that jumpers JP2 and JP5 are short-circuited, and jumpers JP3, JP4, and JP6 are open-circuited. These settings are the factory default.
Figure 2 illustrates the back pane of the JAI CV-M1. Tables 1and 2 at the end of this section summarize the camera switch and jumper configuration. These settings are valid for the revision D of the JAI CV-M1.

Figure 2: Back Pane of the JAI CV-M1 (from JAI CV-M1 Operation Manual, Revision D)
On all cameras, make the following modification to the external camera switch: Tables 1 and 2 below offer a quick reference for adjusting your camera settings.
Table 1: Master Camera Internal Switches and Jumper Settings

Table 2: Slave Cameras Internal Switches and Jumper Settings
Cabling Requirements
Note: You can use the IMAQ-A6822 breakout box to easily prototype your cable.
The IMAQ 1409 operates in external lock mode. This mode requires that you provide the horizontal and vertical synchronization signals, the pixel clock, and the video signals to the board.
Table 3: Connection from the IMAQ 1409 to the Master JAI CV-M1 (12-Pin Hirose Connector)

Table 4: Connection from the IMAQ 1409 to the Slave JAI CV-M1 (12-Pin Hirose Connector)

Table 5: Connection from the Master JAI CV-M1 to the Slave JAI CV-M1

Table 6: Power Supply (connections required for each camera)
Interfacing with the IMAQ 1409
Note: Before configuring your software, make sure to remove the W1 jumper on the 1409 device.
Configuration Files
1. Copy the JAI CV-M1(1409).icd file into the <NI-IMAQ>\Data folder.
Note: To download the camera configuration file, go to ftp://ftp.ni.com/support/imaq/camera_support/camera_files/analog/jai/ and download the JAI
CV-M1(1409).icd file.
2. Launch Measurement & Automation Explorer (MAX).
3. Expand the Devices and Interfaces branch of the tree view.
4. Expand the IMAQ PCI/PXI-1409 branch of the tree view.
5. For each channel, right-click on the channel name (Channel x: RS-170), and select Camera»JAI»JAI CV-M1.
6. Click Save.
7. Click Snap or Grab to acquire images.
Example Program
Click here to go to the example program that demonstrates a ring acquisition that scans all the channels.
The first frame sets the position and size of the image windows. In the second frame, shown in Figure 3 below, IMAQ Init initializes the board. IMAQ Configure List configures a list of buffers. The number of buffers configured by IMAQ Configure List is the same number of buffers as the number of channels, and each buffer is configured to acquire from a different channel.

Figure 3: IMAQ Init and IMAQ Configure List
The next frame, shown in Figure 4 below, contains the acquisition loop. IMAQ Copy copies a buffer, and IMAQ Display displays it in the corresponding window.

Figure 4: Acquisition Loop
The last frame disposes the images and closes the window.
Related Links:
Genlocking Multiple JAI CV-M1 Cameras
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
