Example Code

Read Cognex DM200 barcodes

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

  • Instrument Control

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to open a connection to a Cognex DM200 scanner, initiate a read request and wait for the read data string.

 

Description

This example shows a way to use a Cognex DM200 scanner with LabVIEW. It is very basic and use only the commands Trigger ON and Off.
This example uses the LabVIEW Internet Toolkit to communicate with the scanner over Telnet. The Internet Toolkit is deprecated as of LabVIEW 2012 and is no longer shipped. You must replace the Telnet VIs with pure TCP/IP VIs if you want to use this example with the latest version of LabVIEW.

LabVIEW Internet Toolkit Deprecated - National Instruments

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • LabVIEW Internet Toolkit 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • Cognex DM200 scanner

 

Steps to Implement or Execute Code

  1. Download and open the attached VI
  2. Run the program

 

Additional Information or References

Read Barcode From Cognex DM200 Scanner - Front Panel.png
Read Barcode From Cognex DM200 Scanner - Block Diagram.png

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

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

Comments
Reibungszauber
Member
Member
on

Hi,

please can you convert this to an older Version 8.6 or give a print/ picture of the block diagram?

Thanks a lot and best regards

George

Brooks.Nelson
Member
Member
on

Is there a way I could get the internet toolkit with the telnet, so I can load this vi?  I downloaded 2012 but the toolkit was not there.