Skip to content

Vision: barcodes and QR codes ​

Last updated

License feature: Machine Vision

The Barcodes & QR codes tool publishes what codes say, not how many parts there are. It reads Code 128, Code 39, EAN, UPC, QR, DataMatrix, PDF417, Aztec and other common symbologies. If the appliance's barcode component is missing, only QR codes are read.

Tags ​

All under the tool's prefix — a tool with prefix label publishes label/code.

TagHolds
codeThe first code, in reading order (or the one a slot rule picked)
code_2 … code_10The rest, one per tag, up to Codes to publish
codesEvery code read, separated by a vertical bar with a space either side
formatThe symbology of the first code — Code128, QRCode, DataMatrix, EAN13 …
countHow many codes were read (after filters)

Positions with no code read empty rather than disappearing, so a screen or script bound to code_3 does not break on a label with two codes. Codes are ordered top to bottom, then left to right; codes on the same row sort left to right even when their tops differ by a pixel, so code is the same one on every frame.

Settings ​

SettingDefaultRangeWhat it does
Upscale11–4Enlarges the region before reading. Small or low-contrast codes often fail at native size and read at 2
Codes to publish51–10How many code tags the device has. Takes effect on Save
Starts withemptytextIgnore codes that do not start with this. A UPS tracking number always starts 1Z
Ends withemptytextIgnore codes that do not end with this
ContainsemptytextIgnore codes that do not contain this anywhere
Code typeemptytextOnly this symbology, e.g. Code128, QRCode, DataMatrix, EAN13. Often the cleanest way to pick one code
Min length00–64Ignore codes shorter than this. 0 for no limit
Max length00–64Ignore codes longer than this. 0 for no limit

The filters apply to the whole tool before anything is assigned to a tag; they combine (all must pass) and are not case-sensitive. Codes a filter rejects are not counted and do not appear in codes.

Which code goes in which tag ​

Under Which code goes in which tag there is one row per code tag (code, code_2 …), marked any or by rule. Open a row to give it its own Starts with, Ends with, Contains, Code type, Min length and Max length. The × clears a row's rule.

A slot with a rule claims the first code that matches it, wherever it is on the label. Slots without a rule then take whatever is left, in reading order. A code is claimed once.

Example — a shipping label with a tracking number, a part number and a QR code:

SlotRuleResult
codeStarts with 1ZThe tracking number, wherever it is printed
code_2Code type Code128, Min length 8, Max length 8The eight-character part number
code_3anyWhatever is left — here the QR code

Drawing a region round the wanted code does the same job geometrically and decodes faster. Use a region if the code is always in the same place, a rule if it moves.

Pass / fail ​

OptionPasses when
A code must be readAt least one code (after filters) was decoded in the region
A code must containThis text appears in codes — for example LOT-. Case-sensitive, unlike the filters

With both empty and unticked, a judged barcode tool reports as not judged.

See also ​

Scada.Ink Help Center