Get Started
QR / Barcode
On this page
  1. Commands
  2. Settings
  3. Output Variables
  4. JSON Output

QR / Barcode

Detects and decodes QR codes and several one-dimensional barcode formats in real time.

Commands

CommandDescription
ScanReads one code and writes its data, code type, position, and size. When several codes are detected, one is chosen by Select By.
Scan AllWrites every detected code as a JSON array.
Has Code?Checks whether a code is detected.
Count CodesWrites the number of detected codes.

Settings

SettingDescription
Code TypeDetects only codes of one type. The default All detects every type. The available types are listed below.
Select ByLargest Area (default), Nearest, By Index.
Index (from 0)The position to pick when Select By is By Index. Ordered from the largest area; default 0.
Reference PointSee Common Items.

Output Variables

FieldTypeValue
DetectedDigitalTrue when a code is detected.
DataTextThe decoded string.
Code TypeTextThe code type name reported by the decoder (e.g. QR-Code, EAN-13).
Center X / Center YNumberPixel coordinates of the code's center.
Width (px) / Height (px)NumberSize of the code area.
CountNumberNumber of detected codes.
Output (JSON Text)TextArray of every detected code.

JSON Output

An array with, per code, data, type, the center x and y, width, and height.

[
  { "data": "https://example.com", "type": "QR-Code", "x": 320, "y": 240, "width": 100, "height": 100 },
  { "data": "1234567890123", "type": "EAN-13", "x": 500, "y": 300, "width": 80, "height": 40 }
]
Code Type options

All, QR Code, EAN-8, EAN-13, UPC-A, UPC-E, Code-128, Code-39, Code-93, Codabar, ITF, DataBar, DataBar-Expanded

ITF is Interleaved 2 of 5. DataMatrix and Aztec codes are not supported.