Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home

VHV5 - String Matching

Macthing Barcode Content to a Known String

Written by Christopher Free

Updated at March 31st, 2026

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Products
    Automation Systems Control Components Motion & Drives Quality control & Inspection Robotics Safety Sensing Services Software Switching Components
  • Amplify e-Store
    e-Store public
  • Public CSC
+ More

Some applications may require to not only read the barcode data, but to confirm that the information is correct. For example, to check if the product presented has had the correct label applied to it. 

This article will outline how to set this up on the VHV5 code reader.

Procedure:

  1. Connect to the Reader
  2. Select the Barcode tool that you want to match
  1. On the right hand side, locate the “Match String” window and click on the “Disabled” text option
  1. Inside this window enable the matching capability and then click plus to add a new match string
  1. From this window, select the comparison method that is required, in this case “Equals”. This will confirm the entire string against the input to verify. From here you can also select some output formatting for an instance of matching and mismatching barcodes. 

 

  1. Select the “+” symbol on the right and type in your text string and hit Enter. 
  1. Click “OK” and you are finished the setup.

 

Noteworthy

When setting this up it can sometimes be challenging to get the string correct, be mindful to include any spaces before and after the string. If this is not included, then it will look to be falsely rejecting, however this is usually a leading or training space “<SP>” character that is missing. 

The easiest way to troubleshoot this for example is to change the condition to “Starts With”, if this fails and the data is correct, try adding a space to beginning of the string and see if the result changes. The same method can be repeated using the “Ends With” Comparison. 

 

 

search pattern

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Understanding Scrambled Strings Between CJ and Sysmac Series PLCs
  • Using CIP to Read/Write Network Variables with NJ/NX
  • Protocol Macro Modbus

Definition by Author

0
0
Expand