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.