Communication Concepts ch1. condensed part 1.docx
Document Details
Uploaded by ExquisiteAmetrine
Full Transcript
Communication Concepts Elements Communication has particular elements. In any communication there must be a source (in data communications this is often called the transmitter) and one or more destinations (typically called the receivers). The purpose of communication is to transmit data from the so...
Communication Concepts Elements Communication has particular elements. In any communication there must be a source (in data communications this is often called the transmitter) and one or more destinations (typically called the receivers). The purpose of communication is to transmit data from the source to the destination(s). The data is transmitted through a medium of one kind or another, varying according to the technology used. In data communications, the media we use are: electrical conductors (usually referred to as copper connections), light pipes (often referred to as fiber-optic cabling), and electromagnetic transmission (usually referred to as wireless or radio). (Data itself is useless unless organized, at which time it becomes information.) Data communications topologies are organized as one-to-one (point-to-point), one-to-many (multi-drop), or many-to-many (networked). Note that while data communications terms can be couched in technical symbology, the concepts behind them are relatively simple. Members of a network may have defined relationships: they may have no ranking (be peers, all have the same communications value) or they may be ranked (such as master/slave). Point-to-point means just that, from one point to another, or directly from source to destination (whether workstation-to-server or peer-to-peer). Multi-drop topology more closely resembles a network than it does point-to-point topology. In general, multi-drop involves a master station of some kind with slave stations, as opposed to peer stations. (According to the following definition of a network, a multi-drop system can also be classified a network.) Modes In data communications, there are three modes of transmission: simplex, half-duplex, and duplex. These terms may be used to describe all types of communications circuitry or modes of transmission, whether they are point-to-point, multi-drop, or networked. It is important to understand these three terms because almost all descriptive language pertaining to data communications uses them. A communications channel may consist of a communications circuit, which can be either a hardware configuration or a “virtual” circuit. “Virtual circuit” refers more to the process of communication than to the hardware configuration. NOTES The differences between a “mode” and a “circuit” are rather arbitrary. However, the reader needs to be aware that not all channels are hardware, and even though a channel is physically capable of operating in a certain mode, it does not mean that the channel is being utilized in that mode. As an example, a duplex channel could be operated in half-duplex mode. For example, if the hardware is duplex, the software may constrain the hardware to half-duplex. However, if the hardware cannot support a mode, no amount of software will cause it to support that mode, although it may appear to do so to human observation. An example is a half-duplex system that appears (due to the speed and message attributes) to be duplex to the human user. The three data communications modes are as follows: Simplex or Unidirectional Mode. In this mode, communication occurs only in one direction—never in the opposite direction. The circuit that provided this mode of operation was originally called simplex. “Unidirectional” is a more appropriate name for this mode of transmission and using the name for this circuit would be much more descriptive. Half-Duplex Mode in this mode, communication may travel in either direction, from A to B or from B to A, but not at the same time. Half-duplex communication functions much like meaningful human conversation does, that is, one speaker at a time and one (or more) listener(s). Duplex Mode. In duplex mode, communication can travel in both directions simultaneously: from A to B and from B to A at the same time. Serial and Parallel Transmission Serial transmission uses one channel and every bit follows one after the other, much like a group of people marching in single file. Because there is only one channel, the user has to send bits one after the other at a much higher speed in order to achieve the same throughput as parallel transmission. A nibble is 4 bits (a small byte, a byte is 8 bits). In parallel transmission the signal must traverse more than one transmission channel, much like a group of people marching in four or more columns abreast. For a given message, four parallel channels can transmit four times as much data as a serial channel running at the same data rate (bits per second). However, parallel transmission running any appreciable distance (based on data rate—the faster the data rate, the more the effects for a given distance) encounters two serious problems: First, the logistics of having parallel media is sure to increase equipment costs. Second, ensuring the data’s simultaneous reception over some distance (based on data rate—the higher the data rate, the shorter the distance) is technically quite difficult, along with ensuring that cross-talk (a signal from one transmission line being coupled—electrostatically or electromagnetically—onto another) is kept low. Cross-talk increases with signaling rate, so attempting to obtain a faster data rate by using additional parallel conductors becomes increasingly difficult. Figure 1-4 illustrates what the signals would look like in serial and parallel transmission. Note that for the two 4-bit combinations, it took only two-timing periods (t0-t2) to transmit all 8 bits by parallel transmission, whereas the serial transmission took eight timing periods (t0-t8). The reason is that the serial transmission used one media channel, while the parallel transmission used four media channels (Channel 1 for bits A–E; Channel 2 for bits B–F; Channel 3 for bits C–G; and Channel 4 for bits D–H). For these reasons, most data transmissions outside of the computer cabinet, with the exception of those at very low speeds, are by serial transmission. In the past, inside the computer cabinet (and indeed up to about 1 meter outside it), the buses used parallel transmission since the necessity for high-speed data transfer outweighed the cost. However, as bus speeds (the bus data rate) continue to increase, newer technologies, such as Peripheral Component Interconnect Express (PCIe) and Serial AT Attachment (SATA, a form of Integrated Drive Electronics [IDE]), are using serial transmission. This is because the problem of maintaining transition synchrony over a parallel bus increase drastically as speed increases. Over the past 2 decades, PC printers have been parallel (they started out as serial) because the signal bit lengths are long enough in duration (the signal is slow enough) to permit parallel transmission over a limited distance. Parallel transmission in is now being replaced by USB and other technological advances in serial transmission. Data Organization: Signals Digital Signals A digital signal is defined as one with defined discrete states; no other state can exist. Binary digital signals have only two states: a binary digit is either a “1” or a “0.” Do not confuse a “0” with nothing. Zero conveys half of the information in a binary signal; think of it more as “1” being “true” or “on” and “0” being “false” or “off,” with no allowance for “maybe.” All number systems (by definition) are digital, and we use not only binary (Base 2) and decimal (Base 10) but octal (Base 8) and hexadecimal (Base 16) as well. Octal and hexadecimal (hex) are used mostly to present numbers in a human readable form (humans apparently dislike long rows of 1s and 0s when coding or performing data analysis). Binary is used in contemporary data transmission systems as the signaling means because it can be represented by a simple on-off. (A binary digit is contracted to the term “bit”.) Now that we have defined channels and bits, what are we going to send as a signal over our channel? It is usually a pattern of bits. Bits alone are just data. We must organize our data into some form so that it becomes information. When this is done at higher levels of organization, we may call this organization “protocols” or even “application programming interfaces.” One of the bit patterns to be organized has to represent text, for in order for data organization to yield anything usable to humans, it is necessary to store and present information in a human-readable form. The patterns used for this form of information are called codings. A coding is a generally understood “shorthand” representation of a signal. Codings are not used for secrecy—ciphers are. American Standard Code for Information Interchange (ASCII) is an example of a text coding. A “standard signal” could be called a coding and in fact is referred to as such in the daily work of industry. A standard signal is one that has the approval of the users and/or a standardization agency; it specifies a way to organize data. This book focuses, in many respects, on how data is organized for different functional tasks. There are many different organizations of digital signals in use, classified as standard (approved by standards organizations and may be open or proprietary, depending on the standardizing agency), open (in general use), and proprietary (limited to a specific organization; i.e., owned wholly by a specific organization). In this book, we will only touch on a few. Analog Standard Signals In all areas of data communications, a number of standard signals exist. An analog (or analogue) signal is any continuous signal for which the time varying feature (variable) of the signal is a representation of some other time varying quantity, i.e., analogous to another time varying signal (Wikipedia). In short, an analog signal is a model (usually electrical or pneumatic) representing quantities at any value between a specified set of upper and lower limits (whether temperature, pressure, level flow, etc.). This contrasts with a binary digital signal, which only has one of two values: 1 or 0. Perhaps the easiest of these standard signals to visualize is the standard 4–20 mA (milliamp) current loop signal, long used in process measurement and control (see figure 1-5). These signals represent 0% to 100% of the range (full scale) specified. All instrumentation readings could be likened to a meter face, in which any value is allowed between 0 and 100%, perhaps specified in engineering value measurements. An example is a range of 200°C to 500°C. The 4–20 mA standard instrument signal would represent 200°C as 4 mA and 500°C as 20 mA. These are electrical values for the quantity of energy used in signaling. If you are not familiar with these units, you may not fully understand some of the signal standards and their implications. This text will try to draw the conclusions for you. However, any basic electrical text, particularly one for non-technical people, will provide more than enough background to help you understand the terms used in this book. The 4–20 mA signal is one of the most commonly used industrial communications standards and it is used in the two-wire current loop that connects devices in an instrument circuit. The reader needs to become familiar with the terms: voltage, current, resistance, impedance, capacitive reactance, and inductive reactance. While not an electrical manual, these terms are further defined in the appendices. What follows is an abbreviated glossary: Definitions Voltage (measured in volts) is the difference in electrical potential (charge) that is necessary prior to any work being performed. Current (measured in amperes or amps, nominally thousandths of an amp or milliamps) is what performs the work, as long as there is a difference in potential. Resistance (measured in ohms) is the opposition a conductor offers to current. NOTE The relationship between voltage, current, and resistance is known as Ohm’s Law (E (volts) = I (amps) X R (ohms). Capacitive and Inductive reactance are opposite in action and dependent upon frequency of change. Impedance (measured in Ohms) is the opposition a conductor offers to a changing current value, as well as the steady state (static) resistance. It is represented as follows: One of the bit patterns to be organized has to represent text, for in order for data organization to yield anything usable to humans, it is necessary to store and present information in a human-readable form. The patterns used for this form of information are called codings. A coding is a generally understood “shorthand” representation of a signal. Codings are not used for secrecy—ciphers are. American Standard Code for Information Interchange (ASCII) is an example of a text coding. A “standard signal” could be called a coding and in fact is referred to as such in the The ISA50 committee (ISA-50.01 standard) established a current loop as a standard because it has low impedance, it has a greater immunity to noise (electrical signals that are unwanted) than a high-impedance voltage circuit, and it can power the loop instruments. The receiving devices themselves are high impedance (voltage input) and acquire their input across a 250-ohm resistor (1–5VDC). This allows a known loading for each receiver in the loop. Conversion between current and voltage is provided by a 250-ohm resistor in the current loop. This simple arrangement allows the two-wire loop to both power the loop instrument and to provide the measurement signal. Standard signals allow users to pick and choose among vendors with the confidence that the inputs and outputs will be compatible. The standard signals also allow a manufacturer to build instruments for a larger group of users than if each instrument had its own defined set of signals (non-standard). Digital Standard Signals There have been, and still are, both open and proprietary standard digital signals in the telephone and digital data communications area (we will cover these as we go along). However, in the measurement and control areas, no open, all-digital standard signal has been established as an alternative to the analog 4–20 mA signal described in the last section. The international standard for an industrial fieldbus (IEC 61158) defines eight different fieldbuses, four of which—including PROFIBUS PA and FOUNDATION Fieldbus—are primarily used in process control. (A fieldbus is generally a local area network with its defined signaling protocols and field instruments—control being accomplished in the field instruments rather than a control room cabinet.) Although all these fieldbuses are set as standards, they are not necessarily compatible with each other. While it appears that some of the fieldbuses have gained a majority of sales in certain niches, the marketplace has yet to determine which one will become the de facto fieldbus standard throughout automation. While not a fieldbus itself, but a physical and signal standard, Ethernet continues to gain market share and acceptance in automation areas; indeed, almost all fieldbuses and even proprietary systems now provide networking services via Ethernet. Process measurement and control has used and still uses several digital communications standards—such as EIA/TIA 232(F) or EIA/TIA 485(A)—that detail placing data on (and removing it from) the media, which is a requirement if one is going to signal via an electrical channel. We will discuss these in chapter 3, “Serial Communications.” NOTE The Electronic Industries Alliance (formerly Electronic Association, formerly Radio & Television Manufacturers Association, formerly … all the way back to 1924) is an association of manufacturers that develops standards. The TIA(Telecommunications Industry Association) is a subdivision of the EIA. Data Organization: Communications Codes Communications codes are the components of data organization that are designed for interface with humans. These codes represent letters, numerals, and controls actions that are stored and recalled, printed, sorted, and, in general, processed. IBM designed one of the first digital communications codes: the IBM 4 of 8 Code (circa 1947) which allowed error detection on a character-by-character basis. This section presents a cursory review of this and other communications codes. The IBM 4 of 8 Code was a proprietary code. Other manufacturers typically had their own proprietary codes, all of which were incompatible with each other. In 1963, the U.S. government released the American Standard Code for Information Interchange (ASCII). Several months later, IBM released its own code, an extended version of the 4 of 8 Code: EBCDIC, which is short for “Extended Binary Coded Decimal Interchange Code” (more on this later). EBCDIC is mathematically related to the 4 of 8 Code. The 4 of 8 Code was uppercase and allowed only 64 of the 256 bit combinations available with an 8-bit code. EBCDIC had all combinations available to it because it used a cyclic redundancy check character (CRCC) for error detection instead of the parity bit (bit 7) in the 8-bit (ASCII) character. The U.S. government was (and is) a large buyer of data equipment, thus, ASCII gradually gained acceptance with many vendors (other than IBM), who relinquished their proprietary codings and adopted ASCII. The IBM 4 of 8 Code The IBM 4 of 8 Code is illustrated in table 1-1. In this code, there are four 1s (ones) and four 0s (zeros)—that is 8 bits, or an octet—for each character. This arrangement was used to detect character errors, yet it carried a large overhead; that is, the ratio of bit patterns used for error detection to those for data transmission is high. About 70 characters were used for error detection out of the 256 characters available. International Telegraphic Alphabet #5 Also known as ASCII, the International Telegraphic Alphabet (ITA) #5 (see table 1-2) does not make use of letter frequencies, as did the Morse code, the ITA2 Telegraph Code, and the IBM 4 of 8 Code. It does, however, use a numerically arranged code, in which the alphabet is in ascending order, which permits sorting operations and the like. ASCII is a 7-bit code. Its arrangement is well thought out; particularly in light of the technology available at the time it was designed. It was usually (and is now) transmitted as an 8-bit signal with the “Most Significant Bit” (B7) reserved for parity—an error detection scheme. The parity bit was used for a number of years; however, the technological advantages to using an 8-bit data byte (particularly for sending program code) eliminated the need to use the B7 bit for parity. Today when parity is used, another bit is added to the 8 bits as the parity bit, making the signal 9 bits in length (11 bits when the start and stop are added). For our present purposes, we will set B7 to 0 and concern ourselves only with B0 through B6. Reading table 1-2 is simple; though, it takes some getting used to. First, notice the representations of the bit order: B4, B5, and B6 are grouped as three bits and so have a decimal value between 0 through 7 (same as hex); the lower four bits (B0 through B3) are a group of 4 bits and have a decimal value of 0 to15 (or hex 0 through F). (For a thorough discussion of number systems, including hexadecimal, refer to appendix A.) The most significant bit (MSB) is B6. B6, B5, and B4 are read vertically. Bits 3 through 0 are read horizontally. As an example, what is the coding for the uppercase C? Locate the uppercase C; trace the column vertically and find that the first three bits are (B6) 1, (B5) 0, and (B4) 0: 100. Locate the uppercase C again and travel horizontally to obtain the value of bits 3 through 0, or (B3) 0, (B2) 0, (B1) 1, and (B0) 1: 0011. Put the bits together (B6 through B0) and you have 1000011 for an uppercase C (hex 43). So, what would a lower-case c be? Follow the same procedure and you will determine that it is 1100011 (hex 63). The difference between uppercase and lowercase is bit 5. If B5 is a 0, the character will be an uppercase letter; if B5 is a 1, the character will be lowercase. When B6 is a 0 and B5 is a 1, the characters are numerals and punctuation. Hex uses a different convention: to obtain the lower-case letter from an upper-case value, add hex 20; to obtain an upper-case letter from a lower-case value, subtract hex 20. If both B6 and B5 are 0, then it is a non-printing (control) character. Control characters were based on the technology of the time. Table 1-3 gives the assigned meaning of these characters. The one exception to these rules is DEL (delete), which is comprised of all 1s. The reason for using all 1s can be traced back to when the main storage medium in ASCII’s beginnings was paper tape. If you made a mistake punching a paper tape (a 1 was a hole in the tape, a 0 was no hole), you then backed it up to the offending character and used the delete key, which punched all holes in the tape, masking whatever punching had been there. Extended Binary Coded Decimal Interchange Code As described previously, the Extended Binary Coded Decimal Interchange Code (EBCDIC) was developed in the early 1960s by IBM from its 4 of 8 Code and it is proprietary to them. ASCII has only seven bits, the eighth bit being reserved for parity. One problem in using only 7 bits plus 1 bit for parity arises when computers transmit program instruction coding. Computers normally operate using an 8-bit octet or a multiple of 8 (i.e., a “word” that is 16 bits, or a “double word” of 32 bits). All 256 possible 8-bit combinations may not be used but it is likely that the computer’s instruction set would use the eighth bit. With the “7 for information + 1 for parity” bit scheme, the eighth bit isn’t available. Most computers using ASCII transmit 8 bits and use a ninth bit for parity, if parity is used. In EBCDIC, the blank spaces are used for special or graphic characters particular to the device using them. If required, this code can transmit “object” code—that is, the combinations of 1s and 0s used to program a computer in 8-bit increments—with little difficulty. EBCDIC did not require a parity bit for error detection but instead used a different error-detection scheme—CRCC. One of the first interface problems of the PC age was how to perform PC-to-mainframe communications. By and large, Personal Computers (PCs) and other devices transmitted in ASCII, while many of IBM’s minicomputers and mainframe computers used EBCDIC. This meant that they could not talk directly without some form of translator, generally a software program or firmware in a protocol converter. While such a conversion was not difficult to perform, it was another step that consumed both memory and CPU cycles. Unicode Character coding by electrical means originally became established with the Morse code, in which letter frequencies and a form of compression were used for efficiency. Fixed-length character representations, of which ASCII and EBCDIC are examples, came about in the early 1960s and are still in wide use today. However, ASCII was designed for English (American English at that, the term American being the definitive) and, as communications are now global, there are many languages that require a larger number than 128 patterns (7 bits). Today, Unicode is an industry standard for encoding, representing, and handling text as expressed in the majority of writing systems. The latest version of Unicode has more than 100,000 characters, covering multiple symbol sets. As of June 2015, the most recent version is Unicode 8.0, and the standard is maintained by the Unicode Consortium. Instead of representing a character with 7 or 8 bits, Unicode uses 16 bits. For users of ASCII, this is not a problem (as long as the upper 8, more significant, bits of the 16 total are accounted for) because the Unicode conversion for ASCII is hex 00 + ASCII. In other words, the upper eight bits are set to 0 and the ASCII character set follows. The following is excerpted from Microsoft Corporation’s Help file for Visual Studio 6: “Code elements are grouped logically throughout the range of code values, which is called the codespace. The coding begins at U+0000 with standard ASCII characters, and then continues with Greek, Cyrillic, Hebrew, Arabic, Indic, and other scripts. Then symbols and punctuation are inserted, followed by Hiragana, Katakana, and Bopomofo. The complete set of modern Hangul appears next, followed by the unified ideographs. The end of the codespace contains code values that are reserved Data Organization: Error Coding How we organize our data has a lot to do with how we recognize and correct transmission errors. These are alterations to our intended signal and are caused by noise or other media properties. For example: when listening to a music selection on a DVD, if there is a scratch on the DVD surface (greater than the DVD player’s error correcting abilities), it will change the music (not necessarily improving it). For the purposes of this discussion, we will assume that the data to be transmitted is correct; the matter of erroneous data is not within the scope of this book.