314 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 7 Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
Relay Ladder
Structured Text
index := 0;
SIZE (array[0],0,array_length);
REPEAT
SWPB(array[index],REVERSE,array_bytes_reverse[index]);
index := index + 1;
UNTIL(index >= array_length)END_REPEAT;
Initialize the tags.
Reverse the bytes.
Determine whether the SWPB instruction has acted on all the elements in the array.