From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Overlay Barcode Reading on Center of Barcode in VBAI

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This example demonstrates how to overlay the reading of a barcode on top of the center of the barcode in Vision Builder for Automated Inspection 2009.

Description

Vision Builder for Automated Inspection allows you to load inspect and process images in a configuration based invorment.

Requirements

Vision Builder for Automated Inspection 2009 "or compatible"

Steps to Complete

This example involves the following steps:

1) Read the barcode

2) Locate the center of the barcode

3) Write the position values of the center to variables

4) Read these variables in the overlay step to overlay the readings on the center of the barcode

Additional Information or References

Need VBAI 2009 to run this example. Attached is a sample barcode to read. For different barcodes, the setting for the 'Read Data Matrix Code' may have to be changed.
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

Vivek Nath
National Instruments
Applications Engineer

Machine Vision

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

Comments
micagordon
Member
Member
on

Thanks for sharing, but does this bar code scanner can scan both linear and 2d bar code and read bar code from .net project?

Contributors