X hits on this document

486 views

0 shares

4 downloads

0 comments

59 / 133

59

Allen-Bradley ControlLogix Ethernet Driver Help

when designing UDTs to avoid this possibility if LEN is not intended to be the length of DATA.

l

If a UDT exists that has a DATA member referenced as a STRING but does not have a LEN member, the write to LEN will fail silently without consequence to DATA.

Example MYSTRING.DATA/82 holds the value "Hello World." MYSTRING.LEN holds 11. If the value "Alarm Triggered" is written to MYSTRING.DATA/82, 15 will be written to MYSTRING.LEN. If the write to MYSTRING.LEN fails, MYSTRING.LEN will hold its previous value of 11 while MYSTRING.DATA/82 displays the first 11 characters ("Alarm Trigg"). If the write to MYSTRING.DATA/82 fails, neither tag is affected.

Automatically Read String Length

In the Logical Addressing modes, reading STRING.DATA will cause an automatic read of STRING.LEN in Symbolic Mode. This may be bypassed by unchecking the "Automatically Read String length" option. For more information, refer to Logix Options.

Ordering of Logix Array Data

1. Dimensional Arrays - array [dim1] 1 dimensional array data is passed to and from the controller in ascending order. for (dim1 = 0; dim1 < dim1_max; dim1++)

Example: 3 element array array [0] array [1] array [2]

2. Dimensional Arrays - array [dim1, dim2] 2 dimensional array data is passed to and from the controller in ascending order. for (dim1 = 0; dim1 < dim1_max; dim1++) for (dim2 = 0; dim2 < dim2_max; dim2++)

Example: 3X3 element array array [0, 0] array [0, 1] array [0, 2] array [1, 0] array [1, 1] array [1, 2] array [2, 0] array [2, 1] array [2, 2]

3. Dimensional Arrays - array [dim1, dim2, dim3] 3 dimensional array data is passed to and from the controller in ascending order. for (dim1 = 0; dim1 < dim1_max; dim1++) for (dim2 = 0; dim2 < dim2_max; dim2++) for (dim3 = 0; dim3 < dim3_max; dim3++)

Example: 3X3x3 element array array [0, 0, 0] array [0, 0, 1] array [0, 0, 2] array [0, 1, 0] array [0, 1, 1] array [0, 1, 2] array [0, 2, 0] array [0, 2, 1] array [0, 2, 2] array [1, 0, 0] array [1, 0, 1] array [1, 0, 2] array [1, 1, 0] array [1, 1, 1] array [1, 1, 2] array [1, 2, 0] array [1, 2, 1] array [1, 2, 2] array [2, 0, 0] array [2, 0, 1]

www. kepware.com

Document info
Document views486
Page views508
Page last viewedMon Dec 05 00:46:23 UTC 2016
Pages133
Paragraphs5515
Words40931

Comments