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...
364 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 8 Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)
Example 1: Search for a match between two arrays. When enabled, the FSC instruction
compares each of the first 10 elements in array_1 to the corresponding elements
in array_2.
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000001111111111111111
11111111111111111111111111111111
11111111111111111111111111111111
11111111111111111111111111111111
11111111111111111111111111111111
11111111111111111111111111111111
00000000000000000000000000000000 0
00000000000000000000000000000000 1
00000000000000000000000000000000 2
00000000000000000000000000000000 3
11111111111111110000000000000000 4
11111111111111111111111111111111 5
11111111111111111111111111111111 6
11111111111111111111111111111111 7
11111111111111111111111111111111 8
11111111111111111111111111111111 9
Array_1 Array_2
The FSC instruction finds that these elements are
not equal. The instruction sets the .FD and .IN bits.
The .POS value (4) indicates the position of the
elements that are not equal. To continue
comparing the rest of the array, clear the .IN bit.
Control_3.pos

Table of Contents

Other manuals for Allen-Bradley Logix5000

Related product manuals