Jump to content

Compare ASCII String to a number of characters


JotaPey

Recommended Posts

I am working on a project that requires an operator to enter a field (on the HMI Screen) by scanning a bar code.  I want to be able to confirm that the scanned field has a specific number of characters.  

The field is linked to a tag that is an ASCII string.  It will be an alphanumeric string 25 characters long, and I want to confirm that the scan in fact inputs all 25 characters.  

Any thoughts on how to do that would be much appreciated!

Link to comment
Share on other sites

13 hours ago, Joe Tauser said:

Have you tried the String Length function (in the strings menu)?

image.png.d3da079e685d86633122d9348773c8f1.png

Joe T.

Thanks for the reply Joe Tauser, that looks like exactly what I was looking for! (Not sure how I overlooked it...)

I'm not sure what to put in the B field, if I want to confirm that the Source String is 10 characters, what would I put in the "Length Result" (B field)?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.