Produce a large array – Rockwell Automation Logix5000 Controllers Produced and Consumed Tags Programming Manual User Manual
Page 32

Chapter 2 Produce a Large Array
In addition, the array must contain an extra 122 elements. In other words, it must
be 122 elements greater than the greatest number of elements that you want to
transfer.
•
These elements serve as a buffer.
•
Because each packet contains the same number of elements, the buffer
prevents the controller from copying beyond the boundaries of the array.
•
Without the buffer, this would occur if the last packet contained fewer than
123 elements of actual data.
Follow these steps to produce a large array.
1. In the Controller Tags folder of the controller project that produces the
array, create these tags.
P
Tag Name
Type
array_ack
DINT[2]
X
array_packet
DINT[125]
2. Convert array_ack to a consumed tag.
For
Specify
Controller
Name of the controller that is receiving the packet.
Remote Tag Name
array_ack
Both controllers use the same name for this data.
3. In either the Controller Tags folder or the tags folder of the program that
will contain the logic for the transfer, create these tags.
Tag Name
Type
array
DINT[x] where x equals the number of elements to transfer plus
122 elements
array_offset
DINT
array_size
DINT
array_transfer_time
DINT
array_transfer_time_max
DINT
array_transfer_timer
TIMER
4. In the array_size tag, enter the number of elements of real data.
The value of x from step 3 minus the 122 elements of buffer.
5. Create or open a routine for the logic that creates packets of data.
Produce a large array
32
Rockwell Automation Publication 1756-PM011F-EN-P - October 2014