You are on page 1of 4

Description: When planning the automation strategy, users may want to consider using the offset feature allowed

with Analog Registers and Digital Registers. This feature not only makes it more convenient for iFIX users to access array elements, but can also reduce the burden on the communications driver by accessing array elements more efficiently. Resolution:

Offsets with Analog Register (AR) Tags


The offset feature for Analog Register (AR) supports one-dimensional arrays with homogenous data types of Short, Word, Long, DWord and Float. Example 1 (Static addressing - ControlLogix Ethernet) In the IGS server, create an array tag of 4 integers called IntArrayTag on Channel1, Device1. The address in the IGS tag configuration should be in this format: INT_ARRAY[0]{4} Where INT_ARRAY[0] is the controller tag name, and {4} is the array length. Create an AR block in iFIX named AR1, and set the I/O Address to Channel1.Device1.IntArrayTag. AR1.F_0 references the first element of the array. AR1.F_1 references the second element of the array. AR1.F_2 references the third element of the array. AR1.F_3 references the fourth element of the array. AR1.F_4 is invalid since it will try to access something outside of the configured array length. Example 2 (Dynamic addressing - ControlLogix Ethernet) In the IGS server, create a Channel1 and a Device1. Create an AR block in iFIX named AR2, and set the I/O Address to Channel1.Device1.INT_ARRAY[0]{4}@SHORT

Where INT_ARRAY[0] is the controller tag name, {4} is the array length, and @SHORT is the data type override (if nec.). AR2.F_0 references the first element of the array. AR2.F_1 references the second element of the array. AR2.F_2 references the third element of the array. AR2.F_3 references the fourth (last) element of the array. AR2.F_4 is invalid since it will try to access something outside of the configured array length. Example 3 (Dynamic addressing Allen-Bradley Ethernet) In the IGS server, create a Channel1 and a Device1. Create an AR block in iFIX named AR3, and set the I/O Address to Channel1.Device1.N7:0[25]@short Where N7:0 represents the address in the device, [25] is the array length, and @short is the data type override (if nec.). AR3.F_0 references the first element of the array. AR3.F_1 references the second element of the array. AR3.F_2 references the third element of the array. AR3.F_3 references the fourth element of the array. AR3.F_25 is invalid since it will try to access something outside of the configured array length. Note: The offset feature for AR tags does not support multi-dimensional arrays or strings (BSTRs or arrays of BSTRs).

Offsets with Digital Register (DR) Tags


The offset feature for Digital Register (DR) supports single value data types of Short, Word, Long and DWord. It also supports onedimensional arrays with homogenous data types of Short, Word, Long, DWord and Boolean. Example 1 (Static addressing - ControlLogix Ethernet) In the IGS server, create an array of 4 words called WordArray on Channel1, Device1. The address in the IGS tag configuration should be in this format:

Word_Array[0]{4} Where Word_Array[0] is the controller tag name, and {4} is the array length. Create a DR block in iFIX named DR1, and set the I/O Address to Channel1.Device1.WordArray. DR1.F_0 references the first bit of the first word in the array. DR1.F_1 references the second bit of the first word in the array. DR1.F_15 references the last bit of the first word in the array. DR1.F_16 references the first bit of the second word in the array. DR1.F_63 references the last bit of the fourth word in the array. DR1.F_64 is not a valid offset since it is past the end of the array. Example 2 (Static addressing - ControlLogix Ethernet) In the IGS Server, create an array of 32 booleans called BoolArray on Channel1, Device1. The address in the IGS tag configuration should be in this format: Bool_Array[0]{32} Where Bool_Array[0] is the controller tag name, and {32} is the array length. Note Boolean array addressing in the IGS Server requires even 32-bit boundaries (i.e., 32, 64, 96, 128...). Create a DR block in iFIX named DR2, and set the I/O Address to Channel1.Device1.BoolArray. DR2.F_0 references the first bit of the array. DR2.F_1 references the second bit of the array. DR2.F_31 references the last bit of the array. DR2.F_32 is not a valid offset since it is past the end of the array. Example 3 (Dynamic addressing - ControlLogix Ethernet) In the IGS server, create a Channel1 and a Device1. Create a DR block in iFIX named DR3, and set the I/O Address to Channel1.Device1.Long_Tag.0{32}. Where Long_Tag is the controller tag name, .0 is the first bit of the long, and {32} is the array length (to retrieve all 32 bits of the long).

DR3.F_0 references the first bit of the long. DR3.F_1 references the second bit of the long. DR3.F_31 references the last bit of the long. DR3.F_32 is not a valid offset since it is past the end of the array. Note: The offset feature for DR tags does not support multidimensional arrays or strings (BSTRs or arrays of BSTRs).

Example 4 (Dynamic addressing Allen-Bradley Ethernet) In the IGS server, create a Channel1 and a Device1. Create a DR block in iFIX named DR4, and set the I/O Address to Channel1.Device1.B3:0/0[16]. Where B3:0 represents the address in the device, /0 is the first bit of the word, and [16] is the offset array length the IGS will use (to retrieve all 16 bits of the B file word). DR4.F_0 references the first bit of the word. DR4.F_1 references the second bit of the word. DR4.F_15 references the last bit of the word. DR4.F_16 is not a valid offset since it is past the end of the array. Note: The offset feature for DR tags does not support multidimensional arrays or strings (BSTRs or arrays of BSTRs).

You might also like