Programming – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual
Page 257
Using the Message Instruction
13–9
If the Target Node successfully receives the MSG packet, it sends back an ACK
(an acknowledge). The ACK causes the processor to clear bit S:2/7. (Bit S:2/7
is valid for Series C discrete only). Note that the Target Node has not yet
examined the MSG packet to see if it understands your request. It is replying to
the initial connection.
At the next end of scan, the EW bit is cleared (0) and the ST bit is set (1). Once
the ST bit is set, the processor will wait indefinitely for a reply from the Target
Node. The Target Node is not required to respond within any given time frame.
During this time, no other MSG instruction will be serviced.
Note
If the Target Node faults or power cycles during the time frame after the ST bit is
set and before the reply is returned, you will never receive a reply. No other
MSG instructions will be able to be serviced unless this MSG is terminated in
error using the TO bit. This is why it is recommended you use a timer in
conjunction with the TO bit to clear any pending instructions. (When the TO bit
is set [1] it clears pending messages.) Typically message transactions are
completed within a couple of seconds. It is up to the programmer to determine
how long to wait before clearing the buffer and then re-transmitting.
Step 4 is not shown in the timing diagram.
If you do not receive an ACK, step 3 does not occur. Instead a NAK (no
acknowledge) or no response at all is received. When this happens, the ST bit
remains clear. A NAK indicates:
•
the Target Node is too busy, or
•
it received a MSG packet with a bad checksum.
No response indicates:
•
either the Target Node is not there, or
•
it does not respond because the MSG packet was corrupted in transmission.
When a NAK occurs, the EW bit is cleared at the next end of scan. (Note that
the NR bit will only be set for DH-485 and NAK conditions. An error code
02H, Target Node is busy, is received which causes the NR bit to be set.) The
ER bit is also set which indicates that the MSG instruction failed.
Monitor the NR bit. If it is set, indicating that the Target Node is busy, you may
want to initiate some other process (e.g., an alarm or a retry later). The NR bit
is cleared when the rung logic preceding the MSG changes from false to true.
When an ACK occurs, the Target Node sends one of three responses shown in
Step 6.
Programming