I ran into a situation where some devices I use display String bytes in a swapped order as they are stored in my PLC (CompactLogix). I thought it would be an easy fix, since I've heard about Swap Byte instruction, but never used it. Turns out the Swap Byte instruction wouldn't work nicely (if at all) with Strings.
So I ended up making a short AOI to that I could input any length string and it would output a result with each byte pair swapped. Wasn't hard, and good practice in indexing and AOI usage. But I was just curious if there was already an instruction that existed that would have done that for me?
So I ended up making a short AOI to that I could input any length string and it would output a result with each byte pair swapped. Wasn't hard, and good practice in indexing and AOI usage. But I was just curious if there was already an instruction that existed that would have done that for me?