I want understand into indexed register& SWP Instruction

I assume this is SLC 500, the SWP instruction swaps the bytes of each word Starting at the source and the number of words to swap the bytes. This is often used when communicating so for example a system sends data to a PLC but due to differences how some treat the data the bytes in each word may be reversed Example:
Data coming in: 1234566789qwerty
The PLC sees it as 21436587q9ewtr_y due to the bytes being reversed.
So the SWP instruction is used to correct it by swapping the bytes (low to high & High to low).
I cannot see what drives B3:5/1 but this would normally be a one shot or the data will swap every scan, It is some time since I used RSL and I'm sure someone will correct me if I'm wrong.
Index means the starting position of the address this is a sort of pointer to the address, I think you need to read the manual the link is:
http://www.thelearningpit.com/lp/pdf/1747-rm001c-en-p.pdf
 
SWAP Instruction in may example

Dear friend,

You see my screenshot, when B3:5/1 is to make low to high at time swap instruction is true but here my data is not swapped to each other it look likes same data as i feed.
PLC:ML1400 series-A but sir when I connect with plc is not doing like example program of manual.
 
Last edited:
As per manual i was tested with PLC on below program.
But not any changes using swap instruction. plz help




That program is probably running too fast, swapping the bytes in one scan and then swapping them back in the next, to see any changes while in the [Online] mode in RSLogix or Studio.


The example below catches the swapped version of ST9:2 in ST9:3 for viewing in [Onine] mode in RSLogix; note that it only swaps 5 words (SWP Length=5), so the "lm" byte pair are not swapped.

xxx.png
 
Last edited:

Similar Topics

I have been reading everything I can find on the P_LLS the last 2 days but I am still having trouble understanding how the P_LLS swaps beyond 2...
Replies
9
Views
568
Hello Guys, I have been trying to study a Machine that have Omron 3g3mv VFDs that is controlled by CJ1m CPU and SCU41-V1 communication card. The...
Replies
0
Views
473
On the laser displacement sensor now connected to my PLC, the manual says 4mA=643 and 20mA=64,877. However, I checked with a Fluke, injecting...
Replies
5
Views
885
I'm from a Mitsubishi Q-series background so excuse my ignorance. In Mitsubishi world, in my experience your Mbits (booleans) are just M1, M2...
Replies
20
Views
2,757
Good Evening , I purchased an Avery Weigh-Tronix - ZM301-SD1 to weigh a tote. The loadcell is a FLS -250. Below is the color code and...
Replies
5
Views
1,269
Back
Top Bottom