Send and Receive Messages

Messages transfer standard or safety data to other devices, such as other controllers or operator interfaces. The MSG instruction is a ladder logic output instruction that asynchronously reads or writes a block of data to or from another module over the backplane or a network. The size of the instruction depends on the data types and message command that you program.
Messages use connection resources to send or receive data. Messages can leave the connection open (cached) or can close the connection when the message is done transmitting.
Messages can be either unconnected or connected. Unconnected messages are dependent upon the availability of unconnected buffers in all devices through which the message passes. Connected messages begin with a request to allocate connection buffers in all of those devices, before sending the actual message. Choosing to cache a connected message instructs the controller to keep the connection open after the message has been completed - this improves efficiency if the message is intended to be sent repeatedly.
Connected messages use connection resources. If the connected message is uncached, the resources are used temporarily each time the message is triggered. As long as a cached connected message remains in the cache, the resources remain allocated and are not available for other messages. Messages can get pushed from the cache if the application exceeds the cache capacity of the controller.
Each message uses one connection out of the controller, regardless of how many devices are in the message path. You can connect
CIP
generic messages. However, for most applications we recommend that you leave
CIP
generic messages unconnected. Connected messages that occur more frequently than once every 60 seconds should be cached if possible.
Message Types
Message Type
Communication Method
Connected Message
Message Can Be Cached
CIP
data table read or write
N/A
Configurable
Yes
PLC-2®
,
PLC-3®
,
PLC-5®
, or
SLC
(all types)
CIP
No
No
CIP
with Source ID
No
No
DH+
Yes
Yes
CIP
generic
N/A
Optional
Yes
Block-transfer read or write
N/A
Yes
Yes
For more information about how to use messages, see the Logix 5000 Controllers Messages Programming Manual, publication 1756-PM012.

Cache Message Connections

When you configure an MSG instruction, you can choose whether to cache the connection. Cached connections transfer data faster than uncached connections.
The controllers can cache 384 messages and trigger 384 messages simultaneously.
The following table describes the options for caching connections.
Options for Caching Connections
Frequency of Message Execution
Action
Repeatedly
Cache the connection.
This keeps the connection open and optimizes execution time. Opening a connection each time the message executes increases execution time.
Infrequently
Do not cache the connection.
This closes the connection upon completion of the message, which frees up that connection for other uses.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal