使用搜索功能查看 Kepware 的信息库,其中包含 500 多篇知识库文章。缩小搜索结果范围,或在下面的搜索字段中输入您的查询。

或者,如果您无法找到解决方案,我们还有另一个资源:我们的 PTC eSupport Portal。 如果系统提示您登录 eSupport Portal,您可以使用“我的 Kepware”凭据。需要一个“我的 Kepware”帐户吗?在此处创建

搜索解决方案结果:
View All Solutions

Kepware Knowledge Base: Solution


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


Last Update: 2018/11/12

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".

737884255256257258259910111213141516

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".

737884255
256257258259
9101112
13141516

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.