... communication1.1
The technical term for the “speed limit” of any data communications channel is bandwidth, usually expressed as a frequency (in Hertz).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... processes1.2
HART communications occur at a rate of 1200 bits per second, and it is this slow by design: this slow data rate avoids signal reflection problems that would occur in unterminated cables at higher speeds. For more insight into how and why this works, refer to the “transmission lines” section [*] beginning on page [*]. An example of a “slow” process variable suitable for HART digital monitoring or control is the temperature of a large building or machine, where the sheer mass of the object makes temperature changes slow by nature, and therefore does not require a fast digital data channel to report that temperature.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... mouse1.3
The host system in this case is an Emerson DeltaV DCS, and the device manager software is Emerson AMS.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... superimposed1.4
This concept is not unlike HART, where audio-tone AC signals are superimposed on DC signal cables, so that digital data may be communicated along with DC signal and power.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... section1.5
In the early days of personal computers, many microprocessor chips lacked floating-point processing capability. As a result, floating-point calculations had to be implemented in software, with programmed algorithms instructing the microprocessor how to do floating-point arithmetic. Later, floating-point processor chips were added alongside the regular microprocessor to implement these algorithms in hardware rather than emulated them through software, resulting in increased processing speed. After that, these floating-point circuits were simply added to the internal architecture of microprocessor chips as a standard feature. Even now, however, computer programmers understand that floating-point math requires more processor cycles than integer math, and should be avoided in applications where speed is essential and floating-point representation is not. In applications demanding a small microprocessor chip and optimum speed (e.g. embedded systems), fixed-point notation is best for representing numbers containing fractional quantities.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... exponent1.6
Note how the place-weights shown for the exponent field do not seem to allow for negative values. There is no negative place-weight in the most significant position as one might expect, to allow negative exponents to be represented. Instead the IEEE standard implies a bias value of $-127$. For example, in a single-precision IEEE floating-point number, an exponent value of 11001101 represents a power of 78 (since 11001101 = 205, the exponent's actual value is 205 $-$ 127 = 78).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... not1.7
This motor may be “interlocked” to prevent start-up if certain conditions are not met, thereby automatically prohibiting the operator's instruction to start.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... type1.8
It is also possible to “simulate” fractional resolution using an integer number, by having the HMI insert a decimal point in the numerical display. For instance, one could use a 16-bit signed integer having a numerical range of $-32768$ to +32767 to represent motor temperature by programming the HMI to insert a decimal point between the hundreds' and the tens' place. This would give the motor temperature tag a (displayed) numerical range of $-327.68$ degrees to +327.67 degrees, and a (displayed) resolution of $\pm$0.01 degree. This is basically the concept of a fixed-point number, where a fixed decimal point demarcates whole digits (or bits) from fractional digits (or bits).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... efficient1.9
Morse code is an example of a self-compressing code, already optimized in terms of minimum bit count. Fixed-field codes such as Baudot and the more modern ASCII tend to waste bandwidth, and may be “compressed” by removing redundant bits.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... transmitted1.10
For example, the Baudot code 11101 meant either “Q” or “1” depending on whether the last shift character was “letters” or “figures,” respectively. The code 01010 meant either “R” or “4”. The code 00001 meant either “T” or a “5”. This overloading of codes is equivalent to using the “shift” key on a computer keyboard to switch between numbers and symbols (e.g. “5” versus “%”, or “8” versus “*”). The use of a “shift” key on a keyboard allows single keys on the keyboard to represent multiple characters.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... encoding1.11
Including the digital source code for this textbook!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... set1.12
To illustrate, the first 128 Unicode characters (0000 through 007F hexadecimal) are identical to ASCII's 128 characters (00 through 7F hexadecimal)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...count1.13
The origin of this word has to do with the way many ADC circuits are designed, using binary counters. In the tracking design of ADC, for instance, an up-down binary counter “tracks” the varying analog input voltage signal. The binary output of this counter is fed to a DAC (digital-to-analog converter) sending an analog voltage to a comparator circuit, comparing the digital counter's equivalent value to the value of the measured analog input. If one is greater than the other, the up-down counter is instructed to either count up or count down as necessary to equalize the two values. Thus, the up-down counter repeatedly steps up or down as needed to keep pace with the value of that analog voltage, its digital output literally “counting” steps along a fixed scale representing the full analog measurement range of the ADC circuit.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... down1.14
Whether or not the actual ADC will round down depends on how it is designed. Some ADCs round down, others “bobble” equally between the two nearest digital values, and others yet “bobble” proportionately between the two nearest values. No matter how you round in your calculation of count value, you will never be more than 1 count off from the real ADC's value.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...aliasing1.15
A less-commonly-used synonym for aliasing is folding.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... dots1.16
A mechanical demonstration of aliasing may be seen by using a stroboscope to “freeze” the motion of a rotating object. If the frequency of a flashing strobe light is set to exactly match the rotational speed of the object (e.g. 30 Hz flashing = 1800 RPM rotation), the object will appear to stand still because your eyes only see the object when it is at the exact same position every flash. This is equivalent to sampling a sinusoidal signal exactly once per cycle: the signal appears to be constant (DC) because the sine wave gets sampled at identical points along its amplitude each time. If the strobe light's frequency is set slightly slower than the object's rotational speed, the object will appear to slowly rotate in the forward direction because each successive flash reveals the object to be in a slightly further angle of rotation than it was before. This is equivalent to sampling a sinusoidal signal at a rate slightly slower than the signal's frequency: the result appears to be a sinusoidal wave, but at a much slower frequency.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... resolution1.17
Remember that an ADC has a finite number of “counts” to divide its received analog signal into. A 12-bit ADC, for example, has a count range of 0 to 4095. Used to digitize an analog signal spanning the full range of 0 to 5 VDC, this means each count will be “worth” 1.22 millivolts. This is the minimum amount of signal voltage that a 12-bit, 0-5 VDC converter is able to resolve: the smallest increment of signal it is able to uniquely respond to. 1.22 mV represents 0.037% of 3.3 volts, which means this ADC may “resolve” down to the very respectable fraction 0.037% of the solar panel's 33 volt range. If we were to use the same ADC range to directly measure the shunt resistor's voltage drop (0 to 0.54 VDC), however, it would only be able to resolve down to 0.226% of the 0 to 5.4 amp range, which is much poorer resolution.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... roughly1.18
The relationship of temperature to $V_{signal}$ in this sensor circuit will not be precisely linear, especially if $R_{fixed}$ is not tremendously larger than $R_{RTD}$.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... instantaneous1.19
To be fair, there is such a thing as a time-multiplexed analog system for industrial data communication (I've actually worked on one such system, used to measure voltages on electrolytic “pots” in the aluminum industry, communicating the voltages across hundreds of individual pots to a central control computer).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... choice1.20
There is, of course, the issue of reliability. Communicating thousands of process data points over a single cable may very well represent a dramatic cost savings in terms of wire, junction boxes, and electrical conduit. However, it also means you will lose all those thousands of data points if that one cable becomes severed! Even with digital technology, there may be reason to under-utilize the bandwidth of a signal cable.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... minimum1.21
A common technique for high-speed parallel data communication over short distances (e.g. on a printed circuit board) is differential signaling, where each bit requires its own dedicated pair of conductors. A 16-bit parallel digital signal communicated this way would require 32 conductors between devices!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... telegraph1.22
I do not expect any reader of this book to have firsthand knowledge of what a “telegraph” is, but I suspect some will have never heard of one until this point. Basically, a telegraph was a primitive electrical communication system stretching between cities using a keyswitch at the transmitting end to transmit on-and-off pulses and a “sounder” to make those pulses audible on the receiving end. Trained human operators worked these systems, one at the transmitting end (encoding English-written messages into a series of pulses) and one at the receiving end (translating those pulses into English letters).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... achieve1.23
A test message sent in 1924 between two teletype machines achieved a speed of 1920 characters per minute (32 characters per second), sending the sentence fragments “THE WESTERN ELECTRIC COMPANY”, “FRESHEST EGGS AT BOTTOM MARKET PRICES”, and “SHE IS HIS SISTER”.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... asynchronous1.24
“Asynchronous” refers to the transmitting and receiving devices not having to be in perfect synchronization in order for data transfer to occur. Every industrial data communications standard I have ever seen is asynchronous rather than synchronous. In synchronous serial networks, a common “clock” signal maintains transmitting and receiving devices in a constant state of synchronization, so that data packets do not have to be preceded by “start” bits or followed by “stop” bits. Synchronous data communication networks are therefore more efficient (not having to include “extra” bits in the data stream) but also more complex. Most long-distance, heavy traffic digital networks (such as the “backbone” networks used for the Internet) are synchronous for this reason.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... initially1.25
Later versions of teletype systems employed audio tones instead of discrete electrical pulses so that many different channels of communication could be funneled along one telegraph line, each channel having its own unique audio tone frequency which could be filtered from other channels' tones.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...Non-Return-to-Zero1.26
This simply refers to the fact that the signal never settles at 0 volts.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... signal1.27
This is most definitely not the case with NRZ encoding. To see the difference for yourself, imagine a continuous string of either “0” or “1” bits transmitted in NRZ encoding: it would be nothing but a straight-line DC signal. In Manchester encoding, it is impossible to have a straight-line DC signal for an indefinite length of time. Manchester signals must oscillate at a minimum frequency equal to the clock speed, thereby guaranteeing all receiving devices the ability to detect that clock speed and thereby synchronize themselves with it.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... audio-frequency1.28
It is relatively easy to build an apparatus that makes HART tone signals audible: simply connect a small audio speaker to the low-impedance side of an audio transformer (8 ohms) and then connect the high-impedance side of that transformer (typically 1000 ohms) to the HART signal source through a coupling capacitor (a few microfarads is sufficient). When HART communications are taking place, you can hear the FSK tones reproduced by the speaker, which sound something like the noises made by a fax machine as it communicates over a telephone line.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... signal1.29
This is one of the advantages of Manchester encoding: it is a “self-clocking” signal.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... equivalent1.30
This is likely why “bit rate” and “baud rate” became intermingled in digital networking parlance: the earliest serial data networks requiring speed configuration were NRZ in nature, where “bps” and “baud” are one and the same.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... worst-case1.31
For Manchester encoding, “worst-case” is a sequence of identical bit states, such as 111111111111, where the signal must make an extra (down) transition in order to be “ready” for each meaningful (up) transition representing the next “1” state.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...minicom1.32
An equivalent program for Microsoft Windows is Hyperterminal. A legacy application, available for both Microsoft Windows and UNIX operating systems, is the serial communications program called kermit.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... last1.33
This is standard in EIA/TIA-232 communications.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... single-bit1.34
It should take only a moment or two of reflection to realize that such a parity check cannot detect an even number of corruptions, since flipping the states of any two or any four or any six (or even all eight!) bits will not alter the evenness/oddness of the bit count. So, parity is admittedly an imperfect error-detection scheme. However, it is certainly better than no error detection at all!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... codes1.35
The “XOFF” code tells the transmitting device to halt its serial data stream to give the receiving device a chance to “catch up.” In data terminal applications, the XOFF command may be issued by pressing the key combination $<$Ctrl$><$S$>$. This will “freeze” the stream of text data sent to the terminal by the host computer. The key combination $<$Ctrl$><$Q$>$ sends the “XON” code, enabling the host computer to resume data transmission to the terminal.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... device1.36
I once encountered this very type of failure on the job, where a copper-to-fiber adapter on a personal computer's Ethernet port jammed the entire network by constantly spewing a meaningless stream of data. Fortunately, indicator lights on all the channels of the communications equipment clearly showed where the offending device was on the network, allowing us to take it out of service for replacement.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... seven1.37
An additional layer sometimes added to the OSI model is layer 8, representing either the human user of the network system or the physical process interfacing with the network system. If the purpose of this model is to describe all the functioning portions of a communications link in the context of a system used for some practical purpose, layer 8 represents an essential part of that system and should not be ignored.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... Standards)1.38
If you are thinking the acronym should be “IOS” instead of “ISO,” you are thinking in terms of English. “ISO” is a non-English acronym!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... layers1.39
It should be noted here that some network standards incorporating the name “Modbus” actually do specify lower-level concerns. Modbus Plus is a layer 2 standard, for example.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... formerly1.40
The designation of “RS-232” has been used for so many years that it still persists in modern writing and manufacturers' documentation, despite the official status of the EIA/TIA label. The same is true for EIA/TIA-422 and EIA/TIA-485, which were formerly known as RS-422 and RS-485, respectively.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... devices1.41
“Daisy-chain” networks formed of more than two devices communicating via EIA/TIA-232 signals have been built, but they are rarely encountered, especially in industrial control applications.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... DE-91.42
Often (incorrectly) called a “DB-9” connector.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... signals1.43
The way hardware-based flow control works in the EIA/TIA-232 standard involves two lines labeled RTS (“Request To Send”) and CTS (“Clear To Send”) connecting the two devices together on a point-to-point serial network in addition to the TD (“Transmitted Data”) and RD (“Received Data”) and signal ground lines. Like the TD and RD terminals which must be “crossed over” between devices such that the TD of one device connects to the RD of the other device and vice-versa, the RTS and CTS terminals of the two devices must be similarly crossed. The RTS is an output line while the CTS is an input, on both devices. When a device is able to receive data, it activates its RTS output line to request data. A device is not permitted to transmit data on its TD line until it is cleared to send data by an active state on its CTS input line.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... Equipment1.44
Also known by the unwieldy acronym DCTE (Data Circuit Terminating Equipment). Just think of “DTE” devices as being at the very end (“terminal”) of the line, whereas “DCE” devices are somewhere in the middle, helping to exchange serial data between DTE devices.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... circuits1.45
In fact, the concept is not unique to digital systems at all. Try talking to someone using a telephone handset held upside-down, with the speaker near your mouth and the microphone hear your ear, and you will immediately understand the necessity of having “transmit” and “receive” channels swapped from one end of a network to the other!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... tests1.46
Once I experimented with the fastest data rate I could “push” an EIA/TIA-232 network to, using a “flat” (untwisted, unshielded pair) cable less than ten feet long, and it was 192 kbps with occasional data corruptions. Park, Mackay, and Wright, in their book Practical Data Communications for Instrumentation and Control document cable lengths as long as 20 meters at 115 kbps for EIA/TIA-232, and 50 meters (over 150 feet!) at 19.2 kbps: over three times better than the advertised EIA/TIA-232 standard.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... standards1.47
Former labels for EIA/TIA-422 and EIA/TIA-485 were RS-422 and RS-485, respectively. These older labels persist even today, to the extent that some people will not recognize what you are referring to if you say “EIA/TIA-422” or “EIA/TIA-485.”
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... mile1.48
1200 meters is the figure commonly cited in technical literature. However, Park, Mackay, and Wright, in their book Practical Data Communications for Instrumentation and Control document EIA/TIA-422 and EIA/TIA-485 networks operating with cable lengths up to 5 km (over 16000 feet!) at data rates of 1200 bps. Undoubtedly, such systems were installed with care, using high-quality cable and good wiring practices to minimize cable capacitance and noise.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... resistors1.49
In fact, a great many EIA/TIA-485 networks in industry operate “unterminated” with no problems at all.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... impedance1.50
For detailed explanation of how and why this is necessary, refer to section [*] beginning on page [*].
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... resistor1.51
Actually two terminating resistors in parallel, since one with be at each end of the cable! The actual DC biasing network will be more complicated as well if more than one device has its own set of internal bias resistors.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... maintenance1.52
These very same problems may arise in FOUNDATION Fieldbus networks, for the exact same reason: the cabling is passive (for increased reliability). This makes FOUNDATION Fieldbus instrument systems challenging to properly install for most applications (except in really simple cases where the cable route is straightforward), which in my mind is its single greatest weakness at the time of this writing (2009). I strongly suspect Ethernet's history will repeat itself in FOUNDATION Fieldbus at some later date: a system of reliable “hub” devices will be introduced so that these problems may be averted, and installations made much simpler.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... networks1.53
There are practical limits as to how many hubs may be “daisy-chained” together in this manner, just as there are practical limits to how long a twisted-pair cable may be (up to 100 meters). If too many hubs are cascaded, the inevitable time delays caused by the process of repeating those electrical impulses will cause problems in the network. Also, I have neglected to specify the use of crossover cables to connect hubs to other hubs – this is a topic to be covered later in this book!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... two1.54
With only half the available wire pairs used in a standard 10 Mbps or 100 Mbps Ethernet cable, this opens the possibility of routing two Ethernet channels over a single four-pair UTP cable and RJ-45 connector. Although this is non-standard wiring, it may be a useful way to “squeeze” more use out of existing cables in certain applications. In fact, “splitter” devices are sold to allow two RJ-45-tipped cables to be plugged into a single RJ-45 socket such that one four-pair cable will then support two Ethernet pathways.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... pairs1.55
This means modern Ethernet is capable of full-duplex communication between two devices, whereas the original coaxial-based Ethernet was only capable of half-duplex communication.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... drawbacks1.56
Even the cost difference is negligible. It should be noted, though, that switches may exhibit unintended behavior if a cable is unplugged from one of the ports and re-plugged into a different port. Since switches internally map ports to device addresses, swapping a device from one port to another will “confuse” the switch until it re-initializes the port identities. Re-initialization may be forced by cycling power to the switch, if the switch does not do so on its own.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... destination(s)1.57
When packets travel between different kinds of networks, the “gateway” devices at those transition points may need to fragment large IP packets into smaller IP packets and then re-assemble those fragments at the other end. This fragmentation and reassembly is a function of Internet Protocol, but it happens at the packet level. The task of portioning a large data block into packet-sized pieces at the very start and then reassembling those packets into a facsimile of the original data at the very end, however, is beyond the scope of IP.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... destinations1.58
In fact, this is precisely the state of affairs if you use a dial-up telephone connection to link your personal computer with the Internet. If you use dial-up, your PC may not use Ethernet at all to make the connection to your telephone provider's network, but rather it might uses EIA/TIA-232 or USB to a modem (modulator/demodulator) device, which turns those bits into modulated waveforms transmittable over a voice-quality analog telephone line.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... message1.59
The “ping” command is technically defined as an “Echo Request” command, which is part of the Internet Control Message Protocol (ICMP) suite.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... responsible1.60
Prior to ICANN's formation in 1999, the Internet Assigned Numbers Authority, or IANA was responsible for these functions. This effort was headed by a man named Jon Postel, who died in 1998.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... all1.61
The term “loopback” refers to an old trick used by network technicians to diagnose suspect serial port connections on a computer. Using a short piece of copper wire (or even a paperclip) to “jumper” pins 2 and 3 on an EIA/TIA-232 serial port, any serial data transmitted (out of pin 3) would be immediately received (in pin 2), allowing the serial data to “loop back” to the computer where it could be read. This simple test, if passed, would prove the computer's low-level communication software and hardware was working properly and that any networking problems must lie elsewhere.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... masks1.62
Also called “netmasks” or simply “masks.”
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... works1.63
These are real test cases I performed between two computers connected on a 10 Mbps Ethernet network. The error messages are those generated by the ping utility when communication was attempted between mis-matched computers.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... mass1.64
According to Douglas Giancoli's Physics for Scientists and Engineers textbook, the mass of the Earth is $5.98 \times 10^{24}$ kg, or $5.98 \times 10^{27}$ grams. Dividing $2^{128}$ (the number of unique IPv6 addresses) by the Earth's mass in grams yields the number of available IPv6 address per gram of Earth mass. Furthermore, if we assume a grain of sand has a mass of about 1 milligram, and that the Earth is modeled as a very large collection of sand grains (not quite the truth, but good enough for a dramatic illustration!), we arrive at 57 million IPv6 addresses per grain of sand on Earth.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... simply1.65
The fully-written loopback address is actually 0000:0000:0000:0000:0000:0000:0000:0001.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... contiguous1.66
While it is possible to use non-contiguous subnet mask values, the practice is frowned upon by most system administrators.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... LSB1.67
Indeed, subnet masks for IPv4 can be specified in this manner as well, not just IPv6 subnet masks.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... broadcast1.68
The “ping” command is often used to test the response of a single IP node on a network, by issuing the command followed by the IP address of interest (e.g. ping 192.168.35.70). By contrast, a “broadcast” ping request attempts to contact a range of IP addresses within a subnet. For example, if we wished to ping all the IP addresses beginning with 192.168.35, we would issue the command with all 1's in the last octet of the IP address field (e.g. ping 192.168.35.255).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... interface1.69
In UNIX-based operating systems the program used to access the command line is often called terminal or xterm. In Microsoft Windows systems it is simply called cmd.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... field1.70
Both IPv4 and IPv6 reserve eight bits for this purpose.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... connections1.71
In this particular case, I typed netstat -an to specify all (a) ports with numerical (n) IP addresses and port numbers shown.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... description1.72
A Device Description, or DD (DD) file, is analogous to a “driver” file used to instruct a personal computer how to communicate with a printer, scanner, or any other complex peripheral device. In this case, the file instructs the HART configuration computer on how it should access parameters inside the field instrument's microcontroller. Without an appropriate DD file loaded on the configuration computer, many of the field instrument's parameters may be inaccessible.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... files1.73
A “DD” file, or Device Descriptor file, is akin to a driver file used in a personal computer to allow it to communicate data with some peripheral device such as a printer. DD files basically tell the HART communicator how it needs to access specific data points within the HART field instrument.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... bits1.74
Every byte (8 bits) of actual HART data is sent as an asynchronous serial frame with a start bit, parity bit, and stop bit, so that 11 bits' worth of time are necessary to communicate 8 bits of real data. These “byte frames” are then packaged into larger message units called HART telegrams (similar to Ethernet data frames) which include bits for synchronizing receiving devices, specifying device addresses, specifying the length of the data payload, communicating device status, etc.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... source1.75
The HART standard specifies “master” devices in a HART network transmit AC voltage signals, while “slave” devices transmit AC current signals.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... communicator)1.76
Truth be told, HART instruments configured to operate in burst mode are still able to respond to queries from a master device, just not as often. Between bursts, the HART slave device waits a short time to allow any master devices on the network to poll. When polled, the slave device will respond as it normally would, then resumes its bursts of unpolled data once again. This means that normal master/slave communication with a HART instrument set for burst mode will occur at a slower pace than if the instrument is set for normal mode.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... compatible1.77
These Modbus data frames may be communicated directly in serial form, or “wrapped” in TCP segments and IP packets and Ethernet frames, or otherwise contained in any form of packet-based protocol as needed to transport the data from one device to another. Thus, Modbus does not “care” how the data is communicated, just what the data means for the end-device.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... twice1.78
Recall that each ASCII character requires 7 bits to encode. This impacts nearly every portion of the Modbus data frame. Slave address and function code portions, for example, require 14 bits each in ASCII but only 8 bits each in RTU. The data portion of a Modbus ASCII frame requires one ASCII character (7 bits) to represent each hexadecimal symbol that in turn represents just 4 bits of actual data. The data portion of a Modbus RTU frame, by contrast, codes the data bits directly (i.e. 8 bits of data appear as 8 bits within that portion of the frame). Additionally, RTU data frames use quiet periods (pauses) as delimiters, while ASCII data frames use three ASCII characters in total to mark the start and stop of each frame, at a “cost” of 21 additional bits. These additional delimiting bits do serve a practical purpose, though: they format each Modbus ASCII data frame as its own line on the screen of a terminal program.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... language1.79
This C-language code is typed and saved as a plain-text file on the computer, and then a compiler program is run to convert this “source” code into an “executable” file that the computer may then run. The compiler I use on my Linux-based systems is gcc (the GNU C Compiler). If I save my Modbus program source code to a file named tony_modbus.c, then the command-line instruction I will need to issue to my computer instructing GCC to compile this source code will be gcc tony_modbus.c -lmodbus. The argument -lmodbus tells GCC to “link” my code to the code of the pre-installed libmodbus library in order to compile a working executable file. By default, GCC outputs the executable as a file named a.out. If I wish to rename the executable something more meaningful, I may either do so manually after compilation, or invoke the “outfile” option of gcc and specify the desired executable filename: (e.g. gcc -o tony.exe tony_modbus -lmodbus). Once compiled, the executable file many be run and the results of the Modbus query viewed on the computer's display.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... bytes1.80
Even for devices where the register size is less than two bytes (e.g. Modicon M84 and 484 model controllers have 10 bits within each register), data is still addressed as two bytes' worth per register, with the leading bits simply set to zero to act as placeholders.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.