376 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 8 Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)
File Fill (FLL)
The FLL instruction fills elements of an array with the Source value. The Source
remains unchanged.
Operands:
Relay Ladder
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
for information on the syntax of constructs
within structured text.
Operand Type Format: Description
Source SINT
INT
DINT
REAL
Immediate
Tag
Element to copy.
Important: the Source and Destination operands
should be the same data type, or unexpected
results may occur.
Destination SINT
INT
DINT
REAL
structure
Tag 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.
Length DINT Immediate Number of elements to fill.