Rockwell Automation Publication 1756-PM004D-EN-P - September 2012 35
Organizing Tags Chapter 2
Create an Array
Logix5000 controllers also let you use arrays to organize data.
A subscript (s) identifies each individual element within the array. A subscript
starts at 0 and extends to the number of elements minus 1 (zero based).
The following example compares a structure to an array.
Term Definition
Array A tag that contains a block of multiple pieces of data.
·An array is similar to a file.
·Within an array, each individual piece of data is called an element.
·Each element uses the same data type.
·An array tag occupies a contiguous block of memory in the controller, each element in sequence.
·You can use array and sequencer instructions to manipulate or index through the elements of an array.
·You organize the data into a block of one, two, or three dimensions.
42367
To expand an array and display its
elements, click the + sign.
To collapse an array and hide
its elements, click the – sign.
This array contains six
elements of the DINT data
type.
Six DINTs
Elements of
Timer_Presets
This is a tag that uses the Timer structure (data type).
Tag Name Data Type
Timer_1 TIMER
Timer_1.PRE DINT
Timer_1.ACC DINT
Timer_1.EN BOOL
Timer_1.TT BOOL
Timer_1.DN BOOL
This is a tag that uses an array of the Timer data type.
Tag Name Data Type
Timers TIMER[3]
Timer[0] TIMER
Timer[1] TIMER
Timer[2] TIMER