EasyManua.ls Logo

Allen-Bradley Logix5000

Allen-Bradley Logix5000
708 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
Loading...
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 365
Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE) Chapter 8
Example 2: Search for a match in an array. When enabled, the FSC instruction compares the
MySearchKey to 10 elements in array_1.
Example 3: Search for a string in an array of strings. When enabled, the FSC instruction
compares the characters in code to 10 elements in code_table.
00000000000000000000000000000000 0
00000000000000000000000000000000 1
00000000000000000000000000000000 2
00000000000000000000000000000000 3
11111111111111110000000000000000 4
11111111111111111111111111111111 5
11111111111111111111111111111111 6
11111111111111111111111111111111 7
11111111111111111111111111111111 8
11111111111111111111111111111111 9
MySearchKey Reference
The FSC instruction finds that this array element
equals MySearchKey. The instruction sets the .FD
and .IN bits. The .POS (4) value indicates the
position of the equal element. To continue
comparing the rest of the array, clear the .IN bit.
Control_3.pos
11111111111111110000000000000000

Table of Contents

Other manuals for Allen-Bradley Logix5000

Related product manuals