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 | 513 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.

  • Rexroth 0-531-012-740 Bladder Accumulator
  • Rexroth VT-VRRA 1-527-20/V0/2STV Amplifier
  • Rexroth CSB01-1N-AN-ENS Control Section
  • Rexroth 2ma-1a P58718 Pilot Air Valve
  • Rexroth SB356 Multi-channel Controller System Box
  • Rexroth IndraControl L20 PLC CML20.1
  • Rexroth R151231013 Ball Screw Nut
  • Rexroth RC28-14/30 BODAS Controller R917007683
  • Rexroth LTU350 3-Phase Servo Amplifier
  • Rexroth VAM42.1 Control Device
  • Rexroth S20-DO-16/1 Digital Output Module
  • Rexroth HED8OA-20/350K14AS Pressure Switch
  • Rexroth CSH01.1C-SE-EN2 Control Section
  • Rexroth VT-VSPA2-1-11/T1 Valve Amplifier R900021909
  • Rexroth VT3024-S34-R1 Amplifier Card
  • Rexroth Aventics R417000243 Operating Unit Switch
  • Rexroth NYS04.1-ST-05-ULNN R911325068 Module
  • Rexroth DPR-10 Amplifier Circuit Board Card
  • Rexroth 4WE 10 D33/OFCG24N9K33L R900701304 Valve
  • Rexroth DKC01.3-100-7-FW Servo Drive
  • Rexroth VCP05.2DSN-003-PB-NN-PW Operator Panel
  • Rexroth MSK030B-0900-NN-M1-UG0-NNNN Servo Motor
  • Rexroth 0 821 758 010 Valve Terminal 10 Bar
  • Rexroth VAM42.1-PB-NF-NN-TB-VD-NN-1608-NN Control Panel
  • Rexroth MAC090B-0-JD-5-C/110-A-0/KI520LV Servo Motor
  • Rexroth VCP25.1BVN-003PB-NN-PW Operator Panel
  • Rexroth RKL4305/002.5 Power Cable L=250cm
  • Rexroth MSM031C-0300-NN-M5-MH1 R911344216 Servomotor
  • Rexroth CSH01.1C-SE-EN2 R911335435 Control Unit
  • Rexroth FEM-E-S 25x10RX3-4 R151224013 Ball Screw
  • Rexroth FCS01.1E-W0005-A-04-NNBV Frequency Drive
  • Rexroth 0510-425-009 Hydraulic Gear Pump
  • Bosch Rexroth IndraControl XM42 Controller R911396964
  • Rexroth VT5035-17 R900579497 Valve Amplifier
  • Rexroth FCS01-1EW0015-A-04 R91131106 Frequency Drive
  • Rexroth MSK050B-0600-NN-M1-UG1-NNN Motor
  • Bosch Indramat TBM1.2-40-W1-115 Bleeder
  • Rexroth HCS01.1E-W0028 Compact Converter
  • Rexroth Indramat MAC071B-0-PS-2-C/095-A-0 Motor
  • Rexroth HCS02.1E-W0012-A-03-NNNN Drive Set
  • Rexroth R-IL S3 BK DI8 DO4-PAC Coupler
  • Rexroth HCS01.1E-W0028-A-03-E-S3-EC-NNN Drive
  • Rexroth MSK061C-0600-NN-S1-UG0-NNNN Motor
  • Bosch Rexroth MSM041B-0300-NN-M0-CH0 Motor
  • Rexroth IKG0071-05.0m Servo Motor Cable
  • Rexroth R-IL S3 BK DI8 DO4-PAC Bus Coupler
  • Bosch Rexroth SB301 Tightening Unit 0608701017
  • Rexroth E-003-S-S Tool Cable 0608740220
  • Rexroth MSM020B-0300-NN-M0-CG0 Servo Motor
  • Rexroth IndraControl VEP30.3 Panel PC
  • Rexroth DBETE-62/315G24K31A1V Valve R901029969
  • Rexroth CSH01.3C-ET-ENS-NNN Control Section
  • Rexroth VT3013-37 Amplifier Control Card
  • Rexroth 1-2 TH6 L 162-10/N 05 Joystick
  • Rexroth ESV025 Handheld Nutrunner 0608841037
  • Rexroth RK2 S30 Amplifier Card VT 4224 U 261
  • Rexroth CDB01.1C-SE-ENS R911308279 Control Unit
  • Rexroth VFC3610-0K40-3P4-MNA-7P Inverter 0.4kW
  • Bosch Indramat HCS02.1E-W0028-A-03-NNNN Servo Module
  • Rexroth DKC01.3-040-7-FW EcoDrive R911279426
  • Rexroth HMV02.1R-W0015-A-07-NNN Utility Unit 15kW
  • Rexroth 0 608 830 193 ZSE220 Communication Module
  • Rexroth VT5003 S41 R5 Proportional Amplifier Card
  • Rexroth KSM02.1B-041c-42N-M1-HP0-ET-L3-D7-NN-FW Motor Drive
  • Mannesmann Rexroth VT5005 S16 R1 Valve Amplifier Card
  • Rexroth CFL01.1-R3 Sercos III Interface Module
  • Rexroth CKK-110-NN-1 Linear Axis with MSK040C
  • Bosch Rexroth 047018-104401 Controller Card
  • Rexroth MDSD1K-2X/4 Solenoid Driver Module
  • Rexroth DKC02.3-012-3-MGP-01VRS Servo Drive
  • Rexroth HCS01.1E-W0006 Compact Servo Drive
  • Rexroth NAM1.2-08 Line Former R911246505
  • Rexroth VPB40 Industrial PC Control Cabinet
  • Rexroth FWA-ECODR3-SGP-03-MS Firmware Module
  • Rexroth HEDE10-31 Pressure Switch R901425475
  • Rexroth HM 17-11/315-C/V0/0 Pressure Sensor
  • Rexroth VFC 3610-2K20-3P4-MNA-7P Inverter 2.2kW
  • Rexroth MSK040C-0600-NN-M1-UG1-NNNN Right Angle Geared Motor
  • Rexroth DKC02.3-012-3-MGP-01VRS EcoDrive Cs
  • Bosch Rexroth MSM031C-0300-NN-M0-CH0 Servo Motor
  • Rexroth HCS02.1E-W0012-A-03-NNNN Power Section
  • Rexroth DBDS 20 P18/400V Pressure Relief Valve
  • Rexroth 3460565500 Pneumatic EP Converter Regulator
  • Rexroth VT-SWA-1-12/DFEE Angle Sensor R900913641
  • Rexroth 0-608-830-250 Interface Module SM24V
  • Rexroth MHD071B-035-NP0-UN8 Servo Motor 12Nm 1000rpm
  • Rexroth MKD025B-144-KG0-KN R911263737 Servo Motor
  • Rexroth KCU02.2N-ET-ET*-025-NN-N-NN-NW Control Unit
  • Rexroth MV-VPB40*3-RB001VPB R911337529 Valve Terminal
  • Bosch Rexroth AS 2/R-2200 Drive Module 3842998041
  • Rexroth HMS01.1N-W0036 Power Section
  • Rexroth CKK-145-NN1 Compact Linear Module
  • Rexroth MS2N04-C0BTN-BSDK0-NNNNN-NN Geared Servo Motor
  • Rexroth HCS02.1E-W0028-A-03-NNNN Power Section
  • Rexroth MS2N04-D0BQN-CMSG0-NNNNN-NN Servo Motor
  • Rexroth MSM031C-0300-NN-M0-CH0 Servo Motor
  • Rexroth MKD041B-144-KP1-KN Servo Motor R911262307
  • Rexroth ESA075G Handheld Nutrunner 0608841033
  • Rexroth MSK070D-0450-NN-M1-UP1-NSNN Motor
  • Rexroth CKK-145-NNG1 Linear Kit with HCS02 Drive
  • Rexroth MSK060C-0300-NN-M1-UG0-NNNN Servo Motor
  • Rexroth MKD090B-047-KP1-KS Servo Motor
  • Rexroth MLS140S-3A-0450-NNN Linear Motor
  • Rexroth VPB40.3 Industrial PC R911338689 CB1
  • Rexroth HCS02.1E-W0012 Servo Drive R911313871
  • Rexroth R151349014 R151145672 Ball Screw Assembly
  • Bosch Rexroth CKK-110-NN-1 Compact Module
  • Rexroth MSK060B-0300-NN-M1-UG1-NNNN Servo Motor
  • Rexroth Indramat TBM 1.2-40-W1-024 Servo Bleeder
  • Rexroth MSK040B-0600-NN-M1-UG1-NNNN Servo Motor
  • Rexroth MLS200S-3A-0450-NNN R911299213 Linear Motor
  • Rexroth SB356 Tool Tightening Controller Rack
  • Rexroth MSK050C-0300-NN-M1-UG0-NNNN Servo Motor
  • Rexroth Indramat DKC11.3-040-7-FW Eco Drive
  • Rexroth VT2000 Proportional Amplifier
  • Rexroth VT1118-10 Analog Module
  • Rexroth MSK060C-0600-NN-M1-UP1-NSNN Motor
  • Rexroth MSK060C-0300-NN-S1-UG0-NNNN Motor
  • Rexroth R911173937 IndraControl XM AI1
  • Rexroth R412018225 AES-D-BC-ECAT Module
  • Rexroth CDB02.1B R911338542 Controller Card
  • Rexroth VT-HNC100-2-30/P-I-00/000 Module
  • Bosch Rexroth CSB02.1B R911372549 Control
  • Bosch Rexroth R185321310 Runner Block
  • Rexroth VPB40.3 Industrial PC R911338689
  • Rexroth HNK01.1A-A075-E0106-A-500 Drive Controller
  • Rexroth CSH02.1B-CC-EC-ET-S4-NN-NN-FW Controller
  • Rexroth CSB01.1C-PB-ENS-NNN Control Unit