Welcome to the Industrial Automation website!

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

Advanced triggering and multi card synchronization of ADLINK PCIe-CPL64V image acquisition card

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

Advanced triggering and multi card synchronization application of ADLINK PCIe-CPL64V image acquisition card

In the field of high-speed machine vision and industrial inspection, the Camera Link interface has long dominated high-end camera connectivity due to its high bandwidth, anti-interference, and standardization advantages. With the continuous improvement of image resolution and frame rate, traditional PCIe x4 acquisition cards are gradually facing challenges in throughput and synchronization accuracy. The PCIe-CPL64V series launched by ADLINK adopts PCIe Gen3 x4 architecture, supports Base/Medium/Full full configuration Camera Link, has a maximum aggregated data transfer rate of 850 MB/s, and integrates advanced functions such as multi card synchronization, programmable trigger chain, encoder position trigger, etc., providing a highly flexible hardware platform for linear scanning, 3D detection, and high-speed AOI systems. This article will provide engineers with a system level application reference from the dimensions of hardware architecture, trigger logic, CAM file configuration, multi card synchronization mechanism, and common debugging methods, to help them quickly solve difficult problems in practical deployment.


Product positioning and core upgrade highlights

PCIe-CPL64V is a fully upgraded version of the previous generation PCIe-CPL64, with major improvements including:

Doubling bus bandwidth: PCIe Gen3 x4 provides a theoretical bandwidth of approximately 3.9 GB/s, with an actual image transfer rate of 850 MB/s, making it easy to meet the full bandwidth requirements of 85MHz pixel clock in Full configuration (80 bits) (approximately 680 MB/s).

Memory expansion: Onboard 512 MB DDR cache, supporting longer burst collection and frame buffer queues, reducing the risk of frame loss.

I/O isolation enhancement: Provides 4-channel isolated digital input/output (500Vrms isolation), supports 10kHz input and 500kHz output, and adapts to strong interference environments in industrial sites.

Encoder interface upgrade: Differential isolated encoder input, supporting up to 20MHz (4x AB mode), compatible with multiple encoder protocols such as CW/CCW, OUT/DIR, etc.

Multi card synchronization: Supports up to 4 cards for synchronization, with a synchronization delay of less than 100ns, meeting the requirements of multi camera collaborative acquisition.

These features make it particularly suitable for high demand scenarios such as printing quality inspection, defect scanning for flat panel displays, and visual positioning for high-speed surface mount machines.


Trigger architecture: flexible and programmable signal chain

The triggering system of PCIe-CPL64V is its core competitiveness, and users can configure complex triggering chains through CAM files or APIs. The overall diagram can be found in Chapter 4 of the manual, and the core modules include:

1. Trigger Source Selection

Each output channel (4 DO and 2 CC control lines) can independently select trigger sources, including:

DI0~DI3 events: External isolated input, can be set with rising/falling edge triggering, and equipped with a debounce filter (0/200/500/800ns).

Encoder comparison event: triggered when the encoder count reaches the preset Compare Count.

Multi card synchronization event: The synchronization signal broadcasted by the main card, and the slave card listens for the event.

Software trigger: manually triggered through API.

This multi-source selection mechanism allows users to flexibly combine external sensors, encoder positions, and software instructions to adapt to complex automation processes.

2. Trigger Delay

Each output channel can be independently configured with a delay mode:

Timer mode: Set a fixed delay time in units of 1 μ s (maximum approximately 16.7 seconds).

Encoder mode: Delay the specified number of encoder pulses (up to 32 bits) to achieve position dependent delay, such as waiting for a fixed physical distance to trigger camera exposure after detecting material edges.

3. Re trigger

This function automatically generates a predefined number of output pulses after a single external trigger, especially suitable for linear scanning cameras. For example, when an external sensor triggers once, 1024 CC1 pulses (one per line) need to be continuously sent to the camera to complete the acquisition of one frame of image. By setting Retrigger. Enable=True and specifying the number and interval of triggers (encoder count or timer), the hardware automatically completes the entire sequence without CPU intervention, greatly improving real-time performance.

4. Output PWM generation

Each DO and CC channel can be configured for manual mode or trigger mode. In trigger mode, the high-level and low-level widths of the output pulse can be independently set (1 μ s resolution) for precise control of light source flicker or camera exposure timing.

This modular design allows engineers to achieve full chain timing matching from external events to camera control without writing complex logic, solely through CAM files.

CAM file configuration: from templates to customization

The CAM file (in. ini format) is the core configuration file of PCIe-CPL64V, which defines all operational parameters such as image format, trigger behavior, encoder parameters, I/O mapping, etc. Users can load templates and modify them through the CamCreator tool, or directly edit text files. The following focuses on analyzing several chapters that are prone to errors or require special attention.

1. [ImageFormat] Image format and bandwidth limitations

SensorWidth/SensorHeight: Specific alignment multiple requirements must be met, for example, when Mono8 x 1/2/4/8tap, the width must be a multiple of 32; When Mono10 x 8tap, the width needs to be a multiple of 320. If it does not meet the requirements, an error will be reported when the collection starts.

CameraConfiguration: Select Base, Medium, or Full based on the actual connected camera configuration, corresponding to different data bit widths and required cable numbers (see manual table). Incorrect configuration can cause abnormal status of LED7 (orange flashing indicates error).

TapPlacement: It is necessary to match the actual output mode of the camera (single/double/four/eight/ten tap), otherwise the image arrangement will be disordered.

Practical tip: Use LED7 status indicator light to quickly diagnose configuration: Green constant light=Full, green flashing (2Hz)=Medium, orange constant light=Base, orange flashing=Abnormal, off=No camera detected.

2. [TriggerInput] triggers input debounce

When using mechanical switches or relay contacts as trigger sources, shaking may cause false triggering. Setting DebounceTime (200/500/800ns) can effectively filter out glitches, but it should be noted that a long debounce time may delay the response and needs to be balanced based on the actual signal frequency.

3. [Encoder Input] Encoder mode and comparison value

Mode: Supports multiple modes such as AB phase X1/X2/X4, CW/CCW, OUT/DIR, etc., and needs to match the output type of the encoder.

Comparing Count: When the encoder count reaches this value, a comparison event is generated, which can be used as one of the trigger sources. Real time position can be monitored by reading the status parameters of Encoder Counter.

4. [Retrigger] Re trigger setting instance

Assuming a linear camera is used, the rising edge of the external DI0 triggers one frame acquisition, requiring 2048 lines per frame, and the encoder triggers one line every 10 pulses. Then configure:

text

[TriggerOutputTrigSrc]

DO0TriggerSource=DI0 # DI0 as initial trigger

[Retrigger]

Port0CC1RetriggerEnable = True

Port0CC1Mode = EncoderMode

Port0CC1TriggerNums = 2048

Port0CC1Interval=10 # CC1 is triggered every 10 encoder pulses

In this way, when DI0 is triggered once, the hardware automatically outputs 2048 CC1 pulses to the camera continuously at intervals of encoder pulses, completing the entire frame acquisition.


Multi card synchronization: precise timing and low latency

When multiple cameras are needed for simultaneous shooting (such as binocular stereo vision or multi angle detection), PCIe-CPL64V provides inter board synchronization mechanism, supporting up to 4 cards for synchronization with synchronization jitter less than 100ns.

Hardware connection: All cards are cascaded through a CN4 dedicated ribbon cable, distinguishing between master and slave cards. The main card's CN4 outputs a synchronization signal, and the secondary card's CN4 receives the signal.

CAM file configuration:

Master card setting [MultiCardSync] Mode=Master

From Card Settings [MultiCardSync] Mode=Slave

In [MultiCardTrigSrc], the master card selects the trigger source (such as DI0), and the slave card selects TriggerSource=MultiCardSync.

Power on timing: The master card needs to start collecting data before the slave card to ensure stable synchronization signals. The current mode (1=Master, 0=Slave) can be verified through the state parameter MultiCardSync Mode.

Troubleshooting: If synchronization fails, check if the CN4 cable is locked, if the card ID conflicts (SW1 must be unique), and if the main card is generating synchronization events normally (observe LED2: the main card is always red and the slave card is always green). If LED2 on the card does not light up, it means that no synchronization signal has been received and the hardware connection or CAM file configuration needs to be checked.


PoCL power supply and safety testing

PCIe-CPL64V supports Power over Camera Link, and each SDR interface can output+12V/0.8A. The automatic detection function can identify non PoCL cables or cameras to avoid damage. However, some PoCL devices may not comply with standard timing, causing voltage startup or drop beyond the tolerance range. In this case, the PoCL SafePower Status parameter will report an error (non-zero value), and the corresponding Clock Startup Time Tolerance, Clock Drop Out Time Tolerance, and Voltage Drop Duration Tolerance can be manually adjusted (in μ s) to relax the detection conditions. These tolerances can be pre-set in the CAM file to be compatible with non-standard devices.

Attention: If the PoCL power indicator light (LED next to LED7) does not light up, first check if the cable is PoCL compatible (all 26 cores are intact), and then try to force the PowerState setting (but be cautious).


State parameters and debugging tools

Chapter 6 of the manual lists a wealth of status registers, which can be read through AVSAdvancedConfigRead and are extremely useful for on-site debugging:

DataStreamStatus: Indicates whether the FPGA is receiving data from the front-end and transmitting data to the host, quickly locating data flow blocking points.

DelayBufferCount/Overflow: Each trigger delay module has an internal buffer that records the number of trigger events that have not yet been output. If the overflow exceeds 255, it indicates that the triggering frequency is too high or the delay setting is too long, and the parameters need to be adjusted.

EventCount/DropCount: Each trigger source and output channel has independent event and dropout counts. A non-zero DropCount indicates that the trigger signal has been lost, and it is necessary to check the quality of the front-end signal or increase the buffer.

Camera Link Configuration: Real time display of the currently detected configuration (Base/Medicine/Full/Error), corresponding to the status of LED7.

By utilizing these states, engineers can quickly diagnose bottlenecks in the trigger chain without the need for an oscilloscope, significantly reducing the debugging cycle.

Common Problems and Troubleshooting Guide

1. Collecting images with blurred screens or incorrect lines

Check if TapPlacement matches the actual output of the camera (such as double tap odd order, starting center, etc.).

Verify if SensorWidth meets the alignment requirements (see warning in section 5.1.2).

Check if the LVAL/DVAL/FVAL polarity settings match the camera timing (can be adjusted through LVALPolarity, DVALPolarity).

2. Trigger no response

Confirm that the trigger source is correctly connected (DI/encoder) and the voltage level meets the specifications (DI high level 3-24V, low level<0.8V).

Check if the source of the corresponding output channel in TriggerOutputTrigSrc is configured correctly.

Confirm that AVS_SrameGrabberStartAcquisition has been called, and the triggering function only takes effect after the collection starts.

Observe whether the corresponding event count (such as DI0EventCount) increases. If not, check the front-end signal and debounce settings.

3. Encoder direction is opposite

Swap the wiring between encoder A+and A - or B+and B -, or select CW/CCW reverse through Encoder Input. Mode.

4. The image is not synchronized after multi card synchronization

Check the synchronization cable connection sequence of all cards to ensure that the main card output is connected to the first slave card input and connected in series to subsequent slave cards.

Confirm that the MultiCardSync.Mode configuration for all cards is correct and that the trigger source signal for the main card is stable (if using the same external sensor).

Measure whether the synchronization signal on the main card CN4 is output (requires an oscilloscope). If not, check the main card configuration and trigger source.

5. Firmware update failed

Use the Firmware Update tool provided by ADLINK, select the correct. bin file, and after the update is complete, perform a cold start (completely power off and then power on), otherwise the new firmware will not take effect.


Key points of development environment and API calling

PCIe-CPL64V adopts a brand new AVS SDK (not compatible with the old version CPL64), supports Windows 10/11 64 bit,. NET Framework 4.8 or above, and VC++Redistributable 2015 or above. The programming process is as follows:

Call AVS_LetDeviceCount to enumerate devices.

AVSOpenDevice opens the specified card number and channel.

AVS_CameraLinkImportCamFile loads CAM files.

If a callback is used, the AVS-FrameGrabberSetcallback will register the frame ready callback; If using blocking, loop call AVS_SrameGrabberGetFrame.

AVS_SrameGrabberStartAcquisition starts the acquisition process (triggering logic takes effect at this time).

Process the image in the callback or main loop and return the buffer through AVS-FrameGrabberQueueBuffer.

Stop collecting and turn off the device.

Special note: GetFrame and callback modes cannot be mixed; Dynamic modification of trigger parameters must be performed after stopping the collection process; AVS_FrameGrabberSetBufferCount can adjust the number of buffers before startup (default: 4, maximum: 100). Increasing the buffer will help smooth burst frame traffic.


Selection and application suggestions

For a single Full configuration camera (80 bit, 85MHz), PCIe-CPL64V is an ideal choice with ample bandwidth margin.

If four Base cameras need to be synchronized, it can be achieved by combining four cards with multiple cards for synchronization. Each card controls one camera, which is suitable for parallel detection of multiple workstations.

The encoder trigger mode is suitable for equidistant acquisition in continuous motion, such as defect detection on the surface of a coil. Comparing Count and Interval need to be calculated to ensure uniform line spacing.

The anti-interference ability (± 7V common mode range) of isolating I/O and encoder inputs enables it to adapt to the motor frequency converter environment, but it is still recommended to use shielded twisted pair and single ended grounding.

  • 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