Saudi Flag
Saudi Arabia
Jeddah, Al Misk
+966503526802

Electric Technology

Office: 03-4248224

Factory : 03-4627027

Cairo Office :02-22678967

Reading QR Codes with SIMATIC MV320 & S7-1500 via RS232

Reading QR Codes with SIMATIC MV320 & S7-1500 via RS232

Modern production systems require machine-readable identification to track products and materials across the entire manufacturing process, enabling full traceability and production transparency.

The solution demonstrates how coded product information can be captured at receiving or production stations and transmitted directly to the PLC automation system.

Application Objective

The goal is to:

  • Demonstrate serial communication using a CM PtP RS232 module, reading QR codes with the Simat…
  • Read QR/Data Matrix codes using the MV320 handheld scanner
  • Transfer scanned data to the S7-1500 PLC
  • Enable identification, tracking, and documentation of parts in production

System Architecture

The system consists of:

  • SIMATIC S7-1500 CPU
  • CM PtP RS232 communication module
  • SIMATIC MV320 handheld reader
  • Engineering station with STEP 7 (TIA Portal)

Communication between the scanner and PLC is established through a point-to-point RS232 interface.

Communication Concept – Freeport Protocol

Data transmission is handled using the Freeport (ASCII) protocol, a programmable telegram-based method for serial communication between the PLC and external devices.

This protocol allows configuration of parameters such as baud rate, parity, data bits, and telegram structure to match the scanner communication settings.

PLC Program Structure

The STEP 7 project includes:

  • A global data block used to store received codes and connection parameters
  • A dedicated function block PtPFreeport for configuring the RS232 interface and receiving scan data

The function block initialises communication, resets buffers, receives telegrams, and interprets the scanned code in a sequenced workflow.

Operation Workflow

During operation:

  • The PLC receives and stores the code inside a data block for further processing or tracking.
  • The handheld reader scans a QR/Data Matrix code.
  • Data is transmitted via RS232 to the communication module.

Engineering & Commissioning

Configuration includes:

  • Downloading the STEP 7 project and establishing communication between devices
  • Setting Freeport protocol parameters in the CM PtP module
  • Matching scanner transmission settings (baud rate, data format, etc.)

Key Benefits

  • Enables product traceability and identification in production lines
  • Demonstrates integration of serial devices with modern PLC systems
  • Provides reusable communication code for similar applications
  • Bridges field data acquisition with automation control
  • Ideal for logistics, manufacturing, and quality tracking

Typical Use Cases

This solution is suitable for:

  • Industrial identification and data acquisition projects
  • Warehouse receiving and goods registration
  • Production traceability systems
  • Barcode/QR validation in assembly lines
  • Quality and batch tracking applications

Download Section

Download Full Application Example (PDF)

Verified by MonsterInsights