Rockwell Automation 1770, D17706.5.16 User Manual

AllenBradley
DF1 Protocol and Command Set
Reference Manual

Important User Information

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

Change Description Reference
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
17706.5.16 - October 1996

Table of Contents

What's Changed in This Document soc-i. . . . . . . . . . . . . .
About This Document soc-i. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changes to This Document soc-i
About This Manual P-1. . . . . . . . . . . . . . . . . . . . . . . . . . .
Purpose of This Manual P-1. . . . . . . . . . . . . . . . . . . . . . . . . . .
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
Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Network Layers 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Physical Layer 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DF1 Link 1-2 Network Link 1-2
DH Link 1-3 DH+ Link 1-5 DH485 Link 1-6
Software Layers 1-7
Datalink Layer 1-7 Application Layer 1-8
Message Packet Structure 1-9
Command and Reply Message 1-9 Message Priority 1-10 Delivery Order of Commands 1-10 Types of Commands 1-11 Error Codes 1-11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
P-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding DF1 Protocol 2-1. . . . . . . . . . . . . . . . . . .
DF1 Protocol 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Halfduplex Protocol 2-2
Fullduplex Protocol 2-4 Character Transmission 2-5 Transmission Symbols 2-6
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contentsii
Using Halfduplex Protocols to Send and
Receive Messages 3-1. . . . . . . . . . . . . . . . . . . . . . .
Halfduplex Protocol Message Transmission 3-2. . . . . . . . . . . .
Transmitter and Receiver Message Transfer 3-3 Halfduplex Protocol Environment 3-3 Message Characteristics 3-7 Master
Polling Responsibilities Duplicate Inactive Full Sinks 3-8 Simplified Network Layer 3-8
Slave Transceiver Actions 3-9 HalfDuplex Protocol Diagrams 3-11
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
Detection
Slave Polling
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ransfer with Invalid BCC/CRC
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . .
3-7. . . . . . . . . . . . . . . . . . . . . .
3-7. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-7. . . . . . . . . . . . . . . . . . . . . . . . . . .
3-12. . . . . . . . . . . . .
. . . . . . . . . . . . . .
Using Fullduplex Protocol to Send and
Receive Messages 4-1. . . . . . . . . . . . . . . . . . . . . . .
Fullduplex Protocol Message Transmission 4-2. . . . . . . . . . . . .
Fullduplex 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
Fullduplex Protocol Diagrams 4-10
Normal Message Transfer 4-10 Message Transfer with NAK 4-11 Message Transfer with T Message Transfer with ReTransmission 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
. . . . . . . . . . . . . . . . . . . . . . . . . .
imeout and ENQ
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
4-12. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . .
.
Table of Contents iii
Datalink Layer Message Frames 5-1. . . . . . . . . . . . . . . .
Halfduplex Protocol Message Frames 5-2. . . . . . . . . . . . . . . . .
Polling Frame 5-2 Master Message Frame 5-2 Slave Message Frame 5-2
Fullduplex Protocol Message Frames 5-3
From user application program 5-3 From common application routines 5-3 Datalink layer frame 5-3
BCC and CRC Fields 5-4
BCC
Field Halfduplex protocol example 5-4 Fullduplex protocol example 5-5
CRC
Field Fullduplex and halfduplex slave protocol 5-7 Halfduplex master protocol 5-7 Use
this frame to validate the CRC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
5-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
5-7. . . . . . . . . . . . . . . .
Application Layer Message Packets 6-1. . . . . . . . . . . . .
How Your Application Program Sends and Receives Messages 6-2
Message Packet Format 6-3. . . . . . . . . . . . . . . . . . . . . . . . . . .
Command 6-3 Reply 6-3 DST and SRC 6-4 Command 6-4 Reply 6-4 CMD and FNC 6-5 STS and EXT STS 6-6 TNS 6-7 ADDR 6-8 SIZE 6-8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communication Commands 7-1. . . . . . . . . . . . . . . . . . . .
command name 7-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
apply port configuration 7-4 bit write (write bit) 7-4 change mode 7-5 close
file
diagnostic status 7-6 disable forces 7-6 disable outputs 7-6 download all request (download) 7-7 download completed 7-7 download request (download privilege) 7-8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
Table of Contentsiv
echo 7-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
enable outputs 7-9 enable PLC scanning 7-9 enter download mode 7-9 enter upload mode 7-10 exit download/upload mode 7-10 file read (read file) 7-10 file
write (write file) get edit resource 7-11 initialize memory 7-12 modify
PLC2 compatibility file
file
open physical read 7-13 physical write 7-14 protected protected typed file read 7-16 protected protected typed logical read with three address fields 7-17 protected typed logical write with three address fields 7-18 protected write 7-19 read bytes physical (physical read) 7-19 read diagnostic counters 7-19 read link parameters 7-20 read modifywrite (write bit) 7-20 readmodifywrite N 7-21 read section size 7-22 reset diagnostic counters 7-22 restart request (restart) 7-23 return edit resource 7-24 set data table size 7-24 set ENQs 7-25 set link parameters 7-25 set NAKs 7-25 set CPU mode 7-26 set
timeout set variables 7-27 shutdown 7-28 typed read (read block) 7-28 typed write (write block) 7-30 unprotected unprotected read 7-31 unprotected write 7-32 upload all request (upload) 7-33 upload completed 7-34 upload 7-34
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
bit write
. . . . . . . . . . . . . . . . . . . . . . . . . . .
typed file write
. . . . . .
. . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
bit write
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-12. . . . . . . . . . . . . . . . . . . . . .
7-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-16. . . . . . . . . . . . . . . . . . . . . . . . . . .
7-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-30. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents v
word range read (read block) 7-34. . . . . . . . . . . . . . . . . . . . . .
word range write (write block) 7-35 write bytes physical (physical write) 7-35 PLC5 Type/Data Parameter Examples 7-36 SLC
500 Information Reading and Writing SLC 500 Data 7-38 Reading and Writing SLC 500 Data (using PLC2 terminology) 7-38
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
7-38. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
Message Packet Status Codes (STS, EXT STS) 8-1. . . . .
STS Byte 8-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Local STS Error Codes 8-2 Remote STS Error Codes 8-3
EXT STS Byte 8-3
DH485 EXT STS Codes 8-5
Remote STS and EXT STS Codes 8-5
Remote STS Codes from a PLC2 or 1774PLC Processor 8-5 Remote STS and EXT STS Codes from a PLC3 Processor 8-6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Diagnostic Counters 9-1. . . . . . . . . . . . . . . . . . . . . . . . .
1747
Cat. Nos. 1747KE DH485 Diagnostic Counters 9-3 1747L20, L30, L40, L511, L514, L524, (SLC 500, 5/01, and
5/02 processors), 1747PA2x (SLC APS COM1), 1770KF3, and 1784KR DH485 Diagnostic Counters 9-3
1747L541, L542, and L543 (SLC 5/04 processors)
DH+ Diagnostic Counters 9-4. . . . . . . . . . . . . . . . . . . . .
1747L541, L542, and L543 (SLC 5/03 and 5/04 processors)
DH485 Diagnostic Counters 9-5
1747L541, L542, and L543 (SLC 5/03 and SLC 5/04 processors)
DF1 Diagnostic Counters 9-6. . . . . . . . . . . . . . . . . . . . . .
1761
Cat. Nos. 1761L16AWA, L16BBB, L16BWB, L32AWA, L32BWA, L32BWB
(MicroLogix 1000 processors, Series C or later) DH485 Diagnostic Counters 9-7
1761L16AWA, L16BBB, L16BWB, L32AWA, L32BWA, L32BWB
(MicroLogix 1000 processors) DF1 Diagnostic Counters 9-7
1770 Cat. Nos.
1770KF2 and 1771KE/KF DH and Asynchronous Link Diagnostic
Counters 9-8
1770KF2 and 1785KE DH+ and Asynchronous Link Diagnostic
Counters 9-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1770KFC DF1 Diagnostic Counters 9-13
1771
Cat. Nos. 1771KA, 1771KA2, and 1774KA DH Diagnostic Counters 9-14
1771KC DH Diagnostic Counters 9-16. . . . . . . . . . . . . . . . . .
1771KG,KGM Diagnostic Counters 9-19
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
9-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contentsvi
1775
Cat. Nos. 1775KA,S5,SR5 DH Diagnostic Counters 9-21 1775S5,SR5 DH+ Diagnostic Counters 9-23
1779
Cat. Nos. 1779KP5 DH+ Diagnostic Counters 9-24
1784
Cat. Nos. 1784KT and 1784KT2 DH+ Diagnostic Counters 9-25
1785
Cat. Nos. 1785KA DH Diagnostic Counters 9-26 1785KA DH+ Diagnostic Counters 9-27
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
1785KA3 DH+ Diagnostic Counters 9-28 1785KA5 DH+ Diagnostic Counters 9-29 1785KA5 DH485 Diagnostic Counters 9-30
. . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
9-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1785L11B, L20B, L30B, L40B, L60B, and L80B DH+ Channel
Diagnostic Counters 9-30. . . . . . . . . . . . . . . . . . . . . . . . .
1785L20E, L40E, L40L, L60L, L80E DH+ Diagnostic
Counters 9-32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5250
Cat. Nos.
5250LP1, LP2, LP3, LP4 DH+ Diagnostic Counters 9-33
. . .
9-33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Diagnostic Status Information 10-1. . . . . . . . . . . . . . . . . .
1747
Cat. Nos.
1747KE Status Bytes 10-2
. . . . . . . . . . . . . . . . . . . . . . . . . .
1747L20, L30, L40, L511, L514, L524 (SLC 500, SLC 5/01
and SLC 5/02 processors) Status Bytes 10-3. . . . . . . . . .
1747L532, L541, L542, L543 (SLC 5/03 and SLC 5/04 processors)
Status Bytes 10-4
1761, 1770, and 1771 Cat. Nos. 10-5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
1761L16AWA, L16BBB, L16BWB, L32AWA, L32BWA, L32BWB
(MicroLogix 1000 processors) Status Bytes 10-6
1770KF3 Status Bytes 10-7
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . .
1771KA2, KA, KC/KD, KE, KF, KG, KGM, 1770KF2
Status Bytes 10-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1773, 1775, and 1779 Cat. Nos. 10-11
1773KA Status Bytes 10-11 1775KA, S5 and SR5 Status Bytes 10-13 1779KP5 Status Bytes 10-14
1784
Cat. Nos. 1784KR Status Bytes 10-15 1784KT, KT2 Status Bytes 10-15
1785
Cat. Nos. 1785KA Status Bytes 10-16 1785KA5 Status Bytes 10-17 1785KA3 Status Bytes 10-17 1785KE Status Bytes 10-19
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
10-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents vii
1785LT (PLC5/15) and 6008LTV (PLC5 VME)
Status Bytes 10-20
1785LT3 (PLC5/12) and 1785LT2 (PLC5/25)
Status Bytes 10-21
1785L11B, L20B, L20E, L30B, L40B, L40E, L40L,
L60B, L60L Status Bytes 10-22. . . . . . . . . . . . . . . . . . . .
5130
Cat. Nos.
5130RM1,RM2 (PLC5/250) Status Bytes 10-23
Data
Encoding
Numbering Systems 11-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Decimal 11-2
Binary 11-3
Binary Coded Decimal 11-3
Hexadecimal 11-4
Octal
Binary
Order
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Decimal Representation, Number 239 11-2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Binary Representation, Number 239 11-3
BCD Representation of Decimal 239 11-3
Hexadecimal Representation of Decimal 423 11-4
Octal Representation of Decimal 239 11-5
Floatingpoint
of T
ransmission 11-6. . . . . . . . . . . . . . . . . . . . . . . . . . . .
A 16Bit Word in PLC Memory 11-7 A 16Bit Computer Word with LefttoRight Byte and
Bit Order 11-7
A 16Bit Computer Word with RighttoLeft Byte and
Bit Order 11-7
A 16Bit Computer Word with LefttoRight Byte Order and
RighttoLeft Bit Order 11-7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
10-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11-5. . . . . . . . . . . . . . . . . . . . . . . . . . .
Uploading and Downloading with AB Processors 12-1. . .
Uploading from the Processor 12-2. . . . . . . . . . . . . . . . . . . . . . .
Uploading from a PLC2 Processor 12-2 Uploading from a PLC3 Processor 12-2 Uploading from a PLC5 Processor 12-3
Procedure 1  PLC5/15/B processors, revision E
and earlier 12-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Procedure 2 12-5
Uploading from an SLC 500 Processor 12-6
Downloading to the Processor 12-6
Downloading to a PLC2 Processor 12-7 Downloading to a PLC3 Processor 12-8 Downloading to a PLC5 Processor 12-8
Procedure 1 (PLC5/15/B rev E and earlier) 12-9 Procedure 2 12-10
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . .
Table of Contentsviii
Downloading to an SLC 500 Processor 12-10. . . . . . . . . . . . . .
Procedure 1  SLC 500, SLC 5/01 and SLC 5/02
Processors 12-11
Procedure 2  SLC 5/03 and SLC 5/04 Processors 12-12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
PLC Addressing 13-1. . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC2/1774PLC Addressing 13-2. . . . . . . . . . . . . . . . . . . . . . .
PLC2/1774PLC Logical Addressing 13-2 PLC2 Physical Addressing 13-3 1774PLC Physical Addressing 13-3
PLC3 Addressing 13-4
PLC3 Logical Addressing 13-5 PLC3 Physical Addressing 13-7 PLC3 Symbolic Addressing 13-8
PLC5 Addressing 13-9
PLC5 Logical Addressing 13-10
PLC5 Logical Binary Addressing 13-11 PLC5/250 Logical Binary Addressing 13-13
Logical ASCII Addressing 13-15 PLC5 Physical Addressing 13-16 PLC5
Floating Point
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
13-17. . . . . . . . . . . . . . . . . . . . . . . . . . .
Line Monitor Examples 14-1. . . . . . . . . . . . . . . . . . . . . . .
Halfduplex Line Monitor Example 14-2. . . . . . . . . . . . . . . . . . . .
Message from master to slave and slave acknowledgement: 14-2 Message sent from slave to master in response to poll and
slave acknowledgement: 14-2
Poll with a DLE EOT in response: 14-2
Fullduplex PLC2 Line Monitor Example 14-3 Fullduplex PLC3 Line Monitor Example 14-6
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
ASCII Codes 151. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preface
About This Manual
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.
17706.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 Halfduplex Protocol to Send and Receive Messages
Chapter 4,
Using Fullduplex Protocol to Send and Receive Messages
This manual is divided into five units:
Message
Packets
Chapter 5,
Datalink 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 halfduplex and fullduplex protocols
ference
properly configure the
datalink 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 PLC2, PLC3 and PLC5 processors information on addressing
PLC2, PLC3, PLC5, and PLC5/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
17706.5.16  October
, 1996
About This Manual P–3

Terms and Abbreviations

Term Definition
local node The node sending the command
node The 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 AllenBradley documentation, you may find the term station used in place of the term node.
physical link Cable and associated hardware, such as transmitter and receiver
circuits.
PLC controller An AllenBradley programmable controller. See programmable
controller.
protocol Set of programming rules for interpreting the signals transmitted over
the physical link by nodes.
programmable
controller
remote node The node sending the reply to the local node
Abbreviation Definition
ACK acknowledgement. In communication, ACK is a control code sent by
DH+ Data Highway Plus. AllenBradley proprietary network protocol.
NAK negative acknowledgement.
a solidstate control system that has a userprogrammable 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.

Related Publications

Publication Name Publication Number
DH/DH+/DH II/DH485 Cable Installation Manual 17706.2.2
DH Overview Product Data 17702.39
DH+ Overview Product Data 17852.6
SCADA System Selection Guide AG2.1
SCADA System Application Guide AG6.5.8
17706.5.16  October
, 1996
About This ManualP–4

Related Products

Catalog Number Product Related Documentation
1747KE DH485/RS232 Interface Module 17472.3.7, product data
1770KF2 DH or DH+ Asynchronous (RS232 or RS422A) Interface
1770KF3 DH485 Asynchronous (RS232) Interface Module 17706.5.18, user manual
1771KA2 DH PLC2 Family Communication Adapter Module 17715.2, switch settings
1771KG PLC2 Family RS232 Interface Module 17712.32, product data
1771KGM SCADA Communication Master Module for PLC2 Family 17712.85, product data
1771KE,KF DH RS232 Interface Module 17716.5.16, user manual
1775KA DH PLC3 Communication Adapter Module 17756.5.1, user manual
1775S5,SR5 PLC3 I/O Scanner Module 17756.5.5, user manual
1784KR DH485 Personal Computer Interface Module 17842.23, installation data
1784KT DH+ PC Interface Module 17842.31, installation data
1784KT2/B DH+ PS/2 Interface Module 17842.21, installation data
1784KT2/C 17846.5.16, user manual
1784KTX DH+ PC Interface Module 17846.5.22, user manual
1784KTXD DH+ PC Interface Module
1784PCMK DH+/DH485 PCMCIA communication interface 17846.5.19, user manual
1785KA DH/DH+ Communication Interface Module 17852.6, product data
1785KA3 DH+ PLC2 Family Communication Adapter Module 17852.6, product data
1785KA5 DH+/DH485 Communication Interface Module 17856.5.5, user manual
1785KE DH+ RS232 Interface Module 17856.5.2, user manual
5130RM1,RM2 PLC5/250 Resource Manager Module 50006.2.1, design manual
9351AIX, DKTS, HPUS, OSF, VS, WES, WKTS
9355WABC
Allen-Bradley offers a wide range of interfaces for the DH, DH+, and DH485 networks, including:
Module
INTERCHANGEt Software
RSLINXt C SDK Software
17476.12, user manual
17706.5.13, user manual 17706.5.13RN1 release notes
17706.5.18RN1, release notes 17706.5.18RN2, release notes
17716.5.1, user manual
17716.5.8, user manual 17716.5.8DU1, document update
17716.5.39, user manual
17716.5.16DU1, document update
17842.23RN1, release notes
17856.5.1, user manual
17856.5.3, user manual 17856.5.3DU1, document update
50006.2.10, installation manual
50006.4.21, reference manual
9398WABCTD11.21.95, data sheet
17706.5.16  October
, 1996
About This Manual P–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 AllenBradley documents that might be useful
17706.5.16  October
, 1996
Network Basics
Network Layers  Chapter 1
Chapter 1
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 reassembly of messages. Provides recovery from transmission errors.
Network
Datalink 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:
Section Page
Physical Layer 1-2
Software Layers 1-7
Message Packet Structure
1-9
Publication
17706.5.16 - October 1996
1–2 Network Layers

Physical Layer

DF1 link
RS232 Network Interface
network link
DH/DH+/DH485 link
nodes
IBMPC 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 link Connects And allows See page
PLC2, PLC3
processors
color graphic systems
DH
DH+
DH485
ControlNet
Using up to 255 nodes.
personal computers
host computers
programmable
RS232/RS422 devices
same devices as DH
PLC5 processors
SLC 5/04 processor
SLC 500 processors
color graphic systems
personal computers
PLC5 processors
I/O devices
personal computers
operator interface devices
bridges (e.g., 1785KA modules), you can extend the length of your DH network to contain
up to 64 nodes
up to 64 nodes 1-5
up to 32 nodes 1-6
up to 99 nodes --------
1-3
Publication
17706.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 processor Connects to a DH link through the
PLC2 family
PLC3
PLC5/250
PLC5, SLC 5/04
Although a PLC5 processor does not directly connect to a DH link, it can communicate with devices on a DH link via the 1785KA module.
DH PLC2 family communication adapter module (cat. nos. 1771KA2, KG)
DH PLC3 family communication adapter module (cat. nos. 1775KA,S5, SR5)
Resource manager module (cat. nos. 5130KA, RM1,RM2)
DH+/DH communication module
(cat. no. 1785KA)
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
17706.5.16 - October 1996
1–4 Network 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; 1770SC
PLC3 processor cat. nos. 1775KA or S5
DH+ link
1785KA
personal computer
modem
modem
DH interface module cat. nos. 1771KE, KF
SC SC SC SC SC SCSC
PLC2 family processor cat. no. 1771KA2
RS232C link (50 cableft. max.)
DH link
PLC2/30 processor
1771KG
PLC5/250 processor 5130RM1
modem
modem
1770KF2
1770KF2
RS232C link (50 cableft. max.)
T60 industrial workstation running
iew software
ControlV
Publication
17706.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 processor Connects to a DH+ link
PLC2
PLC3
through the PLC2 Family Interface module (cat. no. 1785KA3)
through the I/O Scanner Communication Adapter module (cat. nos. 1775S5,SR5)
PLC5 directly
PLC5/250
SLC 5/04
You
can configure the data rate for SLC 5/04 processors.
through the Resource Manager module (cat. nos. 5130KA, 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; 1770SC
T71 with 1784KTx
SLC 5/04 processor
PLC3 processor cat. no. 1775S5
DH link
1785KA
SC
PLC5 processor
T53 programming terminal with 1784KT installed
notebook computer with 1784PCMK
PLC2 processor cat. no. 1785KA3 (or any other PLC2 processor)
DH+ link
personal computer
1785KE
SCSC
RS232C link (50 cableft. max.)
PLC5/250 processor cat. no. 5130RM1
1770KF2
T60 industrial workstation with ControlV
iew software
Publication
17706.5.16 - October 1996
1–6 Network 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 1784KTX card installed and running 6200 series software
1747AIC
RS232/RS485 converter
DTAM Plus operator interface
1747AIC
1747AIC
SLC 5/01 processor in 17slot modular system
1747PIC
channel 1
À
PLC5 processor
DH+ link
SLC 5/04 processor
channel 0
DH485 link
1770KF3
1747AIC
PanelV
iew 550
operator terminal
SLC 500 fixed 30I/O controller with expansion chassis
1747AIC
remote I/O link
notebook compute with 1784PCMK
1747SN
SLC 5/03 processor
to remote I/O chassis
Publication
17706.5.16 - October 1996
À
T
o connect an SLC 5/04 to a 1747PIC,
use a 9pin (male) to 25pin (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
RS232 data link layer
DH/DH+/DH485 RS232 interface modules
RS232 DH/DH+
link layer (DF1)
link layer (network)
DH485
PLC processor
application
common application routines
DH/DH+ /DH485 data link layer
Datalink 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 is Then
you do not need to program this layer.
a DH, DH+ or DH485 link
a DF1 link between AllenBradley interface modules
a DF1 link between an AllenBradley interface module and a computer
Your application programs on the network are not involved with internode 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
17706.5.16 - October 1996
1–8 Network 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 is Then
a network link
a DF1 link between AllenBradley interface modules
1747KE
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
17706.5.16 - October 1996
DH485 link
RS232 DF1 fullduplex
a DF1 link between an AllenBradley interface module and a computer
1785KE
PLC5/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:
Bytes Contents
Information used by the application and datalink 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 this See this page
command and reply message 1-9
message priority 1-10
delivery order of commands 1-10
types of commands 1-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
17706.5.16 - October 1996
1–10 Network 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 link Classifies a message as
high priority or normal priority Priority levels of messages determine the order in which nodes transmit
DH
DH+ normal priority
DH485 normal 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
17706.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 node Error 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
17706.5.16 - October 1996
Protocol
Understanding DF1 Protocol  Chapter 2
Using Halfduplex Protocols to Send and Receive Messages  Chapter 3
Using Fullduplex Protocols to Send and Receive Messages  Chapter 4
Chapter 2
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:
Section Page
DF1 Protocol 2-2
Character Transmission 2-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
17706.5.16 - October 1996
Loading...
+ 221 hidden pages