26
Communication Basics Communication Basics Topics Topics ISO OSI Layers – Sajan Joseph RS 232, 485 – Sajan Joseph HART – Sajan Joseph Modbus RTU – Lalit Varshney Ethernet – Lalit Varshney The problem with communication ... is the illusion that it has been accomplished. G.B. Shaw

Communication Basics principle

Embed Size (px)

DESCRIPTION

Communication Basics principle

Citation preview

Page 1: Communication Basics principle

Communication BasicsCommunication Basics

TopicsTopicsISO OSI Layers – Sajan JosephRS 232, 485 – Sajan JosephHART – Sajan JosephModbus RTU – Lalit VarshneyEthernet – Lalit Varshney

The problem with communication ... is the illusion that it has been accomplished.G.B. Shaw

Page 2: Communication Basics principle

ISO OSI 7 Layer Model

People Don't Need This Stuff Presented Anyway

ENCAPSULATION

Open Systems Interconnection Model Open Systems Interconnection Model Describes how information from a software application in one computer moves through a network to a softwareApplication in another computer.

Application LayerApplication LayerE.g.:- HTTP, SMTP, FTP Presentation LayerPresentation LayerStandard formats (GIF, TIFF, MPEG), Data Compression, Data conversion to ASCII, EBCDICSession LayerSession LayerEstablish, Manage, Terminate sessions

Transport LayerTransport LayerSegmenting of data, data sequencing, flow control. E.g.:- TCPNetwork LayerNetwork LayerDefines network Addresses (E.g.:-IP address)Opens shortest path, keep track of number of hopsData Link LayerData Link LayerMedia Access Control (MAC Address) , Error notificationPhysical LayerPhysical LayerDefines voltage levels, baud rates etc. E.g.:- Network interface cards.

Page 3: Communication Basics principle

Serial Communication - Terms

Balanced vs. Unbalanced StandardsBalanced vs. Unbalanced StandardsUnbalanced -Unbalanced - An unbalanced signal is represented by a single signal wire where a voltage level on that one wire is used to transmit/receive binary 1 and 0.

Balanced -Balanced - A balanced signal is represented by a pair of wires where a voltage difference is used to transmit/receive binary information

Simplex, Half Duplex, Full DuplexSimplex, Half Duplex, Full Duplex

Simplex -Simplex - A simplex system is one that is designed for sending messages in one direction only.

Half-Duplex -Half-Duplex - Half duplex communications occurs when data flows in both directions; although in only one direction at a time.

Full-Duplex -Full-Duplex - In a full duplex system, the data can flow in both directions simultaneously.

Page 4: Communication Basics principle

RS-232 Serial Communication

Interfaces between Date Terminal Equipment (DTE) and a Data Communication Equipment (DCE).E.g.:- Communication between a Computer (DTE) and a Modem (DCE)

RS stands for “Recommended Standard”

CharacteristicsCharacteristics

Point to Point

Unbalanced – Low noise immunity

Full Duplex

Available in 9 Pin or 25 Pin configurations

DisadvantagesDisadvantages

Max. speed of transmission – 19.2 Kbps

Susceptible to noise

Distance Limitation – 50 ft.

Multi drop is not possible

Page 5: Communication Basics principle

RS-485 Serial Communication

CharacteristicsCharacteristics

Multi-drop

Balanced – High noise immunity

Half-Duplex or Full Duplex

2 wire or 4 wire twisted pair cable

Max. number of devices on the network – 32

Distances – Up to 1200m

Speeds – Up to 100Kbps

Even though RS-485 is available in both 2-wire and 4-wire configurations, 2-wire is more common.RS 485 2-wire configuration is Half Duplex, whereas 4 wire configuration is Full Duplex.

Page 6: Communication Basics principle

HART Communication

HART – Highway Addressable Remote TransducerHART – Highway Addressable Remote Transducer

HART is a master-slave communication protocol, which means that during normal operation, each slave (transmitters, actuators) communication is initiated by a master (DCS, PLC) communication device. Based on the Bell 202 telephone communication standard Operates using the frequency shift keying (FSK) principle The digital signal is made up of two frequencies— 1,200 Hz and 2,200 Hz representing bits 1 and 0, respectively. Sine waves of these two frequencies are superimposed on the direct current (dc) analog signal cables to provide simultaneous analog and digital communications. Because the average value of the FSK signal is always zero, the 4–20 mA analog signal is not affected. The digital communication signal has a response time of approximately 2–3 data updates per second without interrupting the analog signal. A min. loop impedance of 230 Ohms is required for communication.

Each HART device has a 38-bit unique address encoded at the time of manufacture that consists of the manufacturer ID code, device type code, and device-unique identifier. A HART master must know the address of a field device in order to communicate with it.

Page 7: Communication Basics principle

HART CommunicationBenefits Benefits - The traditional 4–20 mA signal is used to communicate one process variable, while additional process variables, configuration parameters, and other device data are transferred digitally using the HART protocol. The HART communication digital signal gives access to secondary variables and other data that can be used for maintenance, and diagnostic purposes. Backward compatibility of HART ensures that investments in existing cabling and current control strategies will remain secure.

Page 8: Communication Basics principle

MODBUS PROTOCOL

The Modbus protocolThe Modbus protocolModbus is an application layer messaging protocol developed by Modicon in 1979, positioned at level 7 of the OSI model that provides client/server communication between devices connected on different types of buses or networks.

Modbus is a request/reply protocol and offers services specified by function codes. Modbus function codes are elements of Modbus request/reply PDUs (Protocol Data Unit).

Page 9: Communication Basics principle

RS-232 VS RS-485 The original Modbus interface ran on RS-232,

but most later Modbus implementations used RS-485 because it allowed longer distances, higher speeds and the possibility of a true multi-drop network. In a short time hundreds of vendors implemented the Modbus messaging system in their devices and Modbus became the de facto standard for industrial communication networks.

Page 10: Communication Basics principle

Serial Transmission Modes ASCII / RTU

Serial Modbus connections can use two basic transmission modes, ASCII or RTU, remote terminal unit. The transmission mode in serial communications defines the way the Modbus messages are coded. With Modbus/ASCII, the messages are in a readable ASCII format. The Modbus/RTU format uses binary coding which makes the message unreadable when monitoring, but reduces the size of each message which allows for more data exchange in the same time span. All nodes on one Modbus network segment must use the same serial transmission mode. A device configured to use Modbus/ASCII cannot understand messages in Modbus/RTU and vice versa

Modbus RTU is an open, serial (RS-232 or RS-485) protocol based on master/slave or client/server architecture. It is popular, well established, relatively easy to implement and reliable. Since it is so easy to implement, Modbus RTU has gained wide market acceptance wherever Industrial Automation Systems (IAS) or Building Management Systems (BMS) need to communicate with other devices. In fact, Modbus RTU is probably the most implemented automation protocol of all, and a quick search of Google will confirm this.

Page 11: Communication Basics principle

Modbus Addresses

Legal Modbus RTU node addresses are 1-254. 0 is reserved for broadcast messages, and useable for writes only. This is very seldom used since there is no confirmation that the message was successfully received at the server node. If the physical layer is RS-232 then only one node can be implemented anyway. The RS-485 specification limits the number of nodes to 32, although some RS-485 drivers will allow this limit to be extended somewhat.

Device addressDevice address DescriptionDescription 1...10000 Coils 10001...20000 Inputs 30001…40000 Input Registers 40001...50000 Holding Registers

Page 12: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Page 13: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Page 14: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Page 15: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Page 16: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Page 17: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Modbus Data Port(s) Settings

Media RS485

Protocol Modbus RTU

Communications (Half Duplex: 2-wire) - [Full: 4-wire] 2-wire

Serial Cable Connector Type (PLC: 9 PIN male?) 9 PIN female

Slave or Device ID 1

Data Bits 8

Stop Bits 1

Baud Rate 19200

Parity No Parity

Page 18: Communication Basics principle

Modbus Configuration Examples with Delta V DCS system

Communications (Pin Numbers)

DCS

Description

PLC

[ 2 ] DATA (+) BLACK

[ ? ]

[ 4 ] DATA (-) RED

[ ? ]

[ 1 ] Shield

Page 19: Communication Basics principle

Ethernet

Most widely deployed LAN technology 60% + of all LAN installations Most common office automation LAN Will encounter in a variety of applications including plant LANs, sub-networks, and

as a vehicle for control device connection Inexpensive Widely understood Excellent migration path to future technologies

Fast ethernet Gigabit ethernet

Most typically LANs complying to IEEE 802.3 CSMA/CD specification; there are slight differences between ethernet at IEEE 802.3

Page 20: Communication Basics principle

Ethernet

Ethernet is a contention LAN -- CSMA/CD access -- although typically fast -- is not guaranteed this performance profile is well suited to file transfer applications CSMA/ CD imposes minimal controls, allows fast access, and provides collision

detection and resolution mechanisms Four (4) implementations:

10base-T - twisted pair media via hub connection 10base-2 - thin coaxial cable media 10base-5 - thick coaxial cable media 10base-FL - fiber optic media

Ovation will integrate/ interface to ethernet as follows: Printer support - either via a bridge or via a sub-net PLC integration - either via a bridge or via a controller sub-net Plant LAN integration

Page 21: Communication Basics principle

Ethernet10base-T

UTP media Star topology Most common implementation RJ-45 cable connection Connection via hub One (1) device per hub port Hub isolates individual end stations

from the main network Maximum of 100 meters per segment -

installation can span 200 meter diameter without repeaters

Variety of hub features and capabilities HUB

Page 22: Communication Basics principle

Ethernet10base-2

Coaxial cable Bus architecture Passive tap connection 200 meters max segment length 32 devices per segment Station connection may require a

transceiver or media converter NIC may support 10base-T and

10base-2 Network span can be increased

through the use of repeaters

Transceiver and drop cable

BNC “T” Connector

BNC “T” Connector on NIC 10base-2 port

Page 23: Communication Basics principle

Ethernet10base-5

Thick coax media Bus topology Typically backbone implementation 500 meters max segment length 100 devices per segment Station requires transceiver for

connection -- typically vampire taps AUI on NIC is transceiver connection

Page 24: Communication Basics principle

Fast Ethernet

100 Mbps extension of ethernet Logical extension of 10 Mbps ethernet Provides an excellent migration path to higher performance Retains CSMA/CD No impact on higher level protocols or applications Backbone application is typical 10/100 auto-sensing NICs available

10 times the bandwidth at twice the price of 10 Mbps Fiber and UTP media support Due to higher speed has a smaller application radius than 10 Mbps ethernet Implementations:

100baseT4 - four (4) pairs of Category 3,4,or 5 UTP 100base-TX - two (2) pairs of Category 5 UTP or STP 100base-FX - two (2) strands of 62.5/125 multi-mode fiber

Page 25: Communication Basics principle

Ethernet Application ExampleLocalized Ethernet information highway

Westations

Westnet II data highway

Hub - Provides physical connection for printer and Westations via UTP.

Printer - Communicates with Westations via UTPHUB connection.

UTP cables, hub, Westation on-board ethernet controllers, and printer on boardethernet controller constitute informationhighway implementation...

10baseT application using hub and UTP - for segment length less than 100 meters

Page 26: Communication Basics principle

Ethernet Application Example10base-T connected via fiber optic cable

Westations

Westnet II data highway

Printer

Fiber optic segment linking two hubs and connected equipment

Use of fiber optics assumes separation of >500 meters and/ orhigh electrical noise environment. Media conversion from localUTP to fiber accomplished in the hub

Printers are ethernet-based via hub connection and integral ethernet controller.Network configuration allows any Westation to direct print output to eitherprinter.

Westations

Westnet II data highway

Hub

PrinterMedia Conversionin Hub

Westations

Westnet II data highway

Printer

Fiber optic segment linking two hubs and connected equipment

Use of fiber optics assumes separation of >500 meters and/ orhigh electrical noise environment. Conversion from localUTP to fiber accomplished using a media converter

Westations

Westnet II data highway

Printer

Media converter Media converter

UTPUTP

Media Conversionwith external converters

Hub

Hub

Hub