Thursday, November 9, 2017

Camera Link Camera Configuration over Frame Grabber Camera Link Serial Port


Camera Configuration within Camera Link is based on a simple asynchronous serial reading and writing of configuration data. Within the Camera Link standard specification, a serial communication interface is defined. This standardized serial interface is available on the frame grabber. It enables the interaction of a vendor specific camera configuration tool and the frame grabber specific implementation of the serial communication functionality.

In simple words: Any Camera Link compliant camera configuration software runs in combination with any Camera Link frame grabber. In this project we use Bitflow Karbon-CL Frame Grabber.


CLComm - An interface to the Camera Link serial port library.
This wraps both the standard CLAllSerial.h interface, and the BFSerial.h library, which provides various useful extensions to the core library.

To access Camera Link Serial Port cameras require a DLL file, which is supplied by the frame grabber manufacturer, to be installed on the PC. To verify this, use the PC’s registry editor (regedit) to confirm the following setting:

HKEY_LOCAL_MACHINE->SOFTWARE-> “CLSERIALPATH”.



Then, check the folder specified in the “Data” field of “CLSERIALPATH”, and verify that the folder contains a “clser***.dll” file.
Note: the file name of the DLL file is clser***.dll. “***” is up to the frame grabber  manufacturer. If the DLL file does not exist there, place the DLL file into the folder. The DLL file is supplied by the frame grabber manufacturer.


In order to use CLComm Component in the project, first add a reference to it, make sure to place the file "CLAllSerial.NET.dll" into your working directory, and set the target framework to ".NET Framework 4.5". The component "CLAllSerial.NET.dll" has compiled using ".NET Framework 4.5" so the target project must also use ".NET Framework 4.5".



Add a "CLAllSerial.NET.dll" reference to the target project, right click the project, choose "Add References" then from the "Projects" tab, choose "CLAllSerial.NET.dll" from your working directory.



If you got this error message while debugging : " Could not load file or assembly 'ManagedBid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92d16d74ab2a6c4b' or one of its dependencies. An attempt was made to load a program with an incorrect format. " , check your "target framework" setting on your property, change to ".NET Framework 4.5".


To list available port using ComboBox DropDown list:




To list available baudrate ComboBox DropDown list:




Initialize the port:

Serial Receive Thread Function:

Close the Port for reading thread:

No comments:

Post a Comment