Rockwell Automation 1775-KA User Manual

AllenBradley
PLC-3 Communication Adapter Module
(Cat. No. 1775-KA)
User Manual

Table of Contents

General 11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About This Manual 11 Module Description 14 Specifications 16 Applications 16
General 21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Programmable Configuration Parameters 219 Backup Configurations 227 Multiple 1775-KA Modules in One PLC-3 233
Installation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
General 31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Some Terminology 31 Levels of Programming 34 Data Transfers 36
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General 41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Number Systems 42 Addresses 43 Symbols 44 PLC-3 Address Specifications 47 PLC/PLC-2 Address Specifications 410 Remote Station Address Specifications 412 Expression 413
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General 51. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing the Message Instruction 51 Allocating Memory 52 Editing Message Procedures 52
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contentsii
General 61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Assignment Command 62 CREATE Command 65 DELETE Command 65 Execute 66 EXIT Command 66 GOTO Command 67 IF Command 67 ON_ERROR Command 68 STOP Command 69 Functions 69 Comments 611
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General 71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reporting Error Codes 71 Recovery from Errors 71 Error
Monitoring
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General 81. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Individual Commands 81 Message Procedure 84
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction to Layered Communication 91. . . . . . . . . . . . . . . . . . . .
Full-Duplex vs Half-Duplex Protocol for the Data Link Layer 95
. . . . .
General 101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Definition of Link and Protocol 101 Full-Duplex Protocol 102
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Half-Duplex Protocol 111. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Multidrop Link 111 Transmission Codes 112 Link-Layer Packets 114 Protocol Half-Duplex Protocol Diagrams 1113 Line
Monitoring
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Environment Definition
. . . . . . . . . . . . . . . . . . . . . . . . . .
117. . . . . . . . . . . . . . . . . . . . . . . . . .
1120. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents iii
The Network and Application Layer Protocol 121. . . . . . . . . . .
Network Layer 121. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Application Layer 126
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction A1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic
Command Set PLC-3 Commands A13 Privileged Commands A20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General B1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Local Error Codes B1 Reply Error Codes B1 Remote Error Codes B3 Local and Reply Error Codes B4 Remote Error codes received from the 1771-KE/KF
1771-KA, and 1774-KA Modules B14. . . . . . . . . . . . . . . . . . . . . .
Remote Error Codes Received from the 1773-KA Module B15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
, 1771-KG,
. . . . . . .
Data Highway Port Counters C1. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modem Port Counters C2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview D1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UART Sharing D10 SLEEP and WAKEUP D17 POWERUP D18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction
Chapter
1

General

About This Manual

The PLC–3 Communication Adapter Module (cat. no. 1775–KA) is an optional module used in the PLC–3 main chassis or expander chassis. It serves two purposes:
1. Interfacing the PLC–3 processor with the Allen–Bradley Data
Highway
2. Interfacing the PLC–3 processor with an intelligent RS–232–C
device
This manual describes the installation, programming, and operation of the 1775– KA module. This manual assumes that you are already thoroughly familiar with the programming and operation of the PLC–3 processor. It does not assume that you have any prior knowledge of the Allen–Bradley Data Highway.
Organization
The remaining chapters of this manual are organized as follows:
Chapter 2 – describes installation of the 1775–KA module. Chapter 3 – presents concepts and terminology for operating the
1775–KA module on the Data Highway.
Chapter 4 – presents general rules for specifying the data addresses you
use in message procedures.
Chapter 5 – explains how you create and edit message procedures and
commands for the 1775–KA module.
Chapter 6 – describes the command language you use in programming
message procedures.
Chapter 7 – describes how the 1775–KA module detects and reports
various types of errors.
Chapter 8 – presents detailed examples of 1775–KA module commands
and message procedures.
Chapter 9 – introduces a layered approach to writing a driver to enable
a computer to communicate to the 1775–K’s RS–232–C channel.
11
Chapter 1
Introduction
Chapter 10 – describes how to write a full–duplex line driver to enable
a computer to communicate to the 1775–KA’s RS–232–C channel.
Chapter 11 – describes how to write a half duplex line driver to enable
a computer to communicate to the 1775–KA’s RS–232–C channel.
Chapter 12 – describes the network and application layers of a software
driver to enable a computer to communicate to the 1775–KA’s
RS–232–C channel. Appendix A – shows detailed message formats. Appendix B – lists error codes reported by the 1775–KA, 1771–KA,
1771–KG, 1771– KE/KF, 1773–KA, and 1774–KA modules. Appendix C – lists diagnostic counters stored at the 1775–KA,
1771–KA, 1771–KG, 1771–KE/KF, 1773–KA and 1774–KA modules. Appendix D – gives detailed flow charts of an example of software
logic for implementing a full–duplex protocol.
Related Documentation
Read this manual in conjunction with the documentation listed in Table 1.A and Table 1.B. Table 1.A lists related PLC–3 documentation and Table 1.B lists related Data Highway documentation.
Table 1.A
PLC-3 Documentation
Related
Publication
Number
(Old/New No.)
1775-800/1775-6.7.1
1775-801/1775-6.4.1
1775-806/1775-6.5.3
1775-900/1775-2.1
1775-901/1775-2.2
1775-902/--------
1775-904/1775-2.4
1775-908/1775-2.6
1775-910/1775-2.8
PLC-3 Installation and Operations Manual
PLC-3 Programming Manual
I/O Scanner-Message Handling Module User Manual
PLC-3 Controller Data Sheet
PLC-3 Main Processor Module Data Sheet
PLC-3 Memory Organization Data Sheet
Power Supply Data Sheet
PLC-3 Memory Modules Data Sheet
PLC-3 Main Chassis Data Sheet
Title
's
12
Table 1.B Related Data Highway Documentation
Publication
Number
(Old/New No.)
Chapter 1
Introduction
Title
1770-810/1770-6.2.1
1771-801/1771-6.5.1
1771-802---------
1771-811/1771-6.5.8
1771/822/1771-6.5.15
1773-801/1773-6.5.2
1774-819/1774-6.5.8
6001-800/6001-6.5.1
6001-802/---------
Data Highway Cable Assembly and Installation Manual
Communication Adapter Module (cat. no. 1771-KA) User'
s Manual
Communication Controller Module (cat. no.1771-KC/KD) User'
s Manual
PLC-2 Family/RS-232C Interface Module (cat.no. 1771-KG) User's Manual
Data Highway/RS-232-C Interface Module (cat. no. 1771-KE/KF) User's Manual
PLC-4 Communication Interface Module (cat. no. 1773-KA) User's Manual
Communication Adapter Module (cat. no. 1774-KA) User'
s Manual
6001 NET (For VMS) Network Communications Software User'
s Manual
6001 NET (For RSX-1 Software User
1) Network Communication
'
s Manual
Terminology
In this manual you will read about the various commands the 1775–KA module can send and/or receive. To distinguish between commands, we use some of the following terms:
a protected command can read or write only specified areas of PC data
table. A switch on the PLC, PLC–2 Family, and PLC–4 Controllers
determines if the PC will accept only protected commands from another
PC or an RS–232–C device. When you use a protected command, you
may have a limited area that you can read or write in the other station’s
memory. an unprotected command can read or write into any area of PC data
table. A switch on the PC that receives the commands determines if the
PLC, PLC–2 Family, and PLC–4 controller will accept unprotected
commands from another PC or an RS–232–C device. privileged commands are sent by intelligent RS–232–C devices only.
Such devices include computers and intelligent terminals.
Allen–Bradley PC’s do not send privileged commands, but receive and
reply to them. A privileged command can read or write into any area in
the memory of a PC, whether or not switches on the PC have been set
to allow it to receive only protected commands. The term physical
13
Chapter 1
Introduction
command is sometimes used synonymously to mean privileged
command. non–privileged commands include any command that both PC’s and
RS–232–C device can send. The non–privileged commands include the
protected write and unprotected read and write commands. The
non–privileged commands are also referred to as “PLC/PLC–2 type”
commands.

Module Description

Figure 1.1 illustrates the front of the 1775–KA module. The module has the following hardware features:
Self–test diagnostic indicators Thumbwheel switch for setting identification number Two ports– one for Data Highway and one for RS–232–C
communication Two sets of indicators – one for each port Switches for selecting fault responses and communication option
14
Chapter 1
Introduction
Figure 1.1 Communication
PASS FAIL
COMMUNICATION ADAPTER
Adapter Module (Cat. No. 1775-KA)
KA
XMTG RCVG ERR DIS
MODEM
INTERFACE
XMTG RCVG RDY ERR DIS
DATA
HWY
SELF TEST
NO
Self–Test Indicators
Thumbwheel Switch
RS–232–C port Indicators
Data Highway Port Indicators
RS–232–C Port
Data Highway Port
DATA
HWY
10000-I
In addition, the module provides the following software features:
Programmable configuration parameters Command language that allows for complex logic decisions, looping,
and nesting Symbolic representation of data and addresses Embedded arithmetic expressions and logic operations Decimal, octal, or BCD (binary coded decimal) data entry
15
Chapter 1
Introduction

Specifications

Function
Interface the PLC-3 Processor with the Allen-Bradley Data Highway and/or with an RS-232-C device
Location
Single slot in PLC-3 main chassis or expander chassis
Communication Ports
Data Highway
RS-232-C Modem

Applications

Table 1.C lists the specifications for the 1775–KA module.
Table 1.C
Specifications
Module
Communication Rate
T
o Data Highway - 57.6 kilobaud
recommended
o modem-programmable from 1
T baud to 19.2 kilobaud
Cabling
o Data Highway-Data Highway
T dropline cable (Cat.no.1770-CD or equivalent
T
o modem-Modem interface cable
(cat. no. 1775-CKA or equivalent)
Backplane Power Requirement
2.5A max. @ +5V DC
Ambient T
10
Humidity Rating
emperature Rating
00 o 600C (operational)
0
-40
to
850C (storage)
5% to 95% (without condensation)
As already mentioned, the 1775–KA module serves two main purposes:
Interfacing the PLC–3 processor with the Allen–Bradley Data Highway Interfacing the PLC–3 processor with an intelligent RS–232–C device
You can use the module for both of these purposes simultaneously.
In Data Highway applications, the module serves as an interface between the PLC–3 programmable controller and the Allen–Bradley Data Highway. The Data Highway is an industrial communication network that links together as many as 64 distinct stations. Each station can consist of a programmable controller (such as the PLC–3), a computer, or an intelligent RS–232–C device. The central trunkline of the Data Highway may be up to 10,000 feet long, and each station may be as far as 100 feet from the trunkline. Figure 1.2 gives an example of a Data Highway configuration.
16
Chapter 1
Introduction
Figure 1.2 Example
PLC-3
Controller
1775-KA
Data Highway Configuration
Allen-Bradley Data Highway
PC
Module
PC
PC
PC
NOTE: All PCs are Allen-Bradley
PC
Up to 64 Stations
10001–I
17
Chapter 1
Introduction
The PLC–3 can support multiple 1775–KA modules in the same PLC–3 chassis. This provides the PLC–3 with concurrent access to several independent Data Highways.
The 1775–KA module can also serve as an interface between the PLC–3 programmable controller and an intelligent RS–232–C compatible device or any Allen–Bradley PC and its Data Highway module. Some examples of this application of the module are the following:
Interfacing two PLC–3 controllers through a modem link Interfacing a PLC–3 controller with a computer (either directly or
through modems) Interfacing a PLC–3 controller with a remote Data Highway through a
modem link Interfacing a PLC–3 controller as a slave station on a multipoint
modem link Interfacing a PLC–3 controller on a point–to–point link with PLC–2
Family processor through a 1771–KG module (The 1772–LR processor
is not supported in this configuration.)
Figure 1.3 shows the 1775–KA module in a typical modem application.
Figure 1.3
Modem Application
Typical
PLC-3
Controller
Modem
Computer
1775-KA
NOTE: Modems required only for distances greater than 50 feet.
Module
Modem
10002–I
18
Installation
Chapter
2

General

Hardware Installation

This chapter describes installation of the 1775–KA module in two phases:
Installing hardware Programming configuration parameters through the PLC–3 LIST
function
Please read the entire manual carefully before attempting to install the module.
For best results when installing the 1775–KA module, proceed in the order indicated below.
Switch Settings
The 1775–KA module has a number of hardware switches that must be set before the module can be installed in the PLC–3 processor. There is a thumbwheel switch on the front edge of the module and a group of option switches on the bottom edge.
Thumbwheel Switch
Figure 2.1 shows a thumbwheel switch on the front edge of the 1775–KA module. This thumbwheel switch designates the number used by the PLC–3 processor to distinguish one 1775–KA module from another. Rotate the thumbwheel to select the desired identification number.
21
Chapter 2
Installation
Figure 2.1
V
iew of 1775-KA Module
Front
PASS FAIL
KA
XMTG RCVG ERR DIS
COMMUNICATION ADAPTER
XMTG RCVG RDY ERR DIS
MODEM
INTERFACE
DATA HWY
SELF TEST
NO
Self–Test Indicators
Thumbwheel Switch
RS–232–C port Indicators
Data Highway Port Indicators
RS–232–C Port
22
Data Highway Port
DATA
HWY
If there is only one 1775–KA module in the PLC–3 chassis, set its thumbwheel switch to the number 1. If there are multiple 1775–KA modules in the same PLC–3 chassis, set their thumbwheel switches to consecutive numbers, starting with the number 1. You may write the selected number in the space provided beside the thumbwheel switch.
10003-I
Chapter 2
Installation
CAUTION: To guard against unpredictable operation of the PLC–3 processor, do not change the setting on any thumbwheel switch while the 1775–KA module is powered–up.
Option Switches
Figure 2.2 shows a set of four option switches on the bottom edge of the 1775– KA module. Switches 1 and 2 are used when the PLC–3 controller is programmed to operate in a backup configuration. Switch number 1 determines whether or not a fault in the 1775–KA module will cause the primary PLC–3 controller to switch over to the backup PLC–3. Switch number 2 determines whether or not the 1775–KA module will disable its Data Highway port when the PLC–3 becomes deactive. Switch 3 is for RS–232–C communication. Switch 4 is reserved for future use and should always be left open (up, or off). Use Table 2.A below to determine the appropriate switch setting:
Figure 2.2 Option
Switches
23
Chapter 2
Installation
Table 2.A 1775-KA Switch Settings
If this
switch: Is: Then
1 OPEN
1 CLOSED
2 OPEN
2 CLOSED
the PLC will switch over to backup whenever one of the following fault conditions occurs:
1. The 1775-KA module tries to hold control of the PLC-3 backplane for more than 138 microseconds.
2.
The 1775-KA module experiences a execution timeout of more than 32 milliseconds
3.
The 1775-KA module experiences an internal stack
overflow
4.
The 1775-KA module experiences severe Data Highway communication problems.
the primary PLC-3 will not switch to backup when a fault occurs with the 1775-KA module.
the 1775-KA module will disable is Data Highway port whenever the primary PLC-3 controller becomes deactive. The module will no longer be able to transmit or receivemessages through its Data Highway port.
Also, setting switch 2 to open enables the backup operation feature.
the Data Highway port on the module will remain active if the primary PLC-3 becomes deactive.
24
3 OPEN
3 CLOSED
4 OPEN
the module may be connected up to 7,000 cable feet away from a 1771-KF In addition to setting switch 3 to the open position, you must also set switch 2 to closed position. This makes pin 25 on the RS-232-C port of the 1775-KA module active (refer to figures
2.8 to 2.10). Note that switch 3 must always be closed for
communication with an RS-232-C device other than a 1771-KF
the MODEM INTERF connected to a standard RS-232-C device that is located within 50 cable feet of the module.
Switch 4 is reserved for future use and should always be left open.
, a 1771-KG, 1773-KA or another 1775-KA module.
, 1771-KG, 1773-KA, or 1775-KA module.
ACE port of the 1775-KA module may be
Module Placement
After setting the thumbwheel switch, insert the module into any one of the module slots in the PLC–3 processor chassis. Whenever you power–up the processor, the module will receive power also.
Chapter 2
Installation
Indicators
There are three sets of LED indicators on the front of the 1775–KA module (Figure 2.1). The first group, labeled SELF–TEST, indicates the result of internal diagnostic tests that the module continuously performs on its own hardware and firmware. The second group, labeled MODEM INTERFACE, indicates the status of communication through the module’s RS–232–C port. The last group, labeled DATA HWY, indicates the status of communication through the module’s Data Highway port.
Table 2.B. tells what each indicator means.
Table 2.B
Indicators
LED
Indicator
Group
Self-Test PASS
Modem
Interface
Data
Highway
Indicator
Label
FAIL
XMTG
RCVG
ERR
DIS
XMTG
RCVG
RDY
ERR
DIS
Normal
State
ON
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON or
OFF
OFF
OFF
Meaning When ON
Module has passed its own internal diagnostic test
Module has failed its own internal diagnostic tests
Module is transmitting a message over the modem interface port
Module is receiving a message over the modem interface port.
User programming error
Module is disabled due to a fault in the PLC-3 processor, or modem interface port is disabled through the LIST function
Module is transmitting a message over the Data Highway port
Module is receiving a message over the Data Highway port
[1]
Module is ready to transmit a message over the Data Highway port and is waiting to acquire mastership of the highway
User programming error or communication error on either the Data Highway or the Modem port
Module is disabled due to a fault in the PLC-3 processor is disabled through the LIST function
, or Data Highway port
[1]
Depends
on amount of data highway activity
25
Chapter 2
Installation
Data Highway Cable Connections
There are two cable connectors, or ports, on the front of the 1775–KA module (Figure 2.1). The bottom port, labeled DATA HWY., is for connection to the Allen–Bradley Data Highway. If you are using the 1775–KA module in a Data Highway application, plug the Data Highway dropline cable into this port. For details on the installation of the Data Highway cable, refer to the Data Highway Cable Assembly and Installation Manual (publication 1770–810).
RS-232-C Cable Connections
The RS–232–C port, labeled MODEM INTERFACE on the 1775–KA module, can interface with any RS–232–C device that is capable of understanding and generating the communication protocol described in this chapter. Some typical RS–232–C applications are:
Interfacing two PLC–3 controllers through a modem link (Figure 2.3)
Figure 2.3
Two PLC-3 Controllers
Linking
PLC-3 Controller
Modem
1775-KA
PLC-3 Controller
Module
Modem
26
1775-KA
Module
NOTE: Modems required only for distances greater than 50 feet.
10004–I
Chapter 2
Installation
Interfacing a PLC–3 controller with a computer, either directly or
through modems (Figure 2.4)
Figure 2.4
a PLC-3 Station to a Computer
Linking
PLC-3
Controller
Modem
Computer
1775-KA
Module
Modem
10005–I
27
Chapter 2
Installation
PLC-3
Controller
Interfacing a PLC–3 controller with a remote Data Highway through a
modem link (Figure 2.5)
Figure 2.5
a PLC-3 Station to a Remote Data Highway
Linking
Modem
1775-KA
NOTE: All PCs are Allen-Bradley
Module
Modem
1771-KF Module
PC
PC
Allen-Bradley Data Highway
PC
PC
PC
28
Up to 64 Stations
10006–I
Interfacing a PLC–3 controller to a PLC–2 Family processor through a
1771–KG module in a point–to–point link (Figure 2.6)
Figure 2.6
a PLC-3 to PLC-2 Family Controller
Linking
PLC–3 Controller
Chapter 2
Installation
Modem
PLC–2 Controller
1775–KA
1771–KG Module
Module
Modem
NOTE: Modems required only for distances greater than 50 feet.
10007-I
29
Chapter 2
Installation
Computer
Master Station
Interfacing a PLC–3 controller as a slave station on a multipoint
modem link (Figure 2.7)
Figure 2.7
a PLC-3 to a Multi-drop Modem Link
Linking
Multidrop Modem
Multidrop Modem Link
The first four applications above use the module’s RS–232–C port in the unpolled mode, while the last application uses the polled mode. You can select the mode of operation and other characteristics of the RS–232–C port through the LIST function.
Slave Stations
PLC-3 Controller
1775-KA
Modem
Module
10008–I
210
Chapter 2
Installation
Each mode of operation requires a different communication protocol. The unpolled mode uses full–duplex protocol (chapter 10) while the polled mode uses half–duplex protocol (chapter 11). In general, full–duplex protocol gives faster data throughput but is more difficult to implement; half–duplex protocol is easier to implement but gives slow data throughput.
NOTE: In other Data Highway documentation, full–duplex protocol might be referred to as DFI protocol, and half–duplex protocol might be referred to as polled–mode protocol.
Hardware Interface
The modem interface is based on EIA RS–232–C and related standards. This interface should be compatible with most dedicated and dial–up network RS–232 modems.
Mechanical
The RS–232 connector on the 1775–KA module is a 25–pin male connector.
Electrical
Input and output levels on the RS–232 connector conform to the RS–232–C standard. The transmitter has increased capability to drive a 7,000 foot isolated lines. This number depends on baud rate and refers to only direct wire connections. (Refer to Table 2.C.)
211
Chapter 2
Installation
Table 2.C Distance
Rate V
ariations
Distance
in feet
1,000 19,200
2,000 9,600
3,000 9,600
4,000 4,800
5,000 4,800
6,000 2,400
7,000 2,400
Maximum
Baud Rate
The receiver is designed to sense the signal generated by a similar transmitter, and is electrically isolated from all other circuitry on the module. It consists of an opto–isolater circuit with an input and return connection at the RS–232 connector. All other signals on the RS–232 connector are driven and received by standard RS–232 interface circuits, and have a maximum drive capability of 50 feet.
212
Chapter 2
Installation
Pinout
The necessary RS–232–C port connections are described in Table 2.D below:
Table 2.D RS-232-C
Port Connections
Signal at the
1775-KA Abbreviation Pin Input/Output
chassis/shield drain
transmitted data
received data
request to send
clear to send
data set ready
transmitted data return
data carrier detect
data terminal ready
received data return
1
TXD 2 Output
RXD 3 Input
RTS 4 Output
CTS 5 Input
DSR 6 Input
TXDRET 7/14
DCD 8 Input
DTR 20/11 Output
RXDRET 25/13
TXD (transmitted data) caries serialized data. It is output from the
RS–232 connector.
RXD (received data) is serialized data input to the RS–232 connector.
RXD and RXDRET are isolated from the rest of the circuitry on the module.
RTS (request to send) is a request from the RS–232 connector to the
modem to prepare to transmit. It typically turns the data carrier on. When you select the full duplex mode RTS is always asserted. When you select the half duplex mode RTS is turned on when the module has permission to transmit; otherwise it is off.
CTS (clear to send) is a signal from the modem to the RS–232
connector that the carrier is stable and the modem is ready to transmit. The module will not transmit until CTS is true. If CTS is turned off during transmission, the module will stop sending until CTS is restored.
DTR (data terminal ready) is a signal from the RS–232 connector to the
modem to connect to the phone line (that is, “pick up the phone”). The module will assert DTR all the time except during the phone hangup
213
Chapter 2
Installation
sequence. Some modem will not respond to DTR until the phone rings, while others will always pick up the phone whether it is ringing or not.
DSR (data set ready) is a signal from the modem to the RS–232
connector that the phone is off–hook. (It is the modem’s answer to DTR). The module will not transmit or receive unless DSR is true. If the modem does not properly control DSR, or if no modem is used, DSR must be jumpered to an RS–232 high signal at the RS–232 connector. (It can be jumpered to DTR).
DCD (data clear ready) is a signal from the modem to the RS–232
connector that the carrier from another modem is being sensed on the phone line. It will not be asserted unless the phone is off–hook. Data will not be received at the RS– 232 connector unless DCD is true. In the full duplex mode the module will not transmit unless DCD is true. If the modem does not properly control DCD, or if a modem is not being used, DCD must be jumpered to DTR at the RS–232 connector.
TXDRET (transmitted data return) is the return signal for TXD. It is
connected to module logic ground through a resistor.
RXDRET (received data return) is the return signal for RXD. It is
connected to the isolated receiver, and is isolated from all other circuitry on the module.
Connections To The RS–232 Port
Connection to the RS–232 port of the 1775–KA can be one of two types:
Short line (50 feet or less) Isolated long line (between 50 and 7,000 feet)
For short lines, the connection may be either direct or through modems.
You connect an intelligent, RS–232–C compatible device to an interface module by attaching a cable to both the device and to the module socket labeled RS– 232–C CHANNEL. The RS–232–C device may be another Allen–Bradley communication interface module or another manufacturer’s device. For a standard RS–232–C connection, the cable should be no longer than 50 feet. If your RS–232–C device has an Allen–Bradley line driver/receiver, you may use a cable up to 7,000 feet long.
If you want to connect the 1775–KA module to a 1771–KG or 1771–KE/KF module through the RS–232–C channel, use the cabling pinout diagram (Figure 2.8) to construct your own cable.
214
Chapter 2
Installation
RS–232–C CHANNEL Connector of 1775–KA Module
1 2
Figure 2.8 Connection
1 2
7 3
25
4
5 6 8
20
to Allen-Bradley 1771-KG or 1771-KE/KF Module
Connect the Shield at One End Only
13
14
11
1 3
RS–232–C CHANNEL Connector
2
4
5 6 8
of 1771–KG or 1771–KE/KF Module
1
Conductors 2 and 7, 3 and 25 must be twisted pairs for distances longer than 50 feet.
2
Set switch 3 (on the 1775–KA) OFF when the module is communicating with another Allen-Bradley device.
If you want to connect the 1775–KA module to a 1775–KA module through the RS– 232–C channel, use the cabling pinout diagram (Figure 2.9) to construct your own cable.
10009–I
215
Chapter 2
Installation
RS–232–C CHANNEL Connector of 1775–KA Module
Figure 2.9 Connection
1
1
2
2
7 3
25
4
5 6 8
20
1
Conductors 2 and 7, 3 and 25 must be twisted pairs for distances longer than 50 feet.
2
Set switch 3 (on the 1775–KA) OFF when the module is communicating with another Allen-Bradley device.
to Allen-Bradley 1775-KA Module
Connect the Shield at One End Only
25
20
1 3
RS–232–C CHANNEL Connector
2
7
4
5 6 8
of 1771–KA Module
10010–I
216
If you want to connect the 1775–KA module to a modem or computer, use the cabling pinout diagram (Figure 2.10) to construct your own cable.
Chapter 2
Installation
Figure 2.10 Connection
RS–232–C CHANNEL Connector of
1775–KA
Protective Ground Transmitted Data Received Data Request to Send Clear to Send Data Set Ready Signal Ground
Line Signal Detect Data Terminal Ready
Received Data Return
1
Module
to user-Supplied Modem or RS-232-C Device
1 2 3 4 5 6 7 8
20
25
1
Set Switch 3 ON to ground pin 25.
User–supplied Moderm or RS–232–C Device
10011–I
Private lines are permanently connected phone lines used with modems. Dialup is not needed. Usually the modem hold the handshake lines in the proper states.
The RS–232 port can be connected to standard American dial–up modems and some European modems. Other European standards specify that the DTR signal will cause the modem to answer the phone whether it is ringing or not, causing the phone to always be “busy”. Since the modem port asserts DTR while waiting for a call, it cannot be used with such modems.
The types of dial–up network modems that can be used are classified into the following types:
Manual: these are typically acoustically coupled modems. The
connection is established by human operators at both ends, who then insert the handset into couplers to connect the computers.
DTE–controlled answer: these unattended modems are directly
connected to the phone lines. A module controls the modem via the
217
Chapter 2
Installation
DTR, DSR, and DCD signals. It incorporates timeouts and tests to properly operate these types of modems.
Auto–answer: these modems have self–contained timeouts and tests,
and can answer and hangup the phone automatically.
The modem port has no means to control an auto–dial modem, although it is possible that it can be used in conjunction with a separate auto–dialer.
Answering
The module continually asserts DTR when it is waiting for a call. Under this condition the modem will answer a call and assert DSR as soon as ringing is detected. The module does not monitor the RING indicator in the RS–232 interface. Once DSR is detected the module starts a timer (around 10 seconds) and waits for the DCD signal. When DCD is detected communication can start.
If DCD is not detected within the timeout, the module turns DTR off. This causes the modem to hangup and break the connection. When the hangup is complete the modem drops the DSR line. This causes the module to reassert the DTR line and wait for another call. This feature protects access to the phone if someone calling a wrong number reaches this station.
Once DCD is detected the module continues to monitor the DCD line. If DCD goes false the timeout is restarted. If DCD is not restored within the timeout, the hangup sequence is initiated. This feature allows the remote station to re–dial in the event the connection is lost by the phone network.
Note that this handshaking is necessary to guarantee access to the phone line. If this handshaking protocol is defeated by improper selection of modem options, or jumpers at the connectors, the modem may answer a call, but if the connection is lost the modem will not hangup. It will be impossible for the remote station to reestablish the connection because it will get a busy signal.
Character Transmission
218
Data is sent serially over the RS–232 interface, one eight–bit byte at a time. The transmission format conforms to ANSI X3.16, CCITT V.4, and ISO 1177, with the exception that the parity bit is retained while extending the data length to eight bits.
Loading...
+ 209 hidden pages