Use the search and browse feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Search Solutions Results By: View All Solutions

Kepware Knowledge Base: Solution

How Are Arrays Handled in the Allen-Bradley ControlLogix Ethernet Driver?

Last Update: 11/12/2018

Because ControlLogix devices handle arrays differently than other PLCs, Kepware's Allen-Bradley ControlLogix Ethernet Driver handles arrays differently than other drivers.

  1. It supports 3 dimensional arrays, whereas standard drivers only support 2 dimensions.
  2. Individual elements of an array can be addressed directly.
  3. Sub-arrays of data within the array can be addressed using offsets.

When addressing an element in an array or specifying an offset, the indexing/ordering of the data is 0-based. The number of elements to be displayed in an array reference are 1-based. When addressing elements or subsets in an array, the elements are referenced using square brackets and a range or sub-array of data is referenced using braces. There are two types of arrays: single-dimension arrays and multi-dimension arrays.

Single-Dimension Arrays
A 1x16 array example is shown below. The tag name is "IArray".


Example single-dimension array references are as follows:

  • IArray [5] = 257. This is the fifth element in the array.
  • IArray {5} = [73, 78, 84, 255, 256]. This is the first five elements in the array.
  • IArray [10] {3} = [11, 12, 13]. This is an array of 3 elements starting at the tenth element.

Multi-Dimension Arrays
A 4x4 array example is shown below. The first row is 0 and the first column is 0. The tag name is "IArray".


Example multi-dimension array references are as follows:

  • IArray [1,3] = 259. This is the last element in the second row of the array.
  • IArray {4} = [73, 72, 84, 255]. This is an array of four elements with no offset.
  • IArray [2, 0] {2} = [9, 10]. This is an array of two elements starting at an offset of the first element in the third row.