I'm having some trouble working with some string files. I have a Keyence barcode scanner that I'm connecting to via E/IP. When I scan something, it dumps the read value into a series of elements starting at SR:I.Data[11] tag and going to about SR:I.Data[25], depending on the length of the code I am reading. The tags are DINT, but the code is actually ASCII characters. I use a COP instruction to copy the DINT values into a string tag to get the values in a string as ascii characters, and then I can search for specific items within the code using FIND and pull out sections of the code using MID. For some reason, I can't get it to work. If I open my string tag after executing the COP and look at the .data I can see my values in order minus the first element. It is setting the string .LEN as the entire first element. The first two characters in SR:I.Data[11] are "82", and I assume should be the length of the string. When it sets the length of the string to the whole first element, which is "825372725", this value is way too long and makes the string not work. Any idea what's going on?
Last edited: