241
ICC
11.8.4
SLC-5/05 Example: Multiple MSG Instructions
At times, reading from different non-contiguous address of the database may be
necessary. To accomplish this task efficiently, multiple MSG instructions can 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 control file. In the case of
read MSG instructions, more than one instruction may use the same data file to
store the received 16-bit word values, but the storage locations must not overlap.
Figure 93 shows an example of two MSG instructions, each accessing different
target integer files. It is evident from this logic that N20 and N21 are the two
independent message control files created for these instructions.
Figure 93: Multiple MSG Instructions
11.8.5
SLC-5/05 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
control files. Figure 94 shows an example of two MSG instructions, one for
reading and one for writing. Note that the “Read/Write” field of each of the MSG
instructions is set according to their function.