![ICC ETH-1000 Instruction Manual Download Page 231](http://html2.mh-extra.com/html/icc/eth-1000/eth-1000_instruction-manual_3351193231.webp)
230
ICC
11.7.3.3.3 ControlLogix Example: Multiple MSG Instructions
At times, reading from different groups of data may be necessary. To accomplish
this task, multiple MSG instructions will need to be implemented in the PLC
program.
The configuration and execution for implementing multiple MSG instructions is in
general identical to that required for implementing just one MSG instruction.
Each MSG instruction will require its own message controller tag. In the case of
read MSG instructions, more than one instruction may use the same Destination
Element tag, but the storage locations must not overlap. Figure 79 shows an
example of two MSG instructions, each accessing different read tags. It is
evident from this logic that “rd_connection” and “rd_connection2” are the two
independent message controller tags created for these instructions.
Figure 79: Reading Via Multiple MSG Instructions
11.7.3.3.4 ControlLogix Example: Reading and Writing
Often times, applications may need to both read data from and write data to the
gateway. At a minimum, this will require two MSG instructions and two message
controller tags. Figure 80 shows an example of three MSG instructions, one for
reading and two for writing. The only item of note that differentiates this example
from the multiple-read example in section 11.7.3.3.3 is the addition of the
en_xx_wr XIC elements. The reason for the addition of these elements is that
while reading from a remote device is often continuously performed (monitoring),
data is typically written to the remote device only when necessary (i.e. when the
value to write has changed). This conserves network bandwidth on the target
device. The en_xx_wr elements in this example, therefore, would typically be
replaced in an actual application program by user-provided logic that controls the
conditions under which write operations would be performed.