Chapter 2
Produce a Large Array
42
Rockwell Automation Publication 1756-PM011J-EN-P - February 2018
When the offset value in array_ack[0] is equal to the current offset value, the consumer has copied the packet to the array; so
the rung checks for more data to transfer. If the offset value plus 123 is less than the size of the array, there is more data to
transfer; so the rung increases the offset by 123. Otherwise, there is no more data to transfer; so the rung resets the offset
value, logs the transfer time, and resets the timer. In either case, the rung uses the new offset value to create a new packet of
data, appends the new offset value to the packet, and clears the acknowledge element of the packet (packet[124]).
If the current transfer time is greater than the maximum transfer time, update the maximum transfer time. This maintains a
record of the longest time to transfer data.