Fill array FILL
Writes Value into Count elements of an array line.
How it works
While the rung is true, writes Value into Count elements of the Destination array, starting at Dest start. Value has the array's type. A Count of 0 writes nothing. A negative Count, or a range past the end of the array, is a fault and writes nothing at all.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| Value | BOOL, DINT, REAL or a number | Reads |
| Dest | Array of BOOL, DINT, REAL | Writes |
| Dest start | DINT or a number | Reads |
| Count | DINT or a number | Reads |
Common mistakes
- Counting the last element as SizeElements count from 0, so an array of 10 has 0 to 9. Start 5 with Count 5 fills 5 to 9; Count 6 is a fault.