The text of a manual · part 4 of 23
Bulletin 1771 Communication Controller Module (Cat. Nos. 1771-KE, -KF) User's Manual, pages 31 to 40
Pages 31 to 40 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 31
Page 2-13 Communication Concepts
2.2.3.2 Message Transmission
Thus, each Data Highway station can transmit and recelve both messages and polling sequences.
Figure 2.5 shows the change of states at a Data Highway station.
A station must have mastership of the Data Highway before it can transmit any messages or polling sequences. As part of the data integrity of the highway, all commands must receive a reply before a transaction is considered complete. Since the highway treats commands and replies as the same type of message, it takes at least one change of mastership to complete a single transaction.
Any command has to be formatted in the application program of the local, or transmitting, station. For a PC, the format is part of the PC user program. For a computer, the formatting has to be done as part of the computer program (chapter 5).
A reply message is generated by a station in response to a command message it receives. The reply message indicates that the command message was received and that the station interface module has completed the sequence of events required of it for command execution. For commands that read data, the reply message contains the data specified by the command. For commands that write data, the reply message indicates that the write operation has been completed at the receiving station.
When the replying station is a programmable controller, the reply message is an automatic function of the interface module operation and is transparent to your program. If the replying station is a computer, you must program the computer to formulate the response and the reply message.
Page 32
Page 2-14 Communication Concepts
Contention Sending (a State al Have All Sent or Max of 16 or Messages to Send All High Priority Messages and All Stations Sent and Response to High Have Been Polled Priority Global Poll at Least Once Received Polling Mastership State Relinquished Mastership Received _ - State 11536 Figure 2.5, State Transition at Master Station 2.2.3.3. To transfer mastership between stations, the station interface Polling modules use an orderly polling scheme. Normally, mastership passes from one station to another in a round robin fashion. During installation, you assign each station a unique number between 001 and 376 (octal). Each master passes mastership to the station with the next higher station number that is requesting mastership. All polling arithmetic is performed modulo-256 relative to the station number of the current master. For example, when the master is 200 (octal), station 220 will receive mastership before station 177, since 220 is closer in sequence to 200 than is 177. Figure 2.6 illustrates this polling scheme.
The mechanics of the polling algorithm are essentially transparent to you. This is because the communication modules handle this automatically. However, the polling algorithm does lead to the following basic rules that you should follow to optimize your Data Highway performance:
e Number your stations sequentially whenever possible, and
® Keep the number of high priority messages as low as possible.
Large numbers of high priority messages slow all traffic on the network. In general, you should limit the number of high priority messages to less than 1% of the total traffic on the Data Highway.
Page 33
Page 2-15 Communication Concepts
2.2.3.4 Data Security ofe 012018 074 a5
011 076 010 077 376 110 375 411 374 112 373 113 e ° e . 303 174 302 175 301 176 300 177 77 200 276 201 275 a74 203 7”
11537
Figure 2.6, Polling Scheme
There are two checks used in Data Highway network message transmission:
e A 16-bit CRC (cyclic redundancy check) on a Data Highway link e An 8-bit BCC (block check character) or a 16 bit CRC (series A/rev. H only) on an RS-232-C link
Some station interface modules also have a switch that lets you select a parity check (even parity only) on an RS-232-C link.
A block check is used to detect errors at the link level. Beginning with revision H, youcan select a CRC instead of this block check. Any device connected to the RS-232-C link must be capable of generating a BCC.
A BCC is added to the end of every message block to help detect errors of transmission between station interface modules. The command station generates a BCC by first summing every byte of the text (excluding control characters), then taking the 2’s complement of that sum. The result is the BCC. Any final carry-out bit is ignored in the BCC computations.
The receiving station also sums the text bytes, then adds that sum to the BCC to produce zero. Any sum other than zero indicates an error has been made in the transmission and causes the receiving station to respond with DEL NAK.
The CRC is used at the data link layer to validate messages transmitted on the Data Highway link.
Page 34
Page 2-16 Communication Concepts
2.2.3.5 Link Disconnect
The station interface module at the sending station appends the CRC to the message. The CRC is based on the bit pattern of the transmitted message. The receiving station also computes a CRC based on the received data and checks this against the CRC value included with the received message. A discrepancy between the transmitted CRC and the CRC computed by the receiving station indicates some fault in the transmission. If the received and computed CRC values do not agree, the message is not accepted as valid.
Floating master operation continues normally as long as all stations share mastership of the Data Highway link. However, if any one station retained continuous control of the communication link due to a fault condition, floating master operation would not be possible and Data Highway communication would be disabled. As a preventive measure against this type of situation, each station interface module has automatic link disconnect circuitry. If a module detects that it is not relinquishing mastership of the Data Highway, this circuitry can disconnect the module from the Data Highway link. The other stations on the Data Highway can then continue to function normally.
Page 35
Chapter
Installation
3.0 General
3.1 Communication Option Switches
If you have a revision A-G module:
If you have a revision H module:
This chapter explains how to install the 1771-KE and 1771-KF modules. There are five parts to installation:
e Setting the communication option switches e Mounting the module e Connecting the module to its power supply e Connecting the module to the Data Highway and RS-232-C links
® Observing the diagnostic indicators
Please read the first three chapters of this manual carefully before attempting any of the installation steps.
The KE/KF module has 6 switch assemblies (figure 3.1) that enable you to select various communication options. The switch assemblies and their corresponding options are:
Switch Assembly Communication Option SW-1 RS-232-C link features SW-2, SW-3,SW-4 Station number SW-5 Data Highway communication rate SW-6 RS-232-C link communication rate and parity
Read section 3.1.1 to learn how to set your switches in switch assembly SW-1.
Read section 3.1.2 to learn how to set your switches in switch assembly SW-1.
Page 36
Page 3-2 Installation
Station number (SW-2, SW-3, SW-4)
RS-232-C link features (SW-1)
Data Highway communication rate (SW-5)
iRS-232-C link communication ‘rate and parity (SW-6)
ee | O
ON || ON ON OFF OFF || OFF Front view Side view 11689 Figure 3.1, Communication Option Switches Switch assembly SW-1 Af t Diagnostic commands RS-232-C signal lines Duplicate message detection Embedded responses Protocol type 11690
Figure 3.2, RS-232-C Link Features
Page 37
Page 3-3 Installation
3.1.1 Figure 3.2 illustrates the switches in switch assemblies SW-1. RS-232-C Link Features You use these switches to control the special features of the Revisions A-G KE/KF module’s RS-282-C port.
This section shows you how to control this feature: using this switch:
protocol 1 embedded responses 2 duplicate message detection 3
R&S-232-C handshaking signals 4 diagnostic commands i) Protocol
Switch number 1 determines what type of protocol the KE/KF module uses in communicating through its RS-232-C port.
If you want your module to have: set switch 1: half duplex protocol on full duplex protocol off
This section for revision A-G modules only . Refer to chapter 4 if you need a description of protocols.
Embedded Responses
Switches 1 and 2 determine whether or not the KE/KF module can transmit and receive embedded responses.
If you want your module to: set switch 1: set switch 2: transmit or receive embedded responses off on not transmit or receive embedded on on responses on off off off
Refer to chapter 4 if you need a description of embedded repsonses.
Page 38
Page 3-4 installation
This section for revision A-G modules only
Switch 3 determines whether or not the RS-232-C port of the KE/KF module can detect duplicate messages transmitted to it.
Duplicate Messages
If you want your module to: set switch 3: detect and ignore duplicate messages on accept all messages regardless of duplication off
Refer to chapter 4 if you need a description of duplicate messages
Handshaking Signals
Switch 4 determines whether the module uses and recognizes the following handshaking signals: data set ready, request to send, clear to send, data carrier detect, and data terminal ready.
If you want the module’s RS-232-C port to: set switch 4: Use handshaking signals on Ignore handshaking signals off
Diagnostic Commands
Switch 5 determines how the KE/KF module treats diagnostic commands sent to it by a remote Data Highway station. You can connect the RS-232-C port of the KE/KF module directly to a 1771-KG, 1773-KA, or 1775-KA communications interface module (figure 1.2). In such applications, you can set switch 5 so that the KE/KF module will either execute any received diagnostic commands itself or else pass those commands to the other attached communication module.
If you want your module to: set switch 5: execute any received diagnostic commands on pass any received diagnostic commands to the attached off RS+232-C device
Page 39
Page 3-5 Installation
What to do next
3.1.2 RS-232-C Link Features Revision H
Note that switch 5 relates only to diagnostic commands sent to the KE/KF module from a remote Data Highway station. Since only computers can transmit diagnostic commands, the remote station must be a computer connected to the Data Highway by means of another KE/KF module. At the computer station, the setting of switch 5 does not affect any diagnostic commands that the computer sends to its local KE/KF module. The local module always retransmits the command message over the Data Highway without executing it. Figure 3.3 illustrates these concepts.
Also note that you can have more than one computer station on a Data Highway, and one computer can transmit diagnostic commands to the others. At the receiving computer station, if switch 5 is off, the local KE/KF module will pass the diagnostic commands to the computer. In such cases, you will have to write computer application programs to handle those commands at the receiving station. If switch 5 is on at the receiving station, the local KE/KF module itself will execute the incoming diagnostic commands.
Now skip to section 3.1.3 to learn how to set station numbers.
The following table shows you how to set the RS-232-C link features for revision H module, switch numbers 1, 2, 5.
with SWw-1 error with with If you want to check | parity | embedded select protcol as: as: as: responses: 1 2 3 4 5 full duplex BCC none no off | off | N/A| N/A| off full duplex BCC even no on | off off full duplex BCC none yes off | on off full duplex BCC even yes on | on off half duplex BCC none no off | off on half duplex BCC even no on | off on full duplex CRC none yes off | on on half duplex CRC none no on | on y ¥y fon
Page 40
Page 3-6 Installation
Switch 5 on id 1771-KF module z+ 4 4 Diagnostic command | nf, - - 4 C ter ~ 1771-KF ompu module < a tr 7 1771-KG module Reply message PLC-2/15 Data processor Highway Link To other stations Switch 5 off CT 1771-KF module ley 4? Diagnostic command | , I Oo 1-KF -, | t Computer Ae { 1 tae tf 7 1771-KG module Reply message PLC-2/15 Data processor Highway Link To other stations
11691
Figure 3.3, Effect of Switch 5 on Diagnostic Commands