Quantcast
Channel: Allen Bradley / Rockwell Automation Latest Topics
Viewing all articles
Browse latest Browse all 3755

Need some help with data comparison

$
0
0

I'm working on integrating a Keyence CV-X400 vision system controller in with our PLC, an Allen Bradley 1756-L62. I have the camera controller set up to recognize a character string and pass this information along to the PLC where I will make a comparison to verify that the data in the string is correct. The string is in the format of "XXX-Y-XXXX" most of the time but occasionally it is in the format "XXX-YY-XXXX" the "Y" characters are the only ones I care about for the sake of comparison as those are the only ones that change from day to day via manual user input.

Attached is a screen cap of what I have right now, which works for the first format (The 56 currently stored in the tag represents an 8 in ASCII) but I don't know how I should go about programming for the second format. Basically what I'm doing right now is passing the entire string to the PLC, and then using a NEQ instruction on the 5th character over. This won't work when using the "YY" because in those cases I'll need to compare the 5th and 6th character.

The CV-X by default send the characters individually though I can set it up to send 4 at a time. I'm not sure if that would help here though.

Capture.PNG


Viewing all articles
Browse latest Browse all 3755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>