Hello
Sorry if this is not a really smart question but how do you use the SWP (swap )instruction in a Micrologix 1100 processor?
I have got a dmx-512 to modbus rtu gateway that communicates with the micro via channel 0. The gateway sends 2 x bytes which are combined in a word , then I need to split the word in the Micro. I have tried using the SWP instruction in an unconditional logic rung followed by another rung with a MVM instruction but it looks like the 2 bytes in the word don 't get swapped, ie: nothing is happening to the word. Am I doing something wrong? How do you use the instruction? From the reference manual it looks like all I need to do is enter the address of the integer and the length ( number of registers to be swapped ).
Any help would be greatly appreciated.
Dan
Sorry if this is not a really smart question but how do you use the SWP (swap )instruction in a Micrologix 1100 processor?
I have got a dmx-512 to modbus rtu gateway that communicates with the micro via channel 0. The gateway sends 2 x bytes which are combined in a word , then I need to split the word in the Micro. I have tried using the SWP instruction in an unconditional logic rung followed by another rung with a MVM instruction but it looks like the 2 bytes in the word don 't get swapped, ie: nothing is happening to the word. Am I doing something wrong? How do you use the instruction? From the reference manual it looks like all I need to do is enter the address of the integer and the length ( number of registers to be swapped ).
Any help would be greatly appreciated.
Dan