BULLETIN 1203-GD2, -GK2 & 1336-GM2 DF1 MESSAGING (HALF DUPLEX / MULTI-DROP)

Similar documents
Applied Data Communication Lecture 14

ESPA Nov 1984 PROPOSAL FOR SERIAL DATA INTERFACE FOR PAGING EQUIPMENT CONTENTS 1. INTRODUCTION 2. CHARACTER DESCRIPTION

White Paper. Technical Capabilities of the DF1 Half-Duplex Protocol

Appendix B RCS11 Remote Communications

Process Control and Automation using Modbus Protocol

SCADA System. Application Guide

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

PROPERTY MANAGEMENT SYSTEM

Data Link Protocols. 5.4 Framing

Modicon Modbus Protocol Reference Guide. PI MBUS 300 Rev. J

MTS Master Custom Communications Protocol APPLICATION NOTES

MBP_MSTR: Modbus Plus Master 12

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

Operating Systems and Computer Networks / Datenverarbeitung 2 / Data Processing 2

Modbus and ION Technology

Memory is implemented as an array of electronic switches

Modbus Protocol. PDF format version of the MODBUS Protocol. The original was found at:

RS-485 Protocol Manual

Technical Support Bulletin Nr.18 Modbus Tips

The Answer to the 14 Most Frequently Asked Modbus Questions

Multi-Master DF1 Protocol User Guide

ASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot

Modbus and ION Technology

SERIAL INTERFACE. Series SSW-03 and 04

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Xi2000 Series Configuration Guide

Modbus Communications for PanelView Terminals

TAP Interface Specifications

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

Computer Networks. Data Link Layer

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328)

Data Link Layer Overview

Single channel data transceiver module WIZ2-434

CMPE 150 Winter 2009

MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b3 CONTENTS

CONTROL MICROSYSTEMS DNP3. User and Reference Manual

Subnetting,Supernetting, VLSM & CIDR

Allen-Bradley. Bar Code. 2-D Hand-Held. Programming Guide. Bar Code. Scanners. (Cat. No HTG-4)

SIM CARD PROTOCOLS. This paper attempts in broad strokes to outline the construction of these protocols and how they are used.

Telegrams for Operating/Configuring the LMS 2xx Laser Measurement Systems Firmware Version V2.10/X1.14

TOE2-IP FTP Server Demo Reference Design Manual Rev1.0 9-Jan-15

2011, The McGraw-Hill Companies, Inc. Chapter 3

Transport Layer Protocols

Card Issuing Machine for Magnetic, Contact & IC Card

MicroLogix 1100 Embedded Web Server

URL encoding uses hex code prefixed by %. Quoted Printable encoding uses hex code prefixed by =.

How To Send A Message From A Computer To A Computer (Iwea) On A Microsoft Macbook 2.5 (Isoa) To A Microsatellite 2.4 (Ios) On An Unix (Ise

Voyager 9520/40 Voyager GS9590 Eclipse 5145

Signalling Control System Serial Train Information Interface

HOST Embedded System. SLAVE EasyMDB interface. Reference Manual EasyMDB RS232-TTL. 1 Introduction

DDC-100 Direct-to-Host Programming Guide

BARCODE READER V 2.1 EN USER MANUAL

User Manual. AS-Interface Programmer

Networking Test 4 Study Guide

CAM-VGA100 User Manual

Introduction to Analyzer and the ARP protocol

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification

Using MODBUS for Process Control and Automation

Industrial Networks & Databases

Elo Interactive Digital Signage (IDS): Remote Management

Industrial Networks & Databases. Protocols and Networks - Device Bus - - Field Bus -

Ethernet/IP Explicit Messaging Using Unity Software

Serial Communications Protocol. Data 2179 Revision 4. For Use With Cooper Power Systems Apparatus Controls: Form 6 Recloser Control

BRMO 80 / ETH-IP. User Manual. Réf : MU-BRMO 80-ETH-IP-1.4-EN

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

BI-300. Barcode configuration and commands Manual

Virtual Integrated Design Getting started with RS232 Hex Com Tool v6.0

PFB366 Profibus-DP Gateway User Manual

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

TELOCATOR ALPHANUMERIC PROTOCOL (TAP)

ACCESS 9340 and 9360 Meter Ethernet Communications Card ETHER

027,21$1'&21752/5,1* 237,&$/

ENET-710. ENET Ethernet Module ENET-710 JAN / 06 FOUNDATION

MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b CONTENTS

Modbus RTU Communications RX/WX and MRX/MWX

MicroLogix 1400 Embedded Web Server

RS485 & Modbus Protocol Guide

The internetworking solution of the Internet. Single networks. The Internet approach to internetworking. Protocol stacks in the Internet

SPA-Bus Communication Protocol V2.5. Technical description

TSX ETY 110 Module 8

WAN Data Link Protocols

IP - The Internet Protocol

Command Manual - Network Protocol Quidway S3000 Series Ethernet Switches. Table of Contents

A short description to the VABus protocol

ATC-300+ Modbus Communications Guide

Micro800 Programmable Controllers: Getting Started with CIP Client Messaging

ModBus Server - KNX. Gateway for integration of KNX equipment into Modbus (RTU and TCP) control systems.

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

High-Level Data Link Control

C-GEP 100 Monitoring application user manual

Implementation Guide. SAS Serial Protocol. for. Montana Department of Justice Gambling Control Division. October 22, Version 1.4.

INTERNATIONAL STANDARD

PRODUCT MANUAL SKX OPEN SKX ADVANCE ZN1RX-SKXOPEN. Edition 2 Version 1.1

7.7 Ethernet Communication (AFPX-COM5)

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

Turquoise Equities. TQ401 - Level 2 MITCH UDP Market Data. Issue November 2015

Master-Touch and ValuMass. Modbus Communications. INSTRUCTION MANUAL (Rev. 2.1)

ND48-RS ASCII A2.04 Communication Protocol

Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. Version 3.0

Software User Guide UG-461

Transcription:

BULLETIN 1203-GD2, -GK2 & 1336-GM2 DF1 MESSAGING (HALF DUPLEX / MULTI-DROP) APPLICATION NOTE OCTOBER 20, 1999 PURPOSE The purpose of this document is to provide information on using the DF1 Half Duplex/Multi-Drop protocol and Programmable Controller Communications Commands (PCCC) with the 1203-GD2, -GK2 or 1336- GM2. This document is provides information only. Users must ensure that installations using DF1 and PCCC meet applicable codes and are suitable for the existing conditions. WHAT THIS NOTE CONTAINS This document contains information on the DF1 Half Duplex protocol and PCCC commands. INTENDED AUDIENCE This application note should be used by personnel familiar with the hardware components and programming procedures necessary to operate SCANport devices. It is also assumed that the user has some familiarity with serial communications and the programming required to implement serial protocols. WHERE IT IS USED The information contained in this application note is intended to address issues in many different applications. Some changes by the user may be necessary to apply the concepts of this document to a specific application. APPLICATION CONSIDERATIONS SCANport devices may assign different meanings to bits in the Logic Command and Status words. The usage of the Reference and Feedback words may also vary. Consult the manual for your SCANport device for more information. FOR MORE INFORMATION DF1 & PCCC 1203-Gx2 Data Highway/Data Highway Plus/DH-485 Communication Protocol and Command Set Reference Manual Publication 1770-6.5.16 Bulletin 1203 Serial Communications Module RS232/422/485 (Using DF1 Protocol) DH485 User Manual Publication 1203-5.5 Page1of12

DEFINITIONS 1203-Gx2 A 1203-GD2 (120/230vac), 1203-GK2 (24vdc) or 1336-GM2 (internal mount) Serial Communications Module. DF1 A serial communications protocol defined in ANSI X3.28 subparagraphs D1 and F1. DLE Stuffing Full Duplex Half Duplex Master PCCC Responder Sender Slave DF1 uses a sequence of two DLE characters (10h) to represent a data value or station address of 10h. This is also known as Data Transparency. two-way simultaneous transmission between two devices (sometimes referred to as Point-to-Point ) two-way non-simultaneous transmission between two or more devices (sometimes referred to as Multi-Drop ) The device that sends command messages, poll messages and controls message transmissions. Programmable Controller Communications Commands -- the commands transmitted over DF1 that are used to control Allen-Bradley PLC s, SLC s and other devices (sometimes referred to as PC-Cubed ). A device replying to a message. A device sending a message. A device that replies to command messages and is polled by a master. DF1 -- SYMBOLS USED DF1 uses 8-bit characters which may be transmitted over any serial communications medium. DF1 uses certain ASCII characters to form symbols that are embedded in the serial data stream. Control Characters ASCII Hex Symbol Sent Type Meaning Character Value By: SOH 01h data 1 Either Data Single byte data characters STX 02h DLE ACK Slave Control Message received OK ETX 03h DLE DLE Either Data Represents data or STN = 10h EOT 04h DLE ENQ Master Control Start of Polling message ENQ 05h DLE EOT Slave Control No message available ACK 06h DLE ETX BCC 2 Either Control End of message DLE 10h DLE NAK Master Control Reset communications. NAK 15h DLE SOH Master Control Start of master message packet DLE STX Either Control Start of message STN 2 Master Data Station number of a responder 1 may include DLE Stuffing 2 May be an 8-bit Block Check Character (2 s complement modulo 256 checksum) or a 16-bit Cyclic Redundancy Check (CRC-16). A polling message must use BCC. Refer to the section on checksum calculation. Page2of12

Maximum Message Size Minimum Message Size Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 DST SRC CMD STS TNS Data (0-250 Bytes) DLE SOH STN DLE STX Message from Sender Application Layer DLE ETX BCC 1) Master Message Packet Minimum Message Size Maximum Message Size Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 DST SRC CMD STS TNS Data (0-250 Bytes) DLE STX Message from Responder Application Layer DLE ETX BCC 2) Slave Message Packet DLE ENQ STN BCC 3) Polling Packet DF1 HALF DUPLEX DATA LINK LAYER MESSAGE PACKET FIELDS DLE ENQ STN BCC A polling packet -- the master is requesting a message from the slave at station number STN. The slave will respond with a slave message packet or DLE EOT (no messages). This packet always ends with a BCC and never a CRC. DLE SOH Start of a master message packet. STN Station Number of the destination node for this packet. DLE STX Start of message flag. DST Destination address -- where this message packet is going. SRC Source address -- where this message packet is from. CMD The command (or response to a command) this message packet contains. STS The status of the device this message packet is from. TNS Transaction ID number -- a response message will have the same transaction ID number as the command message it is responding to. Page3of12

FNC EXT STS ADDR DLE ETX BCC Function Code -- an additional command code included in certain command messages. If used, this is always the first byte in the data block. Extended Status -- an additional status code included in response messages where the STS byte s upper nibble is set to Fh. If used, this is always the first byte in the data block. Data table address inside the 1203-Gx2. Refer to the 1203-Gx2 manual for more information. The structure of the address fields within the data block varies depending on the message type. End of message flag. Checksum -- may be an 8-bit Block Check Character or a 16-bit Cyclic Redundancy Check in all messages except a polling message. Refer to the section on checksum calculation. DLE STUFFING When the control character DLE (10h) appears between the DLE STX and DLE ETX of a message it must be replaced with DLE DLE before transmission. When decoding such a message only one of the DLE bytes should be included in the BCC or CRC calculation. CHECKSUM CALCULATION BCC Add the STN byte and all bytes between DLE STX (start of message) and DLE ETX (end of message) using modulo 256. Then perform a two s complement. If DLE stuffing was used in the message data only one of the two DLE s should be included in the BCC. CRC A CRC-16 that includes the STN byte, all bytes between DLE STX (start of message) and DLE ETX (end of message) and the ETX byte. On a message from the master device the calculation also includes the STX byte. If DLE stuffing was used in the message data only one of the two DLE s should be included in the CRC. Page4of12

DF1 HALF DUPLEX/MULTI-DROP -- BASIC MESSAGE TRANSACTION A DF1 message transaction begins when the master transmits a command message: DLE SOH STN DLE STX data DLE ETX BCC 1 If the slave receives the message correctly and has memory available to buffer the message it will transmit an ACK: DLE ACK If the slave receives the message incorrectly or is out of buffer space it will not transmit any reply. If the slave does not transmit ACK the master may retransmit the message or go on to polling routine. The number of times the master will retransmit a message is generally programmable with a default value of three. Some time later the master transmits a polling message to the slave: DLE STN DLE BCC If the slave has no messages for the master it responds: DLE EOT If the master receives a DLE EOT message it continues on to the next message or station. The next time the master communicates with this station the slave may have completed processing the message and will transmit the response message. If the slave has a message for the master it sends that message: DLE STX data DLE ETX BCC 1 If the master receives the message incorrectly it may repeat the poll. The number of times the master will retransmit the poll message is generally programmable with a default value of three. If the slave does not receive an ACK from the master it will keep the response message available and respond to poll messages with it until it is successfully received and ACK ed by the master. If the master receives the message correctly it will transmit an ACK: DLE ACK The message transaction is now complete. The data contained in these messages is a PCCC command or response. 1 an 8-bit BCC or a 16-bit CRC may be used. Page5of12

PCCC COMMAND LISTING AND EXAMPLES The table below shows all of the PCCC messages supported by the 1203-Gx2. Examples showing the structures of the message packets for some of these commands are shown on the following pages. For more information about PCCC messages, refer to Publication 1770-6.5.16. For more information about data table addresses inside the 1203-Gx2 refer to Publication 1203-5.5. CMD FNC Command Name PLC Addressing Style Code Code 01h n/a Unprotected Read PLC-2 06h 00h Echo n/a 01h Read Diagnostic Counters PLC-2 02h Set Variables n/a 03h Identify Host and Some n/a Status 04h Set Timeout n/a 07h Reset Diagnostic Counters n/a 09h Read Link Parameters Logical Address 0Ah Set Link Parameters Logical Address 08h n/a Unprotected Write PLC-2 0Fh 00 * Word Range Write PLC-2 System, Logical Binary, Logical ASCII (Not Symbolic) 01 * Word Range Read PLC-2 System, Logical Binary, Logical ASCII (Not Symbolic) 67h Typed Write PLC-2 System, Logical Binary, Logical ASCII (Not Symbolic) 68h Typed Read PLC-2 System, Logical Binary, Logical ASCII (Not Symbolic) A1h A2h A9h AAh ABh Protected Typed Logical Read with Two Address Fields Protected Typed Logical Read with Three Address Fields Protected Typed Logical Write with Two Address Fields Protected Typed Logical Write with Three Address Fields Protected Typed Logical Write with Four Address Fields * FRN2.02 and later firmware only SLC500 File/Type/Element SLC500 File/Type/Element/Sub-element SLC500 File/Type/Element SLC500 File/Type/Element/Sub-element SLC500 File/Type/Element/Sub-element/Bit Mask Page6of12

UNPROTECTED READ (CMD = 01H) (HALF DUPLEX/MULTI-DROP) Read Parameter 5 from the SCANport device connected to the Gx2 module at address 1 (PLC = 0). From Master Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 01 CMD Command 00 STS Status 01 TNS lo Unique Transaction 03 TNS hi ID number 0A ADD lo PLC-2 04 ADD hi Address 02 SIZE Size in bytes E9 BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) From Slave Device 00 DST Destination 01 SRC Source 41 CMD Command & 40h 01 TNS lo (same number as in 03 TNS hi command message) 05 DATA lo Data in 00 DATA hi Lo/Hi order B5 BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. Page7of12

UNPROTECTED WRITE (CMD = 08H) (HALF DUPLEX/MULTI-DROP) Write a value of 5 into Parameter 5 of the SCANport device connected to the Gx2 at address 1. (PLC = 0) From Master Device From Slave Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 08 CMD Command 21 TNS lo Unique Transaction 03 TNS hi ID number 0A ADD lo PLC-2 04 ADD hi Address 05 DATA lo Data in 00 DATA hi Lo/Hi order BF BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) 00 DST Destination 01 SRC Source 48 CMD Command & 40h 21 TNS lo (same number as in 03 TNS hi command message) 93 BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. Page8of12

WORD RANGE WRITE (CMD = 0FH, FNC = 00H) (HALF DUPLEX/MULTI-DROP) Write a value of 5 into Parameter 5 of the SCANport device connected to the Gx2 at address 1. (PLC = 0) From Master Device From Slave Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 0F CMD Command E1 TNS lo Unique Transaction 03 TNS hi ID number 00 FNC Function 00 OFF Offset 00 OFF 01 TRANS 2 Transaction Size 00 TRANS 2 in words 00 MASK Address Mask Byte 24 ADD $ - Logical ASCII 4E ADD N 31 ADD 1 30 ADD 0 3A ADD : 35 ADD 5 00 ADD Null Terminator 05 DATA lo Data in 00 DATA hi Lo/Hi order C3 BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) 00 DST Destination 01 SRC Source 4F CMD Command & 40h E1 TNS lo (same number as in 03 TNS hi command message) CC BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. 2. Transaction Size = Number of Words to write Page9of12

WORD RANGE READ (CMD = 0FH, FNC = 01H) (HALF DUPLEX/MULTI-DROP) Read the value of Parameter 5 from the SCANport device connected to the Gx2 at address 1. (PLC = 0) From Master Device From Slave Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 0F CMD Command 01 TNS lo Unique Transaction 04 TNS hi ID number 01 FNC Function 00 OFF Offset 00 OFF 01 TRANS 2 Transaction Size 00 TRANS 2 in words 00 MASK Address Mask Byte 24 ADD $ - Logical ASCII 4E ADD N 31 ADD 1 30 ADD 0 3A ADD : 35 ADD 5 00 ADD Null Terminator 02 SIZE 3 Size in bytes A4 BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) 00 DST Destination 01 SRC Source 4F CMD Command & 40h 01 TNS lo (same number as in 04 TNS hi command message) 05 DATA Data in Lo byte 00 DATA / Hi byte order A6 BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. 2. Transaction Size = Number of Words to read 3. Size = Number of Bytes to read Page 10 of 12

TYPED WRITE (CMD = 0FH, FNC = 67H) (HALF DUPLEX/MULTI-DROP) Write a value of 5 into Parameter 5 of the SCANport device connected to the Gx2 module at address 1. (PLC = 0) From Master Device From Slave Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 0F CMD Command 41 TNS lo Unique Transaction 03 TNS hi ID number 67 FNC Function 00 OFF Offset 00 OFF 01 TRANS 2 Transaction Size 00 TRANS 2 in words 00 MASK Address Mask Byte 24 ADD $ - Logical ASCII 4E ADD N 31 ADD 1 30 ADD 0 3A ADD : 35 ADD 5 00 ADD Null Terminator 99 TYPE Data Type - Extended 09 EXT Data Type - Array 03 EXT 3 Data Type - Size 42 EXT Data Type - Integer 05 DATA lo Data in 00 DATA hi Lo/Hi order 15 BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) 00 DST Destination 01 SRC Source 4F CMD Command & 40h 41 TNS lo (same number as in 03 TNS hi command message) 6C BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. 2. Transaction Size = Number of Words to write 3. Data Type Size = 1 + 2 * Transaction Size Page 11 of 12

TYPED READ (CMD = 0FH, FNC = 68H) (HALF DUPLEX/MULTI-DROP) Read the value of Parameter 5 from the SCANport device connected to the Gx2 at address 1. (PLC = 0) From Master Device From Slave Device Master 01 SOH Message Header 01 STN Station Address 01 DST Destination 00 SRC Source 0F CMD Command 61 TNS lo Unique Transaction 03 TNS hi ID number 68 FNC Function 00 OFF Offset 00 OFF 01 TRANS 2 Transaction Size 00 TRANS 2 in words 00 MASK Address Mask Byte 24 ADD $ - Logical ASCII 4E ADD N 31 ADD 1 30 ADD 0 3A ADD : 35 ADD 5 00 ADD Null Terminator 01 SIZE lo 3 Size in 00 SIZE hi 3 Words DF BCC Checksum (or 2 byte CRC) 05 ENQ Polling Message 01 STN Destination Station Number FF BCC Checksum (Always BCC -- Never CRC) 00 DST Destination 01 SRC Source 4F CMD Command & 40h 61 TNS lo (same number as in 03 TNS hi command message) 99 TYPE Data Type - Extended 09 EXT Data Type - Array 03 EXT 4 Data Type - Size 42 EXT Data Type - Integer 05 DATA Data in Lo byte 00 DATA / Hi byte order 60 BCC Checksum (or 2 byte CRC) 1. All numbers shown in hexadecimal. 2. Transaction Size = Number of Words to read 3. Size = Number of Words to read 4. Data Type - Size = 1 + 2 * Number of Words read Page 12 of 12