Example Code

Simple Example for Sending Serial Commands to Camera Link Camera

Code and Documents

Attachment

Overview

 

 Use this example to send serial commands to a Camera Link camera and read back the response.

 

Description

 

All Camera Link cameras use an RS-232 port for configuring settings. This port does not enumerate as a normal COM port in your computer, but you can use IMAQ Serial Write.vi and IMAQ Serial Read.vi to send commands to your camera that is connected to an NI Camera Link frame grabber. This example performs a simple write and read allowing you to communicate with your camera in order to set attributes that are not available in NI MAX.

 

Hardware and Software Requirements

 

LabVIEW 2014 or later

NI-IMAQ 15.0 or later (included in Vision Acquisition Software)

NI Camera Link frame grabber

Camera Link camera

 

Steps to Implement or Execute Code

 

  1. Download and open CL Serial WriteRead - LV2014.vi.
  2. Ensure that your camera is recognized and configured in NI MAX with the correct serial settings.
  3. Enter the Interface Name as it is configured for your camera in NI MAX.
  4. Enter the serial command that you want to send and the termination character(s) required by your camera.
  5. Click Write to send the command and read the response from the camera.

Additional Information or References

 

Front Panel:

2017-12-20 15_31_00-CL Serial WriteRead - LV2014.vi Block Diagram.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors