Download 1775-6.4.1, PLC-3 Family Programmable Controller, Programming

Transcript
Chapter 8
Using Data-manipulation Instructions with Files
8.3.4
Search Less Than or Equal
(SLE)
Required Parameters: Sources (A and B) addresses, counter number,
starting word number (POS), length of file (LEN), mode of operation.
Description: When a rung containing a search-less-than-or-equal
instruction goes from false to true, the processor executes a
less-than-or-equal-to comparison operation between the file words
specified as the source. The number of words compared per program scan
is determined by the selected mode of operation.
When the processor finds that a value within the source (A) file is less than
or equal to the corresponding value within the source (B) file, it sets the
found and done bits. To continue the search-less-than-or-equal-to
comparison, you must unlatch the done bit.
Example: Figure 8.12 shows a rung containing a search-less-than-or-equal
instruction.
If the rung goes from false to true, the processor executes a
less-than–or-equal-to operation between the source files (input file 10
starting at word 10 and decimal file 3 starting at word 4). In this search
less-than-or-equal instruction:
This parameter
Tells the processor
counter (C8)
what counter controls data-transfer operation
file position (POS=0)
to start at the first word in the files (word 10 in integer file 10 and
word 4 in decimal file 3)
file length (LEN=71)
to compare 71 words
mode (5/SCAN)
to execute the file operation on five words per program scan
8-21