The text of a manual · part 3 of 23
Bulletin 1771 Communication Controller Module (Cat. Nos. 1771-KE, -KF) User's Manual, pages 21 to 30
Pages 21 to 30 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 21
Page 2-3 Communication Concepts
2.1.1.2 PC Programming
All Allen-Bradley PC processors can connect to the Data Highway through an appropriate station interface module. All of these processors can receive and reply to command messages, and some of them can also transmit command messages. For an explanation of how to program PCs to send and receive messages, refer to the user’s manual for the appropriate station interface module.
PLC-3 C Processor omputer 1775-KA Computer Module MODEM MODEM RS-232-C Link Link 50 Cable-Ft. Max MODEM 1771-KF Module 1771-KF Module Data Highway <o Link 1771-KF Module Longline RS-232-C Link, - - »| 7,000 Cable-FT. Max 1771-KA 1773-KA 1771-KG Module Module Module PLC-2/15 PLC-4 PLC-2/30 Processor Loop Processor 41299
Figure 2.1, Data Highway Network
Page 22
Page 2-4 Communication Concepts
2.1.1.3 Computer Programming
2.1.2 Stand-Aione Links
The communication protocol for the Data Highway link is transparent to a computer on the network. However, for a computer to send or receive messages through the Data Highway network, it must be programmed to communicate with its KE/KF module over an RS-232-C link. Chapters 4, 5 and 6 describe the protocol that you must program your computer to use on this RS-232-C link.
A stand-alone communication link is totally separate from any Data Highway network. Through use of interface modules other than the KE/KF, your computer can communicate directly with one or more PCs over an RS-232-C link. Two PCs can also communicate directly over a similar RS-232-C link.
2.1.2.1 Figure 2.2 shows two possible stand-alone PC-to-PC PC-to-PC communication links. Each is a point-to-point link in which two PC processors can communicate as peers. Ladder diagram programs in the PC processors initiate the transfer of messages between stations. PLC-4 PLC-3 PLC-2/30 Loop Processor Processor Computer 1773-KA 1775-KA 1771-KG Module Module Module 1771-KG Module 1771-KG 1771-KG 1771-KG Module Module Module PLC-2/30 Processor PLC-2/30 PLC-2/20 PLC-2/15 Processor Processor Processor 11300 11301 Figure 2.2, Stand-alone PC to PC Links Figure 2.3, Stand-alone
Point-to- Point Link to a Computer
Page 23
Page 2-5 Communication Concepts
2.1.2.2 Computer-to-PC
Both of the PC-to-PC links in Figure 2.2 are longline RS-232-C links limited to 7,000 cable feet each. If you need a longer distance, you can use modems to create such a link.
A computer can communicate directly with PCs through either a point-to-point or a multidrop RS-232-C link.
Figure 2.3 shows a point-to-point link to a computer. This is an RS-232-C link limited to 50 cable feet. If you need a longer distance, you can use modems to create this link.
Figure 2.4 shows a multidrop link between a computer and three PC stations. The computer can communicate with each of the PC stations directly. This type of configuration requires a modem link.
Computer
MODEM MODEM MODEM MODEM 1771-KG 1775-KA 1771-KG Module Module Module PLC-2/15 PLC-3 PLCG-2/30 Processor Processor Processor
11302
Figure 2.4, Stand-Alone Multidrop Link to a Computer
Page 24
Page 2-6 Communication Concepts
2.1.3 Configuration Considerations
2.1.3.1 PC-Processor/Data Highway interface
2.1.3.2 PC-Processor/RS-232-C Interface
For a point-to-point link, or a multidrop broadband modem link, you can use either peer-to-peer or master-slave communication protocol. For a multidrop baseband modem link, you must use a master-slave communication protocol because the link can support only one communication channel.
A computer can send or receive messages through a stand-alone link in the same way as through a Data Highway network. To do this, the computer must be programmed to follow the communication protocol described in chapters 4, 5, and 6.
Allen-Bradley manufactures a variety of communication interface modules for different applications. At present, these modules are:
e PLC Computer Interface Module (cat. no. 1772-CI) e PLC Communication Adapter Module (cat. no. 1774-KA)
e PLC-2-Family Communication Adapter Module (cat. no. 1771-KA)
e PLC-3 Communication Adapter Module (cat. no. 1775-KA) e PLC-4 Communication Interface Module (cat. no. 1773-KA) e PLC-2-Family/RS-232-C Interface Module (cat. no. 1771-KG)
® Communication Controller Module (cat. no. 1771-KC, -KD, -KE,KF)
The following sections summarize the uses of these modules.
The following modules provide an interface between a PC processor and a Data Highway communication link:
e PLC Communication Adapter Module (cat. no. 1774-KA) e PLC-2-Family Communication Adapter Module
(cat. no. 1771-KA) e PLC-3 Communication Adapter Module (cat. no. 1775-KA) e PLC-4 Communication Interface Module (cat. no. 1773-KA) The following modules provide an interface between a PC processor and an RS-232-C communication link:
e PLC-3 Communication Adapter Module (cat. no. 1775-KA) e PLC-4 Communication Interface Module (cat. no. 1773-KA) e PLC-2-Family/RS-232-C Interface Module (cat. no. 1771-KG)
Page 25
Page 2-7 Communication Concepts
2.1.3.3 RS-232-C/Data Highway interface
2.1.3.4 Configuration Selection
The following modules provide an interface between an RS-232- C communication link and a Data Highway communication link:
@ Communication Controller Module (1771-KC, -KD, -KE, -KF)
The 1771-KC and 1771-KE modules must be installed in an I/O chassis. The 1771-KD and 1771-KF modules are stand-alone modules.
The 1771-KC and 1771-KD modules can provide peer-to-peer communication only through an RS-232-C link that cannot connect to a modem link. They are superseded by the 1771-KE and 1771-KF modules that can provide either peer-to-peer or master-slave communication through an RS-232-C link, which you can optionally connect to a modem link.
Figures 2.1 through 2.4 illustrate several configurations in which PC stations can communicate with each other and with computers through Data Highway ports and RS-232-C ports on the station interface modules. Each configuration is useful, depending on your application.
If you want to provide a peer-to-peer communication between two or more PCs and/or a computer, use a Data Highway network as shown in figure 2.1. For distances longer than the Data Highway itself provides, you can use an auxiliary longline RS-232-C link or modem link.
With two stations, you may want a stand-alone link. Fora stand-along link, a modem link can be used to provide communication between stations more than 10,000 cable feet apart. Also, with the full-duplex (peer-to-peer) protocol and embedded responses, it could be faster than a Data Highway link because it wouldn’t be burdened with polling.
A Data Highway link has a communication rate of 57,600 bits per second and a half-duplex (peer-to-peer, polled) protocol. An RS-232-C link has a selectable communication rate up to 19,200 bits per second and a selectable protocol of half-duplex (master-slave, polled) or full-duplex (peer-to-peer, unpolled).
For a stand-alone link to a computer, you may want to use the peer-to-peer communication protocol for maximum speed. Or you may want to use the master-slave communication protocol so that the computer can select the times it will communicate over the link.
A master-slave communication protocol can be selected for any link to a computer. A peer-to-peer communication protocol can be selected only for a point-to-point link or a broadband modem multidrop link to a computer.
Page 26
Page 2-8 Communication Concepts
2.2 Software Layers
2.2.1 Application Layer
2.2.1.1 Message Structures
Even with only two stations, you may want a Data Highway link. The Data Highway provides the flexibility of easy re-configuration or expansion if you want to be able to add more stations later, and it also provides more error checking than an RS-282-C link.
Each of the physical links just described requires three layers of software to enable communication to take place. The layers are defined as follows:
¢ Application layer, controls and executes the actual tasks, or commands, specified in the communication between stations. To program this layer, use the commands described in chapter 5.
e Network management layer, handles queueing, sequencing, routing, and error status reporting for communication. If your physical link contains only Allen- Bradley PCs, you do not have to program this layer. Otherwise, refer to chapter 5 for a description of how to program this layer for an RS-232-C link to a computer.
¢ Data link layer, controls the flow of communication over the physical link by establishing, maintaining, and releasing the communication channel between stations. If your physical link contains only Allen-Bradley PCs, you do not have to program this layer. Otherwise, refer to chapter 4 for a description of how to program this layer for an RS-232-C link to a computer.
The application layer concerns the specific commands that you can program at a given station to cause that station to communicate over the link. This layer is the same for both RS-232-C and Data Highway links.
The types of commands that a station can transmit and receive vary with the type of processor at that station. Chapter 5 describes the commands that each type of PC processor can transmit or receive. To program your computer to communicate with a PC, use the appropriate command message formats shown in chapter 5.
All messages on a Data Highway network have the same fundamental structure, regardless of their function or destination. If you could freeze a block while it is in transmission, you would see two types of message bytes:
e Protocol bytes e Data bytes
The methods by which these bytes are filled is determined by the nature of the station from which the transmission block
Page 27
Page 2-9 Communication Concepts
2.2.1.2 Command/Reply Cycle
2.2.1.3 Priority originates. For example, if a transaction originates from a PC station, the station interface module automatically fills the protocol bytes. If the transaction originates from a computer station, your computer software must supply the necessary protocol. In both cases, the data bytes contain information supplied by application programs.
Any transaction on a Data Highway network consists of two parts:
e A command e Areply
This provides extra data integrity by ensuring that a required action always returns some sort of status, whether an error code or data. As a frame of reference, the command initiator is always referred to as a local station, and a reply initiator is always referred to as a remote station. Unless noted otherwise, whether in a Data Highway link or an RS-232-C link, the discussion will be limited to a single local station and a single remote station.
The network layer protocol distinguishes a command from a reply. Obviously, the data area of a command and its corresponding reply depends on the type of command.
Each message on a Data Highway link is classified as either:
e High priority e Normal priority
The priority levels of messages determine the order in which stations are polled and allowed to transmit messages. In the polling process, stations with high priority messages will always be given priority over stations with normal priority messages.
You specify the priority level for each command message. The command code contains this specification. The station that receives a command message must establish the same priority level for its corresponding reply message.
NOTE: Stations with high priority messages are given priority over stations with normal priority messages throughout the command/reply message cycle. For this reason, a command should be given a high priority designation only when special handling of specific data is required. Using an excessive number of high priority commands defeats the purpose of this feature and could delay or inhibit the transmission of normal priority messages.
Page 28
Page 2-10 Communication Concepts
2.2.1.4 Command Structures
2.2.1.4.7 Reads
2.2.1.4.2 Writes
There are four basic types of command on a Data Highway network or a stand-alone link:
e Read e Write e Diagnostic @ Mode select
There are two types of read:
e Physical © Unprotected
A physical read allows you to read any area of PC memory at a remote station. However, a PC processor cannot originate a physical read command; only a computer can originate a physical read.
An unprotected read can access only the data table area of PC memory. Both computers and PCs can initiate unprotected reads.
Any read can request up to 122 words of contiguous data from PC memory.
We can classify write commands both by their application and by their level of memory access.
As an application issue, writes are divided between bit writes and word writes. Bit writes allow the local station to control bits in the data table of a remote station.
Word writes allow the local station to write up to 121 contiguous words of data into the remote station’s memory, provided you abide by the restrictions on memory access, discussed next.
As with reads, writes also are classified by the level of access to PC memory. Non-physical writes can access only the data table at a remote PC; physical writes can access all of user memory, including PC program memory.
Non-physical writes can be further subdivided into protected and unprotected. Protected writes can access only specified areas of the remote PC’s data table memory. The accessible areas are defined by memory protection rungs in the remote PC’s ladder diagram program. Unprotected writes, on the other hand, can access any area of the remote PC’s data table.
In most cases, switch settings on the remote station’s interface module can disable the module from executing each of these types of write commands.
Page 29
Page 2-11 Communication Concepts
2.2.1.4.3 Diagnostics
2.2.1.4.4 Mode Select
2.2.2 Network Management Layer
2.2.2.1 Error Checking
Diagnostic commands have to originate from a device other than a PC. You can use these commands to return status information from a remote or local station or to alter some onboard parameters at a station interface module. Diagnostic commands are particularly useful during a startup or during on-line debugging.
Mode select commands allow you to load a new PC program from a remote computer station. The operation of these commands varies by PC processor type. These commands can be issued only by a computer.
The network management layer is concerned with the specifics of conveying a message safely from its source to its destination. This layer is the same for both RS-232-C and Data Highway links.
If your physical link contains only Allen-Bradley PCs, you do not have to program anything for this layer; the communication interface modules automatically take care of it. If your physical link contains a computer, then refer to chapter 5 for a description of how to program this layer at the computer station.
The rest of this section (2.2.2) explains the network management layer for the Data Highway. For the most part, you need not be concerned with the interaction of station interface modules on the Data Highway. This means that your application programs at the PCs and computers along the Data Highway need not involve themselves with inter-station protocol, handshaking, or control of the Data Highway link. This is all carried out automatically by the station interface modules. However, an understanding of station interaction is useful both to computer programmers and PC programmers. It allows optimized use of Data Highway commands and fault diagnostics.
Error codes can be generated at two places: remote station modules and local station interface modules. For codes that are returned from a local station module, two types of condition can exist:
e Application programs use the wrong message format or issue illegal commands e The local station cannot complete a transaction due to network problems
A remote station can return only the codes associated with an application problem at the remote station. Typically, these involve either the PC processor being off-line (in Program mode, for example) or the command trying to access memory
Page 30
Page 2-12 Communication Concepts
2.2.3 Data Link Layer
2.2.3.1 Floating Master areas blocked by either the interface module or the user application program.
In the network layer protocol, command message status is returned in a reply status byte. A value of zero in the status byte indicates successful transmission of the corresponding command. It is up to the local application program to display and act on the value of the returned byte.
The data link layer controls the flow of communication on the physical link by acquiring and releasing access to the communication channel for each station. This layer differs for each type of physical link.
Chapter 4 explains how to program the data link layer for an RS-232-C link. The rest of this section (2.2.3) describes the data link layer of the Data Highway.
Note that you do not have to program the data link layer for the Data Highway; the communication interface modules automatically take care of it. The description presented of it here is solely for information purposes.
The protocol that is used between stations on the Data Highway link is a modified low-level implementation of HDLC that features bit stuffing, flag definition, and generation of the cyclic redundancy check (CRC).
Central to the interaction of Data Highway modules is the concept of the floating master. With this arrangement, no single station is permanent master controlling the Data Highway communication link at all times. Instead, each station bids for mastership, based on its need to send command or reply messages. This arrangement has two major features:
@ Multiple masters e Peer-to-peer communication
One advantage of floating master operation is that no single station disables communication on the Data Highway as long as other stations continue to operate. This means that even with disconnection or faulted operation of a module or a processor, communication between other operating station interface modules continues. This minimizes the need for backup in some applications.
When a station gains control of the Data Highway to transmit messages, it has become a master station. All other station interface modules assume a slave mode. This enables these stations to receive and acknowledge messages sent to them. Basically, a station has three states of operation:
e Transmitting messages ® Polling to determine which station gets mastership next ® Receiving messages and polls