Chapter 8
Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)
File Fill (FLL)
376
The FLL instruction fills elements of an array with the Source value. The Source
remains unchanged.
Operands:
Relay Ladder
Operand
Source
Destination
Length
Structured Text
Structured text does not have an FLL instruction, but you can achieve the same
results by using a SIZE instruction and a FOR...DO or other loop construct.
SIZE(destination,0,length);
FOR position = 0 TO length-1 DO
destination[position] := source;
END_FOR;
See
Structured Text Programming
within structured text.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Type
Format:
SINT
Immediate
INT
Tag
DINT
REAL
SINT
Tag
INT
DINT
REAL
structure
DINT
Immediate
for information on the syntax of constructs
Description
Element to copy.
Important: the Source and Destination operands
should be the same data type, or unexpected
results may occur.
Initial element to be overwritten by the Source
Important: the Source and Destination operands
should be the same data type, or unexpected
results may occur
The preferred way to initialize a structure is to use
the COP instruction.
Number of elements to fill.