contents

Tuesday, February 28, 2017

CAT5, CAT5e, CAT6 cables

1. What is the difference between CAT-5, CAT-5e, CAT-6, CAT-7...
The Simple Answer:
CAT-5 is rated to 100 Mhz
CAT-5e is rated to 350 Mhz
CAT-6 and CAT6e is rated to 550 Mhz or 1000 Mhz depending on your source
Cat7 & Cat7A support speeds up to 10 Gigabit Ethernet with distance up to 100 meters (10,000 Mb/s)(1000 Mhz)
 CAT-6 cable is being made with 23 guage conductor wire as opposed to the slightly smaller 24 guage for CAT-5e and also has a separator to handle crosstalk better.
Both CAT-5 and CAT-5e have 100 ohm impedance and electrical characteristics supporting transmissions up to 100 MHz. The differences between CAT-5 and CAT-5e show in all aspects of performance: capacitance, frequency, resistance, attenuation, and NEXT. CAT-5e components were designed with high-speed gigabit Ethernet in mind. While CAT-5 components may function to some degree in a gigabit Ethernet, they perform below standard during high-data transfer scenarios. CAT-5e cables work with ATM and gigabit speed products. Simply, if you are using a 100Mbps switch, get CAT-5e cable instead of CAT-5.
CAT-5e is formally called ANSI/TIA/EIA 568A-5 or simply Cat-5e (the e stands for 'enhanced'). CAT-5e is completely backward compatible with current CAT-5 equipment. The enhanced electrical performance of CAT-5e ensures that the cable will support applications that require additional bandwidth, such as gigabit Ethernet or analog video.

2. What is the difference between the types of cable - UTP, Patch, Stranded, Solid...
UTP stands for Unshielded Twisted Pair. It is a cable type with pairs of twisted insulated copper conductors contained in a single sheath. UTP cables are the most common type of cabling used in desktop communications applications.
Stranded cable has several small gauge wires in each separate insulation sleeve. Stranded cable is more flexible, making it more suitable for shorter distances, such as patch cords.
Solid has one larger gauge wire in each sleeve. Solid cable has better electrical performance than stranded cable and is traditionally used for inside walls and through ceilings - any type of longer run of cable.
Patch Cables are made of stranded copper conductors for flexibility. This construction is great for the flexing and the frequent changes that occur at the wall outlet or patch panel. The stranded conductors do not transmit data signals as far as solid cable. The TIA/EIA 568A which is the governing standard regarding commercial cabling systems limits the length of patch cables to 10 meters in total length. Does that mean you can't use stranded cable for longer runs? Not at all, we've seen installations running stranded cable over 100 feet with no problems - it's just not recommended. This is why we don't sell patch cables over 30 feet in length.

3. What is the difference between 10BASE-T, 100BASE-T and 1000BASE-T?
10BASE-T is the IEEE standard that defines the requirement for sending information at 10 Mbps on unshielded twisted-pair cabling, and defines various aspects of running Ethernet on this cabling.
100BASE-T is the IEEE standard that defines the requirement for sending information at 100 Mbps on unshielded twisted-pair cabling, and defines various aspects of running baseband Ethernet on this cabling.
1000BASE-T (also called gigabit Ethernet) is the IEEE standard that defines the requirement for sending information at 1000 Mbps on unshielded twisted-pair cabling, and defines various aspects of running baseband Ethernet on this cabling
Channel Performance Characteristics
Parameter CAT-5 (ISO Class D)100 MHz CAT-5 100 MHz CAT-5e 100 MHz
Attenuation 24.0dB 24.0dB 24.0dB
NEXT 27.1dB 27.1dB 30.1dB
PSNEXT 24.0dB N/A 27.1dB
ELFEXT 17.0dB 17.0dB 17.4dB
PSELFEXT 14.4dB 14.4dB 14.4dB
ACR (derived) 3.1dB 3.1dB 6.1dB
PSACR (derived) N/A N/A 3.1dB
Return Loss 10.0dB 8.0dB 10.0dB
4. What is a cross-over cable?
A cross-over cable is a segment of cable that crosses over pins 1&2 and 3&6. This cable is normally used to connect two PCs without the use of a hub, or can be used to cascade two hubs without using an uplink port. Some DSL modems require a crossover calbe to the PC or hub they are connected to.

5. What are the maximum lengths for cables?
For Solid UTP:
Fast Ethernet 100baseT 100 Meters (328 feet)
Twisted Pair Ethernet 10baseT 100 Meters (328 feet)
Recommended maximum lengths for Patch Cables made from stranded cable:
Fast Ethernet 100baseT 10 Meters (33 feet)
Twisted Pair Ethernet 10baseT 10 Meters (33 feet)

6. Is CAT-5e backwards compatible?
Yes it works with any 10BaseT or 100BaseT network cards and hubs.
CAT-5 is also upwardly compatible with CAT-5e, however your network throughput will only be as fast as the slowest part.

7. Can I run CAT-5e ethernet cable outside?
CAT-5e cable is not rated for outdoor use, however it can generally be used without a problem. If possible, run the cable through some kind of conduit to prevent moisture or an attractive site for lightning to strike. You should be able to find gray PVC conduit suitable for cable at any hardware store. Remember, 100 Meters is your max distance, without some kind of hub, bridge or amplification.

8. What is the operating temp for CAT-5e cable?
Operating Temp for CAT-5e cable: -10C to 60C

9. What is the difference between T568A and T568B wiring?
T568A and T568B are the 2 wiring patterns for 8 position RJ45 modular plug, both permitted under the TIA/EIA 568A wiring standards document. The only difference between the two pattern is that the pairs 2 (orange) and 3 (green) are interchanged.
All our cables use T568B standards.

10. What are the UL levels of cable?
There are three levels. General Purpose: UL1581; Riser: UL1666; and Plenum UL910. These numbers are all fire and safety rated.

11. What is EMI and how can you prevent it?
EMI stands for Electro-Magnetic Interference. It is potentially harmful to your communications system because it can lead to signal loss and degrade the overall performance of high-speed, CAT-5e cabling. EMI is interference in signal transmission or reception and is caused by the radiation of electrical or magnetic fields which are present near power cables, heavy machinery, or fluorescent lighting.
Avoiding EMI is as simple as not laying your network cable within 12" of electrical cable, or if needed switching from UTP to more expensive shielded cable.

12. Just tell me what cable I need...
If you need patch cords up to 25 feet, use CAT-5e stranded cable for ease of flexibility.
If you are making linger runs or going through walls or ceilings, I'd go ahead and use the CAT-6 UTP (solid) cables - if that seems a bit expensive, then go with the CAT-5e UTP.

Examples of when you might use each type of network cable.
Cat5 - Cat5 cable is out dated. Do not install this.
Cat5e - Cat5e cable is suitable for Gigabit speeds and networks that change frequently. If the network changes frequently or is temporary in nature, Cat5e may be the optimal selection.
Cat6 - Cat6 cable is optimal for extra margin and higher performance. Cat6 cable will support gigabit ethernet, but will only support 10 Gigabit Ethernet if the total length and loss is low enough. If a project requires a 10 Gigabit Ethernet connection, Cat6A or higher is recommended.
Cat6A - Cat6A cable will support speeds up to 10 Gigabit. If a project requires a single installation solution to support the facility and is inteded to stand the test of time, Cat6A will protect the investment and serve as a reliable backbone for the company going into the future.
Cat7 & Cat7A - Cat7 cable will support 10 Gigabit Ethernet with plenty of margin to spare. Cat7 has pair-sharing capability, making it possible to use one cable to power several different devices at the same time utilizing each pair as needed. For the best and most versatile infrastructure Cat7 provides the solution.


Saturday, February 18, 2017

Basics view of T101

T101

T101 or IEC 60870-5-101 (IEC101) is an international standard prepared by TC57 for power system monitoring, control & associated communications. This is compatible with IEC 60870-5-1 to IEC 60870-5-5 standards and uses standard asynchronous serial tele-control channel interface between DTE and DCE. The standard is suitable for multiple configurations like point-to-point, star, mutidropped etc.
T101 features
60870-5-101 or T101 have many features such as the following:
  • Supports unbalanced (master initiated message) & balanced (master/slave initiated message) modes of data transfer. ­Link address and ASDU addresses are provided for classifying the end station and different sectors under the same. ­Data is classified into different information objects and each information object is provided with a specific address. ­Facility to classify the data into high priority (class-1) and low priority (class-2) and transfer the same using separate mechanisms.
  • Possibility of classifying the data into different groups (1-16) to get the data according to the group by issuing specific group interrogation commands from the master & obtaining data under all the groups by issuing a general interrogation.
  • Cyclic & Spontaneous data updating schemes are provided. ­Facility for time synchronization Schemes for transfer of files SCADA Communication & Protocols Page 2 of 8 SCADA Communication & Protocols Page 3 of 8 3.3. Types supported by T101 Distributed Control System components are usually included in SCADA. IEDs, RTUs or PLCs are also commonly used; they are capable of autonomously executing simple logic processes without a master computer controlling it. A functional block programming language, IEC 61131-3, is frequently used to create programs which run on these RTUs and PLCs. This allows SCADA system engineers to perform both the design and implementation of a program to be executed on an RTU or PLC. From 1998, major PLC manufacturers have offered integrated HMI/SCADA systems, many use open and non-proprietary communications protocols. Many third-party HMI/SCADA packages, offering built-in compatibility with most major PLCs, have also entered the market, allowing mechanical engineers, electrical engineers and technicians to configure HMIs themselves.
 Remote Terminal Unit
  • Single indication without / with 24 / with 56 bit timestamps.
  • Double indication without / with 24 / with 56 bit timestamps.
  • Step position information without / with 24 / with 56 bit timestamps.
  • Measured value – normalized, scaled, short floating point without / with timestamps.
  • Bitstring of 32 bit without / with timestamps.
  • Integrated totals (counters) without / with timestamps.
  • Packed events (start & tripping ) of protection equipments
  • Single commands
  • Double commands
  • Regulating step command
  • Set point commands of various data formats
  • Bitstring commands
  • Interrogation commands
  • Clock synchronization & delay acquisition commands
  • Test & reset commands.

Thursday, February 16, 2017

Basics for IEC61850

Distributed Control System · Post Basics for IEC61850 Posting as Oops Oops Update Revert to draft Preview Close ComposeHTML Link

What is data modelling?
Data Modeling -- Primary process objects as well as protection and control functionality in the substation is modelled into different standard logical nodes which can be grouped under different logical devices. There are logical nodes for data/functions related to the logical device (LLN0) and physical device (LPHD).
 
Generic Substation Events (GSE):
Generic Substation Events (GSE) is a control model defined as per IEC 61850 which provides a fast and reliable mechanism of transferring event data over entire substation networks. When implemented, this model ensures the same event message is received by multiple physical devices using multicast / broadcast services. The GSE control model is further subdivided into GOOSE (Generic Object Oriented Substation Events) and GSSE (Generic Substation State Events).
 
Generic Object Oriented Substation Events (GOOSE):
Generic Object Oriented Substation Events (GOOSE) is a control model mechanism in which any format of data (status, value) is grouped into a data set and transmitted within a time period of 4 millisecond. The following mechanisms are used to assure specified transmission speed and reliability.
GOOSE data is directly embedded into Ethernet data packets and works on publisher-subscriber mechanism on multicast or broadcast MAC addresses.
GOOSE uses VLAN and priority tagging as per IEEE 802.1Q to have separate virtual network within the same physical network and sets appropriate message priority level.
Enhanced Retransmission mechanisms - The same GOOSE message is retransmitted with varying and increasing re-transmission intervals. A new event occurring within any GOOSE dataset element will result in the existing GOOSE retransmission message being stopped. A state number within the GOOSE protocol identifies whether a GOOSE message is a new message or a retransmitted message
 
Generic Substation State Events (GSSE):
Generic Substation State Events (GSSE) is an extension of event transfer mechanism in UCA2.0. Only Status data can be exchanged through GSSE and it uses a status list (string of bits) rather than a dataset as is used in GOOSE. GSSE messages are transmitted directly over IEC/ISO 8802-2 and 8802-3 using a similar mechanism to GOOSE messages (refer IEC 61850-7-1 Clause 12.2, IEC 61850-8-1 Clause 6.4). As the GSSE format is simpler than GOOSE it is handled faster in some devices. GSSE is being progressively superseded by the use of GOOSE and support for it may eventually disappear.
Setting Groups -- The setting group control Blocks (SGCB) are defined to handle the setting groups so that user can switch to any active group according to the requirement.
 
 
MODBUS
Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). The main reasons for the extensive use of Modbus over other communications protocols are:
It is openly published and royalty-free
Relatively easy industrial network to deploy
It moves raw bits or words without placing many restrictions on vendors
Modbus allows for communication between many devices connected to the same network.
Protocol versions
Versions of the Modbus protocol exist for serial port and for Ethernet and other networks that support the Internet protocol suite. Most Modbus devices communicate over a serial EIA-485 physical layer[1]. There are many variants of Modbus protocols
 
Modbus RTU — This is used in serial communication & makes use of a compact, binary representation of the data for protocol communication. The RTU format follows the commands/data with a cyclic redundancy check checksum as an error check mechanism to ensure the reliability of data.  A Modbus RTU message must be transmitted continuously without inter-character hesitations. Modbus messages are framed (separated) by idle (silent) periods.
 
Modbus ASCII — This is used in serial communication & makes use of ASCII characters for protocol communication. The ASCII format uses a longitudinal redundancy check checksum. Modbus ASCII messages are framed by leading colon (':') and trailing newline (CR/LF).
 
Modbus TCP/IP or Modbus TCP — This is a modbus variant used for communications over TCP/IP networks. It does not require a checksum calculation as lower layer takes care of the same.
Data model and function calls are identical for the first 4 variants of protocols; only the encapsulation is different. However the variants are not interoperable as the frame formats are different.
 
STP and RSTP
 
  • Fast detection of failure over links
  • Generate a topology change, after a link stats change
  • Time delay
  • Forwarding, Filtering and Aging
  • Recommended link cost
  • BPDU
  • Root address deciding parameter (switch add and MAC add)
  • Designate Bridge
 
Features of 61850
Interoperablity
IEC 61850 supports the free allocation of functions to devices (IEDs)
The standard contains an object-oriented data model that groups all data according the common user functions in objects called Logical Nodes (LN), e.g. for switch control (LN CSWI) or distance protection (LN PDIS). All related data attributes are contained and defined in these Logical Nodes. The access to all the data is provided in a standardized way by the services of the standard, which are defined to fulfill the performance requirements.
  • Data modeling
  • Data transmit at high data rate
  • GOOSE, GSSE
  • Reliable and Security and long term stability
 
Switch
Manageable and Non-Manageable
VLAN, RSTP, Port mirroring, Port Truncking
Link Aggregation Control Protocol
Internet Group Multicast Protocol (IGMP) Snooping
 
Classes of Ethernet Switches
127 - loopback
 
OSI Model
 
Internet Protocol (connection and connectionless)
IP is a connectionless protocol, which means that IP does not exchange control  information (called a handshake) to establish an end-to-end connection before transmitting data. In contrast, a connection-oriented protocol exchanges control information with the remote computer to verify that it is ready to receive data before sending it. When the handshaking is successful, the computers are said to have established a connection. IP relies on protocols in other layers to establish the connection if connection-oriented services are required. The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information and some control information that enables packets to be routed.
 
User Datagram Protocol
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). The UDP packet format contains four fields, as shown in Figure. These include source and destination ports, length, and checksum fields.
 
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. With stream data transfer, TCP delivers an unstructured stream of bytes identified by sequence numbers. This service benefits applications because they do not have to chop data into blocks before handing it off to TCP. Instead, TCP groups bytes into segments and passes them to IP for delivery.
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. Bytes not acknowledged within a specified time period are retransmitted. The reliability mechanism of TCP allows devices to deal with lost, delayed, duplicate, or misread packets. A time-out mechanism allows devices to detect lost packets and request retransmission. 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 bemultiplexed over a single connection.
 
CAT 5 cable
Category 5 Cable Quality Category 5 distributed cable that meets ANSI/EIA/TIA-568-A building wiring standards can be a maximum of 328 feet (ft.) or 100 meters (m) in length, divided as follows: 20 ft. (6 m) between the hub and the patch panel (if used) 295 ft. (90 m) from the wiring closet to the wall outlet 10 ft. (3 m) from the wall outlet to the desktop device The patch panel and other connecting hardware must meet the requirements for 100-Mbps operation (Category 5). Only 0.5 inch (1.5 cm) of untwist in the wire pair is allowed at any termination point. A twisted pair Ethernet network operating at 10 Mbits/second (10BASE-T) will often tolerate low-quality cables, but at 100 Mbits/second (10BASE-Tx) the cable must be rated as Category 5, or Cat 5, by the Electronic Industry Association (EIA). This rating will be printed on the cable jacket. A Category 5 cable will meet specified requirements regarding loss and crosstalk. In addition, there are restrictions on maximum cable length for both 10- and 100-Mbits/second networks.
 
Abstract Communication Service Interface
ACSI
virtual interface to an IED providing abstract communication services, for example connection, variable access, unsolicited data transfer, device control and file transfer services, independent of the actual communication stack and profiles used.
 
Bay
a substation consists of closely connected subparts with some common functionality. Examples are the switchgear between an incoming or outgoing line and the busbar, the buscoupler with its circuit breaker and related isolators and earthing switches, the transformer with its related switchgear between the two busbars representing the two voltage levels. The bay concept may be applied to one and a half breaker and ring bus substation arrangements by grouping the primary circuit breakers and associated equipment into a virtual bay. These bays comprise a power system subset to be protected such as a transformer or a line end, and the control of its switchgear has some common restrictions such as mutual interlocking or well-defined operation sequences. The identification of such subparts is important for maintenance purposes (which parts may be switched off at the same time with a minimum impact on the rest of the substation) or for extension plans (what has to be added if a new line is to be linked in). These subparts are called bays and may be managed by devices with the generic name “bay controller” and have protection systems called “bay protection”. The concept of a bay is not commonly used all over the world. The bay level represents an additional control level below the overall station level.
 
Data object
part of a logical node object representing specific information, for example, status or measurement. From an object-oriented point of view, a data object is an instance of a data object class. Data objects are normally used as transaction objects; i.e., they are data structures.
 
Device
Mechanism or piece of equipment designed to serve a purpose or perform a function, for example, breaker, relay, or substation computer
 
Functions
Tasks, which are performed by the substation automation system, i.e. by application functions. Generally, functions exchange data with other functions. The details are dependent on the functions in consideration. Functions are performed by IEDs (physical devices). Functions may be split in parts residing in different IEDs but communicating which each other (distributed function) and with parts of other functions. These communicating function parts are called logical nodes. In the context of this standard, the decomposition of functions or their granularity is ruled by the communication behavior only. Therefore, all functions considered consist of logical nodes that exchange data.
 
Intelligent Electronic Device
IED
Any device incorporating one or more processors with the capability of receiving or sending Data/control from or to an external source (for example, electronic multifunction meters, digital relays, controllers)
 
Interchangeability
Ability to replace a device supplied by one manufacturer with a device supplied by another manufacturer, without making changes to the other elements in the system
 
Interoperability
Ability of two or more IEDs from the same vendor, or from different vendors, to exchange information and use that information for correct execution of specified functions
 
Logical Node
LN
Smallest part of a function that exchanges data. A LN is an object defined by its data and methods.
Open protocol
Protocol whose stack is either standardized or publicly available
Physical Device
PD
Equivalent to an IED as used in the context of this standard
 
PICOM
Description of an information transfer on a given logical connection with given communication attributes between two logical nodes (Piece of Information for Communication). It also contains the information to be transmitted and, in addition, requirement attributes such as performance. It does not represent the actual structure and format for data that is exchanged over the communication network. The PICOM approach was adopted from CIGRE working group 34.03.
 
Protocol
Set of rules that determines the behavior of functional units in achieving and performing communication
 
Self-description
A device contains information on its configuration. The representation of this information has to be standardized and has to be accessible via communication (in the context of this
Standard series).
 
System
Within the scope of this standard, system always refers to substation automation systems unless otherwise stated

Process level functions
all functions interfacing to the process, i.e. basically binary and analogue I/O functions such as data acquisition (including sampling) and issuing of commands. These functions communicate via the logical interfaces 4 and 5 to the bay level.
 
Station level functions
station level functions refer to the substation as a whole. There are two classes of station level functions; i.e. process related station level functions and Interface related station level functions
 
Process related station level functions
process related station level functions functions using the data of more than one bay or of the complete substation and acting on the primary equipment of more than one bay or of the complete substation. Examples of such functions are station-wide interlocking, automatic sequencers or busbar protection. These functions communicate mainly via the logical interface 8.

Post settings Labels Published on 2/16/17, 8:22 PM India Standard Time Links Location Search Description Options

Sunday, February 12, 2017

Integer Types

Integer Types

The following table provides the details of standard integer types with their storage sizes and value ranges −
Type Storage size Value range
char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 or 4 bytes -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int 2 or 4 bytes 0 to 65,535 or 0 to 4,294,967,295
short 2 bytes -32,768 to 32,767
unsigned short 2 bytes 0 to 65,535
long 4 bytes -2,147,483,648 to 2,147,483,647
unsigned long 4 bytes 0 to 4,294,967,295
To get the exact size of a type or a variable on a particular platform, you can use the sizeof operator. The expressions sizeof(type) yields the storage size of the object or type in bytes. Given below is an example to get the size of int type on any machine −

Sunday, February 5, 2017

Characteristics of RS232,RS423,RS422,RS485

http://2.bp.blogspot.com/-juIIaK1H_uc/VgVhv0rhWBI/AAAAAAAABXk/YHOTHvvu92k/s1600/12.bmp

Introduction to Serial Communication
Technical Tutorial
  1. Introduction
The purpose of this application note is to attempt to describe the main elements in Serial Communication. This application note attempts to cover enough technical details of RS232, RS422 and RS485.

1.1. 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. RS-232 has been around as a standard for decades as an electrical interface between Data Terminal Equipment (DTE) and Data Circuit-Terminating Equipment (DCE) such as modems or DSUs. It appears under different incarnations such as RS-232C, RS-232D, V.24, V.28 or V.10. RS-232 is used for asynchronous data transfer as well as synchronous links such as SDLC, HDLC, Frame Relay and X.25

1.2. 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.

1.3. 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.

  1. RS232
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 longestablished 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 Electronic Industries Association (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.

2.1. RS232 on DB9 (9-pin D-type connector)
There is a standardized pinout for RS-232 on a DB9 connector, as shown below
Pin Number Signal Description
1 DCD Data carrier detect
2 RxD Receive Data
3 TxD Transmit Data
4 DTR Data terminal ready
5 GND Signal ground
6 DSR Data set ready
7 RTS Ready to send
8 CTS Clear to send
9 RI Ring Indicator
25-pin D-type connector Pin assignment

2.2. RS232 on DB25 (25-pin D-type connector)
In DB-25 connector most of the pins are not needed for normal PC communications, and indeed, most new PCs are equipped with male D type connectors having only 9 pins. Using a 25- pin DB-25 or 9-pin DB-9 connector, its normal cable limitation of 50 feet can be extended to several hundred feet with high-quality cable. RS-232 defines the purpose and signal timing for each of the 25 lines; however, many applications use less than a dozen. There is a standardized pinout for RS-232 on a DB25 connector, as shown below.

Pin Number Signal Description
1 PG Protective ground
2 TD Transmitted data
3 RD Received data
4 RTS Request to send
5 CTS Clear to send
6 DSR Data set ready
7 SG Signal Ground
8 CD Carrier detect
9 + Voltage (testing)
10 - Voltage (testing)
11
12 SCD Secondary CD
13 SCS Secondary CTS
14 STD Secondary TD
15 TC Transmit Clock
16 SRD Secondary RD
17 RS Receiver clock
18 Ready to Send
19 SRS Secondary RTS
20 DTR Data Terminal Ready
21 SQD Signal Quality Detector
22 RI Ring Indicator
23 DRS Data rate select
24 XTC External Clock
25
25-pin D-type connector Pin assignment

2.3. RS232 on RJ-45
RJ-45 (Registered Jack-45) is an eight-wire connector used commonly to connect computers onto local-area networks (LAN), especially Ethernets. In other words, RJ-45 is a single-line jack for digital transmission over ordinary phone wire, either untwisted or twisted. The interface has eight pins or positions. For faster transmissions in which you're connecting to an Ethernet 10BASET network, you need to use twisted pair wire. RS232D, EIA/TIA - 561 standard is applied when connecting to or from a serial port with a 8 position Modular Jack (RJ45) though it is not widely used as such.

Pin No. Name Notes/Description
1 DSR/RI Data set Ready/ring indicator
2 DCD Data Carrier Detect
3 DTR Data Terminal Ready
4 SGND Signal Ground
5 RD Receive Data
6 TD Transmit Data
7 CTS Clear to Send
8 RTS Request to Send
RS232D standard for RS232 communication

2.4. Signal Description
TxD: - This pin carries data from the computer to the serial device
RXD: - This pin carries data from the serial device to the computer
DTR signals: - DTR is used by the computer to signal that it is ready to communicate with the
serial device like modem. In other words, DTR indicates to the Dataset (i.e., the modem or
DSU/CSU) that the DTE (computer) is ON.
DSR: - Similarly to DTR, Data set ready (DSR) is an indication from the Dataset that it is ON.
DCD: - Data Carrier Detect (DCD) indicates that carrier for the transmit data is ON.
RTS: - This pin is used to request clearance to send data to a modem
CTS: - This pin is used by the serial device to acknowledge the computer's RTS Signal. In most
situations, RTS and CTS are constantly on throughout the communication session. Clock signals (TC, RC, and XTC): - The clock signals are only used for synchronous communications. The modem or DSU extracts the clock from the data stream and provides a steady clock signal to the DTE. Note that the transmit and receive clock signals do not have to be the same, or even at the same baud rate.
CD: - CD stands for Carrier Detect. Carrier Detect is used by a modem to signal that it has a made a connection with another modem, or has detected a carrier tone. In other words, this is used by the modem to signal that a carrier signal has been received from a remote modem.
RI: - RI stands for Ring Indicator. A modem toggles(keystroke) the state of this line when an incoming call rings your phone. In other words, this is used by an auto answer modem to signal the receipt of a telephone ring signal The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in connections to a modem. Because most modems transmit status information to a PC when either a carrier signal is detected (i.e. when a connection is made to another modem) or when the line is ringing, these two lines are rarely used.

2.5. Limitations of RS-232
RS-232 has some serious shortcomings as an electrical interface. Firstly, the interface presupposes a common ground between the DTE and DCE. This is a reasonable assumption where a short cable connects a DTE and DCE in the same room, but with longer lines and connections between devices that may be on different electrical busses, this may not be true. We have seen some spectacular electrical events causes by "uncommon grounds". Secondly, a signal on a single line is impossible to screen effectively for noise. By screening the entire cable one can reduce the influence of outside noise, but internally generated noise remains a problem. As the baud rate and line length increase, the effect of capacitance between the cables introduces serious crosstalk until a point is reached where the data itself is unreadable. Using low capacitance cable can reduce crosstalk. Also, as it is the higher frequencies that are the problem, control of slew rate in the signal (i.e., making the signal more rounded, rather than square) also decreases the crosstalk. The original specifications for RS-232 had no specification for maximum slew rate. Voltage levels with respect to ground represent the RS 232 signals. There is a wire for each signal, together with the ground signal (reference for voltage levels). This interface is useful for point-to-point communication at slow speeds. For example, port COM1 in a PC can be used for a mouse, port COM2 for a modem, etc. This is an example of point-to-point communication: one port, one device. Due to the way the signals are connected, a common ground is required. This implies limited cable length - about 30 to 60 meters maximum. (Main problems are interference and resistance of the cable.) Shortly, RS 232 was designed for communication of local devices, and supports one transmitter and one receiver.
  1. RS422 and RS485
When communicating at high data rates, or over long distances in real world environments, single-ended methods are often inadequate. Differential data transmission (balanced differential signal) offers superior performance in most applications. EIA has recently released new serial interface, RS-422 and RS-485. These standards were designed for highspeed communication.

3.1. RS422 Serial Communication
RS422 is a Standard interfaces approved by the Electronic Industries Association (EIA), and designed for greater distances and higher Baud rates than RS232. In its simplest form, a pair of converters from RS232 to RS422 (and back again) can be used to form an "RS232 extension cord." Data rates of up to 100K bits / second and distances up to 4000 Ft. can be accommodated with RS422. RS422 is also specified for multi-drop (party-line) applications where only one driver is connected to, and transmits on, a "bus" of up to 10 receivers. RS422 devices cannot be used to construct a truly multi-point network. A true multi-point network consists of multiple drivers and receivers connected on a single bus, where any node can transmit or receive data.

3.2. RS485 Serial Communication
RS485 is an Electronics Industry Association (EIA) standard for multipoint communications. It supports several types of connectors, including DB-9 and DB-37. RS-485 issimilar to RS-422 but can support more nodes per line RS485 meets the requirements for a truly multi-point communications network, and the standard specifies up to 32 drivers and 32 receivers on a single (2-wire) bus. With the introduction of "automatic" repeaters and high-impedance drivers / receivers this "limitation" can be extended to hundreds (or even thousands) of nodes on a network. The RS-485 and RS-422 standards have much in common, and are often confused for that reason. RS-485, which specifies bi-directional, half-duplex data transmission, is the only EIA/TIA standard that allows multiple receivers and drivers in "bus" configurations. RS-422, on the other hand, specifies a single, unidirectional driver with multiple receivers.

3.3. Converters
Converters in general can be used to change the electrical characteristic of one communications standard into another, to take advantage of the best properties of the alternate standard selected. For example, an Automatic RS232<=>RS485 converter, could be connected to a computer's RS232, full-duplex port, and transform it into an RS485 half-duplex, multi-drop network at distances up to 4000ft. Converters in most instances, pass data through the interface without changing the timing and/or protocol. While the conversion is "transparent" the software must be able to communicate with the expanded network features. An "Automatic Converter" (RS232<=>RS485) will turn on the RS485 transmitter when data is detected on the RS232 port, and revert back into the receive mode after a character has been sent. This avoids timing problems (and software changes) that are difficult to deal with in typical systems. When fullduplex is converted into half-duplex only one device at a time can transmit data. Automatic Converters take care of the timing problems and allow fast communications without software intervention.
  1. Summary Table
The table below compares the specifications of RS232, RS423, RS422, and RS485. Specifications for RS232, RS423, RS422, and RS485 Specifications RS232 RS423 RS422 RS485 Mode of Operation Single-Ended Single-Ended Differential Differential Allowed no. of Tx and Rx 1 Tx, 1 Rx 1 Tx, 10 Rx 1 Tx, 10 Rx 32 Tx, 32 Rx Maximum cable length 50 Feet 4000 Feet 4000 Feet 4000 Feet Maximum data rate 20 kbps 100 kbps / 10 mbps 100 kbps / 10 mbps 100 kbps / 10 mbps Minimum driver output range ±5V to ±15V ±3.6V ±2V ±1.5V Maximum driver output range ±25V ±6V ±6V ±6V
Tx load impedance (Ohms) 3k to 7k >=450 100 54
Rx input sensitivity ±3V ±200mV ±200mV ±200mV
Rx input voltage range ±15V ±12V ±7V -7V to +12V
Maximum Rx input resistance 3k to 7k 4k min 4k min >=12k (Ohms)




Saturday, February 4, 2017

Basic of MODBUS





BASICS OF MODBUS

·         Modbus is a serial communication protocol published by MODICON in 1997.it was created specifically for use in MODICON PLC for industrial application today it is an open protocol used by a wide range of automation products.

·         Modbus is often used to connect a supervisory computer with a remote terminal unit (RTU) in SCADA.

·         Modbus is available in

1.       Serial communication

2.       Ethernet

·         The different wiring standards to deploy Modbus in serial communication are

1.       RS232

2.       RS422

3.       RS485

·         dynamics of Modbus as master and slave in serial communication and client, server over Ethernet.

·         The three types of variations of Modbus protocols are

1.       Modbus ASC II

2.       Modbus RTU

3.       Modbus TCP/IP

·         Modbus was originally developed using ASC II characters to encode messages.

·         Modbus RTU is by for the most common implementation used widely in automation.

Modbus RTU frame format

 

address function data Error check
 

 


·         Modbus RTU devices typically use one of three electrical interfaces

RS232, RS422, RS485

·         RS232 is a simple point to point arrangement

·         If you only need to connect one device to another.

50 ft                           

15 METERSI                                                              I

SLAVEMASTER                                         

                                                                               

 To connect more than two devices on the same line, and to have a distance greater than 50 ft. RS485 or RS422 are recommended.

·         For a master communicating with multiple slave devices RS485 is by far the most popular method.

·         theRS485 standard can support up to 32 nodes. Over a range up to 4000 feet roughly 1200 meters without any repeaters.

·         The speed the Modbus messages are sent at it referred to as the baud rate (no of bits per second).

·         All devices on RTU network must use the same baud rate.

    Modbus baud rate range

           9600-19200         typical speeds

            300-100000         possible speeds

·         A Modbus serial network has a master device that issues commands to the slave devices, the slave will not transmit information unless they receive a command to do so from the master.

·         There can be only one master on a network and a maximum up247 slaves .each with a unique id from 1to 247.

 

247 Slaves Maximum
MASTER
 


                                                                                                                                               .

·         RS485 cannot drive more than 32 nodes in a single segment so in case of some rare application if more than 32 node are required then a repeater is required

MASTER,repeater,32 nodes or
Devices
 

 

 


·         writeThe master can write data to the slaves as well as read

MASTER,SLAVE,read
 

 


·         Modbus RTU network will be only formed by connecting the slaves in series or by the below daisy chain method and the cannot be connected in star or its similar topology

·         In Modbus TCP/IP Modbus devices using regular Ethernet cables and switches to communicate with each other

·         The big difference with Modbus TCP/IP is MBAP header or Modbus application header is added to the start of the each message , the slave id and crc checking is done by the lower layer(Transport layer of OSI model)

·         Modbus TCP/IP uses port502 for communication this port is important if your data needs to go through a firewall. Modbus RTU messages can also be sent as regular RTU messages encapsulated inside Ethernet TCP/IP packet. Encapsulated messages can use any port.

·         The MBAP and RTU encapsulation are not compactible device must be set one are the other

·         MBAP messaging is by far the most popular Modbus TCP/IP communication method.

·         Modbus TCP/IP

o   Modbus TCP/IP is stead of master /slave .the TCP network consist of client or server  or connected on the network using switches

o   Modbus TCP/IP devices use internet protocol addressing and require a subnet mask. The IP address the location of a particular device on a network and the subnet mask server to simplify the task of routing traffic within the network.

·         } discrete 0 or 1Modbus addressing system and different data table.

o   coil-read write                                 00001-09999

o   } numerical 16 bit valuesdiscrete inputs-read only              10001-19999

o   input registers-read only               30001-39999

o   holding registers-read/write         40001-49999

·         coils and discrete inputs=1 bit

·         register=16 bits (or) 2 Bytes (or) word

·         Modbus function codes are simple and the numerical  codes that tell the slave which table to access and whether to read or write the table

·         note: Function codes plays a major role and during the device configuration they should be properly referenced.

·         Each function codes relates to a specific  data table address range for interface function codes it is the code to read an individual bit status

·         Function codes

o   1- read coil status

o   2-read input status

o   3-read holding registers

o   4-read input registers

o   5-read single coil status

o   6-read single register

·         Modbus as a protocol does not exactly define how the data to be stored in the register

o   Different vendors have different ways of storing  and transmitting data

o   Some devices will transmit the  higher bit bit first, followed by the lower byte, others will do the other way around

o   By the same token, when registers are combined to represent32-bit real values. Some devices will transmit the higher 16bit in the first register and the 16 bits in the second register

o   eg:Int532_LW_HB