Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

ADLINK PCIe-CPL64 Image Acquisition Card Hardware Trigger and Encoder Application

F: | Au:FANS | DA:2026-08-20 | 12 Br: | 🔊 点击朗读正文 ❚❚ | Share:

ADLINK PCIe-CPL64 Camera Link Image Acquisition Card Hardware Trigger and Encoder Application Analysis

In the field of machine vision and industrial inspection, real-time acquisition and transmission of image data from high-resolution and high frame rate cameras has always been a core challenge in system design. The Camera Link interface, with its high-speed LVDS signal and mature standard protocol, has become the preferred connection method for line scan and area scan cameras. The ample bandwidth provided by the PCI Express bus provides a reliable transmission channel for multi-channel or high-resolution image data. ADLINK PCIe-CPL64, as a PCIe x4 interface based Camera Link frame acquisition card, supports dual Base configuration or single Medium configuration, with a maximum pixel clock of 85MHz. It integrates encoder input, multi trigger I/O, and Power over Camera Link (PoCL) functions, providing a high-performance and flexible image acquisition platform for applications such as semiconductor inspection, PCB automatic optical inspection (AOI), and printing quality monitoring. This article will provide a detailed technical reference for system integration engineers from the aspects of hardware architecture, trigger mode, encoder position synchronization, software configuration, and practical debugging points.

Product positioning and core specifications

PCIe-CPL64 is positioned for machine vision systems that require high bandwidth, multiple camera access, or complex external synchronization. Its core features include:

Interface and configuration: PCI Express x4, supports simultaneous acquisition of two independent Base mode Camera Link cameras (dual Base) or one Medium mode camera (single Medium). In dual Base mode, the total bandwidth can reach 255MB/s per channel, while in Medium mode it can reach 320MB/s.

Image Cache: Onboard 128MB 200MHz DDR SDRAM, used to buffer image data and prevent frame loss caused by bus congestion.

PoCL support: Each channel can output+12V/1A power supply, automatically detect PoCL compatible cameras and provide power, while also having overcurrent protection.

External I/O: 4-channel TTL digital input, 4-channel digital output (open drain, can be pulled up to+5V), 2-channel TTL trigger input, 2-channel TTL trigger start input, 2-channel exposure output, and encoder differential input (RS422, A/B/Z three-phase, up to 1MHz).

Camera control: CC1~CC4 LVDS control signals, configurable as pulse or level outputs, used to control camera exposure, line period, etc.

This card supports Windows XP/Vista and subsequent systems (UAC needs to be disabled), and provides a complete API library (C++, C #, VB.net) and CamCreator configuration tool, greatly simplifying system development and debugging.


Hardware layout and key connectors

PCIe-CPL64 adopts the standard PCIe half height card size (167.65mm × 111.15mm), and its main interfaces include:

CN1 and CN2: Two MDR26 Camera Link connectors, corresponding to channel 0 and channel 1 respectively. In dual Base mode, each connector is connected to a Base camera; In Medium mode, only CN1 is connected to one Medium camera (occupying two data channels).

The CN3: 25 pin D-SUB connector integrates encoder input, trigger input/output, universal DI/DO, and exposure output. For specific pin definitions, please refer to Table 2-1 in the manual. Encoder A-phase/B-phase/Z-phase differential pairs, TTL trigger input, line trigger enable, etc. are all led out through this connector.

SW1:4 DIP switch, used to set Card ID (0~15), supports multi card coexistence.

SW2: A 4-bit independent switch used to select whether DO0~DO3 should be internally pulled up to+5V (through a 10k Ω resistor) for direct driving of PNP or NPN loads.

JP1: Used to select the input level of Z-phase encoder as TTL or RS422, default RS422.

LED indicator lights: LED3/LED5 respectively indicate the PoCL power supply status of channels A/B, and LED4/LED6 indicate the acquisition status (flashing indicates image capture).

Note: This card only supports x4, x8, or x16 PCIe slots. If inserted into an x16 slot that only supports VGA, the speed will decrease to x1, affecting performance.


PoCL Power Supply and Cable Safety

Power over Camera Link is an important extension of the Camera Link standard, allowing power to be supplied to the camera through data cables and reducing external power wiring. PCIe-CPL64 can provide+12V/1A power per channel and has automatic detection function (set to 0: Auto Detect through SetPowerState). In this mode, the card will detect whether the connected camera supports PoCL. If it supports PoCL, power will be supplied; otherwise, power will not be supplied. In addition, it can also be manually set to "Short ground" or "Short+12V" mode, but the latter is only for use with PoCL cameras, and misconnecting a non PoCL camera may cause damage.

Practical suggestion: When connecting an unknown camera for the first time, it is recommended to use Auto Detect mode and observe the status of LED3/LED5 to confirm that the power supply is normal. If the power consumption of the camera exceeds 1A, an external independent power supply is required, otherwise overcurrent protection may be triggered.

Trigger mode synchronized with encoder

PCIe-CPL64 supports multiple triggering methods to meet the different requirements of line array scanning and area array scanning. The triggering mode can be configured through the AKS aptureMode function or the CaptureMode field in the Camera File

Free Run: Continuous collection, not limited by external triggers, suitable for scenes with stable lighting and continuous motion.

Line Area Trigger: External TTL or RS422 trigger signals control the acquisition of each line or frame. The trigger source can be pin9/pin10 (TTL) or pin1-4 (RS422 differential) of CN3. SetLineAreaTriggerPolarity can be used to set the rising or falling edge trigger, and LineAreaTriggerStartEnable can be enabled to make the trigger signal only valid during the high-level enable period.

Encoder Input: Only applicable to linear scanning cameras, it controls line acquisition through pulses generated by an external encoder (A/B/Z three-phase) to achieve precise synchronization between image lines and physical motion positions. This is a key function for applications such as print inspection and roll surface inspection.

Encoder triggers detailed mechanism

The encoder input supports three modes (set through SetEncoder Input Mode):

A Phase: When an edge (rising or falling) of A phase is detected, a row of data acquisition is triggered.

AB Phase: Determine the direction of motion (CW or CCW) based on the phase difference between phase A and phase B. After each complete orthogonal period, trigger one line to achieve frequency doubling counting (1x/2x/4x).

ABZ Phase: The Z phase is used as the reference zero signal. When the Z phase is at a high level, the A/B phase starts counting and is used to establish an absolute position reference.

In addition, there are two key counters:

Encoder Delay Count: Ignoring the first N encoder pulses after starting the acquisition process, used to skip the acceleration phase during motion startup.

Encoder Compare Count: Each count of N valid pulses triggers a line acquisition, which is equivalent to pulse division. It is suitable for scenarios where high-resolution encoders need to reduce line density.

For example, if the encoder outputs 1000 pulses per millimeter and the camera needs to capture 200 lines per millimeter, set Encoder Compare Count to 5, which means capturing one line every 5 pulses to achieve a resolution of 5 μ m/line.

The counting direction of the encoder can be set to CW or CCW through SetEncoder Input Direction to accommodate differences in installation direction. There is also a hardware counter in the card (which can be read through the FHIR ncoderCounterValue), making it easy for software to monitor the current location.

Line triggered start signal

For applications that require external enable signals (such as starting data collection only after the material passes through the sensor), Line Trigger Start input (CN3 pin11/12) can be used. When this signal is at a high level, the trigger signal is allowed, otherwise it is blocked. Refer to Figure 2-4 in the manual for the timing diagram, which can effectively avoid image acquisition in invalid areas.


GPIO and External Control

PCIe-CPL64 provides 4 TTL digital inputs (DI0-3) and 4 open drain digital outputs (DO0-3). DI supports event triggering (enabled through SetDIEvent), and callback functions can be called when DI status changes to respond to external alarms or synchronization signals. DO is an open drain output, with no pull-up by default, but it can be enabled to internally pull up 10k Ω to+5V through SW2, making it convenient to directly drive low-power loads (maximum current of 100mA). If a large current needs to be driven, it is recommended to connect an external transistor or relay.

In addition, there are two Exposure Out signals that can directly output pulses synchronized with the internal exposure timing, used to control the external light source flicker and avoid heat generation and energy waste caused by continuous lighting.


Camera File Configuration and Parameter Explanation

PCIe-CPL64 uses a text-based Camera File (. cam) to store camera specific parameters, including sensor size, pixel count, tap count, trigger mode, CC1/CC2 control, etc. Users can load or modify it through the CamCreator tool, or manually edit it. The following key parameters are highlighted:

Sensor Tap: The number of camera output channels, such as single tap, dual tap, quad tap, etc. It is necessary to coordinate with SensorTapPlacement to specify the data arrangement order (such as odd sequence, start+middle, etc.).

PixelSize: The number of significant bits per pixel (8/10/12/14/16/24/30/36 bits). Note that if Tap=3 and PixelSize=8, it is in RGB24 color format.

PixelFormat: Unpack (raw data with padding bytes) or Pack (compressed without padding). Pack format reduces data volume but consumes CPU for reassembly.

CC1/CC2 Type: can be set as Pulse (pulse output) or DO (level output). In pulse mode, the pulse width and negative pulse width can be set to control the camera exposure or line period.

LVALEnable/DVALEnable: Camera Link standard signal line, used to indicate valid pixels or valid data, must be correctly enabled according to the camera manual.

The card also provides the dDataBits function, which can return the actual bus bit width occupied by each pixel, making it easier to calculate the required memory. The size of the system buffer can be adjusted through tSystemBufferCount, with a default of 4 frames. It is recommended to increase it appropriately according to the image resolution and frame rate to prevent frame loss.

Key points of development environment and API usage

ADLINK provides the Cpl64.dll dynamic library, along with accompanying header files (Cpl64. h) and import libraries (Cpl64. lib). Developers need to include header files and link library files. The basic calling process is as follows:

Cpl64_GetDeviceCount() retrieves the number of cards.

Cpl64_SpenDevice (CardID, Channel) opens the specified channel (0 or 1) and returns a handle.

Cpl64_LoadCamFile (Handle, "camera. cam") loads the camera file.

If using callback method, call Cpl64_Setcallback (Handle, EventType, VNet) to register image ready or DI event callback.

Cpl64_StartCapture (Handle, TotalFrames) starts collecting (TotalFrames=0 indicates continuous).

Process image data in callbacks or use Cpl64_SnapShot for single frame capture.

Cpl64_StopCapture stops collecting, Cpl64_CloseDevice releases resources.

For serial communication (used for camera parameter settings), an independent clallserial library is required, and the initialization, read-write, and shutdown processes are similar to standard serial port operations.

Common error codes: Returning -3 indicates an invalid handle, -7 indicates the device is not turned on, and -10 indicates a driver issue. It is necessary to check the driver installation and system version.


Practical tips for CamCreator tool

CamCreator is a debugging tool, with its interface divided into device panel, camera panel, parameter panel, counter panel, I/O and soft trigger panel, and display window.

Dynamic parameter tuning: Modifying XOffset, YOffset, SensorWidth, etc. in the parameter panel will take effect in real time, making it easy to quickly verify the camera output range.

Trigger Test: DI/DO can be directly read and written in the I/O panel, and software Trigger Out can be triggered to test the response of light sources or external devices.

Counter monitoring: Encoder Counter and Line Counter display the current pulse count, which can be used to verify the encoder wiring and direction.

Image analysis: Supports "Focus Value" to display the pixel value curve of the selected row, and "Zoom In" to zoom in on local areas for checking focus and image quality.

Note that UAC needs to be disabled on Windows Vista and above systems, otherwise CamCreator may not be able to access the hardware correctly.


Common problems in installation and debugging

1. Device Manager cannot find the device after driver installation

Confirm that the PCIe slot is powered on normally and try replacing the slot.

Check if PCIe channel is disabled in BIOS settings.

Under Windows 7, it is necessary to manually specify the driver path ( ADLINK  cpl64  Driver).

2. Collecting images with blurred or misaligned screens

Check if the Camera Link cable is in good condition, with a recommended maximum length of no more than 10 meters.

Confirm that parameters such as SensorWidth, SensorHeight, TapPlacement match the actual output of the camera.

Adjust the DataValidDelay parameter to solve the phase shift of data sampling.

3. Encoder triggers no response

Check if the polarity of the differential signal of CN3 encoder is correct (A+and A -, B+and B -).

Confirm that CaptureMode is set to Encoder Input and ScanMode is set to LineScan.

Observe whether the Encoder CounterValue increases with the rotation of the encoder. If there is no change, check the wiring and JP1 level settings.

4. The PoCL power supply indicator light is not on

Confirm that the camera supports PoCL and the cable is PoCL compatible (all pins are complete).

Attempt to set PowerState to "Short+12V" for forced power supply (proceed with caution).


Selection and System Design Suggestions

PCIe-CPL64 is suitable for applications that require medium bandwidth (up to 85MHz pixel clock) and high synchronization requirements. For higher bandwidth or higher pixel clocks (such as above 85MHz), updating models such as PCIe-CPL64v2 or PCIe-CPL128 may be considered. But the dual Base mode of the card can simultaneously connect two cameras, suitable for binocular stereo vision or multi station detection, and the flexibility of encoder input and triggering makes it outstanding in linear array applications such as printing, textile, battery electrode detection, etc.

Attention should be paid to the following during design:

Calculate bus bandwidth: The total data rate in dual Base mode is about 255MB/s, and the theoretical bandwidth of PCIe x4 is 1GB/s. Therefore, the bottleneck lies in the Camera Link interface, not the bus.

Memory allocation: Allocate buffers reasonably according to the Set System Buffer Count formula to avoid memory overflow.

Cable length: If it needs to exceed 10 meters, it is recommended to use a Camera Link repeater or fiber optic converter.

  • Alcatel-Lucent 3AL82037ADAA SFP Module
  • Alcatel-Lucent OMQ 408645968 Optical Module
  • Alcatel-Lucent 9500 MPR 8-Slot Shelf 3DB18485AB
  • Alcatel-Lucent 408154904 CPU I/O Card
  • Alcatel-Annecy 5150 CP Turbo Vacuum Pump
  • Alcatel-Lucent 3EH73084AEJD08 Card
  • Alcatel-Lucent 3EH73050ABAB Interface Card
  • Alcatel-Lucent 3HE06151ABAA01 SFP Line Card
  • Alcatel-Lucent 8DG59242AD Power Filter
  • Alcatel-Lucent IMM48-1GB-TX 48-Port Module
  • Alcatel Lucent 3CM03285MQ02 Module
  • Alcatel 3HE07158BA 7750 SR-12 IMM-2PCA-FP3 Optical Transceiver
  • Alcatel-Lucent 9396 Digital 2U NodeB Outdoor with Indoor Mainframe and Alarm Module
  • Alcatel Lucent MPX-16/64-T-L3 MPX1664TL3 Multiplexer Module
  • Alcatel Lucent 3EH73052AB Power Supply Module
  • Alcatel Lucent ASM2-155FM-2W-4C ASM2155FM2W4C Switch Fabric Module
  • Alcatel Lucent 3AL00124ABAB Interface Card
  • Alcatel-Lucent 1AB429380001 Cable Assembly
  • Alcatel Z24 3BA53065 Analog Extension Card 3BA53065AA
  • Alcatel-Lucent 9500-MPR 11GHz MPT-HC ODU Microwave Packet Radio 3DB20371ACAA01
  • Alcatel-Lucent RRH1900-4x45 Remote Radio Head
  • Alcatel-Lucent 3HE00028AA Ethernet Line Card
  • Alcatel-Lucent 3HE04939CE CWDM SFP Transceiver
  • Nokia Alcatel-Lucent 3FE66546AA Fan Module
  • Alcatel-Lucent SSP-6 Speech Signal Processor Board
  • Alcatel-Lucent 500-1113-212 Channel Bank Assembly
  • Alcatel-Lucent EZ32-2 Board 3BA23265ADKE 01
  • Alcatel-Lucent GSM-FM-2W-4C Filter Module
  • Alcatel-Lucent 3AL00378AF Interface Card
  • Alcatel-Lucent 3AL00124ABAC Interface Module
  • Alcatel-Lucent BJB1 PWPQALGAAG 48V Independent Microprocessor Board
  • Alcatel Lucent MDR-8000 Microwave Digital Radio MDR-8506-4 with 13 Modules
  • Alcatel Lucent 3AL00424AA Interface Card
  • Alcatel Lucent 3BA73012AB Power Supply Module
  • Alcatel Lucent ESX-100C-32W ESX100C32W Power Supply Module
  • Alcatel Lucent GSX-K-FM-2W GSXKFM2W Fan Module
  • Alcatel 8DG59247AA Optical Protection Switch Card
  • Alcatel Lucent 91-E03100-B 91E03100B Interface Module
  • Alcatel Lucent FSX-FM-1W FSXFM1W Fan Module
  • Alcatel Lucent RRH2X40-07L-AT Remote Radio Head
  • Alcatel-Lucent 9500-MPR MSS-8 Shelf 3DB18485CA
  • Alcatel Annecy ACP20 Vacuum Pump CP20
  • Alcatel-Lucent 9500 MPR P32E1DS1 E1 PDH Card
  • Alcatel-Lucent J98726AL-2 D4OI210DAA Module
  • Alcatel 409113651 RRH700L1 700MHz Remote Radio Head
  • Alcatel io2 3ba23050 PCB Card
  • Alcatel-Lucent MDR-8000 MDR-8706-8 Digital Radio
  • Alcatel-Lucent ACT2300M Turbo Pump Controller AF042134A
  • Alcatel-Lucent OmniPCX Office Medium PowerCPU PRA-TI
  • Alcatel-Lucent 9500 MPR 23GHz ODU 3DB23045HDAA01
  • Alcatel-Lucent 9500 MPR ODU Outdoor Unit 300 11GHz TX Low HP 3DB23035AAAA01
  • Alcatel-Lucent ECNT-C 3FE25676 BA AK 06 Termination Card
  • Alcatel Lucent MDR-8000 Microwave Digital Radio MDR-8606-45 with 13 Modules
  • Alcatel-Lucent 849144415 KS-24829L1 Remote Radio Head v1.4
  • Alcatel CFF 450 Turbo Pump Controller 137171
  • Alcatel-Lucent ACS108 109579896 004 Access Controller
  • Alcatel-Lucent OS6850-48 Network Switch with PS-126W-AC Power Supply
  • Alcatel Lucent DFP-CM-14B/2T Filter DCMA Base Station
  • Alcatel Lucent ESX-K100C32W4 ESXK100C32W4 Power Supply Module
  • Alcatel Lucent 91-E03100-A 91E03100A Interface Module
  • Alcatel-Lucent STGR-LIM-A2P-72-HBI ADSL2+ High Bandwidth Module
  • Alcatel-Lucent 9500 Microwave Packet Radio MPT-3DB20547BBAA02
  • Alcatel Lucent Enterprise 4049-4059 MMK Keyboard Console Kit
  • Alcatel-Lucent RRH4X40-1900 Remote Radio Head
  • Alcatel Lucent OS6450-P48 Switch
  • Alcatel Lucent 625617-000-001 Cable Assembly
  • Alcatel Lucent 108320 Module
  • Alcatel Lucent TN801B Board
  • Alcatel-Lucent RRH2X50-800 LTE Remote Radio Head
  • Alcatel Lucent CPU8 Board 3BA23258AB OmniPCX 4400
  • Alcatel-Lucent 3EM22617AAAE 9500 MPT-HL Microwave Radio Transceiver
  • Alcatel-Lucent CPU7-2 3BA23259AAAD 7750 SR Control Processor Module
  • Alcatel-Lucent 9500 Microwave Packet Radio MPT-3DB20371BCAA01
  • Alcatel-Lucent Enterprise 4059 MMK Keyboard + Phone PAC Kit
  • Alcatel-Lucent Nokia 3HE10329AA 7750 SR Series Router Module
  • Alcatel-Lucent 7705 SAR-W IP MPLS Service Aggregation Router 3HE07349AA
  • Alcatel-Lucent-Nokia 3HE08429AARC01 7750 SR SFM5-7 Switching Module
  • Alcatel-Lucent 3HE00272DB 7750 SR-7 DC Chassis with PEM3+EFT
  • Alcatel-Lucent ACT 1300M/1600M HT Turbo Pump Controller
  • Alcatel Lucent IMM48-1GB-TX 3HE03625AAG01 48-Port 7750 SR-12 Interface Module
  • Alcatel-Lucent AP-500 Wireless Access Point
  • Alcatel-Lucent ATP-150 Power Supply
  • Alcatel-Lucent 622-8603-012 Optical Transceiver
  • Alcatel-Lucent 270-0038-010 10.5 VDC Power Supply
  • Nokia 9500-MPR Microwave Radio Module XPIC-RPS/3DB20116BCAA01
  • Alcatel-Lucent 3DB19017AB EAS Access Switch v2
  • Alcatel-Lucent 3AL81072AA Matrix Enhanced Unit - Cross-Connect Module
  • Alcatel-Lucent MDR-8606-135 6GHz Digital Microwave Radio
  • Alcatel-Lucent 3EM09626AD RF Transmitter - MDR-8000 Component
  • Alcatel 3HE03619AAAF01 Network Module
  • Alcatel-Lucent 3EH76027AEJC OmniPCX Enterprise Communication Server
  • Alcatel-Lucent 9500 MPR 11GHz Microwave Link - 3DB22001DA
  • Alcatel-Lucent GSX-FM-4W - Gigabit Ethernet Fiber Module 4-Port
  • Alcatel-Lucent 270-0038-020 - Power Supply Interface Module
  • Alcatel-Lucent LNW64 - Network Processor Module for Switching Systems
  • Alcatel-Lucent 3DB19017AB - High-Density Interface Module Board
  • Valmet U4600063 - Industrial Automation Module
  • Valmet M851040 M1 MEMU Module - Memory and Expansion Unit
  • Metso Valmet A413016 NCU2 Board - Network Control Unit Model 17
  • Valmet A413115 TCU41 Board Ver.06 - Temperature Control Unit
  • Metso Valmet PEFT A413792 - Power Supply Module for Automation Systems
  • Valmet ABTU M2512201 - Analog Binary Termination Unit Module
  • Valmet ABMB MT036 PCB Card - Auxiliary Backplane Motherboard
  • Valmet A413345 FPUS Battery Backup Unit - Standby Power Module
  • Valmet A413060 DMU Rev 04 - Drive Monitor Unit Board
  • Valmet BOR82 A413292 - Binary Output Relay Module
  • Valmet A413383 Ver.04 ESW - Electronic Switching Module Board
  • Valmet Neles A415579 Valve Controller
  • Metso Valmet A413381 ESW Drive Board
  • Valmet ABTU Module 545266-2A 2-545264-2B - Analog Binary Termination Unit
  • Valmet ABMB MT838 PCB - Backplane Bus Mother Board
  • Valmet LEV-EL PG4 N1 H2S Sensor - 600mbar Gas Detector
  • Valmet ABMB MT940 PCB - Analogue Bus Mother Board Backplane
  • Valmet VAT65425921A MT241 PCB Board
  • Valmet A413310 VPU Power Unit - 230VAC 1.5A Automation Supply
  • Valmet Metso IOP303 Input Module 181504 - 32-Channel Digital Input
  • Valmet A413060 DMU Rev 07 - Data Management Unit
  • Valmet M851220 M1 PCB Card - Process Automation Interface Board
  • Valmet A413042 Ver.06 CPU
  • Valmet A413200-01 AIU 8 Analog Input Module
  • Basler DECS-250-CGCM-LN2SA1C Digital Excitation Control System
  • Valmet Automation PLC Module A413171
  • Valmet Automation 542852-3A Rack-Mount Cross Connect Panel
  • Valmet Marine Damatic M851565 Main Keyboard
  • Valmet TIU 6 Printed Circuit Board A413110
  • Metso Valmet U4440253V1.1 RMI CPU 300
  • Metso Valmet A413016 Ver.12 NCU2
  • Valmet M851565 Damatic Keyboard