Using the Sony XC-HR50 Camera in Asynchronous Reset Mode With the IMAQ 1409
Overview
This article explains how to use the Sony XC-HR50 camera in asynchronous reset mode with the National Instruments IMAQ 1409 image acquisition device to acquire clear images of moving objects.
Table of Contents
Progressive Scan and Asynchronous Reset
Some industrial imaging and Web inspection applications involve acquiring images of fast-moving objects. In most cases, an external trigger produced by a photocell, proximity sensor, or a similar device starts the image acquisition.Acquired images of moving objects are often blurred. However, triggered acquisition with a progressive scan camera is one way to produce an image without the blur. Progressive scan cameras, such as the Sony XC-HR50, eliminate the blur that results from motion because they acquire one full frame at a time. Moving images acquired using interlaced cameras often produce a motion-induced blur because they acquire the odd and even fields separately and then interlace them. Motion-induced blur occurs when the two fields are not acquired at the same time and the object is moving between the fields.
Triggering only the acquisition device while using the camera in free-running mode creates a variable delay between the time the acquisition device receives the trigger and the time the image is acquired. The delay occurs because the acquisition device must finish acquiring the current frame before acquiring the triggered frame. Figure 1 illustrates this variable delay.
Because the delay is variable, depending on when the trigger occurs, the object does not appear at the same location on all the triggered images. Asynchronous reset cameras offer one solution to this problem. Asynchronous reset techniques help keep the motion device (a conveyor belt, for example) moving while acquiring images on the fly. These techniques offer a way to introduce a vision system in an assembly line with very little modification of the environment.
When an asynchronous reset camera receives a trigger, it resets the CCD and immediately begins acquiring a new image, which ensures that the image is always taken at the same time after trigger assertion. In this case, the objects imaged appear at the same location in the image, which simplifies the preprocessing of the image, including locating the object under inspection and specifying the regions of inspection within the image.
Figure 2 illustrates the asynchronous reset principle. This section explains how to set up the Sony XC-HR50 to run in continuous mode. This mode is for applications that do not require asynchronous external triggering (continuous operation). The camera operates in continuous mode with the default factory settings.
Configuration Files
1. Copy the Sony XC-HR50(1409).icd file into the <Program Files\NI-IMAQ>\Data folder.
2. Launch Measurement & Automation Explorer (MAX). Expand the Devices and Interfaces branch of the tree view.
3. Expand the IMAQ PCI/PXI-1409 branch of the tree view.
4. Right-click Channel 0: RS-170, and select Camera»Sony»Sony XC-HR50.
5. Click Save and exit MAX.
6. Perform snap and continuous video acquisition for diagnostics and verification.
Asynchronous Reset Mode
This section explains how to set up the Sony XC-HR50 to run in asynchronous reset mode. The Sony XC-HR50 uses External Trigger Shutter mode for asynchronous reset mode. In this mode, a trigger initiates the capture, and the duration of the trigger pulse governs the exposure time of the camera. The attached example demonstrates how to use the XC-HR50 camera in External Trigger Shutter mode.
Camera Switches Setup
Setting up the camera to run in asynchronous reset mode requires that you modify some of the switches on the back of the camera. Figure 3 shows the rear panel switches on the Sony XC-HR50.
In its default setting, the XC-HR50 accepts external HD/VD signals. To use the camera in asynchronous reset mode, it is necessary to make the following modifications to set the camera to output HD/VD signals:
1. Set the HD/VD switch on the back panel to INT (right position).
2. Set the 75W termination switch to OFF.
3. Set switch 8 to ON (right position).
Table 2: Switch Configuration
Cabling Requirements
This section discusses cabling and power supply requirements.
Note: You can use the IMAQ-A6822 breakout box to easily prototype your cable.
Figure 4 shows the cable schematics for the Sony XC-HR50 and the IMAQ 1409.
Tables 2, 3, and 4 outline connection for the power supply, connections from the IMAQ 1409 to the Sony XC-HR50, and external BNCs.
Table 2: Power Supply
Table 3: Connection from the 1409 to the Sony XC-HR50 (12-Pin Hirose Connector)
Table 4: External BNCs
Note: To preserve the quality and signal-to-noise ratio of the analog video signal, National Instruments recommends a cable length less than 10 meters (~30 feet). This section explains how to configure your software for asynchronous reset acquisition.
Note: Before configuring your software, make sure to remove the W1 jumper on the 1409 device.
Configuration Files
1. Copy the Sony XC-HR50 60Hz Progressive Scan Ext HLock(1409).icd file into the <Program Files\NI-IMAQ>\Data folder.
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. Right-click Channel 0: RS-170, and select Camera»Sony»Sony XC-HR50 60Hz Progressive Scan Ext HLock.
6. Click Save and exit MAX.
Note: You cannot use this camera file to acquire images with MAX. Asynchronous reset mode requires that the IMAQ 1409 generate the trigger pulse sent to the camera. Since it is not possible to accomplish this task in MAX, the camera file can only be used with LabVIEW.
In order to acquire images in asynchronous reset mode, both the IMAQ 1409 and the camera must receive the trigger. The input trigger connects to the IMAQ device, which generates the trigger signal sent to the camera. This signal is synchronized with the input trigger. This setup allows you to specify the length of the trigger pulse in order to set the exposure time. Because the IMAQ 1409 generates the trigger sent to the camera, you can also use the camera without providing an external trigger input to the IMAQ device by specifying the width and frequency of the pulse signal generated by the IMAQ device. These pulse signals determine the acquisition rate and exposure time (internal trigger mode). The camera provides both the horizontal and vertical synchronization signals to the IMAQ device
When acquiring images of moving objects, decreasing the exposure time (increasing the shutter speed) ensures that the resulting images are not blurred. Decreasing the exposure time decreases the amount of light that the CCD sensor can integrate. To compensate for the short exposure time and still get a well-contrasted image, provide a more intense lighting or use a strobe light at the time of the image acquisition. The strobe light can also control the exposure time, in which case the sensor exposure time can be set to the maximum.
The acquisition device is capable of outputting a signal that corresponds to the start of a frame (TRIG 1). For example, it can be useful to illuminate the object by firing a strobe light when the frame is acquired.
Computing the Exposure Time
This section explains how to compute the correct exposure time for your application.
To compute the exposure time needed for your application, you need to know the following parameters:
- Horizontal resolution of your camera (example: 640 pixels)
- Horizontal field of view (example: 100 mm)
- Speed of the moving object (example: 150 mm/s)
- Acceptable blur¾the maximum blur that is acceptable in the image (example: < 1 pixel)
The shutter speed needed for the application corresponds to the time needed for the object to move of the number of pixels specified by the blur. Figure 6 demonstrates how to compute exposure time.

Figure 6: Computing Exposure Time
In the example, the Exposure Time needs to be less than: 1 x 100 / (640 x 150) = 0.00104 s = 1.04 ms
Computing the Frame Rate
This section explains how to compute the correct frame rate based on desired exposure time.
The frame rate of the Sony XC-HR50 is dependent on the exposure time in asynchronous reset mode. The rising edge of the next trigger cannot occur until the previous frame has been output. An incorrect video signal will output if a new trigger pulse is input before the video signal output for the previous trigger pulse is output completely. Figure 7 illustrates this concept.
Frame rate max = Te + 2H + 16.7ms
- Te is the exposure time
- H is the horizontal line rate (31.78us)
The example is implemented using a state machine. It shows how to control the camera's shutter speed and how to perform an asynchronous reset acquisition using an IMAQ 1409 device and a Sony XC-HR50 camera. You can either provide an external trigger to trigger the acquisition, or the IMAQ acquisition device can generate a signal to trigger the acquisition (internal trigger). The internal trigger allows you to test the example without having to provide an external trigger signal to the IMAQ device.
In the first frame, IMAQ Create allocates the memory for the images.
In the Start state, illustrated in Figure 8, IMAQ Init is called to initialize the IMAQ device. Next, the subVI Sony XC-HR50 Asynchronous Reset Manager generates all the signals. Inside this subVI, IMAQ Generate Pulse is called twice to create the shutter pulse (which controls the camera's shutter and asynchronous reset) and to output a strobe signal on one of the output lines. IMAQ Configure List configures the buffer list, which contains one buffer. IMAQ Start starts the acquisition.
In the Acquire state, illustrated in Figure 9, IMAQ Copy provides a copy of the image currently being acquired. IMAQ WindDraw displays this image in an image window.

Figure 9: Acquire State
The Stop state calls Sony XC-HR50 Asynchronous Reset Manager to stop generating the pulses. IMAQ Close is called to shut down the acquisition.

Figure 10: Stop State
Using the Sony XC-HR50 Camera in Asynchronous Reset Mode With the IMAQ 1409
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/).










