IMAC2B015 V2
Uncontrolled Copy - Refer to Ampcontrol Website for Latest Version
Page 36 of 41
Ampcontrol Pty Ltd
– ABN 28 000 915 542
iMAC2 Controller EtherNet/IP Communications Manual
IMAC2B015 V2
– 07/17
A
P
P
R
OV
E
D
FOR
E
X
T
E
R
N
A
L
D
IS
TR
IB
U
T
ION
–
P
R
OP
E
R
T
Y
OF
A
M
P
C
ON
TR
OL
P
T
Y
LTD
–
N
O
T
T
O
B
E
R
E
P
R
OD
U
C
E
D
I
N
P
A
R
T
AOIs
4.2
This subsection will describe four RSLogix5000 add-on instructions that have been written for retrieving the
EtherNet/IP data from the iMAC2. Instruction parameters and logic (where relevant) is to be described.
4.2.1 iMac_Demux_AOI
This AOI reads in data from the iMAC2 EIP module assembly instance, and distributes it to iMAC2 bug UDT
instances and the iMAC2 Controller UDT instance. It uses a network setup lookup table to determine where
the bug data needs to be distributed. The AOI parameters are as follows.
Name
Usage Data Type
Description
InputAssembly
InOut
INT[100]
Input assembly data from Ethernet
iMac_Network_Config InOut
iMac_Network_Config_DT iMAC network configuration lookup table.
iMac_Controller
InOut
iMac_Controller_DT
iMAC Controller UDT
iMac_Modules
InOut
iMac_Modules_DT
All bug data.
The iMac_Demux_AOI InputAssembly input parameter is of the form described earlier in
Table 3.1: iMAC2
Controller Input Assembly Instance Data Structure
. The AOI logic works in two stages:
In stage 1, the Data, Status, Resistance and ErrCnt data for each of the four consecutive modules
(with the first module node address specified in Start Block Address) is stored to the iMac_Controller
DATA, STATUS, RESIST and ERROR arrays. The next block of input assembly data is stored to the
iMac_Controller Runtime data. Lastly, the General Buffer and NV Memory data is stored to the
GENBUFF and NVM arrays. In time, the data for all bugs (modules) will eventually be stored to the
iMac_Controller UDT instance.
In stage 2, the iMac_Network_Config parameter is consulted, and when there is a valid module type,
the node index is used to transfer the DATA, STATUS, RESIST and ERROR information from the
iMac_Controller array (at the node index) to the iMac_Modules UDT instances, according to the
module type and index. For example, if there is a DI4 module at node address 7, then
iMac_Network_Config[7] = 15 (the module type); data will be transferred from
iMac_Controller.DATA[7] to iMac_Modules.DI4_Modules[7].DI4_Inputs_IPx, and so on for the
STATUS[7], RESIST[7] and ERROR[7] data.
4.2.2 iMac_Clear_Data_AOI
This AOI clears all iMAC2 module and controller instance data. It is intended to be used on first scan only.
The AOI parameters are as follows.
Name
Usage Data Type
Description
iMac_Controller InOut
iMac_Controller_DT iMAC Controller UDT
iMac_Modules
InOut
iMac_Modules_DT
All bug data.