Structured Text - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 7
Move/Logical Instructions (MOV, MVM, BTD, MVMT, BTDT, CLR, SWPB, AND, OR, XOR, NOT, BAND, BOR, BXOR, BNOT)
SWPB(Source,OrderMode,Dest);
Description:
bar code reader
B A
42969
A B
Arithmetic Status Flags:
Fault Conditions:
Condition
Prescan
Rung-condition-in is false
Rung-condition-in is true
EnableIn is set
Instruction execution
Postscan
312

Structured Text

The operands are the same as those for the relay ladder SWPB instruction. If you select
the HIGH/LOW order mode, enter it as HIGHLOW or HIGH_LOW (without the
slash).
The SWPB instruction rearranges the order of the bytes of the Source. It places the result
in the Destination.
When you read or write ASCII characters, you typically do not need to swap characters.
The ASCII read and write instructions (ARD, ARL, AWA, AWT) automatically swap
characters, as shown below.
Not affected
None
Execution:
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
The rung-condition-out is set to true.
N/A
The instruction rearranges the specified bytes.
The rung-condition-out is set to false.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Tag Name
bar_code[0]
42968
Structured Text Action
No action taken
N/A
N/A
EnableIn is always set.
The instruction executes.
The instruction rearranges the specified bytes.
No action taken.
Value
Style
Type
AB
ASCII
INT

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents