100BBasic instructions
7.6 Move
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
199
7.6.3
Fill instructions
Table 7- 68 FILL_BLK and UFILL_BLK instructions
LAD / FBD
SCL
Description
out := FILL_BLK(
in:=_variant_in,
count:=int,
out=>_variant_out);
Interruptible fill instruction: Fills an address range with copies of a
specified data element
out := UFILL_BLK(
in:=_variant_in,
count:=int
out=>_variant_out);
Uninterruptible fill instruction: Fills an address range with copies of a
specified data element
Table 7- 69 Data types for parameters
Parameter
Data type
Description
IN
SInt, Int, DIntT, USInt, UInt, UDInt, Real, LReal, Byte, Word,
DWord
Data source address
COUNT
USInt, UInt
Number of data elements to copy
OUT
SInt, Int, DIntT, USInt, UInt, UDInt, Real, LReal, Byte, Word,
DWord
Data destination address
Note
Rules for data fill operations
To fill with the BOOL data type, use SET_BF, RESET_BF, R, S, or output coil (LAD)
To fill with a single elementary data type, use MOVE
To fill an array with an elementary data type, use FILL_BLK or UFILL_BLK
To fill a single character in a string, use MOVE
The FILL_BLK and UFILL_BLK instructions cannot be used to fill arrays in the I, Q, or M
memory areas.
The FILL_BLK and UFILL_BLK instructions copy the source data element IN to the
destination where the initial address is specified by the parameter OUT. The copy process
repeats and a block of adjacent addresses is filled until the number of copies is equal to the
COUNT parameter.
FILL_BLK and UFILL_BLK instructions differ in how interrupts are handled:
●
Interrupt events are queued and processed during FILL_BLK execution. Use the
FILL_BLK instruction when the data at the move destination address is not used within an
interrupt OB subprogram or, if used, the destination data does not have to be consistent.
●
Interrupt events are queued but not processed until UFILL_BLK execution is complete.
Use the UFILL_BLK instruction when the move operation must be completed and the
destination data consistent, before the execution of an interrupt OB subprogram.