Networking concepts for chemists

Networking concepts for chemists

Chemometrics and Intelligent Laboratory Systems: Laboratory Information Management, 13 (1992) 203-210 Elsevier Science Publishers B.V., Amsterdam m ...

626KB Sizes 0 Downloads 106 Views

Chemometrics and Intelligent Laboratory Systems: Laboratory Information Management, 13 (1992) 203-210 Elsevier Science Publishers B.V., Amsterdam

m

Tutorial

Networking Concepts for chemists S.P. Maj Instrtute of’Automatic

Control

Systems, Serwlahoratoriet, Lyngby

(Received

10 December

Technical

UniL~ersity of‘Denmark,

(Denmark) 1991; accepted

7 April

1992)

Abstract

Maj, S.P., 1992. Networking. Management, 13: 203-210.

Concepts

Chemometrics and Intelligent Laboratory Systems: Laboratory Information

for chemists.

This article is concerned with the basics of communication engineering with the aim of explaining some of the commonly used terms. The concept of the open systems interconnection model is introduced. These principles will subsequently be built upon to give the reader a fuller understanding of networking and its applications within a laboratory environment. CONTENTS

1. Introduction.

3. 4. 5. 6.

The

basics

of data

transmission

. .. . . .

................... 2.1. Asynchronous transmission ........... 2.2. Synchronous transmission ............ Modes of communication ............... Serial/parallel transmission ............. Signal deterioration ................... Transmission media ...................

2. Transmission

modes

7. The open system

interconnection

. .

.. . .

.. . .. .

..

. . . . . .

. . . . .

.. . . . .

.

.

205 206 206 206 207 208

. . ..

9.1. Media access controls ............... 9.2. CSMA/CD ...................... 9.3. Local area networks and the OS1 IO. Summary ...........................

204 204

206

..... .......

model

7.1. The seven-layer IS0 OS1 model ........................... 8. Networks ................... 9. Local area networks

204

..

.

. .

. .

208 209 209 209 210 210

......

Correspondence to: Dr. S.P. Maj. Adjunct Professor and Independent Consultant, Institute of Automatic Control Systems. Servolaboratoriet. Technical University of Denmark, DTH, Building 326, DK-2800 Lyngby, Denmark. Tel.: ( + 45 42) 88 01 99; Fax: ( + 45 42) 88 12 95. 0925.52&X1/92/$05.00

0 1992 - Elsevier

Science

Publishers

B.V. All rights reserved

S.P. Muj / Lab. lnf. Manage.

204 1. INTRODUCTION. MISSION

THE

BASICS

OF DATA

TRANS-

Recall that for our full alphanumeric code of letters, numbers, spaces, carriage return to be represented by a computer, etc., 128 characters are necessary. This can therefore be provided by a seven-bit code, i.e., the American Standard Code for Information Interchange (ASCII). Each combination of bits is allocated a meaning that is understood throughout the world. A standard code is obviously needed for free and universal communications. For example, when the key for the letter ‘A’ on a keyboard is depressed the associated ASCII binary pattern called a voltage pulse train is generated. Transmitted electrical signals are, however, subject to electrical interference. Equipment such as heavy machines can produce electromagnetic radiation which can generate unwanted electrical pulses in transmission wires. It is possible to transmit one series of pulses but receive another. To give a degree of protection it is necessary to introduce redundancy; this is done by using eight bits instead of the original seven bits. This additional bit is called a parity bit. Redundancy allows for the possibility of generating codes that are not valid; this invalidity can then be detected. There are two types of parity, odd and even. A system can be either odd or even parity, but not both. With even parity the transmitting device ensures that the number of binary 1s is even by setting the parity bit accordingly. The receiving device must be set to the same parity as the transmitting device. If, when the pulse train is transmitted, bit inversion occurs, the parity will change. The receiving device employs the same parity as the transmitting device and can therefore detect whether an error has occurred. Parity is therefore a simple form of error detection.

2. TRANSMISSION

end of each character - byte or character synchronisation; (3) the beginning and end of each message block - block or frame synchronisation. In effect the receiving device must be informed of the start and end of data and also how fast the line must be sampled. If the transmitting device is sending pulses at a clock rate of, say, 1 kHz the sampling frequency must be the same. There are two ways of achieving this synchronisation, depending on whether the transmitter and receiver clocks are independent (asynchronous) or dependent (synchronous). 2.1. Asynchronous transmission

In this method the transmitter and receiving clocks work independently, i.e., the receiver does not know the correct frequency of the transmitting clock and the exact bit period is therefore unknown. This method is used when there are long idle periods between characters that are being sent at random intervals - such as from a keyboard. The transmission line will be idle for extended periods of time and the receiver must be resynchronised at the start of each new character. This is achieved by enveloping the data between start and stop bits. By convention the idle line is held high and the first 1 to 0 transition indicates to the receiving device the start of a new character. The receiving device clock has a higher frequency than the transmitted bit rate frequency and can reliably determine the state of each transmitted bit by sampling the received signal approximately in the centre of each bit period (Fig. 2).

bit

period

MODES

For the receiving device to decode and interpret this pattern correctly it must know: (1) the bit rate (i.e., time period of each bit, Fig. 1) - bit or clock synchronisation; (2) the beginning and

13 (19921 203-210

Sampl ing Fig. 1. The bit period.

frequency

S.P. Maj/Lab.

205

Inf Manage. 13 (1992) 203-210

1 keyboard

- -1

I-

computer stop bit

start bit 0

idle t

1

0

0

0

0

0

1

1

0

1

5v

ov

/

I

T

Ttfttttft receiver detects 1 to 0 transition ie new character

idle

stop bit ensures a 1 to 0 transition for next character

each bit sampled approximately in centre of each bit period

Fig. 2. Pulse train with even parity and start/stop bits.

2.2. Synchronous transmission

between computers. The overhead of two additional bits per character would in this case be inefficient. With synchronous transmission the data is transmitted as a single stream with no

In some applications there are large volumes of data to be sent at very high speed, such as

transmitted

>

<->

<

start frame of contents frame character Fig. 3. Synchronoustransmissionframe. sync characters

frame

> <->

<

end of frame character

sync characters

S.P. Muj / Lab. Inf. Manage. 13 (1992) 203-210

206

delays between each eight-bit element. The data is enclosed by start-of-frame and end-of-frame characters. During idle periods synchronisation characters (sync) are continuously sent allowing the receiver to maintain synchronisation i.e. both transmitter and receiver clocks are working at the same frequency (Fig. 3). When data are transmitted over a distance it has been found that groups or strings of errors occur: error bursts. Parity does not provide protection against error bursts. However polynomial codes can be used when frames of data are transmitted. Based on a polynomial code a group of check digits are calculated for each frame that is to be transmitted and appended to the end of each frame. The receiving device then performs a calculation on each frame and associated check digits. If no errors have been induced then an expected result is always obtained. The check digits are called the frame check sequence (FCS) or the cyclic redundancy check (CRC).

3. MODES OF COMMUNICATION

There are different modes of communication. Whilst listening to one of your relatives perhaps the conversation is one way only! In normal conversation there will be two-way communication with each speaker taking turns to talk. In communication engineering there are in fact three types of such communication: (1) simplex, in which data is transmitted in one direction only; (2) half duplex, in which data may be exchanged between two devices but only one device may transmit at a time; (3) duplex, which allows data exchange between two devices in both directions simultaneously.

3. SERIAL/PARALLEL

bit serial. However with, for example, eight wires eight bits can be sent at a time which is bit-parallel mode. This could also be called byte serial. This is faster but more expensive. In both cases additional wires are used to send control data.

5. SIGNAL

DETERIORATION

In practice the quality of the transmitted signals is reduced by attenuation (made smaller) and distortion (deformed) due to the effects of the transmission medium. The magnitude of each effect depends on the transmission medium being used and the rate of transmission. Considering some of the effects: - Attenuation. As the signal moves along the transmission medium its amplitude decreases. This can be compensated for by using amplifiers. - Bandwidth limitations. A digital signal (square wave) consists of a very wide range of frequencies. The bandwidth of the medium is the range of frequencies that may be transmitted. The bandwidth of the medium may be considerably less than the bandwidth of the signal causing signal distortion. - Delay distortion. Propagation rate along a transmission line depends on frquency. As mentioned, a digital signal consists of a range of frequencies. Hence these various frequencies will be subjected to different delays causing delay distortion. - Noise. Even with no signal on a transmission line, there will be random perturbations called noise. This becomes a significant problem when the signal has become so attenuated that the noise amplitude is a significant percentage of the signal. By analogy this is rather like trying to listen to someone next to a pneumatic drill.

TRANSMISSION 6. TRANSMISSION

The cabling between two pieces of equipment may allow data to be transmitted either bit serial or bit parallel (byte serial). In serial mode there is only one wire connecting the two pieces of equipment for data transmission. Each bit of the pulse train must be sent in turn, one bit at a time, i.e.

MEDIA

Data transmission between two pieces of equipment is by means of a transmission medium. The type and hence the characteristics of the medium will determine the rate at which data can be transmitted i.e. the bit rate.

S.P. Maj/Lah.

Infl Manage. 13 (1992) 203-210

data CD~,~U,,,C~~~ODS

207

of metres. The high bandwidth of coaxial cables can be utilised in two ways: (a) baseband mode in which all the bandwidth is used for a single high bit rate transmission path; (b) broadband mode in which the bandwidth is divided into several lower bandwidth subchannels. - Optical fibres differ from other transmission media in that the carrier is a beam of light in a glass fibre, rather than an electrical signal in a piece of wire. Due to the properties of light waves a much higher bandwidth is possible ailowing very high bit rates (hundreds of Mbps) with the additional advantage of immunity from electromagnetic interference. _ Microwave links employ the transmission medium of free space, i.e., satellites.

network

Fig. 4. Communications link.

-

Two-wire, open lines is the simplest and cheapest form of connection. It is limited to short distances (up to 50 m) and low transmission rates (20 kbps) due to susceptibility to noise pick-up. - Twisted pair lines give better noise immunity due to the physical proximity of the wires (twisted together). The close proximity of the wires means that any noise would be induced in both wires; however, the relative value of the signal has not substantially been degraded. Thus bit rates of 1 Mbps over 100 m is possible. - Coaxial cables have a central conductor that is shielded from external interference allowing transmission rates of lo-20 Mbps over hundreds

7. THE MODEL

OPEN

So far, consideration physical interconnections

r Computer B

communications

Application

layer

Presentation Session

layer layer

Transport Network Data

layer layer

link

Physical

>

<

Application

layer layer

data Fig. 5. OSI model.

<

>

Application

Presentation

<->

Session

<->

Transport >

<

communication

>

network

layer layer

layer

Network Data

<->

I

Application

<-------->

<

SYSTEMS

link

Physical

layer layer layer layer

INTERCONNECTION

(0%)

has only been given to which have associated

S.P. Maj/Lab.

208

standards for mechanical and electrical definitions, i.e., pin definition etc. Communication engineering is complex and must address many issues and problems at many different levels. Different computers have different operating systems and indeed different ways of representing data. The ASCII code is not even universally used! IBM have their own character code called EBCDIC. Historically, there were ‘closed’ computer communities in which each computer manufacturer had their own standards for computer communications (Fig. 4). In the 1970s the International Standards Organisation (ISO) developed the reference model for open systems interconnection (OSI) in order to address the problem of universal interconnectivity. Thus allowing: “Any application in any computer that supports the appropriate standards to freely communicate with an application in any other computer supporting the same standard irrespective of its origin or manufacture”

i.e., manufacturer-independent standards. Communications software is complex and must address many issues and problems such as sequence control, flow control, error detection and correction, etc. In order to address this complexity the OS1 standard is divided into layers each with a well-defined function operating to defined protocols with defined interfaces (Fig. 5). 7.1. The seven-layer IS0 OSI model The layered approach gives a logical decomposition of a complex system into smaller, distinct parts with standard interfaces between the layered functions. Each layer is a service provider. At the bottom level the physical layer provides the service of mechanical and electrical connections between equipment to an agreed specification. This service is used by layer 2, the data link layer, which in turn provides a service for the next layer up and so on. The seven layers are: 7. The application layer provides the user interface to a variety of information services distributed across the network. Services include file management and file transfer facilities, electronic mail etc.

Inf: Manage. 13 (1992) 203-210

6. The presentation layer is concerned with the representation or syntax of the data being transferred. To achieve open systems interconnection several data forms have been defined. The presentation layer both negotiates and selects the appropriate syntax to be used. The best analogy is two people of different nationality trying to communicate. It is possible that neither can speak each other’s language but both can speak and understand a common language. 5. The session layer provides dialogue synchronisation. As such it is responsible for setting up and clearing a communication channel. 4. The transport layer is responsible for endto-end message transfer and as such includes connection management, flow control and error control. 3. The network layer is provided by the data link layer with a reliable data transfer service. The network layer is responsible for establishing connections between selected devices across a large complex network. Facilities available include routing (address location), call-setup and clearing. 2. The data link layer builds upon the lower physical layer in order to ensure reliable data transfer. As such it is responsible for error detection/correction, data framing, and, when necessary, the re-transmission of messages. 1. The physical layer is concerned with both the physical and electrical interface. It provides the medium by which a bit stream may be transmitted.

8. NETWORKS

What is a network? There are various definitions, of which one would be: “an interconnected collection of autonomous computers capable of sharing information”. The advantages of a network of computers and devices include: - Increased reliability, also called soft performance degradation. Networks have the potential ability to continue operating even if a hardware or software failure occurs. Typically there are multiple computers on the networks and the fail-

S.P.

Maj/Lab.

TABLE

I$

Manage.

13 (1992)

1

Specification

Diameter Owner/ controller Data rate

of local and wide area networks Local area network

Wide area network

< a few km One organisation > 1 Mbps

Unrestricted Common carrier with many organisations < 1 Mbps

me of one device should not cause the whole system to fail. _ Extensibility and flexibility. Networked systems enforce modularity and the use of standard interfaces, both for hardware and software. This facilitates modifications or extensions to the system without disrupting current operations. It is therefore possible to start with a small system and upgrade by adding further devices to the network at low incremental cost. - Shared cost. Expensive hardware and software can be shared between users. - Local control. Each computer has control over its own resources. There are two types of network (local area and wide area> that can be distinguished according to specification (Table 11.

9. LOCAL

AREA

NETWORKS

209

203-210

CLANS)

Local area networks or LANs are distributed but interconnected communities of computerbased systems. The physical separation is restricted to a single building site or manufacturing plant. Typically, LANs are owned and maintained by a single organisation. The two main topologies are bus and ring. With the ring topology the cable connects the computer systems in the form of a ring or loop. There is a direct point-to-point link between neighbouring equipment which is unidirectional in operation. The bus (linear) topology has a single network cable. 9.1. Medium access control (MAC) All types of equipment can have access to the network - workstations, intelligent instrumentation process plant, etc. In general these types of equipment are called data terminal equipment

(DTE). All the DTEs must share a single transmission path. Hence restrictions and therefore discipline must be imposed on all network users. The two techniques that have been adopted for use are: - carrier-sense-multiple-access with collision detection (CSMA/CD) that is used with bus topologies; - control token that is used with either bus or ring topologies. Other techniques exist but are not supported by full international standards. 9.2. CSMA / CD This medium access method is only used with bus networks. Any pair of devices can communicate, i.e., multiple access (MA). The data to be transmitted by the sender are encapsulated in a frame that includes both the destination and the source address (Fig. 6). The frame is then transmitted (broadcast) on the cable. All equipment on the bus detects whether a frame is being transmitted. If the frame has the appropriate address the data are read. The source address allows the recipient to reply. With this mode of operation it is possible for two DTEs to attempt to transmit data at the same time. To prevent this from happening each DTE transmitter listens to the cable to detect whether or not a frame is currently being transmitted. If a carrier signal is sensed (CS), the DTE delays transmission until the cable is free. It is however still possible that two DTEs may sense a free carrier and simultaneously transmit. In this case a collision occurs Start-of-Frame Delimiter

(SFD)

Destination Address Source Address Data Frame Check Sequence Fig. 6. Simplified

(FCS) frame

format

S.P. Maj/Lah.

210

and is detected by the DTEs (CD). TO allow for this contingency each sender simultaneously monitors the cable when transmitting a data frame. If the transmitted and monitored signals are different, a collision has occurred. To ensure that the other sender is aware that this collision has occurred, the collision is enforced by continuing to send a random bit pattern for a short period the jam sequence. The two DTEs then wait a short and random period before attempting retransmission. The analogy here would be a dinner party. You can only speak to someone if there is t=0:,4

starts to transm,ta

data

frame

cl

cl

A

B

t = 1 : 8 starts

to

transmit

a data

frame

nnnru___________

?I B

t = 2 : B detects

the

co,,,s,on

nnnnn____-____-_________~~~~1m

and

start

,am sequence

Inf: Manage. 13 (1992) 203-210 IS0 Reference Model

IEEE Standard 802

_____-.

Link Layer

_____-_ Physical lW@X _____- -

IEEE

802.3

:

CSMA/CD

IEEE

802.4

:

Token

bus

IEEE

802.5

:

Token

ring

Fig. 8. IEEE/IS0

standards.

a lull in the conversation. The sequence is demonstrated in Fig. 7. It can be concluded that this type of medium access control is probabilistic; transmission cannot be guaranteed. This can be an important consideration depending on the application requirements. This type of network is also called ethernet and typically implemented by a coaxial cable capable of 10 Mbps baseband. They are used in technical and office environments. Data rates lower than this, such as 1 Mbps, are implemented on twisted pair cabling. 9.3. Local area networks and the OS1

t = 3

: A detects

the

collision

The different standards of media access controls for LANs are defined in the IEEE (Institute of Electrical and Electronics Engineers) Standard 802. Each exists within the context of the OS1 reference model (Fig. 8). t =4

Both

dev,ces

wait

10. SUMMARY

The principles and terminology have been explained in order to promote an understanding of the use of networks within a laboratory environment. 11. ACKNOWLEDGEMENT

Fig. 7. CSMA,‘CD

requence.

VG Laboratory Systems is thanked for their assistance with the preparation of this article.