12.07.2015 Views

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

Logix5000 Controllers General Instructions - SLAC Confluence

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Move/Logical <strong>Instructions</strong> (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT) 301Swap Byte (SWPB)The SWPB instruction rearranges the bytes of a value.Operands:Relay LadderOperand Type Format EnterSourceINT tag tag that contains the bytes that you want to rearrangeDINTREALOrder ModeIf the SourceIs anAnd You Want To Change the Bytes ToThis Pattern (Each Letter Represents aDifferent Byte)Then SelectINT n/a any of the optionsDINTABCD ⇒ DCBA REVERSE (or enter 0)REALABCD ⇒ CDAB WORD (or enter 1)ABCD ⇒ BADC HIGH/LOW (or enter 2)DestinationINTtagtag to store the bytes in the new orderDINTIf the SourceIs anThen the Destination Must Be anREALINTINTDINTDINTDINTREALREALStructured TextSWPB(Source,OrderMode,Dest);The operands are the same as those for the relay ladderSWPB instruction. If you select the HIGH/LOW order mode, enter it asHIGHLOW or HIGH_LOW (without the slash).Publication 1756-RM003I-EN-P - January 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!