EasyManuals Logo
Home>Allen-Bradley>Controller>SLC 500 Series

Allen-Bradley SLC 500 Series User Manual

Allen-Bradley SLC 500 Series
694 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #90 background imageLoading...
Page #90 background image
Publication 1747-RM001G-EN-P - November 2008
4-28 Math Instructions
Swap (SWP)
Use this instruction to swap the low and high bytes of a specified number of
words in a bit, integer, ASCII, or string file. Use this instruction with SLC 5/03
(OS302), SLC 5/04 (OS401), and SLC 5/05 processors.
Entering Parameters
Enter the following parameters when programming this instruction.
• Source can only be an indexed word address
• Length refers to the number of words to be swapped, regardless of the
file type. The address is limited to integer constants. For bit, integer, and
ASCII file types, the length range is 1 to 128. For the string file type, the
length range is 1 to 41. Note that this instruction is restricted to a single
string element and cannot cross a string element boundary.
The following example shows how the SWP instruction works.
Before:
ST10:1 = abcdefghijklmnopqrstuvwxyz
After
ST10:1 = badcfehgjilknmporqtsvuxwzy
SWP
Swap
Source #ST10:1.DATA[0]
Length 5
SWP
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••
SWAP
Source #ST10:1.1
Length 13
SWP

Table of Contents

Other manuals for Allen-Bradley SLC 500 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley SLC 500 Series and is the answer not in the manual?

Allen-Bradley SLC 500 Series Specifications

General IconGeneral
BrandAllen-Bradley
ModelSLC 500 Series
CategoryController
LanguageEnglish

Related product manuals