35
NETWORKING SHIVAM SINGH PROJECT +91-8527199116

Automation Networking By Shivam Singh

Embed Size (px)

DESCRIPTION

Automation Networking, IP Address, Class of IP Address, Protocols, RS-232, RS-422, RS-485

Citation preview

Page 1: Automation Networking By Shivam Singh

NETWORKING

SHIVAM SINGHPROJECT ENGINEER

+91-8527199116 [email protected]

Page 2: Automation Networking By Shivam Singh

Network Architecture- Network architecture is a blueprint of the complete computer

communication network, which provides a framework and technology foundation for designing, building and managing a communication network.

Anyone is free to design hardware and software based on the network architecture.

The TCP/IP network architecture, which the Internet is based on, is such as open network architecture and it is adopted as a worldwide network standard and widely deployed in local area network (LAN), wide area network (WAN), small and large enterprises, and last but not the least, the Internet.

Open Systems Interconnection (OSI) network architecture, developed by International Organization for Standardization, is an open standard for communication in the network across different equipment and applications by different vendors.

Network architecture provides only a conceptual framework for communications between computers. Actual communication is defined by various communications protocols.

Page 3: Automation Networking By Shivam Singh

OSI 7 Layers Model-

Open Systems Interconnection (OSI) model is a reference model developed by ISO (International Organization for Standardization) in 1984, as a conceptual framework of standards for communication in the network across different equipment and applications by different vendors.

Page 4: Automation Networking By Shivam Singh

OSI 7 Layers Model…… The OSI model defines the communications process into 7 layers,

dividing the tasks involved with moving information between networked computers into seven smaller, more manageable task groups.

Basically, layers 7 through 4 deals with end to end communications between data source and destinations, while layers 3 to 1 deal with communications between network devices.

On the other hand, the seven layers of the OSI model can be divided into two groups:

Upper layers (layers 7, 6 & 5) and

Lower layers (layers 4, 3, 2, 1).

The upper layers of the OSI model deal with application issues and generally are implemented only in software. The highest layer, the application layer, is closest to the end user.

The lower layers of the OSI model handle data transport issues. The physical layer and the data link layer are implemented in hardware and software. The lowest layer, the physical layer, is closest to the physical network medium (the wires, for example) and is responsible for placing data on the medium.

Page 5: Automation Networking By Shivam Singh

OSI 7 Layers Model…… Layer 7: Application Layer • Defines interface to user processes for communication and data transfer in network.

• Provides standardized services such as virtual terminal, file and job transfer and operations. Layer 6: Presentation Layer • Masks the differences of data formats between dissimilar systems.

• Specifies architecture-independent data transfer format.

• Encodes and decodes data; encrypts and decrypts data; compresses and decompresses data. Layer 5: Session Layer • Manages user sessions and dialogues.

• Controls establishment and termination of logic links between users.

• Reports upper layer errors. Layer 4: Transport Layer • Provides reliable and sequential packet delivery through error recovery and flow control mechanisms.

• Provides connectionless oriented packet delivery and Manages end-to-end message delivery in network.

Page 6: Automation Networking By Shivam Singh

OSI 7 Layers Model……

Layer 3: Network Layer

• Determines how data are transferred between network devices

• Routes packets according to unique network device addresses

• Provides flow and congestion control to prevent network resource depletion

Layer 2: Data Link Layer

• Defines procedures for operating the communication links

• Frames packets

• Detects and corrects packets transmit errors

Layer 1: Physical Layer

• Defines physical means of sending data over network devices

• Interfaces between network medium and devices

• Defines optical, electrical and mechanical characteristics

Page 7: Automation Networking By Shivam Singh

Internet Protocol (IP)-

The Internet protocols are the world’s most popular open-system (nonproprietary) protocol suite because they can be used to communicate across any set of interconnected networks and are equally well suited for LAN and WAN communications.

The Internet protocols consist of a suite of communication protocols, of which the two best known are the Transmission Control Protocol (TCP) and the Internet Protocol (IP).

The Internet protocol suite not only includes lower-layer protocols (such as TCP and IP), but it also specifies common applications such as electronic mail, terminal emulation, and file transfer.

Page 8: Automation Networking By Shivam Singh
Page 9: Automation Networking By Shivam Singh

IP Addressing- As with any other network-layer protocol, the IP

addressing scheme is integral to the process of routing IP datagrams through an internetwork.

Each IP address has specific components and follows a basic format.

Each host on a TCP/IP network is assigned a unique 32-bit logical address that is divided into two main parts: the network number and the host number.

The network number identifies a network and must be assigned by the Internet Network Information Center (InterNIC) if the network is to be part of the Internet.

An Internet Service Provider (ISP) can obtain blocks of network addresses from the InterNIC and can itself assign address space as necessary.

The host number identifies a host on a network and is assigned by the local network administrator.

Page 10: Automation Networking By Shivam Singh

IP Address Format-

The 32-bit IP address is grouped eight bits at a time, separated by dots, and represented in decimal format (known as dotted decimal notation).

Each bit in the octet has a binary weight (128, 64, 32, 16, 8, 4, 2, and 1). The minimum value for an octet is 0, and the maximum value for an octet is 255.

Page 11: Automation Networking By Shivam Singh

IP Address Classes-

IP addressing supports five different address classes: A, B, C, D, and E. Only classes A, B, and C are available for commercial use. The left-most (high-order) bits indicate the network class.

Page 12: Automation Networking By Shivam Singh

IP Address Classes……

Page 13: Automation Networking By Shivam Singh

IP Subnet Addressing-

IP networks can be divided into smaller networks called sub-networks (or subnets).

Sub-netting provides the network administrator with several benefits, including extra flexibility, more efficient use of network addresses, and the capability to contain broadcast traffic (a broadcast will not cross a router).

Subnets are under local administration. As such, the outside world sees an organization as a single network and has no detailed knowledge of the organization’s internal structure.

A given network address can be broken up into many sub-networks. For example, 172.16.1.0, 172.16.2.0, 172.16.3.0, and 172.16.4.0 are all subnets within network 171.16.0.0. (All 0s in the host portion of an address specifies the entire network.)

Page 14: Automation Networking By Shivam Singh

Transmission Control Protocol (TCP)-

The TCP provides reliable transmission of data in an IP environment. TCP corresponds to the transport layer (Layer 4) of the OSI reference model. Among the services TCP provides are stream data transfer, reliability, efficient flow control, full-duplex operation, and multiplexing.

TCP offers reliability by providing connection-oriented, end-to-end reliable packet delivery through an internetwork. It does this by sequencing bytes with a forwarding acknowledgment number that indicates to the destination the next byte the source expects to receive.

TCP offers efficient flow control, which means that, when sending acknowledgments back to the source, the receiving TCP process indicates the highest sequence number it can receive without overflowing its internal buffers.

Full-duplex operation means that TCP processes can both send and receive at the same time. Finally, TCP’s multiplexing means that numerous simultaneous upper-layer conversations can be multiplexed over a single connection.

Page 15: Automation Networking By Shivam Singh

User Datagram Protocol (UDP)-

The User Datagram Protocol (UDP) is a connectionless transport-layer protocol (Layer 4) that belongs to the Internet protocol family.

UDP is basically an interface between IP and upper-layer processes. UDP protocol ports distinguish multiple applications running on a single device from one another.

Unlike the TCP, UDP adds no reliability, flow-control, or error-recovery functions to IP. Because of UDP’s simplicity, UDP headers contain fewer bytes and consume less network overhead than TCP.

UDP is useful in situations where the reliability mechanisms of TCP are not necessary, such as in cases where a higher-layer protocol might provide error and flow control.

UDP is the transport protocol for several well-known application-layer protocols, including Network File System (NFS), Simple Network Management Protocol (SNMP), Domain Name System (DNS), and Trivial File Transfer Protocol (TFTP).

Page 16: Automation Networking By Shivam Singh

INTRODUCTION TO

SERIAL COMMUNICAT

ION

Page 17: Automation Networking By Shivam Singh

Serial Communication- The RS stands for Recommended Standard. Nothing was really

agreed upon or official. At least not in the sense of the "made-by-committee" standards like IEEE-1284 and IEEE-1394. 

Simplex can be viewed as a communications "one-way street". Data only flows in one direction. That is to say, a device can be a receiver or a transmitter exclusively. A simplex device is not a transceiver. A good example of simplex communications is an FM radio station and your car radio

Duplex communications overcome the limits of Simplex communications by allowing the devices to act as transceivers. Duplex communication data flows in both directions thereby allowing verification and control of data reception/transmission.

Full Duplex devices can transmit and receive data at the same time. RS232 is a fine example of Full Duplex communications. There are separate transmit and receive signal lines that allow data to flow in both directions simultaneously. RS422 devices also operate Full Duplex.

Half Duplex devices have the dubious honor of allowing both transmission and receiving, but not at the same time. Essentially only one device can transmit at a time while all other half duplex devices receive. Devices operate as transceivers, but not simultaneous transmit and receive

Page 18: Automation Networking By Shivam Singh

DCE and DTE Devices-

DTE stands for Data Terminal Equipment, and DCE stands for Data Communications Equipment.

These terms are used to indicate the pin-out for the connectors on a device and the direction of the signals on the pins.

Your computer is a DTE device, while most other devices such as modem and other serial devices are usually DCE devices.

DTE DCE

25 pin male pin-out 25 pin female pin-out

Pin 1 - Shield Ground Pin 1 - Shield Ground

Pin 2 - Transmitted Data (TD) output Pin 2 - Transmitted Data (TD) input

Pin 3 - Receive Data (RD) input Pin 3 - Receive Data (RD) output

Pin 4 - Request To Send (RTS) output Pin 4 - Request To Send (RTS) input

Pin 5 - Clear To Send (CTS) input Pin 5 - Clear To Send (CTS) output

Pin 6 - Data Set Ready (DSR) input Pin 6 - Data Set Ready (DSR) output

Pin 7 - Signal Ground Pin 7 - Signal Ground

Pin 8 - Carrier Detect (CD) input Pin 8 - Carrier Detect (CD) output

Pin 20 - Data Terminal Ready (DTR) output

Pin 20 - Data Terminal Ready (DTR) input

Pin 22 - Ring Indicator (RI) input Pin 22 - Ring Indicator (RI) output

Page 19: Automation Networking By Shivam Singh

Synchronous Data Transfer-

In program-to-program communication, synchronous communication requires that each end of an exchange of communication respond in turn without initiating a new communication.

A typical activity that might use a synchronous protocol would be a transmission of files from one point to another.

As each transmission is received, a response is returned indicating success or the need to resend.

Page 20: Automation Networking By Shivam Singh

Asynchronous Data Transfer-

The term asynchronous is usually used to describe communications in which data can be transmitted intermittently rather than in a steady stream.

For example, a telephone conversation is asynchronous because both parties can talk whenever they like.

If the communication were synchronous, each party would be required to wait a specified interval before speaking.

The difficulty with asynchronous communications is that the receiver must have a way to distinguish between valid data and noise.

In computer communications, this is usually accomplished through a special start bit and stop bit at the beginning and end of each piece of data. For this reason, asynchronous communication is sometimes called Start-Stop Transmission.

Page 21: Automation Networking By Shivam Singh

Handshaking- Handshaking is a procedure used to check the link

between DTE & DCE before transmitting of data. Data is transmitted and received on pins 2 and 3

respectively (for both types 25 & 9 pin).

1. DTE would request to send data to DCE (RTS).

2. The DCE will indicate to DTE that it is ready and clear to send data (CTS). Both RTS and CTS therefore used to control data flow

between DTE & DCE. Data Set Ready (DSR) is an indication from the DCE (i.e., the modem) that it is ON.

Similarly, DTR (i.e., the PC) indicates to the Data Set that the DTE is on. Data Carrier Detect (CD) indicates that a good carrier is being received from the remote modem.

Page 22: Automation Networking By Shivam Singh

RS-232-

RS-232 (Recommended standard-232) is a standard interface approved by the Electronic Industries Association (EIA) for connecting serial devices.

In other words, RS-232 is a long established standard that describes the physical interface and protocol for relatively low-speed serial data communication between computers and related devices.

An industry trade group, the EIA, defined it originally for teletypewriter devices. In 1987, the EIA released a new version of the standard and changed the name to EIA-232-D. Many people, however, still refer to the standard as RS-232C, or just RS- 232.

RS-232 is the interface that your computer uses to talk to and exchange data with your modem and other serial devices. The serial ports on most computers use a subset of the RS- 232C standard.

Page 23: Automation Networking By Shivam Singh

RS-232…….

9-pin D-type connector Pin assignment

Page 24: Automation Networking By Shivam Singh

RS-232…….25-pin D-type connector

Pin assignment

Page 25: Automation Networking By Shivam Singh

RS-232…….

Type of Cables-

(A) Modem Cable: A normal modem cable runs straight through with pin

1 to pin 1, pin 2 to pin 2 etc. The end that will be connected to the terminal or PC is a female connector, and the end that will be connected to the modem is male connector.

Page 26: Automation Networking By Shivam Singh

RS-232…….

(B) Null Modem Cables: When you need to connect two equipment with both

(DTE) or both (DCE), for example connecting two PC's, then in this case you have to use the cable with below pin connection (25 to 25). And this is called Null modem cable.

“Connecting 25 pin to 25 pin for Null modem”

Page 27: Automation Networking By Shivam Singh

RS-232…….

“Connecting 9 pin to 9 pin for Null Modem”

Page 28: Automation Networking By Shivam Singh

RS-232…….

“Connecting 9 pin to 25 pin for Null Modem”

Page 29: Automation Networking By Shivam Singh

RS-485-

RS-485 allows multiple devices (up to 32) to communicate at half-duplex on a single pair of wires, plus a ground wire (more on that later), at distances up to 1200 meters (4000 feet). Both the length of the network and the number of nodes can easily be extended using a variety of repeater products on the market.

Data is transmitted differentially on two wires twisted together, referred to as a “twisted pair.” The properties of differential signals provide high noise immunity and long distance capabilities. A 485 network can be configured two ways, “two-wire” or “four-wire.”

In a “two-wire” network the transmitter and receiver of each device are connected to a twisted pair.

“Four-wire” networks have one master port with the transmitter connected to each of the “slave” receivers on one twisted pair. The “slave” transmitters are all connected to the “master” receiver on a second twisted pair.

Page 30: Automation Networking By Shivam Singh

RS-485…… The EIA RS- 485 Specification labels the data wires

“A” and “B”, but many manufacturers label their wires “+” and “-”.

In our experience, the “-” wire should be connected to the “A” line, and the “+” wire to the “B” line.

Reversing the polarity will not damage a 485 device, but it will not communicate. This said, the rest is easy: always connect A to A and B to B.

Page 31: Automation Networking By Shivam Singh

RS-422- The TIA/EIA-422 standard, known as RS422, describes a

communication interface that uses balanced data transmission over multiple pairs of wires to establish communication from one transmitter to up to 10 receivers.

At least two twisted pairs of wires are used, one for communication from the transmitter (usually the master) to the receivers (usually the slaves), and the other for transmission from the slaves back to the master.

RS-422 is similar to RS-232, and can be programmed in the same way, however, offers a few advantages and disadvantages. One problem is that you need to purchase an RS-422 port or at least an RS-422 to RS-232 converter, since PC's don't come standard with this interface. Also, you may find that there are fewer devices supporting RS-422.

Page 32: Automation Networking By Shivam Singh

RS-422…….

Some advantages are: 1. Long Distance Runs - Up to 500 feet

is generally supported, and with repeaters, even further distances can be achieved.

2. Multi-Drop - Usually, up to 32 devices can be connected per port, and even more using repeaters. Devices are distinguished by unique addresses that are assigned to each device.

3. Noise Resistant - Since it uses a separate FLOATING transmit and receive pair (four wires), it offers better noise immunity than RS-232.

Page 33: Automation Networking By Shivam Singh

Comparison- RS232 RS422 RS485

Cabling single ended single ended multi-drop

multi-drop

Number of Devices 1 transmit 1 receive

5 transmitters 10 receivers

32 transmitters 32 receivers

Communication Mode

full duplex full duplex half duplex

half duplex

Max. Distance 50 feet at 19.2 Kbps 4000 feet at 100 Kbps

4000 feet at 100 Kbps

Max. Data Rate 19.2 Kbps for 50 feet

10 Mpbs for 50 feet 10 Mpbs for 50 feet

Signaling unbalanced balanced balanced

Mark (data 1) -5 V min. -15 V max.

2 V min. (B>A) 6 V max. (B>A)

1.5 V min. (B>A) 5 V max. (B>A)

Space (data 0) 5 V min. 15 V max.

2 V min. (A>B) 6 V max. (A>B)

1.5 V min. (A>B) 5 V max. (A>B)

Input Level Min. +/- 3 V 0.2 V difference 0.2 V difference

Output Current

500 mA (Note that the driver ICs normally used in PCs are limited to 10 mA)

150 mA 250 mA

Page 34: Automation Networking By Shivam Singh
Page 35: Automation Networking By Shivam Singh