QR / Barcode
Detects and decodes QR codes and several one-dimensional barcode formats in real time.
Commands
| Command | Description |
|---|---|
| Scan | Reads one code and writes its data, code type, position, and size. When several codes are detected, one is chosen by Select By. |
| Scan All | Writes every detected code as a JSON array. |
| Has Code? | Checks whether a code is detected. |
| Count Codes | Writes the number of detected codes. |
Settings
| Setting | Description |
|---|---|
| Code Type | Detects only codes of one type. The default All detects every type. The available types are listed below. |
| Select By | Largest 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 Point | See Common Items. |
Output Variables
| Field | Type | Value |
|---|---|---|
| Detected | Digital | True when a code is detected. |
| Data | Text | The decoded string. |
| Code Type | Text | The code type name reported by the decoder (e.g. QR-Code, EAN-13). |
| Center X / Center Y | Number | Pixel coordinates of the code's center. |
| Width (px) / Height (px) | Number | Size of the code area. |
| Count | Number | Number of detected codes. |
| Output (JSON Text) | Text | Array 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.