← Strings and Text

Check the Label

medium

Compares a printed label with the expected text and reports why they differ.

What it teaches

Two STRINGs are equal only when they have the same length and the same characters, and upper and lower case count as different, so 'lot-4471-b' does not match 'LOT-4471-B'. When two codes look the same and do not match, compare their lengths first: 'LOT-4471-B$r' is 11 characters, not 10, because of a hidden $r from Strip the Terminator. A difference only in case is its own reason, apart from any other difference, so 'lot-4471-c' counts as a different character. The inputs stay as they are.

Parameters

TagDirectionTypeDefaultDescription
Sts_MatchOutputBOOL0The label is exactly the expected text
Out_ReasonOutputDINT00 match, 1 length differs, 2 case only, 3 other text
Ref_LabelInOutSTRING—The text read from the printed label
Ref_ExpectedInOutSTRING—The text the label should have

Required behavior