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

  • Micro Innovation GF1-10TVA-100 Touch Panel
  • Micro Innovation GSO-57EQD-000 Operator Panel
  • Micro Innovation XN-2AI-U Analog Input Module
  • Micro Innovation CAN-4AI/UI Analog Input Module
  • Micro Innovation ZSB-1.5/8-S/S/-/PE Base Terminal
  • Micro Innovation AG XVH-340-57CAN-1-10 HMI Panel
  • Micro Innovation GSO-57EQD-000 Micro Panel
  • Micro Innovation XN-2AI-PT/NI-2/3 Input Module
  • Micro Innovation AG GF0-57SQD-000 Display Panel
  • MICRO INNOVATION AG XN-16DI-24VDC-P Input Module
  • Micro Innovation XN-2AI-PT/NI-2/3 Input Module
  • Micro Innovation MC2-442-57CQB-1-2G Display Panel
  • Micro Innovation XN-16DO-24VDC-0.5A-P Module
  • Micro Design MC200PROFI Programmable Module
  • Micro Innovation XV-252-57MPN-1-10 Micro Panel
  • Micro Innovation CAN-4AI/UI Analog Input Module
  • Micro Innovation GT1-MPI-A000 Panel
  • Micro Innovation MC2-440-10TVB-1-21 Display Panel
  • Micro Innovation XVS-430-57MPI-1-1S 6" HMI
  • Micro Innovation XV-442-57CQB-1-1AB Monitor
  • Micro Innovation ZSB-1.5/8-S/S/-/PE Base Terminal
  • Micro Design 895A Microfiche Reader
  • MICRO INNOVATION XNE-8DI-24VDC-P Input Module 8550100794
  • MICRO INNOVATION MICRO PANEL GF0-10CVD-002
  • Micro Innovation XN-PLC-CANopen Controller 85 50 274124
  • Micro Innovation Display Panel GS0-57E0D-000
  • MICRO INNOVATION CAN-32DI/P2X16 Input Module
  • MICRO INNOVATION XN-2DO-R-NO Relay Output Module
  • MICRO INNOVATION XNE-16DI-24VDC-P Input Module
  • Micro Innovation AG XN-2AI-U Analog Input Module
  • Micro Innovation XN-BR-24DC-D Power Supply
  • Micro Innovation MH2-342-57EIB-1-20 Panel
  • Micro Innovation XV-252-57MPN-1-10 Micro Panel
  • Micro Innovation Display Card EIB2-TP
  • Micro Innovation XV-252-57MPN-1-10 6" HMI
  • Micro Innovation XN-B3T-SBC 16x DO Base Module
  • Micro Innovation XVH-330-57MPI-1-10 Panel
  • Micro Innovation XN-BR-24VDC-D Power Module
  • Micro Innovation EIB2-TP EIB2TP Module
  • Micro Innovation GF0-10CVD-100 Touch Panel
  • MICRO INNOVATION XV-230-57CNN-1-10 HMI-PLC
  • MICRO INNOVATION XN-2DO-R-CO Relay Output Module
  • KMK MICRO INNOVATION GS2-90EMD-000 Micro Panel
  • Micro Innovation XN-2AO-U Analog Output Module
  • Micro Innovation XN-1AO-I Analog Output Module
  • Micro Innovation CAN-32DI/P-2x16 Rack Module
  • Eaton Micro Innovation MC2-440-10TVB-1-11 HMI
  • Micro Innovation AG CAN Bridge 8551224177
  • Micro Innovation XN-2AI-I Analog Input Module Set
  • Micro Innovation XN-4DI-24VDC-P Input Module
  • Micro Innovation Winbloc CAN-16DO/0.5A-PK Module
  • Micro Innovation Micro Panel GFO-10SVD-002 HMI
  • Micro Innovation CAN-24DI/8DO/0.5A-PK Module
  • Micro Innovation DP-24DI/8DO/0.5A-PK I/O Module
  • Weidmuller Micro Innovation CAN-BRIDGE ZSFA 1,5R
  • Micro Innovation CAN-3AI/1AO-UI Profibus Module
  • Micro Innovation PDP-TP Profibus DP Module
  • Micro Innovation CAN-3AI/1AO-UI Analog Module
  • Micro Innovation MC2-430-12TSB-10 HMI Panel
  • Micro Innovation XNE-8DO-24VDC-0.5A-P I/O Module
  • MICRO INNOVATION AG WINBLOC CAN-32DI/P-2x16 85 51 224182
  • MICRO INNOVATION AG WINBLOC CAN-4AO/UI 85 51 224195
  • Micro Innovation Xv-252-57cnn-1-10 HMI Panel
  • Micro Innovation XN Basis XN-S4T-SBBS-CJ 225200
  • Micro Innovation GF1-10TVD-100 Micro Panel
  • Micro Innovation XN-B3T-SBC 16-Fold DO Base Module
  • MICRO INNOVATION AG WINBLOC CAN-3AI/1AO-UI 85 51 224192
  • KMK Micro Innovation GS2-90EMD-000 Micro Panel
  • Micro Innovation MC2-430-10TVB-1-10 PanelView Terminal 24VDC
  • Micro Innovation XNE-8DO-24VDC-0.5A-P I/O Module 8550100795
  • MICRO INNOVATION GF1-10TVB-100 Touch Panel
  • MICRO INNOVATION AG WINBLOC CAN-4AI/UI Analog Input Module
  • MICRO INNOVATION AG WINBLOC CAN-32DO/0.5A-P-2x16 Output Module
  • MICRO INNOVATION AG CAN-32DI/P-2X16 8551224182 Input Module
  • MICRO INNOVATION MK2-230/232-57 Circuit Board 85 28 200000
  • MICRO INNOVATION CAN-BRIDGE 8551224177 CAN Bridge
  • Micro Innovation MC2-430-10TVB-1-10 Panel 24VDC
  • MICRO INNOVATION MC2-432-57CQB-1-10 HMI Panel
  • MICRO INNOVATION AG CAN-BRIDGE 85 51 224177 CAN Bridge
  • MICRO INNOVATION CAN-4AI/UI Analog Input Module
  • MICRO INNOVATION CAN-32DI/P-2X16 Input Module
  • SIGMATEK MDD111 09-404-111 Drive Module
  • SIGMATEK DVI021 Display Interface Module
  • SIGMATEK 00-450-024 C-IPC Processor
  • SIGMATEK MDD-111 MDD111 Drive Module
  • SIGMATEK ICA011 20-102-011 Interface Module
  • SIGMATEK 01-250-010-D NC4Kompakt Control Module
  • SIGMATEK CRIF081 12-751-081 Interface Module
  • SIGMATEK S1026-8AF61-R4E-Z57 Drive Module
  • SIGMATEK 9305.081.02 9227.082.00 Control Module
  • Sigma Tek 5000B-36 Attitude Indicator
  • SIGMATEK CEZ201 12-051-201-O Counter Module
  • SIGMATEK DPS001 Power Supply Module
  • SIGMATEK 994 395 01z Via Interface Module
  • SIGMATEK PC411-K 01-310-411-K Industrial PC
  • SIGMATEK 9816.324.00 Demag NC4 Keyboard
  • SIGMATEK ET261 90010C-71 Operator Terminal
  • SIGMATEK DDI 164 05-006-164 Input Module
  • SIGMATEK CCP 082 C-DIAS Processor Module
  • SIGMATEK CEZ201 12-051-201-O PLC Module
  • SIGMATEK MDD 1111 06178867 Drive Module
  • SIGMATEK S1 073-6AC61-RE-Y08-Z Drive Module
  • SIGMATEK MDD 111 Drive Module MDD111
  • SIGMATEK CSDI161 Safety Module 12-891-161
  • SIGMATEK C-IPC Processor 01-450-024
  • SIGMATEK DIAS DAM122 Analog Mixing Module
  • Sigma Tek 5000B-36 Attitude Gyro Indicator
  • SIGMATEK TMS012 Motherboard Module 05-250-012-T
  • SIGMATEK CCP-531 PLC Module
  • SIGMATEK DIAS DNC4 I/O Module 05-250-011
  • SIGMATEK AI088 Analog Input Module
  • SIGMATEK CEZ201 Counter Module
  • SIGMATEK CIC011 Industrial Computer Module
  • SIGMATEK MDM021 Motor Drive Module
  • SIGMATEK DTO163 Digital Output Module
  • SIGMA-TEK 5000B-36 Attitude Gyro
  • SIGMATEK DM161 Digital Input Module
  • SIGMATEK CCP-531 PLC Control Panel
  • SIGMATEK HZS773 Touch Terminal Operator Panel
  • SIGMATEK MDP101 3 KVA 45-65Hz Driver
  • SIGMATEK ETV1251 Touch Panel 12-230-1251
  • SIGMATEK CIO021 Safety Module 12-013-021
  • Sigma Tek 4000H-5 Directional Gyro
  • SIGMATEK TAE531 I/O Module 01-240-531
  • SIGMATEK DAI081 Input Module 05-009-081
  • SIGMATEK DCP640 Drive Control Module
  • SIGMATEK DCP643 Slides Module A6-29
  • SIGMATEK SCP011 Safety Module 20-890-011