MESSAGE Structure

Each Message (MSG) instruction has a MESSAGE structure that contains status information about the instruction.
instruction
A mnemonic and data address defining an operation to be performed by the controller. A rung in a program consists of a set of input and output instructions. The input instructions are evaluated by the controller as being True or False. In turn, the controller sets the output instructions to True or False.
Mnemonic
Byte Offset
Data Type
Description
.FLAGS
04
INT
integer (INT)
An atomic data type consisting of a word used to store a 16-bit signed integer value (-32,768 to +32,767).
The flags word stores these status bits in one, 16-bit word.
Bit
Number
Data Type
Description
.EW
02
BOOL
The enable waiting bit is set when the controller detects that a message request has entered the queue. The controller resets the .EW bit when the .ST bit is set.
.ER
04
BOOL
The error bit is set when the controller detects that a transfer failed. The .ER bit is reset the next time the rung-condition-in goes from false to true.
.DN
05
BOOL
The done bit is set when the last packet of the message is successfully transferred. The .DN bit is reset the next time the rung-condition-in goes from false to true.
.ST
06
BOOL
The start bit is set when the controller begins executing the MSG instruction. The .ST bit is reset when the .DN bit or the .ER bit is set.
.EN
07
BOOL
The enable bit is set when the rung-condition-in goes true and remains set until either the .DN bit or the .ER bit is set and the rung-condition-in is false. If the rung-condition-in goes false, but the .DN bit and the .ER bit are cleared, the .EN bit remains set.
05
.TO
08
BOOL
If you manually set the .TO bit, the controller stops processing the messages and sets the .ER bit.
.EN_CC
09
BOOL
The enable cache bit determines how to manage the MSG connection. If you want the controller to maintain the connection (such as when you repeat the same MSG instruction many times), set the .EN_CC bit. If you rarely execute the MSG instruction and have other needs for a controller connection, clear the .EN_CC bit.
06
INT
If the .ER bit is set, the error code word identifies error codes for the MSG instruction.
10
DINT
The extended error code word stores additional error code information for some error codes.
12
INT
The requested length specifies how many words the message instruction will attempt to transfer.
14
INT
The done length word identifies how many words actually transferred.
total memory per structure
328 bytes (includes above items plus additional configuration attributes)
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.