Basler L304kc USER’S MANUAL Document Number: DA00072104 Release Date: 27 September 2007
For customers in the U.S.A. This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communications.
Contacting Basler Support Worldwide Europe: Basler AG An der Strusbek 60 - 62 22926 Ahrensburg Germany Tel.: +49-4102-463-500 Fax.: +49-4102-463-599 vc.support.europe@baslerweb.com Americas: Basler, Inc. 855 Springdale Drive, Suite 160 Exton, PA 19341 U.S.A. Tel.: +1-877-934-8472 Fax.: +1-877-934-7608 vc.support.usa@baslerweb.com Asia: Basler Asia Pte. Ltd 8 Boon Lay Way # 03 - 03 Tradehub 21 Singapore 609964 Tel.: +65-6425-0472 Fax.: +65-6425-0473 vc.support.asia@baslerweb.com www.basler-vc.
Draft Contents Table of Contents 1 Introduction 1.1 Document Applicability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.2 Performance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1.3 Spectral Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1.4 Environmental Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Draft 3.3.2 Free Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 3.3.2.1 Basics of Free-run Controlled Operation . . . . . . . . . . . . . . . . . . . . . 3-8 3.3.2.2 Selecting a Free-run Exposure Mode, Setting the Line Period and Setting the Exposure Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 3.3.2.3 Guidelines When Using Free-run . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 3.
Draft Contents 3.11.4 Test Image Two (Moving Gray Gradient) . . . . . . . . . . . . . . . . . . . . . . . . . 3-54 3.11.5 Test Image Three (Vertical / Horizontal Gray Gradient) . . . . . . . . . . . . . . 3-55 3.11.6 Test Image Four (Fixed Red Gradient) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-56 3.11.7 Test Image Five (Fixed Green Gradient). . . . . . . . . . . . . . . . . . . . . . . . . . 3-56 3.11.8 Test Image Six (Fixed Blue Gradient) . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Draft FPGA Status Inquiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 Binary Command Protocol Status Inquiry . . . . . . . . . . . . . . . . . . . 4-11 Sensor Temperature Inquiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11 4.2.2 Feature Control and Status Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12 4.2.2.1 Definition of a Feature Control and Status Register . . . . . . . . . . . 4-12 4.2.2.2 “Raw” Value Fields vs.
Draft Contents 4.2.3.2 Using Bulk Data CSRs to Work with Bulk Data . . . . . . . . . . . . . . . 4-39 4.2.3.3 Bulk Data Control and Status Register Details . . . . . . . . . . . . . . . 4-44 Configuration Set CSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 Shading Value CSR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-45 4.3 Using Binary Read/Write Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-46 4.3.
Contents VI Draft Basler L304kc
Draft Introduction 1 Introduction 1.1 Document Applicability This User’s Manual applies to L304kc cameras with a camera version ID number of 01. Cameras with a lower or a higher ID number may have fewer features or have more features than described in this manual. Features on cameras with a lower or a higher ID number may not operate exactly as described in this manual. An easy way to see the camera version ID number for an L304kc camera is by using the CCT+. To see the camera version ID number: 1.
Draft Introduction 1.2 Performance Specifications Category Specification Sensor Kodak KLI-4104 Linear CCD with 3 parallel color lines (one green, one red, one blue) Number of Pixels 4080 per line Pixel Size 10.0 µm x 10.0 µm (10.0 µm pitch) Center-to-center Spacing Between Lines 90 µm Fill Factor 100% Spectral Response 350 nm to 1050 nm (See Figure 1-2) Camera Link Pixel Clock Speed 30 MHz in 3 tap output mode Maximum Data Rate 28 MPixels/s Maximum Line Rate 7.
Draft Introduction 1.3 Spectral Response The spectral response for L304kc cameras is shown in Figure 1-2. Figure 1-2: Spectral Response L To obtain the best performance regarding the camera’s blooming, smearing and dark signal non-uniformity characteristics, use of a dielectric IR cut-off filter is strongly recommended. The filter should transmit in a range from 400 nm to 700 ... 720 nm and it should cut off from 700 ... 720 nm to 1100 nm.
Draft Introduction 1.4 Environmental Requirements 1.4.1 Temperature and Humidity Housing temperature during operation: 0° C ... + 55° C (+ 32° F ... + 131° F) Humidity during operation: 20% ... 80%, relative, non-condensing Storage Temperature: -20° C ... +80° C (-4° F ... +176° F) Storage Humidity 5% ... 95% relative, non-condensing 1.4.2 Heat Dissipation You must provide sufficient heat dissipation to maintain the temperature of the camera housing at 55° C or less.
Draft Introduction 1.5 Precautions Heat Warning! If heat is not properly dissipated, the camera can get hot enough during operation to cause burning when touched. See Section 1.4.2 for more information. Power Caution! Be sure that all power to your system is switched off before you make or break connections to the camera. Making or breaking connections when power is on can result in damage to the camera. The camera is not protected for reverse voltage.
Introduction Draft Transporting Only transport the camera in its original packaging. Do not discard the packaging. Cleaning Avoid cleaning the surface of the CCD sensor if possible. If you must clean it, use a soft, lint free cloth dampened with a small quantity of high quality window cleaner. Because electrostatic discharge can damage the CCD sensor, you must use a cloth that will not generate static during cleaning (cotton is a good choice).
Draft Camera Interface 2 Camera Interface 2.1 Connections 2.1.1 General Description L304kc cameras are interfaced to external circuitry via two connectors located on the back of the camera: • a 26-pin, 0.050 inch Mini D Ribbon (MDR) female connector used to transmit video data, control data and configuration data. • a 6-pin, micro-miniature, push-pull receptacle used to provide power to the camera.
Draft Camera Interface 2.1.
Draft Camera Interface Caution! Be sure that all power to your system is switched off before you make or break connections to the camera. Making or breaking connections when power is on can result in damage to the camera. The camera is not protected for reverse voltage. If reverse voltage is applied to the camera while it is connected to a frame grabber in a PC, the camera could be seriously damaged. The camera has overvoltage protection, but we do not recommend applying an input voltage greater than 13.
Draft Camera Interface 2.1.3 Connector Types 26-Pin Connector The 26-pin connector on the camera is a female 0.050 inch MDR connector as called for in the Camera Link Specification. 6-Pin Connector The 6-pin connector on the camera is a Hirose micro-miniature locking receptacle (part # HR10A7R-6PB) or the equivalent. The recommended mating connector is the Hirose micro-miniature locking plug (part # HR10A-7P-6S). A plug of this type will be shipped with each camera.
Draft Camera Interface 2.3 Camera Link Implementation in the L304kc The schematic in Figure 2-3 shows the interface for L304kc cameras and a typical implementation for the frame grabber interface. The L304kcv uses a National Semiconductor DS90CR285 as a Camera Link transmitter. For a Camera Link receiver, we recommend that you use the National Semiconductor DS90CR286, the National Semiconductor DS90CR286A or an equivalent.
Camera Interface Draft Figure 2-3: Camera / Frame Grabber Interface 2-6 Basler L304kc
Draft Camera Interface 2.4 Input Signals An external sync (ExSync) signal is the only control signal that can be input into an L304kc camera. 2.4.1 ExSync: Controls Line Readout and Exposure Time The ExSync input signal can be used to control exposure time and line read out. The ExSync signal is an RS-644 LVDS signal as specified in the Camera Link standard and is usually supplied to the camera by the frame grabber.
Draft Camera Interface 2.5 Output Signals The camera’s output signals include a pixel clock, video data and video data qualifiers such as line valid and data valid. Sections 2.5.1 through 2.5.4 describe the output signals. 2.5.1 Pixel Clock As shown in Figure 2-3 and in Table 2-3, the Camera Link pixel clock is assigned to the TxClkIn (transmit clock) pin of the Camera Link transmitter. The pixel clock is used to time the sampling and transmission of pixel data as shown in Figures 2-4 and 2-5.
Draft Camera Interface 2.5.4 Video Data Table 2-3 lists the assignment of pixel data bits to the input ports on the transmitter in the camera and the corresponding output pins on the receiver in the frame grabber. These bit assignments comply with the Camera Link standard. As shown in the table, the bit assignments for pixel data vary depending on the output mode of the camera. The available output modes are explained in more detail in Section 2.5.5.
Draft Camera Interface 2.5.5 L304kc Video Data Output Modes L304kc cameras can operate in 3 tap 8 bit, 2 tap 10 bit and 2 tap 8 bit output modes. (See Section 3.2 for more information about setting the camera for a particular output mode.) Operation in 3 Tap 8 Bit Output Mode In 3 tap 8 bit output mode, L304kc cameras operate with a 30 MHz pixel clock.
Draft Camera Interface When the AOI and Stamp features are used, N could be more or less than 4080 (see Sections 3.7 and 3.8). The pixel data transmitted out of the camera is affected by the spatial correction settings (see Section 3.5). Timing diagrams are not to scale.
Camera Interface Draft When the AOI and Stamp features are used, N could be more or less than 4080 (see Sections 3.7 and 3.8). The pixel data transmitted out of the camera is affected by the spatial correction settings (see Section 3.5). Timing diagrams are not to scale.
Draft Camera Interface Operation in 2 Tap 10 Bit or 2 Tap 8 Bit Output Modes In 2 tap 10 bit output mode, L304kc cameras operate with a 60 MHz pixel clock. On each clock cycle, the camera transmits data for two pixels at 10 bit depth, a line valid bit and a data valid bit. The assignment of the bits is as shown in Table 2-3. The Camera Link pixel clock is used to time data sampling and transmission.
Camera Interface Draft Figure 2-6 shows the data sequence when the camera is operating in edge-controlled or levelcontrolled exposure mode and Figure 2-7 shows the data sequence when the camera is operating in programmable exposure mode. When the AOI and Stamp features are used, N could be more or less than 4080 (see Sections 3.7 and 3.8). The pixel data transmitted out of the camera is affected by the spatial correction settings (see Section 3.5. Timing diagrams are not to scale.
Draft Camera Interface When the AOI and Stamp features are used, N could be more or less than 4080 (see Sections 3.7 and 3.8). The pixel data transmitted out of the camera is affected by the spatial correction settings (see Section 3.5). Timing diagrams are not to scale.
Draft Camera Interface 2.5.6 Integrate Enabled Signal An RS-644 LVDS output signal called Integrate Enabled (IntEn) is available on L304kc cameras. The integrate enabled signal indicates that an exposure is taking place. The signal will go high when each exposure begins and go low when the exposure ends. As shown in the schematic in Section 2.3, the IntEn signal is available on pins 24 and 11 of the 26-pin connector on the L304kc.
Draft Camera Interface 2.6 RS-644 Serial Communication The L304kc is equipped for RS-644 serial communication via the frame grabber as specified in the Camera Link standard. The RS-644 serial connection in the Camera Link interface is used to issue commands to the camera for changing modes and parameters. The serial link can also be used to query the camera about its current setup.
Draft Camera Interface 2.7 Converting Camera Link Output to RS-644 with a k-BIC On the l304kc, video data is output from the camera in Camera Link LVDS format and parameter change commands are issued to the camera using RS-644 serial communication via the frame grabber. On older cameras, video data was output using an RS-644 LVDS format and commands were issued using RS-232 serial communication via the host PC.
Draft Operation and Features 3 Operation and Features 3.1 Functional Description The L304kc is a high resolution camera that employs a CCD sensor chip designed for color scanning. The sensor contains three lines of photosensitive elements (pixels) with 4080 pixels per line. One line is covered with a red filter, one line with a green filter and one line with a blue filter to provide spectral separation. Exposure time is normally controlled via an externally generated trigger signal (ExSync).
Operation and Features Draft Figure 3-1: Pixels and Shift Registers Figure 3-2: L304kc Block Diagram 3-2 Basler L304kc
Draft Operation and Features 3.2 Video Data Output Modes L304kc cameras can output video data in a 3 tap 8 bit mode, a 2 tap 10 bit mode or a 2 tap 8 bit mode. These modes of operation are described in detail in Section 2.5.5. 3.2.1 Setting the Video Data Output Mode You can set the video data output mode with the Camera Configuration Tool Plus (CCT+) or by using binary write commands from within your own application to set the camera’s control and status registers (CSRs).
Operation and Features Draft 3.3 Exposure Time Control Modes L304kc series cameras can operate under the control of an external trigger signal (ExSync) or can operate in “free-run.” In free-run, the camera generates its own internal control signal and does not require an ExSync signal. 3.3.1 ExSync Controlled Operation 3.3.1.1 Basics of ExSync Controlled Operation In ExSync operation, the camera’s line rate and exposure time are controlled by an externally generated (ExSync) signal.
Draft Operation and Features • In ExSync programmable mode, the rising edge of ExSync triggers exposure and charge accumulation for a pre-programmed period of time. The lines are read out and transferred at the end of the pre-programmed period. The falling edge of ExSync is irrelevant (see Figure 35). A parameter called “Exposure Time” is used to set the length of the pre-programmed exposure period. Figure 3-5: ExSync, Programmable Mode 3.3.1.
Draft Operation and Features 3.3.1.3 Guidelines When Using an ExSync Signal When using an ExSync signal to control exposure, several general guidelines must be followed: • The ExSync signal must toggle. • The ExSync signal period must not be lower than 138.6 µs. • The ExSync signal must remain high for at least 0.1 µs. • The minimum exposure time is 10.0 µs. This means that: In ExSync level-controlled mode, the ExSync signal must remain low for at least 10.0 µs.
Draft Operation and Features Exposure End Delay When an exposure is triggered by the ExSync signal, the actual end of exposure will be delayed. (This is commonly referred to as an exposure end delay.) The exposure end delay includes two components: the transfer gate time and the setup time. These times vary depending on the exposure mode you are using. Table 3-2 shows the transfer gate time and the setup time for each exposure mode.
Operation and Features Draft 3.3.2 Free Run 3.3.2.1 Basics of Free-run Controlled Operation In free-run, an ExSync signal is not required. The camera generates its own internal control signal based on two programmable parameters, “Line Period” and “Exposure Time.” The camera’s internally generated control signal rises and falls in a fashion similar to an ExSync signal.
Draft Operation and Features • In free-run programmable mode, the pixels are exposed and charge is accumulated when the internal control signal is low. The lines are read out and transferred on the rising edge of the internal control signal (see Figure 3-7). In this mode, the line period is determined by the setting for the line period parameter. The exposure time parameter setting determines how long the control signal will be low and thus determines the exposure time.
Operation and Features Draft 3.3.2.3 Guidelines When Using Free-run When using free-run mode to control exposure, several general guidelines must be followed: • The line period must not be lower than 138.6 µs • The minimum and the maximum exposure time must be within the limits specified in the Exposure Time CSR (see page 4-15). L We strongly recommend using an exposure time that is at least 10% of the line period.
Draft Operation and Features 3.5 Spatial Correction 3.5.1 What is Spatial Correction? As shown in Figure 3-8, the sensor used in the L304kc has three lines of pixels and the lines are spaced 90 µm apart center-to-center. Figure 3-8: L304kc Sensor Face Due to the spacing between the lines, each line will have a different line of view on any object passing the camera as shown in Figure 3-9. Whenever an exposure is triggered, all three lines in the sensor are exposed simultaneously.
Operation and Features Draft Let’s consider a single, small area on an object passing the camera and let’s call it point A. Figure 3-10 illustrates that as the object passes the camera, point A will fall into the line of view of the green line, of the red line, and of the blue line at three different times. This means that the green information for point A, the red information for point A, and the blue information for point A will be captured during three different exposures.
Draft Operation and Features To better understand the concept of spatial correction, consider a simple example. In our example, we will make the following assumptions: • The optics and the distance between the camera and the conveyor have been arranged so that we have a 1 to 10 magnification. This means that an area of 0.10 mm x 0.10 mm on the object will create a 10 µm x 10 µm image on one pixel. • We have an encoder on our system and each step of the encoder represents a 0.
Operation and Features Draft Keep in mind that the direction of travel of the object will determine how the object’s image passes the camera’s sensor. If the object passes the camera as shown in Figure 3-12, its image will cross the blue line first, the red line second and the green line third. If the object passes the camera as shown in Figure 3-13, its image will cross the green line first, the red line second and the blue line third.
Draft Operation and Features Spatial Correction Amount The spatial correction amount parameter is used to determine which stored exposures will be combined in order to obtain full RGB data for an area on the image (see Section 3.5.1). The spatial correction amount can be set in a range from 0 to 27.
Operation and Features Draft 3.5.4 Camera Operating Requirements for Proper Spatial Correction To achieve proper spatial correction, certain camera operating requirements must be met. Exposure Start Control Exposure start must be triggered with an ExSync signal. Use of the programmable exposure mode is strongly recommended to ensure uniform exposure. The edge controlled or level controlled exposure modes can be used but only if the conveyor speed is 100% stable.
Draft Operation and Features 3.5.5 System Design Requirements for Proper Spatial Correction As explained in Section 3.5.1, spatial correction is used to align color information in the image. For a given area on the object to be captured correctly, its image must fall precisely on the blue line, the red line and the green line in the sensor. If spatial correction is being done correctly, the captured images will be sharp and clear as shown in the right side of Figure 3-14.
Operation and Features Draft Sensor Perpendicularity The sensor lines in the camera must be perpendicular to the conveyor’s line of travel. If the sensor lines are not perpendicular to the line of travel, a slightly different area of the object will fall on each line as shown in Figure 3-16. This situation will cause haloing that is perpendicular to the transport direction. The halos will be constant in size.
Draft Operation and Features Sensor-Conveyor Parallelism The face of the sensor in the camera and the surface of the conveyor should be in parallel planes. This condition should be met to ensure that all of the pixels in the sensor lines view the object at the same magnification. If the camera is positioned so that the sensor is rotated on its long axis as shown in Figure 3-17, you will see haloing that is perpendicular to the transport direction.
Operation and Features Draft Figure 3-18: Sensor Rotated on its Short Axis Object Height Differences If the objects on the conveyor strongly differ in height, the lines in the sensor will view a short object from a different perspective than they view a tall object. To make sure that all objects are in perspective even if they strongly differ in height, use of a telecentric lens setup is recommended. A telecentric setup usually requires high illumination.
Draft Operation and Features 3.5.6 System Design Calculations Assuming that the camera operating requirements listed in Section 3.5.4 and the system design requirements listed in Section 3.5.5 are met, the formulas below can be used to calculate the basic design criteria for your system.
Operation and Features Draft Example 1 Assume the following conditions: • Conveyor movement per line capture = 0.25 mm • Desired aspect ratio = 1/1 • Conveyor Width = 850 mm • Length of Sensor Line = 40.80 mm (4080 pixels/line x 10 µm/pixel) • With an objective lens in place, the direction of travel of the object will cause the image to cross the blue line in the sensor first. Step 1 - Check Table 3-3 and note that for a 1/1 aspect ratio, n must be set to 9.
Draft Operation and Features Example 2 There is a second approach to calculating system design criteria that is less concerned with aspect ratio. This approach is more tuned towards matching the line of view of the sensor to the width of your conveyor. Example 2 illustrates this approach. Assume the following conditions: • Conveyor Width = 850 mm • Conveyor Movement per Encoder Step = 0.25 mm • Center to Center Spacing Between Sensor Lines = 90 µm • Pixel Size = 10 µm • Length of Sensor Line = 40.
Operation and Features Draft The calculations below look at the outcomes of our two options: Option 1 Calculate the conveyor movement that will generate seven encoder steps: 7 steps × 0.25 mm/step = 1.75 mm Calculate the magnification needed to make 1.75 mm of conveyor movement result in 90 µm movement of the image: 90 µm ----------------------- = 0.0514 1.75 mm 1 ------------------ = 19.46 0.0514 β = 1 : 19.
Draft Operation and Features Step 4 - Select an appropriate lens and determine the mounting distance for your camera. You can contact Basler Technical Support if you need help with this procedure. Step 5 -Make sure that the Spatial Correction Direction and the Spatial Correction Amount parameters (see Section 3.5.2) are set correctly. In this example, the direction would be set to blue and the amount to 8.
Draft Operation and Features 3.6 Gain and Offset 3.6.1 Red Gain, Green Gain and Blue Gain On L304kc cameras, the gain settings for the red line, the green line and the blue line in the sensor are individually adjustable. For example, adjusting the red gain setting will increase or decrease the gain applied to the pixel values from the red line in the camera’s sensor. Gain is adjustable within a range from -6.00 dB to +20.00 dB in increments of 0.01 dB.
Draft L Operation and Features All cameras have default gain settings that are referenced to a factory master L304kc camera. This default output is referred to as 0 dB of gain. This means that when you set a line in your camera for +4.00 dB of gain, you are getting 4.00 dB more than the corresponding line on the factory master. And if you set a line to -2.00 dB of gain, you are getting 2.00 dB less than the factory master.
Operation and Features Draft 3.6.2 Gain Lock As described in Section 3.6.1, the red, green and blue gain settings let you individually adjust the gain applied to each line in the sensor. When the gain lock feature is disabled, the red gain, green gain and blue gain parameter settings can be adjusted independently. Adjusting any one of these parameters will have no affect on the other two parameter settings.
Draft Operation and Features 3.6.3 Red Offset, Green Offset and Blue Offset On L304kc cameras, the offset settings for the red line, the green line and the blue line in the sensor are individually adjustable. For example, adjusting the red offset setting will increase or decrease the offset applied to the pixel values from the red line in the camera’s sensor. When the camera is set for 8 bit output, the offset for each line is adjustable within a range from -200.0 DN to +200.
Operation and Features Draft 3.6.4 Offset Lock As described in Section 3.6.3, the red, green and blue offset settings let you individually adjust the offset applied to each line in the sensor. When the offset lock feature is disabled, the red offset, green offset and blue offset parameter settings can be adjusted independently. Adjusting any one of these parameters will have no affect on the other two parameter settings.
Draft Operation and Features 3.6.5 Clipping If the gain and offset on one or more of the lines in an L304kc camera are set incorrectly, “high clipping” or “low clipping” can occur. High clipping is caused when the combination of gain and offset is set so that the range of light level data in the scene being captured by a line exceeds the range of the line’s output.
Operation and Features Draft 3.7 Area of Interest (AOI) The area of interest feature lets you specify a portion of the CCD array and during operation, only the pixel information from the specified portion of the array is signaled as valid to the frame grabber. Pixels outside of the AOI are transmitted to the frame grabber as black pixels and signaled as invalid to the grabber. The size of the area of interest is defined by declaring a starting pixel and a length in pixels (see Figure 3-22).
Draft Operation and Features Figure 3-23: AOI Operation on a Camera set for 3 Tap 8 Bit Output 3.7.1 Setting the AOI You can set the AOI with the Camera Configuration Tool Plus (CCT+) or by using binary write commands from within your own application to set the camera’s control and status registers (CSRs). With the CCT+ With the CCT+ (see Section 4.1), you use the AOI Starting Pixel parameter and the AOI Length parameter in the AOI parameters group to set the AOI.
Operation and Features Draft 3.8 Stamp The stamp feature provides the user with information about each captured line such as the sum of the pixel values in the line and the contrast value of the line. When the stamp feature is enabled, 16 extra “stamp pixel” values are appended to each transmitted line. Each stamp pixel carries an 8 bit value that conveys information about the transmitted line.
Draft Operation and Features Figure 3-25: Stamp Pixel Transmission with 2 Tap 8 Bit or 2 Tap 10 Bit Output If the stamp feature is used together with the AOI feature (see Section 3.7), the stamp pixels are transmitted immediately after the last pixel in the AOI. The line valid and data valid signals will be high while the pixels in the AOI and the stamp pixels are transmitted.
Figure 3-27: Stamp Pixel Transmission with 2 Tap 8 Bit or 2 Tap 10 Bit Output and an AOI Operation and Features 3-36 Draft Basler L304kc
Draft Operation and Features The table below shows the function of each stamp pixel by position. A more detailed explanation of how to interpret the pixel values follows the table.
Draft Operation and Features For example, assume that the High Pixel Threshold for the red line in the sensor is set to 200. Also assume that the camera has captured a red line and that 56 of the pixels in that line have a value greater than 200. In this case, the total high pixels would be 56. There is a separate High Pixel Threshold setting for each of the three lines in the sensor. See Section 3.8.1 for information about setting the High Pixel Threshold values.
Draft Operation and Features 3.8.1 Enabling and Setting the Stamp You can enable and set the stamp feature with the Camera Configuration Tool Plus (CCT+) or by using binary write commands from within your own application to set the camera’s control and status registers (CSRs). With the CCT+ With the CCT+ (see Section 4.1), you use the Stamp Mode parameter in the Stamp parameters group to enable the stamp.
Operation and Features Draft 3.9 Mirror Image L304kc cameras are equipped with a mirror image feature. When the mirror image feature is enabled, the pixel values for each line will switch end-for-end about the line’s center point. In other words, the value for pixel 1 will be swapped with the value for pixel 4080, the value for pixel 2 will be swapped with the value for pixel 4079, the value for pixel the 3 will be swapped with the value for pixel 4078, and so on. 3.9.
Draft Operation and Features 3.10 Image Enhancements With an L304kc camera, you can expect to achieve excellent image quality by making simple adjustments to camera settings such as exposure time and gain. Basler has added a new set of image enhancement features that give you an even wider range of flexibility to meet your image quality tastes and needs. These enhancements let you tune the camera for best performance under the wide variety of operating conditions encountered in industrial applications.
Operation and Features Draft 3. Signal the camera to generate a set of DSNU shading values: a) You can start the generation of a set of DSNU shading values with the Camera Configuration Tool Plus (see Section 4.1). With the CCT+, you use the Shading Value Generate parameter in the Image Enhancement parameters group to start the generation of a set of DSNU shading values. b) You can also start the generation of a set of DSNU shading values by using a binary write command (see Section 4.
Draft Operation and Features Enabling DSNU Shading Correction Once you have a complete set of DSNU shading values in place, you can enable and use DSNU shading correction. With the DSNU correction feature enabled, the camera will use the DSNU shading values to apply the appropriate offset to each pixel to correct for DSNU.
Operation and Features Draft 4. Begin capturing lines either by generating an ExSync signal to trigger line capture or by setting the camera for free-run exposure. 5. Signal the camera to generate a set of PRNU shading values: a) You can start the generation of a set of PRNU shading values with the Camera Configuration Tool Plus (see Section 4.1). With the CCT+, you use the Shading Value Generate parameter in the Image Enhancement parameters group to start the generation of a set of PRNU shading values.
Draft Operation and Features 7. Once 16 image capture cycles have been completed, the camera uses the following process to calculate a set of PRNU shading correction values for each of the three lines: a) The camera uses the captured data to calculate an average gray value for the pixels in the line. b) The camera finds the pixel in the line with the highest average gray value.
Operation and Features Draft Saving a Set of Shading Values to a File You can save the DSNU and PRNU shading values currently in the volatile memory to a file in the non-volatile memory with the Camera Configuration Tool Plus (CCT+) or by using binary read/ write commands from within your own application to set the camera’s control and status registers (CSRs). With the CCT+ With the CCT+ (see Section 4.
Draft Operation and Features 3.10.2 Dark Noise Cancellation When the camera is used at very low line rates or with long idle times, a sensor characteristic known as “dark current” causes extraneous charges to accumulate in the pixels during the time between exposures. This accumulated charge can cause all of the lines captured at very low line rates to be too bright or can cause the first few lines captured after a long idle period to be too bright.
Operation and Features Draft Enabling Dark Noise Cancellation You can enable the dark noise cancellation feature with the Camera Configuration Tool Plus (CCT+) or by using binary write commands from within your own application to set the camera’s control and status registers (CSRs). With the CCT+ With the CCT+ (see Section 4.1), you use the Dark Noise Cancellation parameter in the Image Enhancement parameters group to enable dark noise cancellation.
Draft Operation and Features 3.10.3 Defective Pixel Correction The sensor used in L304kc cameras may include up to three defective pixels. When each camera is manufactured, tests are performed to locate any defective pixels in the sensor lines. The location of any defective pixels found is noted and permanently stored in the camera’s memory. When the defective pixel correction feature is enabled, the camera will supply a corrected value for each of the known defective pixels.
Operation and Features Draft 3.10.4 Color Shift Correction Under certain operating conditions, L304kc cameras are subject to a “color shift” effect. Color shifting is seen when you hold the camera’s exposure time constant and you increase or decrease the line rate. The more you increase or decrease the line rate, the greater the color shift effect will be. The color shift effect occurs because the camera’s spectral response changes when you change the line rate while holding the exposure time constant.
Draft Operation and Features By Setting CSRs You enable the color shift correction feature by writing a value to the Mode field of the Color Shift Correction Mode CSR (see page 4-27). You set the amount of red color shift correction by writing a value to the Absolute Red Color Shift Correction field or to the Raw Red Color Shift Correction field of the Red Color Shift Correction CSR (see page 4-34).
Operation and Features Draft 3.11 Test Images The test image mode is used to check the camera’s basic functionality and its ability to transmit an image via the video data cable. Test images are especially useful for service purposes and for failure diagnostics. In test mode, the image is generated with a software program and the camera’s digital devices and does not use the optics, the CCD sensor or the ADCs. Ten test images are available. 3.11.
Draft Operation and Features 3.11.3 Test Image One (Fixed Gray Gradient) Test image one is formed with a vertical gradient that ranges from 0 to 255 and repeats every 256 pixels as shown in Figure 3-29. The first pixel in each line has a red value of 0, a green value of 0 and a blue value of 0. The second pixel has a red value of 1, a green value of 1 and a blue value of 1. The third pixel has a red value of 2, a green value of 2 and a blue value of 2, and so on.
Operation and Features Draft 3.11.4 Test Image Two (Moving Gray Gradient) Test image two is formed with a gradient that ranges from 0 to 255 and repeats every 256 pixels as shown in Figure 3-30. In the first line, the red, green and blue values for pixel 1 are all 0, the red, green and blue values for pixel 2 are all 1, the red, green and blue values for pixel 3 are all 2, and so on.
Draft Operation and Features 3.11.5 Test Image Three (Vertical / Horizontal Gray Gradient) Test image three consists of two parts. The left 2048 pixels of the image are formed with a vertical gray scale gradient ranging from 0 to 255 that repeats every 256 pixels as shown in Figure 3-32. The first pixel in each line has a red value of 0, a green value of 0 and a blue value of 0. The second pixel has a red value of 1, a green value of 1, and a blue value of 1, and so on.
Operation and Features Draft 3.11.6 Test Image Four (Fixed Red Gradient) Test image four is formed with a vertical red gradient that ranges from 0 to 255 and repeats every 256 pixels as shown in Figure 3-33. The first pixel in each line has a red value of 0, a green value of 0 and a blue value of 0. The second pixel has a red value of 1, a green value of 0 and a blue value of 0. The third pixel has a red value of 2, a green value of 0 and a blue value of 0. And so on.
Draft Operation and Features 3.11.8 Test Image Six (Fixed Blue Gradient) Test image six is formed with a vertical blue gradient that ranges from 0 to 255 and repeats every 256 pixels as shown in Figure 3-35. The first pixel in each line has a red value of 0, a green value of 0 and a blue value of 0. The second pixel has a red value of 0, a green value of 0 and a blue value of 1. The third pixel has a red value of 0, a green value of 0 and a blue value of 2. And so on.
Operation and Features Draft 3.11.10 Test Image Eight (Uniform Black) In test image eight, all pixels will have a red value, a green value and a blue value of 0 whether the camera is set for 8 bit output or 10 bit output. Test image eight should always appear as a uniform, black image as shown in Figure 3-37. Test image eight is useful for checking the integrity of the data transmitted by the camera.
Draft Operation and Features 3.11.11 Test Image Nine (Interleaved Gradient) Test image nine is formed with a vertical odd/even gradient that ranges from 0 to 255 and repeats every 512 pixels as shown in Figure 3-38. The odd pixel gradient starts with 0 and steps up, that is, the red, green and blue values for pixel 1 are all 0, the red, green and blue values for pixel 3 are all 1, the red, green and blue values for pixel 5 are all 2, and so on.
Operation and Features Draft 3.12 CCD Temperature Sensor L304kc cameras are equipped with a feature that lets you monitor the temperature of the CCD sensor. You can check the temperature of the CCD sensor with the Camera Configuration Tool Plus (CCT+) or by using binary read commands from within your own application to read the camera’s inquiry registers. With the CCT+ With the CCT+ (see Section 4.
Draft Operation and Features 3.13 Error Condition Detection 3.13.1 Overvoltage Condition Detected L304kc cameras have overvoltage protection. If an input voltage greater than 14.5 VDC is applied to the camera, the camera will automatically switch off the internal power applied to the CCD sensor so that the sensor will be protected. In this situation, you will still be able to communicate with the camera and the camera will still be able to transmit test images, however, no live images can be generated.
Operation and Features Draft 3.13.2 Overtemperature Condition Detected L304kc cameras have overtemperature protection. If the temperature of the camera’s CCD sensor rises above 75° C, the clocking circuitry for the sensor will switch off. In this situation, you will still be able to communicate with the camera and the camera will still be able to transmit test images, however, no live images can be generated. The clocking circuitry will remain off until the CCD’s temperature falls to 60° C or less.
Draft Operation and Features 3.13.3 Identical Dark Images Indicate a Parameter Error If the camera detects that a parameter error is present, it will automatically switch into a mode where it outputs identical dark images. In this mode, all of the pixel values in each captured line will be low and the pixel values in any one of the captured lines will be identical to the pixel values in all other captured lines of the same color.
Operation and Features Draft 3.16 Resetting the Camera You can initiate a camera reset with the Camera Configuration Tool Plus (CCT+) or by using binary write commands from within your own application to set the camera’s control and status registers (CSRs). A reset is the equivalent of switching off power to the camera and switching power back on. With the CCT+ With the CCT+ (see Section 4.1), click on “Camera” in the menu at the top of the CCT+ window and a drop down list will appear.
Draft Operation and Features 3.17 Configuration Sets A configuration set is a set of values that contains all of the parameters needed to control the camera. There are two basic types of configuration sets: the work configuration set and the factory configuration set. Work Configuration Set The work configuration set contains the camera’s current settings and thus determines the camera’s performance, that is, what your image currently looks like.
Operation and Features Draft 3.17.2 “Activating” a Saved User Set File As explained in Section 3.17.1, you can save configuration sets to files in the camera’s nonvolatile memory. These saved configuration set files are commonly referred to as “user configuration sets” or “user sets.” If you have saved one or more user set files, you can choose to make one of them the “activated” user set.
Draft Operation and Features Activating the Factory Set File You can activate the factory set file with the Camera Configuration Tool Plus (CCT+) or by using binary read/write commands from within your own application to set the camera’s bulk data control and status registers (CSRs). With the CCT+ With the CCT+ (see Section 4.1), you use the File Name Select parameter and the Activate User Set parameter in the User Set Files parameters group to activate the factory set file.
Operation and Features Draft By Setting CSRs You download or upload user set files by writing values to the bulk data CSR for configuration sets. The bulk data “download” process is used to download a user set file from the camera to your PC. The bulk data “upload” process is used to upload a user set file from your PC to a camera. Section 4.2.3 explains the bulk data CSRs and explains how to use the CSRs to download or upload a saved user set file. Section 4.3.1 explains using read/write commands.
Draft Basler L304kc Operation and Features 3-69
Operation and Features 3-70 Draft Basler L304kc
Draft Configuring the Camera 4 Configuring the Camera L304kc cameras come with a factory set of parameters that will work properly for most applications with only minor changes.
Configuring the Camera Draft 4.1 Configuring the Camera with the Camera Configuration Tool Plus (CCT+) The Camera Configuration Tool Plus (CCT+) is a Windows™ based program used to easily change the camera’s parameter settings. The tool communicates via the RS-644 serial connection in the Camera Link interface between the frame grabber and the camera. The tool automatically generates the binary programming commands that are described in Section 4.3.
Draft Configuring the Camera 4.1.3 Configuration Tool Basics The volatile (RAM) memory in the camera contains the parameter settings that control the current operation of the camera. This group of parameter settings in the volatile memory is known as the work configuration set or “work set” (see Section 3.17). The CCT+ is used to view or change the parameter settings in the work set.
Configuring the Camera L Draft Keep in mind that the work set is stored in the camera’s volatile memory. Any changes you make to the work set using the configuration tool will be lost when the camera is switched off. To save changes you make to the work set, save the modified work set to one of the camera’s four user set files. The user set files are stored in non-volatile memory and will not be lost when the camera is switched off (see Section 3.17). 4.1.
Draft Configuring the Camera 4.2 Configuring the Camera By Setting Registers L304kc cameras have blocks of mapped memory space known as registers. By reading values from the registers, you can determine basic information about the camera and information about the camera’s current parameter settings. By writing values to the registers, you can set camera parameters and control how the camera’s features will operate.
Draft Configuring the Camera 4.2.1 Inquiry Registers 4.2.1.1 Definition of an Inquiry Register Inquiry registers contain basic information about the camera and information about the camera’s current status. Each inquiry register contains one or more fields and each field has an assigned address within the camera’s memory space. By using a binary read command, you can read the data in a field and get information about the camera.
Draft Configuring the Camera Product ID Inquiry Register Base Address: 0x0300 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this inquiry register: 0x00 = The register is not available 0x01 = The register is available. Field Name: Product ID Offset: 0x0001 Size: 20 Bytes Type: Read only Description: String containing the camera’s product ID number.
Draft Configuring the Camera Microcontroller Firmware Version Inquiry Register Base Address: 0x0700 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this inquiry register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Camera Status Inquiry The camera has been programmed to detect several error conditions. When an error condition is detected, a flag is set. The camera status inquiry register lets you read the error flags. Register Base Address: 0x0C00 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this inquiry register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera 20 An over-temperature situation has been detected. This bit clears when the camera is reset or is powered off and back on. 21 ... 31 Reserved FPGA Status Inquiry The camera has been programmed to detect several error conditions in its field programmable gate array (FPGA). When an error condition is detected, a flag is set. The FPGA status inquiry register lets you read the error flags.
Draft Configuring the Camera Binary Command Protocol Status Inquiry The camera has been programmed to detect several errors in the format of any binary commands received by the camera. When an error condition is detected, a flag is set. The binary command status inquiry register lets you read the error flags.
Configuring the Camera Draft 4.2.2 Feature Control and Status Registers 4.2.2.1 Definition of a Feature Control and Status Register The feature control and status registers (CSRs) let you set the parameters for camera features such as exposure mode, gain, offset and the AOI. These registers also let you check the current parameter settings and the status for each feature. Each feature has one or more CSRs associated with it.
Draft Configuring the Camera Setting the Absolute Red Gain If you set the red gain by writing a value to the Absolute Red Gain field of the Red Gain CSR, you can write a floating point value from -6.00 to +20.00 (decimal) in increments of 0.01. Writing a floating point value to the absolute register sets the red gain directly in dB. For example, if the absolute red gain field is set to 13.42, then the camera would be set for 13.42 dB of red gain.
Draft Configuring the Camera 4.2.2.3 Feature Control and Status Register Details Video Data Output Mode CSR Register Base Address: 0x1700 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Exposure Time CSR Note: The exposure time can be set by writing a floating point value to the Absolute Exposure Time field or by writing an integer value to the Raw Exposure Time field. Refer to Section 4.2.2.2 for an explanation of the difference between these two fields.
Draft Configuring the Camera Field Name: Raw Min Offset: 0x0011 Size: 4 Bytes Type: Read only Description: Minimum allowed integer value for the raw exposure time setting. This field is updated to reflect limitations caused by the way any related features are set.
Draft Configuring the Camera Line Period CSR Note: The line period can be set by writing a floating point value to the Absolute Line Period field or by writing an integer value to the Raw Line Period field. Refer to Section 4.2.2.2 for an explanation of the difference between these two fields.
Draft Configuring the Camera Field Name: Raw Min Offset: 0x0011 Size: 4 Bytes Type: Read only Description: Minimum allowed integer value for the raw line period setting. The 4 bytes in this field are interpreted as follows: Byte 1 = Low byte of the min value Byte 2 = Mid byte of the min value Byte 3 = High byte of the min value Byte 4 = Always 0x00 (not used) Field Name: Raw Max Offset: 0x0015 Size: 4 Bytes Type: Read only Description: Maximum allowed integer value for the raw line period setting.
Draft Configuring the Camera Spatial Correction Direction CSR Register Base Address: 0x3300 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Red Gain CSR Note: The red gain can be set by writing a floating point value to the Absolute Red Gain field or by writing an integer value to the Raw Red Gain field. Refer to Section 4.2.2.2 for an explanation of the difference between these two fields.
Draft Field Name: Raw Min Offset: 0x000F Configuring the Camera Size: 2 Bytes Type: Read only Description: Minimum allowed integer value for the raw red gain setting. This field is updated to reflect limitations caused by the way any related features are set.
Draft Configuring the Camera Red Offset CSR Note: The red offset can be set by writing a floating point value to the Absolute Red Offset field or by writing an integer value to the Raw Red Offset field. Refer to Section 4.2.2.2 for an explanation of the difference between these two fields.
Draft Field Name: Raw Red Offset Offset: 0x000D Configuring the Camera Size: 2 Bytes Type: Read / Write Description: Writing an integer value to this field sets the red offset. When the camera is set for 8 bit output, the value can normally range from -400 (0xFE70) to +400 (+0x0190). When the camera is set for 10 bit output, the value can normally range from -1600 (0xF9C0) to +1600 (+0x0640). When the offset lock feature (see Section 3.6.
Draft Configuring the Camera Offset Lock CSR Register Base Address: 0x0FE0 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Area of Interest Starting Pixel CSR Register Base Address: 0x1000 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available. All related settings are OK 0x80 = A value in the register is set out of range 0X81 = The setting for the AOI staring pixel conflicts with the setting for the AOI length.
Draft Configuring the Camera Area of Interest Length CSR Register Base Address: 0x100A Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available. All related settings are OK 0x80 = A value in the register is set out of range 0X81 = The setting for the AOI length conflicts with the setting for the AOI starting pixel.
Draft Configuring the Camera Stamp Mode CSR Register Base Address: 0x2B00 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Stamp Red Low Pixel Limit CSR Register Base Address: 0x2B60 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Stamp Red High Pixel Threshold CSR Register Base Address: 0x2B70 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Configuring the Camera Draft Stamp Green Low Pixel Limit CSR Register Base Address: 0x2B80 The fields and the field descriptions in the green low pixel limit CSR are similar to those in the red low pixel limit CSR. Stamp Green High Pixel Threshold CSR Register Base Address: 0x2B90 The fields and the field descriptions in the green high pixel threshold CSR are similar to those in the red high pixel threshold CSR.
Draft Configuring the Camera Mirror Image Mode CSR Register Base Address: 0x3500 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Shading Mode CSR Register Base Address: 0x2000 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Dark Noise Cancellation Mode CSR Register Base Address: 0x1480 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Color Shift Correction Mode CSR Register Base Address: 0x4000 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Field Name: Raw Red Color Shift Correction Offset: 0x000D Configuring the Camera Size: 2 Bytes Type: Read / Write Description: Writing an integer value to this field sets the line period. The value can range from a minimum of 1 (0x0001) to a maximum of 65535 (0xFFFF). The amount of red color shift that the camera will apply at a given setting in this field is determined by this formula: raw setting + 4 Red Color Shift = log ⎛ ------------------------------------------⎞ × 24.
Draft Configuring the Camera Test Image Mode CSR Register Base Address: 0x1800 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Serial Communication Baud Rate CSR An RS-644 serial connection is integrated into the Camera Link interface between the frame grabber installed in your computer and the camera. The serial connection is used to issue commands to the camera for changing modes and parameters. You can use the serial communication baud rate CSR to set the baud rate for the camera’s RS-644 serial port. The default setting is 9600 bps.
Configuring the Camera Draft 4.2.3 Bulk Data and the Bulk Data Control and Status Registers 4.2.3.1 Definition of Bulk Data Control and Status Registers The term “bulk data” refers to a collection of values used by the camera as a block. A configuration set (see Section 3.17) is an example of one type of bulk data. A single configuration set contains values for all of the normal parameters needed to configure the camera and the values within a configuration set are used by the camera as a block.
Draft Configuring the Camera 4.2.3.2 Using Bulk Data CSRs to Work with Bulk Data Saving a Configuration Set As mentioned in Section 3.17, the work configuration set resides in the camera’s volatile memory. Assume that you want to save the values in the current work set to a file named “UserSet01” in the camera’s non-volatile memory. To do so, you would follow this procedure: 1.
Configuring the Camera Draft Activating a Saved Configuration Set File The process of “activating” a saved configuration set file, accomplishes two things: • It copies the values from the saved file into the camera’s volatile memory. This means that the values will now be actively used by the camera. • It creates a link to the activated file.
Draft Configuring the Camera Enumerating Saved Bulk Data Files Bulk data file enumeration allows you to look through a list of existing saved bulk data files. As an example, assume that you want to see a list of all of the existing saved configuration set files. To do so, you would follow this procedure: 1. Use a binary write command to set the value of the Control field in the configuration set bulk data CSR (see page 4-44) to 0x00. Setting the value to 0x00 initiates an enumerate function. 2.
Configuring the Camera Draft Downloading a Saved Bulk Data File from the Camera to a PC You can download an existing saved bulk data file from the camera’s non-volatile memory to your host PC. As an example, assume that the camera has an existing saved configuration set file named “UserSet02” and that you want to download this file from the camera to your host PC. To do so, you would follow this procedure: 1.
Draft Configuring the Camera Uploading a Bulk Data File from a PC to the Camera You can upload a bulk data file from your host PC to the camera’s non-volatile memory. As an example, assume that you previously downloaded a saved configuration set file named “UserSet02” to your PC. Also assume that you now want to upload this file from your host PC to a camera. To do so, you would follow this procedure: 1.
Draft Configuring the Camera 4.2.3.3 Bulk Data Control and Status Register Details Configuration Set CSR See Section 4.2.3.2 for information about using bulk data control registers. Register Base Address: 0x2800 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Draft Configuring the Camera Shading Value CSR See Section 4.2.3.2 for information about using bulk data control registers. Register Base Address: 0x2A00 Field Name: Register Status Offset: 0x0000 Size: 1 Byte Type: Read only Description: The integer value in this field indicates the status of this control register: 0x00 = The register is not available 0x01 = The register is available.
Configuring the Camera Draft 4.3 Using Binary Read/Write Commands As explained in Section 4.2, each L304kc camera has control and status registers with one or more fields that are used to set the values for parameters associated with a camera feature. For example, the red gain control and status register has two fields that can be used to set the camera’s red gain (see page 4-20). By writing values to fields in the control registers, you configure the camera and control how it operates.
Draft Configuring the Camera 4.3.1 The Binary Read/Write Command Protocol With the binary read/write command protocol, data is placed into a “frame” and sent to the camera. When the frame is received, it is checked for validity. If valid, the data is extracted from the frame and the command is executed. This section describes the basic layout of a binary command frame. Figure 4-2 shows a graphical representation of the fields within a binary command frame.
Draft Configuring the Camera The value in the OpCode portion of the FTF field defines the function of the binary command, that is, whether it is a read command or a write command. The following OpCodes are available: OpCode Function 0b00000 This is a write command used to write a single setting to the camera. 0b00001 This is a read command used to read a single setting from the camera. 0b00010 This is a read response frame without an address field. (The AddrLen bits are ’don’t care’).
Draft Configuring the Camera DataLen Data Length field For read commands, the DataLen field indicates the number of bytes to read from the given CSR address. For write commands, the DataLen field indicates the number of bytes contained in the Data field. Size = 1 byte Range of possible settings: 0 to 255. DataLen = 0 will result in an ACK, but no further command will be executed. Address Address field For read commands, indicates the CSR address for the read.
Configuring the Camera Draft 4.3.1.1 Error Checking and Responses ACK/NAK When the camera receives a frame, it checks to see if the order of the bytes in the frame is correct. If the FTF field indicates that the frame includes a BCC, the camera checks to see if the XOR sum of the relevant frame fields matches the block check character. The camera also checks to see if the number of bytes in the data field is equal to the number specified in the DataLen field.
Draft Configuring the Camera 4.3.2 Basic Read/Write Command Explanations 4.3.2.1 Read Command This section includes a text description the hex digits included in a command message used to read the Status field of the Test Image Mode CSR (see page 4-36). The intent of this section is to give you a basic understanding of the elements included in a read command. Sample code that illustrates how to send a read command are available from Basler (see Section 4.4).
Draft Configuring the Camera 4.3.2.2 Write Command This section includes a text description the hex digits included in a command message used to write a value of 0x01 to the Mode field of the Test Image Mode CSR (see page 4-36). The intent of this section is to give you a basic understanding of the elements included in a write command. Sample code that illustrates how to send a write command are available from Basler (see Section 4.4).
Draft Configuring the Camera 4.3.2.3 Calculating the Block Check Character The use of a block check character (BCC) in L304kc commands is optional (see pages 4-47 and 4-48). If you choose to use a BCC, the BCC will be the exclusive-or sum (XOR sum) of the bytes in the FTF field, the DataLen field, the Address field and the Data field of the command frame. For the write command example shown in Section 4.3.2.2, the block check character is 0x1D. Let’s consider how this block check character was calculated.
Configuring the Camera Draft 4.4 Binary Command Sample Code Sample code that illustrates how to use binary commands with L304kc cameras is available at the Basler web site. Please look for the documentation downloads on the L300 page at: http://www.basler-vc.
Draft Mechanical Considerations 5 Mechanical Considerations The L304kc camera housing is manufactured with high precision. Planar, parallel and angular sides guarantee precise mounting with high repeatability. Caution! The camera is shipped with a cap on the lens mount. To avoid collecting dust on the sensor, make sure that at all times either the cap is in place or a lens is mounted on the camera.
Mechanical Considerations Draft 5.1 Camera Dimensions and Mounting Facilities The dimensions for L304kc cameras are as shown in Figure 5-1. L304kc cameras are equipped with four M4 mounting holes on the front and two M4 mounting holes on each side as indicated in the drawings.
Draft Mechanical Considerations 5.2 Sensor Positioning Accuracy The sensor positioning accuracy is as shown in Figure 5-2.
Mechanical Considerations Draft 5.3 Sensor Line Location The location of the sensor Lines on the sensor chip is as shown in Figure 5-3.
Draft Mechanical Considerations 5.
Mechanical Considerations Draft 5.
Draft Troubleshooting 6 Troubleshooting 6.1 Fault Finding Using the Camera LED During bootup, the camera loads firmware and performs initial self checks. Once bootup is complete, the camera performs a continuous series of self checks. If an error condition is detected, the status LED on the back of the camera will begin to blink. The number of blinks indicate the detected error as shown in Table 6-1. If several error states are present, the LED outputs the error code that has the highest priority.
Draft Troubleshooting LED Description Priority Repeated pattern of 6 slow orange blinks An erroneous parameter set has been loaded. Load another parameter set. 4 Repeated pattern of 5 slow orange blinks Parameter error. For example, a parameter is set out of range or to a value that is not valid. 5 Repeated pattern of 4 slow orange blinks One of the following errors is present: 6 • A byte time-out has occurred (see Section 4.3.1.1). • Invalid opcode in a read or write command (see Section 4.3.
Draft Troubleshooting 6.2 Troubleshooting Charts The following pages contain several troubleshooting charts that can help you find the cause of problems users sometimes encounter. The charts assume that you are familiar with the camera’s features and settings and with the settings for your frame grabber. If you are not, we suggest you review the manuals for your camera and frame grabber before you troubleshoot a problem. 6.2.
Draft Troubleshooting Check to make sure that the RS-644 serial connection is working OK. You can do this by starting the Camera Configuration Tool Plus (CCT+). When you start the tool, a startup graphic should appear and then a window that shows a list of parameter settings should appear. (If this is the first time that you are using the tool, you will see an empty window with a drop down menu at the top which says “No port selected”.
Draft Troubleshooting 6.2.2 Poor Quality Image Use this chart if the image is poor quality, is completely white, or is completely black. If you get no image at all when you attempt to capture an image with the frame grabber, use the chart that appears in Section 6.2.1. Do all captured images appear to be completely black or very dark. Yes No Capture several lines and check the pixel values in each of the captured red lines.
Draft Troubleshooting Images are too bright or too dark. Images look noisy. Do the following: Do the following: Make sure that the lens cap has been removed. Check the lens aperture. If the images are too dark, try opening the aperture. Try closing the aperture if they are too bright. Check the exposure time. If the images are too dark, try increasing the exposure. Try decreasing the exposure if they are too bright. Check your light source.
Draft Troubleshooting 6.2.3 Interfacing Use the interfacing troubleshooting charts if you think that there is a problem with the cables between your devices or if you have been directed here from another chart. Interfacing Chart Always switch off power to the system before making or breaking any connection. If you have not already do so, use a voltmeter to check the power source for the camera. The output must be 12 VDC ± 1.2 V.
Draft Troubleshooting 6.2.4 RS-644 Serial Communication Use the serial communication troubleshooting charts if you think that there is a problem with RS644 serial communication or if you have been directed here from another chart. Serial Communication Chart A (without a BIC) Always switch off power to the system before making or breaking any connection. The RS-644 port used by the L304kc is located on the frame grabber. Check the documentation for your frame grabber.
Draft Troubleshooting 6.3 Before Calling Basler Technical Support To help you as quickly and efficiently as possible when you have a problem with a Basler camera, it is important that you collect several pieces of information before you contact technical support. Copy the form that appears on this and the next page, fill it out, and fax the pages to your local dealer or to your nearest Basler support center.
Draft Troubleshooting 9 How often did/does the problem occur? Once. Every time. Regularly when: Occasionally when: 10 How severe is the problem? Camera can still be used. Camera can be used after I take this action: Camera can no longer be used. 11 Did your application ever run without problems? Yes No 12 Parameter set It is very important for Basler Technical Support to get a copy of the exact camera parameters that you were using when the problem occurred.
Draft Revision History Revision History Doc. ID Number Date Changes DA00072101 26 Jan 2004 Preliminary release of the L304kc User’s Manual. Applies to prototype cameras only. DA00072102 18 Mar 2005 Initial release of the L304kc User’s Manual for series production cameras. DA00072103 12 Jul 2005 Added that dark noise cancellation has no effect in edge-controlled mode: • Note box on page 3-47 • Page 4-33 Updated CCT+ screenshot (Figure 4-1 on page 4-3). Added Section 6.3.
Revision History ii Draft BASLER L304kc
Draft Feedback Feedback Your feedback will help us improve our documentation. Please click the link below to access an online feedback form. Your input is greatly appreciated. http://www.baslerweb.com/umfrage/survey.
Feedback iv Draft Basler L304kc
Draft Index Index A absolute value fields in CSRs. . . . . . . . . . . . . . . 4-12 area of interest . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32 B baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37 BCC see block check character BIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 binary commands basic examples . . . . . . . . . . . . . . . . . . . . . . 4-51 error checking . . . . . . . . . . . . . . . . . . . . . . . 4-50 explained . . . . .
Index Draft K k-BIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 L LED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-636-1 level-controlled exposure mode . . . . . . . . . . . . . . 3-4 line rate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 line valid bit. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82-15 M mirror image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-40 mounting facilities . . . . . . . . . . . .