The text of a manual · part 10 of 23
Bulletin 1771 Communication Controller Module (Cat. Nos. 1771-KE, -KF) User's Manual, pages 91 to 100
Pages 91 to 100 of 228
The original document is the PDF (9.6 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 1771-KE
Page 91
Page 4-29 RS-232-C Link Protocol
When a DLE ACK is received, the message currently held is discarded. When the next poll is received the next message available from the message source is sent (or a DLE EOT).
When a DLE NAK is received, the transceiver takes messages from the source until it is empty. Each message will be discarded with an error code sent back to the message source. This can be used by the master to clear up the message source buffers of all slaves after the master has been down.
4.3.5 The following figures show some of the events that occur on
Half-Duplex Protocol various interfaces. Time is represented as increasing from the Diagrams top of the figure to the bottom.
SOURCE/
SINK MASTER
SOURCE/ LINK SLAVE SINK, - (Data), - >
DLE SOH STN DLE STX (Data) DLEETXBCC, » a - - - Not Full
(Data), - >
~t DLE ACK a - OK 11567 Figure 4.17, Normal Message Transfer SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, (Data) - - - >
(Timeout), - - - -OK
DLE SOH STN DLE STX (Noise) DLEETXBCC, >
DLE SOH STN DLE STX (Data) DLEETX BCC, >
~« - Not Full
(Data) >»
A
DLE ACK
11568
Figure 4,18 -- Message Transfer with Invalid BCC
Page 92
Page 4-30 RS-232-C Link Protocol
SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, - (Data), - », DLE SOH STN DLE STX (Data) DLEETX BCC - - » a - - - Not Full (Data), - » ~ (Noise) (Timeout) ~~ DLE SOH STN DLE STX (Data) DLE ETX BCC, * <t DLE ACK “ OK 11569 Figure 4.19, Message Transfer with ACK Destroyed SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, - Not Full, DLE ENQ STN BCC >
~« - - No Message, - A
DLE EOT
11570
Figure 4.20, Poll with No Message Available
Page 93
Page 4-31 RS-232-C Link Protocol
SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, Not Full, »
DLE ENQ STN BCC >
~<a- - - - - (Data)
<+ - - - __ DLE STX (Noise) DLE EXT BCC
DLE ENQ STN BCC a
<« - - - _ DLE STX (Data) DLEETX BCC 9, - - - - - - Same Message
~t - (Data)
DLE ACK a
OoK - - - _ - - Note that the message sent for the second poll is the same as the first, since the first transmission was not ACKed. 415714
Figure 4.21, Poll with Message Returned
Page 94
Page 4-32 RS-232-C Link Protocol
SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, - Not Full, - »
DLE ENQ STN BCC >
|~ - - - - (Data)
+ DLE STX (Data) DLE EXT BCC
~<« - - . (Data) DL (Noise) CK, »> Sometime Later..., Not Full, » DLE ENQ STN BCC a
~< - _-_ - - _ DLE STX (Data) DLE ETX BCC
DLE ACK
¥
(Discard Retransmission)
Note that the message sent for the second poll is the same as the first, since the first transmission was not ACKed. Also, the master should ACK and discard the second message, since it was a retransmission. This means that the master must either poll a station repeatedly until it receives a DLE EOT, without polling any other stations, to be sure it has detected all retransmissions. If each station is polled only once per cycle, the master must keep a record of the last header from each station, since other stations may transfer messages between retransmissions from a station. 41872
Figure 4.22, Duplicate Message Transmission
Page 95
Page 4-33 RS-232-C Link Protocol
SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, - (Data), - »
- - - DLE SOH STN DLE STX (Data) DLE ETX BCC, >
+ Full, Not Full - »
DLE ENQ STN BCC, - - - - - - ~<a - - No Message, DLE EOT
A
Sometime Later..., _ - DLE SOH STN DLE STX (Data) DLEETXBCC =
« - _ Not Full
(Data), - - »
DLE ACK
A
< - - OK
When a station times out it is a good idea to poll it to see if it is there. If it answers with a DLE EOT toa message, but consistently fails to ACK a message, its message sink is probably full. If it respands DLE EOT to a poll, you must wait for the buffers to clear. 11873
Figure 4.23, Message Sink Full, Case 1
Page 96
Page 4-34 RS-232-C Link Protocol
«< - (Data), - - - ™ - OK, - <+ - - ___ DLE SX (Data) DLE ETX BCC
DLE ACK >, DLESOH STN DLE STX (Data) DLEETXBCC, »
SOURCE/ SOURCE/ SINK MASTER LINK SLAVE SINK, - (Data) - - >}, - DLE SOH STN DLE STX (Data) DLEETXBCC, » t Full (Timeout), Not Full, +» DLE ENG STN BCC, - - - _ - - " - -, - _ (Data)
m - Not Full
(Data) - - - »
When a station’s message source and sink share a common memory pool, it may be that the message sink “full” indication results from an abundance of messages in the message source, which use up all free pool memory. In this case, the memory can be freed up by receiving messages from the station. Waiting for the memory to clear by the action of the station alone may not work, since it could be that the only way to free up space is to send a message to the master.
11675
Figure 4.24, Message Sink Full, Case 2
Page 97
Page 4-35 RS-232-C Link Protocol
4.3.6 When monitoring half-duplex protocol in two-wire mode, you Line Monitoring need to monitor only one line. The example below shows a message sent by the master and a reply sent by the slave in response to a poll. Slave responses are underlined.
Message from master to slave: DLE SOH stn DLE STX message DLE ETX BCC DLE ACK Message sent from slave to master in response to poll:
DLE ENQ stn BCC DLE STX message DLE ETX BCC DLE ACK
Poll with a DLE EOT in response: DLE ENQ stn BCC DLE EOT
Page 98
Page 99
Chapter
Message Packet Formats
5.0 General
5.1 Application Layer
5.2 Network Layer
This chapter describes how your computer application programs should format command and reply messages for transmission over the RS-232-C link. It covers both application level and network level functions. Basically, the application layer specifies the contents of messages and initiates their transmissions. The network layer takes the information from the application layer and formats it in a way that is acceptable to the data link layer described in chapter 4.
Application programs are of two types: command initiators and command executors. This corresponds with the two message types:
e Command messages - - - sent by command initiators to command executors
© Reply messages, sent by command executors in response to command messages received from command initiators
Each command message requires one reply message.
Command initiators specify which command function to execute at a particular destination station. The command executor at that destination station is responsible for interpreting the command message and executing the specified command function. The command executor also issues a reply message for each command it receives. If it cannot execute the received command, the command executor must generate the appropriate error message.
Internally, the KE/KF module uses a routing subroutine and a message queue to implement the network layer. When the module receives a message over its RS-232-C port, it puts that message in the queue. The routing subroutine then takes the message from the queue and transmits it over the Data Highway link. The module also queues messages received from the Data Highway, and the routing subroutine retransmits those messages over the RS-232-C link. Figure 5.1 illustrates this model.
Page 100
Page 5-2 Message Packet Formats
Command Command Initiator Executor Q Q A A Commands Replies Replies Commands R R
Network
R | = Routing Subroutine Entry
Q }|= Incoming Message Queue
11576
Figure 5.1, Application Model
Messages do not necessarily arrive at their destination in the same order that they were sent. It is impossible for the network layer to guarantee delivery, and in some cases it may not be possible to provide notification of non-delivery. In particular, the network layer does not notify the command executor about non-delivery of a reply message. Therefore, it is advisable that your command initiator maintain a timer for each outstanding command message. If the time limit expires before the command initiator receives the corresponding reply to its command, it can either re-transmit the same command message or indicate an error condition.