S7 Instruction for RSLogix FFL

Description
The FLL instruction is an output instruction that fills the words of a file with a source value. The source remains unchanged. The FLL instructions do not use status bits. If you need an enable bit, program a parallel output that uses a storage address.

The FLL instruction does not write over file boundaries. Any overflow data is lost. Also, no data conversion occurs if the source and destination files are different types; use the same file type for each.

The destination file type determines the number of words per element that the instruction transfers. For example, if the destination file type is counter and the source file type is integer, three integer words are transferred for each element in the counter-type file.

Entering Parameters
To program the FLL instruction, you must provide the processor with the following:

Source

The address of the source word or a program constant. The source remains unchanged.

Dest

The address of the destination file. The instruction writes over any data already stored at the destination.

Length

The number of the words/structures to fill in the destination file.

Operation
Elements are copied from the specified source file into the specified destination file every scan that the rung is true. They are copied (in ascending order with no transformation of data) up to the specified number or until the last element of the destination file is reached, whichever occurs first. Be sure that you accurately specify the starting address and length of the data block you are copying. The instruction will not write over a file boundary (such as between files N16 and N17) at the destination. The overflow would be lost. However, the instruction will read over a file boundary (such as between N16 and N17) at the source. Be especially careful if the number of words per element of the source and destination files is different.

Note: When using SoftLogix 5, this instruction supports the Long-integer data table type. Example: L10:0

You can perform file shifts by specifying a source element address one or more elements greater than the destination element address within the same file. This shifts data to lower element addresses. You can use this technique to store data of assembly line events instead of using FIFO load/unload instructions.
 
You're probably looking for Fill (shich is also numbered SFC21 in Simatic Manager), or possibly Fill_BlK if you are using the 1200 or 1500.
 
Last edited:
I second the SFC21. But remember that if your source is smaller than your destination, the destination is filled up multiple times until it is full.

Conditions for source and destination field

The source and destination field must not overlap.
If the preassigned destination field is not a whole multiple of the length of the input parameter BVAL, the destination field will nevertheless be written to up to the last byte.
If the specified destination field is smaller than the source field, only the amount of data that can be entered in the destination field will be copied.
If the real existing destination or source field is smaller than the size of the memory area for source or destination field as set in the parameters (BVAL, BLK), the behavior depends on the CPU type:

· S7-300 CPUs: No data is transferred. RET_VAL has the value W#16#837F.

· The following applies to the S7-400 V4 CPUs (standard CPUs V4, H-CPUs V4 and V4.5): No data is transferred.
The following applies to all other S7-400 CPUs: Data is transferred.
With all S7-400 CPUs, an error is shown in RET_VAL with the error code W#16#8122 or W#16#8323. Make sure that you always evaluate these RET_VALs in your user program.

If the ANY pointer (source or destination) is of the type BOOL, the specified length must be divisible by 8 otherwise the SFC will not execute.

If the destination field is of the data type STRING, SFC21 "FILL" writes the entire string including the management information.
SFC20 would give an error if your source is larger than your destination.
 

Similar Topics

I'm trying to fix a mess of code on an older machine that's running a Micrologix 1400 and an RS232 ASCII barcode scanner. The previous guy had...
Replies
3
Views
312
Hey guys, thanks for taking the time to look into my question. I'm building a system to monitor several other systems for faults and one of the...
Replies
17
Views
4,609
I"m trying to average an array of DINT's called FIFO_ARRAY. It has 1000 elements in it. Here is what I have entered into the AVE instruction...
Replies
11
Views
4,646
Hello Please Help, I want to use a FSC instruction that will scan 20 DINT arrays. If the arrays are greater than 1000 display the value. How do I...
Replies
4
Views
1,708
Hi There, When i did FRD instruction in SLC 500 its working, when i try to simulate in RSLogix 5000 same way as i did in SLC 500 which is not...
Replies
14
Views
2,657
Back
Top Bottom