
Instruction Set
File Instructions
3-29
file instructions continued...
Instruction
Description
File Search and Compare
FSC
Status Bits:
EN - Enable
DN - Done Bit
ER - Error Bit
IN - Inhibit Bit
FD - Found Bit
When the input conditions go from false-to-true, the processor performs the not-equal-to
comparison on 10 elements per scan for 9 scans (numeric mode) between files B4:0 and B5:0.
The Mode determines whether the processor performs the expression on all elements in the
files (ALL) per program scan, one element in the files (INC) per scan, or a specific number of
elements (number) per scan. The control element R9:0 controls the operation.
When the corresponding source elements are not equal (element B4:4 and B5:4 in this
example), the processor stops the search and sets the found.FD and inhibit.IN bits so your
ladder program can take appropriate action. To continue the search comparison, you must reset
the.IN bit.
To see a list of the available comparisons, see the comparisons listed under the CMP
instruction.
File Copy
COP
When the input conditions are true, the processor copies the contents of the Source file (#N7:0)
into the Destination file (#N12:0). The source remains unchanged. The COP instruction copies
the number of elements from the source as specified by the Length.
FILE SEARCH/COMPARE
Control
R9:0
Length
90
Position
0
Mode
10
Expression
#B4:0 <>#B5:0
FSC
COPY FILE
Source
#N7:0
Destination
#N12:0
Length
5
COP