Example Code

Serial control of Basler A500 cameras

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Machine Vision

    Software

  • LabVIEW

    Driver

  • NI Vision Acquistion Software

Code and Documents

Attachment

Download All

Screenshot-BaslerA504kCommand.vi Front Panel *-1.png

Functional Description

According to the camera compatibility report, Basler cameras like the A504k(c) cannot be fully controlled by MAX, and useful parameters like the exposure time or the frame rate need to be set using the somehow inconvenient utility program CCT+, provided by Basler. However, programmatic control via Labview is perfectly possible, just implementing the specific protocol for binary serial commands over Camera Link, described in the camera manual.

Additional Notes

This VI was developed for an A504k camera, but the binary communication protocol should be the same also for the A501k(c) and A503k(c).

The camera file provided by IMAQ lists a wrong terminator character, so that IMAQ Serial Read.vi is not effective, and IMAQ read bytes.vi has to be used instead: see this forum thread.

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

Comments
TiTou
Trusted Enthusiast
Trusted Enthusiast
on

great utility and nice coding style!!

thanks for sharing 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

nareshsampara
Member
Member
on

Hi

Nice coding.

Is there VI files for Basler acA2040 180km camera, if it so please let me know where can i find them.

Many Thanks

Naresh

Contributors