Because of the variety of uses for the products described in this
publication, those responsible for the application and use of this
control equipment must satisfy themselves that all necessary steps
have been taken to assure that each application and use meets all
performance and safety requirements, including any applicable laws,
regulations, codes and standards.
The illustrations, charts, sample programs and layout examples
shown in this guide are intended solely for purposes of example.
Since there are many variables and requirements associated with any
particular installation, Allen-Bradley does not assume responsibility
or liability (to include intellectual property liability) for actual use
based upon the examples shown in this publication.
Allen-Bradley publication SGI-1.1, Safety Guidelines for the
Application, Installation, and Maintenance of Solid-State Control
(available from your local Allen-Bradley office), describes some
important differences between solid-state equipment and
electromechanical devices that should be taken into consideration
when applying products such as those described in this publication.
Reproduction of the contents of this copyrighted publication, in
whole or in part, without written permission of Allen-Bradley
Company, Inc., is prohibited.
Throughout this manual we use notes to make you aware of safety
considerations:
ATTENTION: Identifies information about practices
or circumstances that can lead to personal injury or
!
Attention statements help you to:
death, property damage or economic loss.
• identify a hazard
• avoid the hazard
• recognize the consequences
Important:Identifies information that is critical for successful
application and understanding of the product.
PLC-5, DH+, PLC-2, PLC-3, PLC, SLC 500, SLC, SLC 5/01, SLC 5/02, SLC 5/03, SLC 5/04, ControlNet, MicroLogix, and
PLC-2/15 are trademarks of Allen-Bradley Company, Inc.
All other trademarks are property of their respective companies.
Summary of Changes
What's Changed in This
Document
About This Document
Changes to This
Document
ChangeDescriptionReference
organization
commands
This document contains important information concerning the DF1
Protocol and Command Set Reference Manual.
This information extends and explains information provided in the
Data Highway/Data Highway Plust/DH-485 Communication
Protocol and Command Set Reference Manual, publication
1770-6.5.16 — November 1991
Changes to this document are indicated by a revision bar in the
margin.
The “look and feel” of your Allen-Bradley documentation has
changed! We’re constantly trying to improve our documentation to
make it more usable for you. If you have questions or comments
about this document, complete the enclosed Publication Problem
Report. In addition, we’ve also made the following changes to
publication 1770-6.5.16:
We've reorganized the reference manual to make it easier to find
information. We include a map" of this new organization.
We've added and updated the communication commands. We've
also organized them alphabetically. Additional commands include:
•apply port configuration
•change mode
•close file
•disable forces
•get edit resources
•initialize memory
•open file
•protected typed logical read with three address fields
•protected typed logical write with three address fields
•read diagnostic counters
•read section size
•return edit resource
Preface, page P-2
Chapter 7, Communication Commands"
Publication
17706.5.16 - October 1996
Table of Contents
What's Changed in This Document soc-i. . . . . . . . . . . . . .
Who Should Use This Manual P-1
What This Manual Contains P-2
Terms and Abbreviations P-3
Related
Related Products P-4
Conventions Used in This Manual P-5
Normal Message Transfer 3-12
Message T
Message Transfer with ACK Destroyed 3-13
Poll with No Message Available 3-13
Poll with Message Returned 3-14
Duplicate Message Transmission 3-15
Message Sink Full, Case 1 3-16
Message Sink Full, Case 2 3-17
Fullduplex Protocol Environment 4-3
Message Characteristics 4-4
Transmitter and Receiver Message Transfer 4-4
How the Transmitter Operates 4-5
How the Receiver Operates 4-7
Fullduplex Protocol Diagrams 4-10
Normal Message Transfer 4-10
Message Transfer with NAK 4-11
Message Transfer with T
Message Transfer with ReTransmission 4-13
Message Transfer with Message Sink Full 4-14
Message Transfer with NAK on Reply 4-15
Message Transfer with Timeout and ENQ for the Reply 4-16
Message Transfer with Message Source Full on the Reply 4-17
Read this preface to familiarize yourself with this manual.
This preface includes information on:
• the purpose of this manual
• who should use this manual
• what this manual contains
• terms and abbreviations used in this manual
• related publications
• related products
• conventions used in this manual
Purpose of This Manual
Who Should Use This
Manual
Use this manual to:
• program a DF1 driver for a computer to interface to
Allen-Bradley DF1 products and to proprietary networks via
protocol bridges
• write applications for 1784-KT, -KT2, -KTX, -KTXD, -PCMK
communication interfaces using standard
Rockwell Software Inc. (RSI) driver products
• troubleshoot your network
Read this manual before you attempt to write a DF1 driver, or before
attempting to troubleshoot your network. We assume that you are
already familiar with:
• your serial device
• Allen-Bradley PLC processors
Before you begin writing your driver, make sure you have:
• a pocket calculator that adds, subtracts, multiplies, and divides in
decimal, hexidecimal, octal, and binary
• a serial protocol analyzer for displaying actual hex bytes sent to
and from a DH, DH+, or DH485 module
"
Writing drivers
As an alternative to writing your own driver, RSI provides RSLINX
C SDK (cat. no. 9355-WABC) and INTERCHANGE (cat. nos.
9351-AIX, -DKTS, -HPUS, -OSF, -VS, -WES, -WKTS) software.
These products provide an application programmer’s interface (API)
and a complete set of drivers to communicate with Allen-Bradley
processors via Ethernet, DH, DH+, DH485, and DF1 serial links on
various hardware and operating system platforms.
17706.5.16 October
, 1996
About This ManualP–2
What This Manual
Contains
➊Network
Basics
Chapter 1,
Network Layers
➋Protocol
Chapter 2,
Understanding DF1
Protocol
Chapter
3,
Using Halfduplex
Protocol to Send and
Receive Messages
Chapter 4,
Using Fullduplex
Protocol to Send and
Receive Messages
This manual is divided into five units:
➌Message
Packets
Chapter 5,
Datalink Layer
Message Frames
Chapter 6,
Application Layer
Message Packets
Chapter 7,
Communication
Commands
Chapter 8,
Message Packet
Status Codes (STS,
EXT STS)
➍Module
Diagnostics
Chapter 9,
Diagnostic Counters
Chapter 10,
Diagnostic Status
Information
➎Reference
Chapter 1
1,
Data Encoding
Chapter 12,
Uploading and
Downloading
Chapter 13,
PLC Addressing
Chapter 14,
Line Monitor
Examples
➊➋➌➍➎
gain an understanding of
the network
•
understand what DF1
protocol is
understand the dif
•
between halfduplex and
fullduplex protocols
ference
•properly configure the
datalink layer of your
software driver
understand each part of a
•
message packet
•
learn message packet
formats for all commands
•asynchronous link status
codes that may be sent in
the STS fields of your
message packet
•diagnostic counters
contained in each interface
module
information returned from
•
each interface when your
computer sends a
diagnostic status command
Chapter 15,
ASCII Codes
•
data encoding and
conversion information
upload and download
•
procedures for the PLC2,
PLC3 and PLC5
processors
information on addressing
•
PLC2, PLC3, PLC5, and
PLC5/250 processors
line monitor examples that
•
show actual commands
being sent and provide an
explanation of each
example
•hex and binary values for
ASCII characters
17706.5.16 October
, 1996
About This ManualP–3
Terms and Abbreviations
TermDefinition
local nodeThe node sending the command
nodeThe point at which devices, such as programmable controllers,
interface to the network. Each device on a network must have a
unique node address.
In some AllenBradley documentation, you may find the term station
used in place of the term node.
physical linkCable and associated hardware, such as transmitter and receiver
circuits.
PLC controllerAn AllenBradley programmable controller. See programmable
controller.
protocolSet of programming rules for interpreting the signals transmitted over
the physical link by nodes.
programmable
controller
remote nodeThe node sending the reply to the local node
AbbreviationDefinition
ACKacknowledgement. In communication, ACK is a control code sent by
a solidstate control system that has a userprogrammable memory
for storage of instructions to implement specific functions such as I/O
control, logic, timing, counting, report generation, communication,
arithmetic, and data file manipulation. A controller consists of central
processor, input/output interface, and memory. A controller is
designed as an industrial control system.
the receiving node to indicate that the data has been received
without error and the next part of the transmission may be sent.
17716.5.8, user manual
17716.5.8DU1, document update
17716.5.39, user manual
17716.5.16DU1, document update
17842.23RN1, release notes
17856.5.1, user manual
17856.5.3, user manual
17856.5.3DU1, document update
50006.2.10, installation manual
50006.4.21, reference manual
9398WABCTD11.21.95, data sheet
17706.5.16 October
, 1996
About This ManualP–5
Conventions Used in This
Manual
"
Communication, diagnostic, and driver software
DH 6001-NET Network Communications Software (Series 6001)
provides a DH driver for many DEC
information, refer to the DH/DH+/DH II
computers. For more
Network Communication
Software Overview (publication 6006-2.3).
We use these conventions in this manual:
This convention:Is used to:
"
call attention to helpful information
refer you to other AllenBradley documents that
might be useful
17706.5.16 October
, 1996
Network Basics
Network Layers Chapter 1
Chapter1
Network Layers
Your network is made up of several layers, including:
Nodes send data through the layers.
Application layer serves as the window through which applications access
communication services, including file transfers, virtual terminal functions, and email.
Presentation
Session
applications.
Transport layer performs segmentation and reassembly of messages.
Provides recovery from transmission errors.
Network
Datalink layer runs protocol to guard against errors, detects errors, and corrects
errors. Packages data and puts it onto the physical cable. Manages the flow of the
data bit stream into and out of each network node.
layer manages data formats for the applications.
layer establishes and terminates network communications between
layer establishes connections for communication between network nodes.
Physical layer transmits bits between communication devices.
In this chapter, we discuss the physical, data-link, and application
layers. (We refer to the data-link and application layers as the
software layers.) This chapter contains these sections:
SectionPage
Physical Layer1-2
Software Layers1-7
Message Packet Structure
1-9
Publication
17706.5.16 - October 1996
1–2Network Layers
Physical Layer
DF1 link
RS232 Network Interface
network link
DH/DH+/DH485 link
nodes
IBMPC XT, AT or
compatible computer
ControlNet
link
The physical layer is a set of cables and interface modules that
provides a channel for communication between the nodes. A node is
a connection point onto a network, typically containing a unique
address.
When you connect a computer serially to your DH, DH+, DH-485,
or ControlNet link, the interface module acts as an interface between
the:
• DF1 link (RS-232 or RS-422-A)
• network link (DH, DH+, DH485, ControlNet link)
DF1 Link
A DF1 link provides:
• master-slave communication through a half-duplex protocol
• peer-to-peer communication through a full-duplex protocol
This manual provides information necessary to write your own
driver for an intelligent device on a DF1 link. See “Software
Layers,” on page 1–7, for the layers your software driver must
implement so that your intelligent device can talk to other DH,
DH+, DH485, or ControlNet nodes.
Network Link
These network links are available for peer-to-peer communication:
This linkConnectsAnd allowsSee page
•PLC2, PLC3
processors
•color graphic systems
DH
DH+
DH485
ControlNet
➀
Using
up to 255 nodes.
•personal computers
•host computers
•programmable
RS232/RS422 devices
•same devices as DH
•PLC5 processors
•SLC 5/04 processor
•SLC 500 processors
•color graphic systems
•personal computers
•PLC5 processors
•I/O devices
•personal computers
•operator interface devices
bridges (e.g., 1785KA modules), you can extend the length of your DH network to contain
up to 64 nodes
up to 64 nodes1-5
up to 32 nodes1-6
up to 99 nodes--------
➀
1-3
Publication
17706.5.16 - October 1996
1–3Network Layers
DH Link
A DH link is a local area network (LAN) designed for factory-floor
applications. This link accepts 64 devices and can transmit 57.6 K
bits of data per second.
A DH link consists of a trunk cable up to 10,000 feet (3,048 meters)
long and drop cables as long as 100 feet (30.48 meters) each.
Each node is at the end of a drop cable and connects to the DH link
through a station connector (cat. no. 1770-SC). This is the only
configuration tested and supported by Allen-Bradley.
This processorConnects to a DH link through the
PLC2 family
PLC3
PLC5/250
PLC5, SLC 5/04
➀
Although a PLC5 processor does not directly connect to a DH link, it can communicate with
devices on a DH link via the 1785KA module.
DH PLC2 family communication adapter module
(cat. nos. 1771KA2, KG)
DH PLC3 family communication adapter module
(cat. nos. 1775KA,S5, SR5)
A DH link implements peer-to-peer communication through a
scheme called the floating master. With this arrangement, each
node has equal access to become the master. The nodes bid for
temporary mastership based on their need to send information.
Publication
17706.5.16 - October 1996
1–4Network Layers
Unlike a master/slave relationship, a floating master relationship
does not require the current master to poll each node to grant
permission to transmit. Therefore, it provides a more efficient
network because there is less overhead—i.e., time—per transaction.
SC
= station connector; 1770SC
PLC3 processor
cat. nos. 1775KA or S5
DH+ link
1785KA
personal computer
modem
modem
DH interface module
cat. nos. 1771KE, KF
SCSCSCSCSCSCSC
PLC2 family processor
cat. no. 1771KA2
RS232C link
(50 cableft. max.)
DH link
PLC2/30 processor
1771KG
PLC5/250 processor
5130RM1
modem
modem
1770KF2
1770KF2
RS232C link
(50 cableft. max.)
T60 industrial workstation running
iew software
ControlV
Publication
17706.5.16 - October 1996
1–5Network Layers
DH+ Link
A DH+ link is similar to a DH link, but is optimally used for smaller
networks consisting of limited nodes (about 15 maximum). A DH+
link accepts 64 devices and can transmit data at 57.6, 115.2, or
230.4K bits. (PLC-5/250, SLC, and PLC processors support 57.6
and 115.2K bits; SLC 5/04 processors support 230.4K bits; PLC-5
processors are expected to support 230.4K bits early in 1997.)
This processorConnects to a DH+ link
PLC2
PLC3
through the PLC2 Family Interface module
(cat. no. 1785KA3)
through the I/O Scanner Communication Adapter module
(cat. nos. 1775S5,SR5)
PLC5directly
PLC5/250
SLC 5/04
➀
➀
You
can configure the data rate for SLC 5/04 processors.
through the Resource Manager module
(cat. nos. 5130KA, RM1, RM2)
directly
A DH+ link implements peer-to-peer communication with a
token-passing scheme to rotate link mastership among the nodes
connected to that link.
SC
= station connector; 1770SC
T71 with 1784KTx
SLC 5/04 processor
PLC3 processor
cat. no. 1775S5
DH link
1785KA
SC
PLC5 processor
T53 programming
terminal with 1784KT
installed
notebook computer
with 1784PCMK
PLC2 processor
cat. no. 1785KA3
(or any other PLC2
processor)
DH+ link
personal computer
1785KE
SCSC
RS232C link
(50 cableft. max.)
PLC5/250 processor
cat. no. 5130RM1
1770KF2
T60 industrial
workstation with
ControlV
iew software
Publication
17706.5.16 - October 1996
1–6Network Layers
DH485 Link
A DH485 link is a low cost, peer-to-peer programming and
data-acquisition link for a variety of Allen-Bradley products.
DH485 topology is similar to DH and DH+ topology. You can
connect as many as 32 nodes to a DH485 link.
The DH485 link is based on the Electrical Industries Association(EIA) Standard RS-485 Electrical Signalling Specification.
A variety of Allen-Bradley products (including SLC 500 controllers,
1784-KTX, 1747-KE, 1770-KF3, and operator interface devices) act
as token-passing masters on the DH485 link. This link also supports
a respond-only mode for low-level devices on the link, such as
Allen-Bradley bar code decoders.
A DH485 link implements peer-to-peer communication with a
token-passing scheme to rotate link mastership among the nodes
connected to that link.
T53 programming terminal with a
1784KTX card installed and running
6200 series software
1747AIC
RS232/RS485
converter
DTAM Plus
operator
interface
1747AIC
1747AIC
SLC 5/01 processor
in 17slot modular system
1747PIC
channel 1
À
PLC5 processor
DH+ link
SLC 5/04
processor
channel 0
DH485 link
1770KF3
1747AIC
PanelV
iew 550
operator terminal
SLC 500
fixed 30I/O
controller with
expansion chassis
1747AIC
remote I/O link
notebook compute
with 1784PCMK
1747SN
SLC 5/03
processor
to remote
I/O chassis
Publication
17706.5.16 - October 1996
À
T
o connect an SLC 5/04 to a 1747PIC,
use a 9pin (male) to 25pin (female) adapter.
1–7Network Layers
Software Layers
Your DF1 links and network links (DH, DH+, and DH485) each use
two layers of software to enable communication:
• the data-link layer
• the application layer
This figure shows how these layers fit together.
computer
application
common
application
routines
RS232
data link
layer
DH/DH+/DH485
RS232 interface modules
RS232DH/DH+
link layer
(DF1)
link layer
(network)
DH485
PLC processor
application
common
application
routines
DH/DH+
/DH485 data
link layer
Datalink Layer
This layer controls the flow of communication over the physical link
and:
• determines the encoding of data on the physical medium
• controls who transmits data and who listens using an
arbitration protocol
• conveys data packets intact from the source node to the
destination node over the physical link
"
If your link isThen
you do not need to program this layer.
a DH, DH+ or DH485 link
a DF1 link between AllenBradley
interface modules
a DF1 link between an AllenBradley
interface module and a computer
Your application programs on the network
are not involved with internode protocol,
handshaking, or control of the link.
the interface modules automatically take
care of this layer. Your application
program does not have to be involved with
handshaking control.
you must program this layer at your
computer.
Programming the data-link layer
You can program the data link layer using DF1 protocol.
For more information, see Chapter 3, “Using Half-duplex Protocol to
Send and Receive Messages,” or Chapter 4, “Using Full-duplex
Protocol to Send and Receive Messages.”
Publication
17706.5.16 - October 1996
1–8Network Layers
Application Layer
This layer controls and executes the actual commands specified in
the communication between nodes. This layer is the same for both
DF1 and network links. The application layer:
• interfaces to user processes and databases
• interprets commands
• formats user data into packets
The application layer depends upon the type of node the application
is running on since it must interface to the user process and interpret
the user database.
"
Processes in the application layer
The application layer is typically organized into two types of
processes:
• senders — A sender, after receiving a signal from the user
process, sends a message and awaits a reply. It then sends the
results to the user process.
• responders — A responder waits for an incoming message from
the link. When the responder receives a message, it performs the
indicated operation on the user data base and returns a reply
message to the sender.
If your physical link isThen
a network link
a DF1 link between AllenBradley interface
modules
1747KE
SLC 5/02
processor
the communication modules automatically
take care of this layer.
the interface modules automatically take
care of this layer. (See figure below.)
Publication
17706.5.16 - October 1996
DH485 link
RS232
DF1 fullduplex
a DF1 link between an AllenBradley
interface module and a computer
1785KE
PLC5/15
processor
DH+ link
you will need to program this layer at your
computer.
1–9Network Layers
Message Packet Structure
"
Messages
See Chapter 7, “Communication Commands,” for:
• a description of the command messages for each type of
PLC processor
• information on how to program the application layer fields of a
message packet for an asynchronous link
All messages on a network have the same fundamental structure,
regardless of their function or destination. If you could freeze a
message packet while it is in transmission, you would see:
BytesContents
Information used by the application and datalink layers of your software to
get the message to its destination:
protocol
data
•If a transaction originates from a PLC processor, the interface module
automatically fills the protocol bytes.
•If the transaction originates from a computer, your computer software
must supply the necessary protocol.
Information supplied by application program at the source and delivered to
the application program at the destination.
The following sections describe bytes that you define using the
application-layer protocol bytes in your message packet.
For a detailed description of how to use these bytes for each type of
command, see Chapter 7, “Communication Commands.”
To define thisSee this page
command and reply message1-9
message priority1-10
delivery order of commands1-10
types of commands1-11
error codes
1-11
Command and Reply Message
A network transaction consists of a command and a reply.
The two parts provide extra data integrity by making sure that a
required action always returns a reply with some sort of status, either
zero status for a good reply, or non-zero status as an error code.
The application-layer protocol distinguishes a command from a
reply. The data area of a command and its corresponding reply
depend on the type of command.
Publication
17706.5.16 - October 1996
1–10Network Layers
Message Priority
You specify the priority level for each DH command in the message
command code. The node that receives a command message must
establish the same priority level for its corresponding reply message:
This linkClassifies a message as
high priority or normal priority
Priority levels of messages determine the order in which nodes transmit
DH
DH+normal priority
DH485normal priority
Important:Nodes with high priority messages are given priority
messages on a DH link. In the polling process, nodes with high priority
messages will always be given priority over nodes with normal priority
messages.
over nodes 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.
Delivery Order of Commands
The sending node, the network, and the receiving node execute
commands based on network conditions, including—but not limited
to:
• nodes buffering commands
• retries due to noise on the network
• priority levels
If your application requires that commands be delivered in a specific
order, your logic must control the initiation of one command at a
time on the network and verify delivery before initiating additional
commands. This verification is completed by:
• a done bit or an error bit in a PLC processor
• a reply message in a computer
A done bit or a successful reply causes the next command to be
initiated. If an error bit or a reply with non-zero status is returned,
you must decide the appropriate action based on your application.
Important:If any node on the network initiates multiple commands
(for example, the sending node sets multiple bits at any
one time), the order in which these commands get
executed at the receiving node cannot
be guaranteed.
Publication
17706.5.16 - October 1996
1–11Network Layers
Types of Commands
From your computer on a DF1 link to a node on a DH, DH+ or
DH485 link, you can send four types of commands:
• read
• write
• diagnostic
• upload/download
For additional information on the commands you can send,
see Chapter 7, “Communication Commands.”
Error Codes
When your computer sends a command on the asynchronous link, a
status code is returned in the reply message. This code tells you the
status of the command sent from your computer. You must program
your computer to interpret this code. For more information on codes
and their meanings, see Chapter 8, “Message Packet Status Codes.”
Error codes can be generated at two places:
• the sending node
• the receiving node
For codes that are returned from the sending node:
From this nodeError codes are generated when
•an application program used the wrong message format or issued
sending node
receiving node
illegal commands.
•the sending node cannot complete a transaction due to network
problems.
an application problem exists at the receiving node. Typically, these
involve:
•the PLC processor being off line (in Program mode, for example)
or
•the command trying to access a memory area is blocked by the
interface module or user application program (i.e., the data table
location does not exist or is restricted).
Publication
17706.5.16 - October 1996
Protocol
Understanding DF1 Protocol Chapter 2
Using Halfduplex Protocols to Send and Receive
Messages Chapter 3
Using Fullduplex Protocols to Send and Receive
Messages Chapter 4
Chapter2
Understanding DF1 Protocol
If you are connecting an interface module to a computer, you must
program the computer to understand and issue the proper protocol
character sequences. This chapter describes the DF1 protocol you
can use with your DF1-link driver for:
• peer-to-peer (two-way simultaneous) communication
• master-slave (two-way alternate) communication
This chapter includes these sections:
SectionPage
DF1 Protocol2-2
Character Transmission2-5
Transmission Symbols
Important:The 1784-KT and 1784-KT2 cards connect directly to
DH+; the 1784-KR card connects directly to DH-485.
As a result, an asynchronous RS-232 interface is not
used and the information in this chapter does not apply
to software written for these cards, which use the
Standard Driver software.
2-6
Publication
17706.5.16 - October 1996
Loading...
+ 221 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.