Education Eng[1]

Embed Size (px)

Citation preview

  • 8/6/2019 Education Eng[1]

    1/47

    The industrial IT revolution

    The new and more effective information flowing in today's corporate

    systems can provide many competitive benefits. Shorter delivery times,faster product development, customer focused production and shorter

    turnaround times are some of the key benefits of industrial IT

    (Information Technology), not to mention rapid access to information

    and the potential for accurate process control.

    Industry is developing IT tools that require a greater degree of infor-

    mation at all stages of the process from purchasing to production to

    market. The quality of the information highways is currently one of the

    most important prerequisites for improving industry's competitiveness

    and efficiency.

    The standard of the highway network

    New ideas, solutions and systems for the creation of these IT tools are evolving,

    but one negative consequence of this dynamism and great diversity is a long-

    standing absence of accepted standards, despite several efforts to remedy this.

    Every pioneer has created his own standard and the problem of inadequate stan-

    dards only becomes evident when computers, machines and other equipment

    have to communicate.

    This involves standards at multiple levels, not merely cables and connectors, but

    such matters as data creation and storage, packaging, addressing and transmis-

    sion. As well as the manner in which the medium (e.g. a cable) carries informa-

    tion and how it is received, unpacked and read by the recipient.

    When all such aspects function, then data communication has been realised,which is the basis of modern IT development.

    10

    Data communications involvemore than cables and connectors

  • 8/6/2019 Education Eng[1]

    2/47

    11

    Industrial data communications

    Most of the standardization within data communications has taken place within

    office applications in integrated networks for personal computers, mainframecomputers, printers, servers, modems etc.

    The same focus has not been given to local data communications within indus-

    try. This may be due to the fact that the lack of standardization and diversification

    is even greater within industry since computers, lathes, measurement equipment,

    scales, robots, transportation systems and different alarm systems must be able to

    communicate with each other. Furthermore, greater demands are made on relia-

    bility and immunity to interference.

    One reason for writing this book is to clarify the concepts used in data com-

    munications, to explain how it works and to provide a practical tool for problem-

    solving within local industrial data communications. For further information, con-

    tact Westermo or attend one of our seminars or courses on data communications.

    Data communications more and more importantfor improving productivity

    As automation becomes increasingly common, the demands become greater on

    effective communication between the units and systems used to control process-

    es and those that actually carry out production and measurement. Data commu-

    nication is the backbone that assures improved efficiency and competitiveness,

    regardless of whether the application is manufacturing, construction, transporta-

    tion or the medical services.

    Data communicationskeeps the wheels ofindustry in motion.

    All products marketed

    by Westermo are CE-marked, which means thatthe product complies with ECrequirements in all directivesapplying to the standard.

    ContactWestermo for adeclaration of conformity

  • 8/6/2019 Education Eng[1]

    3/47

    The purpose of data communications is to transfer information between

    two or more units. As a rule, it is characters (text or numbers) and/or

    instructions (commands) which are transmitted, although it can also be

    drawings and pictures.

    The simplest level of computer language is binary characterswhere

    each character is composed of seven to eight 1s or 0s. Most comput-

    ers operate at this level.

    Data communications is basicallya matter of ones and zeros

    The computer processes binary characters, made up of onesand zeros.

    Each of the characters is called a bit. By combining several bits, a bina-

    ry characterset can be constructed. The most common system, ASCII, contains

    128 characters, each of which is made up of 7 bits. Each of these characters (or

    bit patterns) is known as a byte. Please note that a kilobyte is made up of 1 024

    ASCII characters.

    All communication is carried out at this level, internally within the computer as

    well as externally with other units. Internal communication within the computer is

    simple. However, as soon as the computer has to communicate with external

    units, a series of factors must be synchronized and controlled to ensure that the

    transmission of data takes place correctly.

    See the ASCII table on page 21.

    12

    How does datacommunications work?

    Bits and bytes

    byte

    bit

  • 8/6/2019 Education Eng[1]

    4/47

    13

    One bit at a time, or a whole byte?

    There are two ways of transmitting data: by parallel or serial transmission.

    Parallel transmission is faster and simpler since the entire character with its

    8 bits is transmitted in a single operation using 8 transmission paths, one for each

    bit. All communication within the computer itself takes place via parallel paths in

    the internal data bus, so that an entire character or several characters can be

    simultaneously transmitted.

    Parallel transmissionvia a multi-conductor cable (Centronics-type) can only becarried out at short distances for practical and economic reasons. Therefore, the

    majority of all external data communications is achieved through serial transmis-

    sion, i.e. the bits are sent, one at a time, on a single transmission path.

    Serial transmissionplaces higher demands on the receiver and the transmitter

    which has to keep track of when a character starts and ends and of the inherent

    sequence of the bits. The transmitter and receiver must transmit and receive at

    the same rate. This is known as the transmission speed and is expressed in bit/s

    (bits per second).

    In order to tell the receiver where a character starts and ends, the transmitter

    sends out extra bits, a start bitand one or several stop bits.

    One character at a time or whole sentences?

    There are two methods of serial transmission: asynchronous transmission and

    synchronous transmission. In asynchronous transmission, the transmitter transmits

    the characters one at a time, with their respective start and stop bits. The receiv-

    er knows that each start bit will be followed by a character which has to be inter-

    preted. The stop bit completing the message re-sets the receiver. About 90-95%

    of serial data transmission is asynchronous.

    In synchronous transmissionthe entire message is sent in an even flow. The rate

    is maintained by a clock signal on a separate wire or modulated on the data sig-

    nal.

    The advantage of asynchronous transmission is that it is simple and inexpen-sive. The disadvantage is that it is inefficient in comparison with synchronous

    transmission as it contains as much as 2025% of message content comprising

    parity bits.

    Parallel and serialtransmission

    Asynchronous andsynchronous transmission

    Parallel transmission

    Serial transmission

    Start bit Stop bit

    In asynchronous transmission,one byte is transmitted ata time. The byte starts with

    a start bit and ends witha stop bit.

    In synchronous transmission,the whole set of data istransmitted at once, in acontinuous stream.

  • 8/6/2019 Education Eng[1]

    5/47

    TD

    RD

    SG

    TD

    RD

    SG

    TD

    RD

    SG

    237

    TD

    RD

    SG

    237

    TD

    RD

    SG

    TD

    RD

    SG

    TD

    RD

    SG

    2

    37

    TD

    RD

    SG

    2

    37

    Transmitters and receivers

    Within the field of data communications, we define hardware as transmitters or

    receivers. Two units, e.g. a PC and a robot can both be transmitters and receivers,

    although this is seldom possible at the same time.

    When communication only takes place in one direction, e.g. a computer which

    sends an on/off instruction to a motor, this is called simplex transmission. On

    the other hand, if the motor then has to reply that it is functioning and report its

    speed, duplex transmission is required.Half-duplextransmission means that the communicating units must take turns

    in sending out signals, i.e. communication can take place in both directions but

    not simultaneously.

    Full-duplextransmission is two-way simultaneous transmission. One example is

    a telephone converstation where both parties can speak at the same time.

    The right connection

    Two terms which recur in data communications are DTE (Data Terminal

    Equipment) and DCE (Data Communication Equipment).

    Computers and terminals are usually DTEs, modems and communications

    hardware are generally DCEs while other equipment such as multiplexers andprinters can be DTEs or DCEs (refer to the relevant equipment manual). DTEs

    transmit and receive data on different pins in the connector than DCEs.

    Therefore, to avoid common errors when connecting equipment, it is important

    to know the definition of the particular item of equipment.

    If you connect a DTE with a DCE, the DTE will transmit data on pin 2 while the

    DCE will receive data on pin 2 (in spite of the fact that the signal is called TD,

    Transmit Data in both cases). If you connect two DCEs, you have to connect pin

    2 and pin 3 in order for the transmitter to be connected to the receiver (for more

    detailed information turn to page 19).

    Transparent communication

    When connecting two or more modems together to create a network the

    modems do not influence the data. What goes in one end comes out the other

    describes why the term transparent communication is used. Transparency also

    means that all units will hear all messages.

    Master-Slave configuration and addresses

    The vast majority of industrial networks are based on a master slave configuration

    where one or several masters sequentially send messages to the slaves who in turn

    respond. This sequence is call polling. As the system is transparent a prerequisite

    for this procedure is that each slave has its own address.

    A master sends a message starting with the specific slaves address. The slave

    recognizes its address and performs the commands included in the message. In

    many protocols an acknowledgment is returned to the master who will proceed

    to the next slave.

    The format of the address and the message is all part of the protocol used by

    the specific control system. The modems are not concerned with this fact as long

    as the signals conform to the standard of the communications protocol.

    If the slaves are unintelligent (no address) so called addressable modems can

    be used.

    A message intended for all slaves is called a broadcast message. This can typ-

    ically be a message from the master instructing all slaves to perform the same

    task. An example would be a number of PLCs controlling sirens. In case of a gen-eral alarm all sirens should sound and this could be achieved by sending a broad-

    cast message.

    14

    DTE DCE

    DCE DCE

    Simplex and duplex

    TransparentCommunication

    Simplex

    Half duplex

    Full duplex

  • 8/6/2019 Education Eng[1]

    6/47

    15

    Transmission speeds

    The optimum transmission speed is not the same as the fastest possible speed

    since the risk of transmission errors and interference increases with an increase in

    the transmission speed. It is the type of cable and the distance which define the

    optimum speed. The aim is always to achieve a highly secure and reliable trans-

    mission as well as immunity to interference.

    In order to send digital data signals over an ordinary copper wire, the signals

    must be transformed. The length of the cable will attenuate and alter the signals.At high speeds, this effect will be critical.

    Two terms which are easily confused are those used to describe transmission

    speeds: bit/s and baud.

    The transmission speed is measured in bit/s(data bits per second). Since

    approximately 10 bits are required to transmit one character, it is simple to cal-

    culate how many characters are transmitted per second. At a transmission speed

    of 9 600 bit/s, about 960 characters per second are transmitted.

    In order to transform the digital signal into a signal which can be transmitted

    on the network, a modem is used. The modem transforms (modulates) the sig-

    nal and the baud rateindicates

    how many times per secondthe signal is transformed. Each

    transformation is a packet

    which is sent along the line to

    the receivers modem which

    unpacks (demodulates) the information into digital signals

    again.

    Short-haul modems are transparent and the transmission is not modulated so

    that data is received exactly as it was transmitted. The PTT modem can function

    as a short-haul modem or with a built-in buffer to hold the bits before they are

    sent. For every transmission more than one bit can be sent so the value for trans-

    mission speed-bit/s and the transmission times per second-baud differ. If amodem transmits at 2 400 baud and there are four bits in every transmission, the

    transmission rate will be 9 600 bits/s.

    Modulation

    The term, modem, is an acronym of the term modulation, i.e. signal transforma-

    tion, and the term demodulation, which is the recreation of the original signal. The

    data signals must be transformed and adapted so that they can be transported

    over different types of cable. The digital signal levels (1s and 0s) must be trans-

    formed into readable changes for the selected cable.

    There are three types of modulation:

    Frequency modulation, where different frequencies are used to represent a1 and a 0.

    Phase modulationwhere the phase of the carrier sine wave is shifted abruptly

    to represent the 1s and the 0s. This is the most common method used for PTT

    modems which transmit across the telecommunications network.

    Amplitude modulationuses the strength of the signal or amplitude peaks to cre-

    ate readable 1s and 0s.

    Phase/Amplitude modulation is a combination that allows more bits per baud

    to be transmitted.

    Bit/s and baud

    Modulation anddemodulation

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D TD D CD RTS CTS DTR R D TC

    ACCESS

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D TD D CD RTS CTS DTR R D TC

    ACCESS

    Modulated analogue

    electrical signal

    Amplitude modulation

    Frequency modulation

    Phase modulation

  • 8/6/2019 Education Eng[1]

    7/47

    Handshaking is a way for data communication equipment to control the

    flow of data between connected equipment. It becomes necessary

    when there is a part of the system that is slower than the rest.

    There are two common forms of handshaking. Hardware handshak-

    ing referred to as (RTS/CTS) which uses separate status lines to control

    data flow and software handshaking referred to as (Xon/Xoff) which

    uses extra characters in the data flow to achieve the control.

    If we have a computer connected to a serial printer and the com-

    puter is capable of transmitting its data to the printer faster than the

    printer is able to print, it is normal for the printer to have a small buffer

    to store this extra data whilst printing, however under certain circum-

    stances this buffer will fill up. This is why software or hardware hand-

    shaking is needed to tell the computer that it must stop sending data until the

    buffer is empty.

    Another example is a computer attached to a modem. The data rate between

    computer and modem is sometimes much higher than the telephone line can

    support so the modem must use handshake signals to tell the computer to slow

    down.

    Software handshaking.

    With software handshaking the printer for example will send a character to be

    computer -Xoff when its buffer is full. When the data in the buffer is processed

    then the printer will transmit an Xon Character to the computer. The actual char-

    acters used have to be defined in some kind of protocol however ASCII 17 (Xon)

    and ASCII 19 (Xoff) are commonly used.

    16

    Handshaking

    TD

    RD

    SG

    CTS

    RD

    TD

    SG

    DCD

    TD

    RD

    SG

    RTS

    RD

    TD

    SG

    DTR

    Xon/Xoff

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA NN EL 2 P OW ER12-36V DC

    1 2 3 4 5 -

    MD-42

    R + R - T + T -

    CHANNEL4

    1 2 3 4 5 6 7 81 2 3 4 5 6 7 8

    R+ R - T+ T- T+ T- R+ R -

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA NN EL 2 P OW ER12-36V DC

    1 2 3 4 5 -

    MD-42

    R + R - T + T -

    CHANNEL4

    1 2 3 4 5 6 7 81 2 3 4 5 6 7 8

    R+ R - T+ T- T+ T- R+ R -

  • 8/6/2019 Education Eng[1]

    8/47

    Hardware handshaking.

    Instead of using extra characters in the data flow, RS-232 provides additional

    hardware lines to control communication. The most common lines used areRTS(Request to Send) and CTS (Clear to Send), typically when a computer wish-

    es to communicate with a modem.

    1. A computer wishes to transmit data so it raises RTS (+3V to +15V).

    No data is transmitted

    2. The connected modem registers the RTS. When it is ready to receive data

    it raises its signal CTS.

    3. The computer waits until it sees the CTS line go high and then transmits

    its data.

    If at any point CTS is dropped by the modem the computer will stop transmitting.

    Other hardware lines are sometimes used, for instance serial printers often raise

    the DTR line to tell the computer to stop sending data because they have run out

    of paper.

    Hardware signals are not always used just for handshaking and can be employed

    for a number of purposes within data communications. It is also possible that

    when connecting two pieces of equipment together a special combination of

    crossovers is required to ensure that each piece of equipment sees the right sig-

    nals at the right times to ensure reliable data communication.

    17

    DCE DCE DCE

    RTS

    1

    CT S

    DTE DTEDTE

    TD

    32

  • 8/6/2019 Education Eng[1]

    9/47

    It is not enough to agree on the appearance of the signals and on how

    they are to be transformed and transmitted. The next level is

    to agree on the appearance of the connectors and the voltage levels for

    which they are designed, i.e. the physical and electrical interfaces.

    Furthermore, there is a logical interface which defines what a signal

    means.

    The way in which signals fit together, how the communication is

    started, how it is terminated, whose turn it is to send or receive data,

    how messages are confirmed etc. are controlled by a protocol. Many

    different protocols exist. For example: Profibus, Comli, Modbus.

    The physical interfacedefines how units should be connected to each

    other and defines the appearance of the connector.

    The electrical interface defines the electrical levels and what these mean

    (1s or 0s).

    The logical interfacedefines how the signal should be interpreted.

    RS-232-C/V.24

    The most common interface for data communications via the serial port of

    the computer is the 9- or 25-pin V.24 standard.

    V.24 recommends that the cable should be no longer than 15 metres.

    At greater distances, up to several kilometres, short-haul modems are used

    to transform the V.24 signal into a signal that is less vulnerable to interference.

    V.24 (the ITU-T standard) or RS-232-C(the EIA standard) are two standards

    which are similar, in principle, see table. V.24 is the physical standard

    while V.28 is the electrical standard. For this reason, the interface is sometimes

    described as V.24/V.28.

    The interface describes and defines the 25-pin male connector

    and the signals and voltages for which they are designed.

    Interfaces

    18

    RS-232/V.24

    3 V

    -3 V

    Startbit

    Databits

    Paritybit

    Stopbit

    Not accepted level

  • 8/6/2019 Education Eng[1]

    10/47

    19

    Signals in V.24/RS-232-C

    Pin V.24 RS-232 Signal Signal name Direct.9/25 Code Code DCE

    1 101 AA GND Protective Ground

    3 2 103 BA TD Transmitted data I2 3 104 BB RD Received data O7 4 105 CA RTS Request To Send I8 5 106 CB CTS Clear To Send O6 6 107 CC DSR Data Set Ready O5 7 102 AB SG Signal Ground 1 8 109 CF DCD Data Carrier Detector O

    9 can be + 12 V 10 can be 12 V 11 126 SCF STF Select Transmit Frequency I12 122 SCB Secondary DCD O13 121 SBA Secondary CTS O14 118 SBA Secondary TD I

    15 114 DB TC Transmit Clock O16 119 SBB Secondary RD O17 115 DD RC Receive Clock O18 19 120 SCA Secondary RTS I

    4 20 108/2 CD DTR Data Terminal Ready I21 110 CG SQD Signal Quality Detect O

    9 22 125 CE RI Ring Indicator O23 111 CH/CI Data Signal Rate Selector O24 113 DA EC External Clock I25 133 RFR Ready For Receiving I

    The most common signals used in local communication with modems are print-

    ed in bold type. The I/ O direction indicates the direction from the modem (DCE)where I is an input signal and O an output signal.

    The TD (Transmit Data) signal is an outlet in a DTE and an inlet in a DCE.

    1

    2345678910111213

    141516171819202122232425

    12

    3

    4

    5

    67

    8

    9

    DTE to DTE or DCE to DCE DTE to DCE

    9 WayD-sub9 WayD-sub

    327865149

    25 WayD-sub

    25 WayD-sub

    123456782022

    25 WayD-sub

    25 WayD-sub

    123456782022

    9 WayD-sub9 WayD-sub

    327865149

    327865149

    123456782022

    123456782022

    327865149

    9 WayD-sub9 WayD-sub

    327865149

    25 WayD-sub

    25 WayD-sub

    123456782022

    25 WayD-sub

    25 WayD-sub

    123456782022

    9 WayD-sub9 WayD-sub

    327865149

    Cable configuration

    The picture below shows how the pin configuration for 9- and 25-pole

    connectors should be made for all combinations of DTEs and DCEs.

    Male D-subs

  • 8/6/2019 Education Eng[1]

    11/47

    Explanation of the most important signals

    Protective Ground Connector no. 1 is reserved for protective ground

    between the devices.

    Signal Ground Signal ground is a signal reference and must always be

    connected to connector 7 (25-pin)/connector 5 (9-pin)

    in V.24.

    Transmitted Data This signal transmits data from a DTE to a DCE.

    Received Data This signal is the data that a modem or a DCE

    transmits to a DTE.

    Request to Send This signal is a request to send data from a DTE.

    The device waits for the CTS answer signal.

    Clear to Send The answer signal which tells the DTE that it is ready to

    transmit data.

    Data Set Ready The signal from a DCE which indicates that the device isswitched on, connected and ready.

    Data Terminal Ready The same as DSR, although from a DTE.

    Data Carrier Detect The output signal from a DCE which indicates that there

    is a carrier between the devices and that the connection

    is ready for communication.

    External Clock This signal is used in synchronous transmission when

    it is necessary to clock data. The signal is the input in

    the DCE.

    Transmit Clock Transmits the DCE clock in synchronous systems.

    Receive Clock Clock received in the DTE for decoding data.

    Ring Indicator Output signal from a modem indicating that it has

    received a ring signal.

    20

    GND

    SG

    TD

    RD

    RTS

    CTS

    DSR

    DTR

    DCD

    EC

    TC

    RC

    RI

  • 8/6/2019 Education Eng[1]

    12/47

    21

    ASCII

    BINARY b6

    b5

    b4

    b3 b2 b1 b0 HEX 0 1 2 3 4 5 6 7

    0

    0

    0

    0

    0

    1

    0

    1

    0

    0

    1

    1

    1

    0

    0

    1

    0

    1

    1

    1

    0

    1

    1

    1

    0 0 0 0

    0 0 0 1

    0 0 1 0

    0 0 1 1

    0 1 0 0

    0 1 0 1

    0 1 1 0

    0 1 1 1

    1 0 0 0

    1 0 0 1

    1 0 1 0

    1 0 1 1

    1 1 0 0

    1 1 0 1

    1 1 1 0

    1 1 1 1

    0

    1

    2

    3

    4

    5

    6

    7

    8

    9

    A

    B

    C

    D

    E

    F

    NUL DLE SP 0 @ P p

    SOH

    `

    DC1 ! 1 A Q a q

    STX DC2 " 2 B R b r

    ETX DC3

    4 D T d t

    ENQ NAK % 5 E U e u

    ACK SYN & 6 F V f v

    BEL ETB ' 7 G W g w

    BS CAN ( 8 H X h x

    HT EM ) 9 I Y i y

    LF SUB * : J Z j z

    VT ESC + ; K k

    FF FS , < L l

    CR GS - = M m

    SO RS . > N n

    SI US / ? O _ o DEL

    $

    # 3 C S c s

    EOT DC4

    [

    {

    \

    |

    ]

    ^

    }

    ~

    ASCII is the acronym used for American Standard Code for Information Interchange.

    Different varieties of the ASCII code exist for different languages as well as an Extended

    ASCII where the 8th data bit is used.

  • 8/6/2019 Education Eng[1]

    13/47

    TD

    RD

    RTS

    DTR

    GND

    TD

    RD

    RTS

    DTR

    GND

    RS-232DEVICE

    A

    B

    RS-485DEVICE

    RS-485DEVICE

    RS-485DEVICE

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA NN E L 2 P OW ER12-36V DC

    1 2 3 4 5 - +

    MD-42

    R+ R-T+ T-

    CHANNEL4

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R- T + T - T + T- R + R -

    TD

    RD

    RTS

    DTR

    SG

    TD

    RD

    RTS

    DTR

    SG

    TX A

    TX B

    RX A

    RX B

    RX A

    RX B

    TX A

    TX B

    RS-232DEVICE

    RS-422DEVICE

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D T D D C D R TS C T S D T R R D T C

    ACCESS MA-42

    TD

    RD

    RTS

    DTR

    SG

    TD

    RD

    RTS

    DTR

    SG

    RS-232DEVICE

    TX A

    TX B

    RX A

    RX B

    RS-422DEVICE

    RS-422DEVICE

    RS-422DEVICE

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA N NE L 2 P OW ER12-36V DC

    1 2 3 4 5 - +

    MD-42

    R+ R-T+ T-

    CHANNEL4

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9R + R- T + T - T + T- R + R-

    V.11/RS-422

    V.11/RS-422 is a standard interface which is suitable for industrial appli-

    cations. It was created for the construction of multidrop data buses,between a main computer and a number of terminals. The interface is

    balanced, uses a four-wire format and is relatively immune to interfer-

    ence. The interface changes the polarity of the wire pair depending on

    whether a 1 or a 0 is to be transmitted.

    RS-422 was originally designed to handle 10 units and can now be

    set up with up to 32 units connected. The maximum recommended

    distance is 1,200 m (100 kbit/s) or 50 m (10 Mbit/s). RS-422 can be

    integrated with RS-485, RS-423-A and RS-449 via converters.

    RS-422 on four-wire

    In the RS-422 four-wire system the master transmiter can always be active/

    energized irrespective of the state of the slaves. The standard allows simultaneous

    two-way communications.

    22

    Interfaces for industry

    RS-485

    RS-422

    Termination

  • 8/6/2019 Education Eng[1]

    14/47

    Meter

    10 kb/s

    10 000

    1 000

    100

    10

    1 200

    100 kb/s 1 mb/s 10 mb/s

    +5 V 0 V

    R+

    R-

    23

    RS-485 communicationdistance

    Failsafe

    RS-485

    RS-485 is an updated version of RS-422 and is used more and more often nowa-

    days as the standard interface for different units. It is designed for data buses with

    up to 32 units and is suitable for multidrop networks with master/slaves. It is rec-

    ommended for distances of up to 1 200 m.

    The great advantage of using this interface is that it can reverse the direction

    of communication which allows for half-duplex transmission on two-wire lines.

    RS-485 is the transmission method underlying many popular fieldbus standardsfor instance, Profibus, Bitbus and Interbus-S.

    RS-485 on 2-wire

    RS-485can be used with two-wire in various master/slave systems, where every

    slave is addressable. In a two-wire solution the data direction must be controlled.

    This can be achieved with a handshaking signal (RTS/DTR) or by means of the

    data flow. Connected units must be capable of what is termed tri-state, i.e. a lis-

    tener mode, in which the inactive transmitter enters a high-impedance state thus

    not loading the line.

    Termination and fail-safeIt is recommended to terminate the line with a circuit of equal impedance to thecharacteristic impedance of the line. For RS-422 and RS-485 a 120 resistance isrecommended. The termination should be placed as shown on page 22.

    The purpose of the termination is to prevent the reflection of data at the endsof the cable. If there is no active driver on the network the line can be forced intoa known idle state with a fail-safe circuit. Without this circuit it is likely that the linewill pick up noise and falsely trigger the receivers leading to problematic commu-nications.

    RS-232 to RS-422/485 converters The RTS question

    When using an RS-232 to RS-422/485 converter it is important to remember that

    an RS-485 driver sometimes has to enter tristate or become a receiver. Normally

    the RTS signal from the RS-232 circuit is used to control the state of the convert-

    er. To work correctly the RTS signal from the RS-232 device must go high for the

    duration that data is being transmitted from it and go low to allow the converter

    to receive any message back. If this signal is not available then it is necessary to

    use converters that can control the data direction from received data alone.

    Installation

    If a twisted wire pair is used, it should be terminated with a 120-ohm resistor.

    The RS-232 cable should not be longer than 15 metres and keep the RS-422/

    485 stubs as short as possible.

    RS-422/485 guarantees transmission distances up to 1 200 m for data rates up

    to 100 kbit/s. Longer distances can be allowed at lower speeds.

    RS-485

    +5 V

    0 V

    B

    A

    Tristate

    Startbit

    Databits

    Paritybit

    Stopbit

  • 8/6/2019 Education Eng[1]

    15/47

    Distance and short-haul modems

    We mentioned earlier that V.24 does not recommend the use of cables longer

    than 15 metres. Consequently, short-haul modems are used for longer connec-

    tions. Short-haul modems are sometimes called line-drivers or base-band

    modems. These modems transform the V.24 interface into defined signals which

    are transmitted over twisted pair or fibre-optic cable for distances up to several

    kilometres. The receiving short-haul modem transforms the signals into V.24

    again. The modems must be of the same standard and must share a commoninterface in order to communicate via the cable.

    Current loop (TTY)

    One problem associated with using ordinary copper wire for long-distance com-

    munication is that transmission is relatively unreliable and the risk of interference

    is high. The transmission speed often has to be reduced to maintain reliability. A

    tried and tested method of improving reliability which has been in use for a long

    time is to transmit an electrical current over the network.

    Current loopis the oldest known method. V.24 signals are represeted as a pulse

    of electrical current or no electrical current in the wire pair. Current loop is some-

    times refered to as TTY. To supply each wire pair with current, the transmitter iseither connected as active and the receiver as passive, or vice versa. Current Loop

    results in more reliable communication but is relatively vulnerable to interference

    since the current loop is not balanced, and there is no accepted standard for

    Current Loop.

    A more advanced method is the balanced 10 mA current loop described

    below.

    10 mA balanced current loop (W1)

    Westermo has developed its own improved interface for its short-haul modems. The

    aim is to improve the reliability and performance of the modems and reduce their

    vulnerability to interference.Westermos modems transform the signal to be transmitted into a balanced 10

    mA current loop. The connected units are always electrically isolated from each

    other by means of galvanic isolation. The method involves changing the direction

    of the current in the wire pair depending on whether a high or a low signal is to

    be transmitted from the V.24 interface. On the transmitter side, there are two

    amplifiers which drive 10 mA into the line and on the receiver side there are two

    optocouplers which read this signal.

    Current always flows in the loop, even when no data is being transmitted, with

    the exception of when you chose to use a hardware handshake line to activate the

    transmitter and hence provide a way of sending hardware handshake information

    across a link.This method is very reliable, there is very little risk of interference and data can

    be transmitted at distances of up to 18 km.

    24

    Current Loop

    T+

    T -

    T+

    T -

    R+

    R -

    R+

    R -

    R+

    R -

    R+

    R -

    T+

    T -

    T+

    T -

    20 mA

    20 mA

  • 8/6/2019 Education Eng[1]

    16/47

    25

    Why the 10 mA balanced current loopis less sensitive to interference

    A balanced current loop is less sensitive to interference than a non balanced sys-

    tem because when noise is applied to the line both wires are effected the same

    way and hence the differential between the two wires that encodes the data is

    maintained. See drawing.

    1. Data in to the transmitter.

    2. Voltages on lines A and B are inverted depending on data hence driving

    current either one way or the other through the circuit.

    3. Common mode interference on the line.

    4. Noise superimposes onto data stream.

    5. Data is received and decoded unchanged from when it was transmitted (1)

    +

    -

    +

    -

    A

    B

    2

    1

    3

    4

    5

    TD

    RD

    Wire A

    Wire B

  • 8/6/2019 Education Eng[1]

    17/47

    26

    Unfortunately, all of our problems are not solved once we have identi-

    fied the right method of transmission and the right interface to use. The

    biggest problem of data communications still remains to be tackled

    external interference. Interference can cause data losses, transmission

    errors and, worst of all, it can damage equipment. Advances in com-

    puter technology have led to the use of smaller circuits and units which

    are operated at lower voltages. This is very favourable in terms of ener-

    gy conservation and limiting the heat that is given off by the equipment

    but it also means that the equipment is more sensitive and vulnerable

    to power surges. Surveys have shown that up to 70% of all interference

    during data transmission is due to defective installation or interference

    from sources near to the equipment, such as neighbouring machinery

    or cables. Only 20% is due to defects in the hardware or software. Therefore, most

    of the sources of interference are located in the same room as, or near to the

    equipment. The other sources of interference are external often originating from

    nature itself in the form of lightning.

    The most significant sort of interference is a type known as transients. These are

    short but high pulses of electrical current in the network. The service life of com-

    puter equipment which is exposed to transients, from 1 000 V up to 10 kV, for a

    period of a few milliseconds, is bound to be short.

    Lightning, machinery and fluorescent lights

    We know that very high levels of current are discharged when objects are direct-

    ly hit by lightning. The discharged electricity can propagate and damage power

    and PTT lines and worst of all, cause fires. Even if the line is not directly hit by

    lightning, electrical equipment can still be affected because the current propagates

    great distances along the power lines. Thats why a bulb flickers even when the

    lightning is a long way off.

    However, external transients are not only caused by lightning. Bulbs can also

    flicker when an industrial plant in the neighbourhood starts up or shuts down its

    machinery. This can also cause transients, or power surges, in the electricity net-

    work.

    As a rule, most transients originate right on your own premises. Machinery, equip-

    ment and fluorescent lighting can cause power surges.

    Switching off a fluorescent light can, for example, result in a power surge, due to

    stored charge, of up to 3 000 V. Lightning striking an object near to a power line

    could result in a surge of up to 610 kV.

    The problemof interference

    Transients

  • 8/6/2019 Education Eng[1]

    18/47

    27

    A normal communications circuit board in a computer is designed for 12 V.

    Therefore, transients are often the reason why computer equipment breaks down

    without apparent reason or why there is temporary interference in transmission.

    Transients are the most common causes of disturbances. Only in 10% of the

    cases is the interference due to failures, i.e. long-term undervoltage or power

    surges and power cuts.

    Interference in the network

    One cause of interference during data transmission, which is almost as common,

    is problems with earth currents. This is a particular problem if the network consists

    of units which are electrically connected to different fuse panels. The return cur-

    rent can take different routes, either the intended route, via earth to the fuse panel

    that the unit is connected to, or it can travel via the serial ports signal ground to

    another fuse panel.

    Earth currents which move through the network can cause interference as well

    as cause damage to the circuits driving the line.

    A communications network consists of physical lines which are many metres

    long. These lines are often laid together with other power and PTT lines. An elec-

    tromagnetic field is created around each cable conduct-

    ing current and this effects adjacent or crossing cables.

    Together, these lines create large aerialswhich can pick

    up different types of disturbance. Recommendations exist

    for the installation of different types of cables in order to

    minimize electromagnetic interference.

    The simplest way of tackling both transients and the

    problem with earth currents is to use modems with gal-

    vanic isolationwhich electrically isolate the lines and units

    without preventing the transmission of signals. Galvanic

    isolationprevents transients, lightning and earth currentsfrom reaching the equipment.

    In the above example, theearth currents can take thewrong route, via the com-puter networks signalground to a fuse panel, andthereby causing interference.

    Earth currents

    Zero

    Protective ground

    Zero

    Protective ground

  • 8/6/2019 Education Eng[1]

    19/47

    28

    In any system, electronic signals are always prone to inter-

    ference. Analogue signals tend to be more prone due to

    the fact that all points on the signal carry information- i.e.

    amplitude and frequency. Small disturbance to the signal

    will cause the receiving system to interpret the signal dif-

    ferently to that of the original transmitted signal and give

    an incorrect output.

    Digital signals are less prone to interference as there

    are only two basic states; high or low. However due to

    the interaction of the capacitance, resistance and induc-

    tance of the cables used to carry the digital signals and

    the effects of external noise, the information contained in the signals can be dis-

    torted until the signal is unrecognisable.

    Industrial signalsMany techniques have been developed to overcome the problems associated

    with transmitting data over long distance. For example RS-422 and RS-485 are

    designed to operate up to 1 200 m.

    Even with busses specially designed to be used in long distance data commu-

    nications applications, electronic interference will always be a problem and in

    extreme cases the expected transmission distance will not be achieved.

    There are many practical steps that can be taken to improve the susceptibility

    of the signals to interference.

    Isolation

    In all data communications it is essential to galvanically isolate equipment and net-works from each other to prevent the propagation of transients and other forms

    of interference that can cause transmission errors or damage equipment.

    There are several methods ensuring isolation for example relays, transformers,

    isolation amplifiers and optocouplers. Incoming transients can also be removed

    using protective components such as varistors, capacitors, RC filters and zener

    diodes.

    Westermo use optocouplers for isolation in their receivers. Optocouplers pro-

    vide better performance than for example differential amplifiers. Transformers pro-

    vide isolation on the power source and varistors and zener diodes are used to sup-

    press transients.

    Interference suppression

    +

    +

    multidrop

    Fast balancedcommunication

  • 8/6/2019 Education Eng[1]

    20/47

    29

    Shielding

    Shielded or double shielded cables can be used to increase the resistance to exter-

    nal interference. Under normal circumstances the cable shield should only be

    connected to ground at one end.

    In some extreme circumstance where high frequency noise is a problem, the

    cable can be connected to ground at both ends. However this method introduces

    a potentially larger problem if there is a potential difference between the points.

    If this is the case current will start to flow through the shield of the cable and carry

    with it any noise on the ground plain.

    As an alternative it is sometimes possible to connect one end of the shield to

    ground and the other to ground via a small value, high voltage capacitor

    Telephone modems and interference

    For very long distance data communication PTT modems are used. These devices

    rely on analogue signals to carry the digital information over the PTT network . Asstated earlier the analogue signals are prone to the effects of noise. To counter

    these effects error checking algorithms and filtering are used.

    Optical fibre cables

    An increasingly common means of reducing the effects of noise in an industrial

    environment is to use fibre optic cables.

    Data transmission via fibre-optic cable tends to be insensitive to electrical inter-

    ference and provide total isolation between systems, so making it an excellent

    media for industrial data communications.

    There are limitations as to the maximum distance that can be achieved. This is

    due to the amount of available power at the transmitter, the loses within the cable,the type of fibre and the sensitivity of the receiver.

    Data communications toRS-422 for 10 Mbit.

    Data communications toRS-232/V.24

    CMW=0

    Improved transmission with amodem and twin-screenedcable, with each screengrounded at one end.

  • 8/6/2019 Education Eng[1]

    21/47

    30

    Designing networks

    A local network for data communications is usually called a LAN or

    Local Area Network. Whether the network is within one building or con-

    nects several buildings, it is considered to be local because it is owned

    and operated by the user. The local network can, in turn, be connected

    through a leased line or by calling PTT circuits, with a public network,

    such as a regional, national and global network, which is sometimes

    called a WAN, Wide Area Network or a MAN, Metropolitan Area

    Network.

    A local network can consist of data communications for office appli-

    cations or for industry, hospitals, mining operations or traffic control.

    The particular network design which is selected, also known as the

    topology, is important since it is a long-term infrastructure which must

    handle and transport important data without problems. It must also be possible to

    modify or expand the network when necessary.

    Serial point-to-point

    Point to point data communications, i.e. between two communicating units on

    a line, is the most common application. This is the case in simple applications, such

    as computer-printer, as well as in more complex applications, where each user

    communicates via his own line for security reasons. The common RS-232 stan-

    dard interface is not recommended for distances exceeding 15 metres. Therefore,

    modems are used as repeaters and as protection against transients for communi-

    cation at distances of up to 18 kilometres.

    Star network

    A network with many point-to-point connections is called a star network. Each unitcommunicates, over its own line, with the central processing unit at the hub. The

    advantage of a star network is that it is highly reliable. If one line is down, the other

    lines are not affected. The disadvantage is that since more cable has to be used,

    this kind of network is more costly. Furthermore, all communication must

    take place via the central processing unit.

    Point to point

    Star network

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D T D D C D R T S C TS D T R R D

    ACCESSMX-14

    C H A N N E L 3

    PWR

    RD

    TD

    D CD 2

    D CD 3

    D CD 4

    C H AN N E L 2 P O W ER

    LD-01 DC

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R - T + T - T + T - R + R -

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D T D D C D R T S C T S D T R R D

    ACCESSMX-14

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D T D D C D R T S C T S D T R R D

    ACCESSMX-14

    PWR RD1 TD1 RD2 TD2 RD3 TD3 RD4 TD4

    R D T D D C D R T S C TS D T R R D

    ACCESSMX-14

    C H A N N E L 3

    PWR

    RD

    TD

    D CD 2

    D CD 3

    D CD 4

    C H AN N E L 2 P O W ER

    LD-01 DC

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R - T + T - T + T - R + R -

    C H A N N E L 3

    PWR

    RD

    TD

    D CD 2

    D CD 3

    D CD 4

    C H A NN E L 2 P O W ER

    LD-01 DC

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R - T + T - T + T - R + R -

    C H A N N E L 3

    PWR

    RD

    TD

    D CD 2

    D CD 3

    D CD 4

    C H A NN E L 2 P O W ER

    LD-01 DC

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R - T + T - T + T - R + R -

    C H A N N E L 3

    PWR

    RD

    TD

    D CD 2

    D CD 3

    D CD 4

    C H AN N E L 2 P O W ER

    LD-01 DC

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R - T + T - T + T - R + R -

  • 8/6/2019 Education Eng[1]

    22/47

  • 8/6/2019 Education Eng[1]

    23/47

    32

    Communications layers

    Besides transmitting data (characters, numbers, commands) data communications

    equipment must also handle a large quantity of peripheral data which is neces-

    sary for communication to take place. For example, such information includes data

    on the transmitter and the receiver (addressing), on what is to be transmitted, on

    how it is to be transmitted and on the form into which it is to be transformed and

    sent.

    For this information to be processed correctly, independently of the type ofcommunication device used and manufacturer, a reference model, known as the

    OSI (Open Systems Interconnection) model, exists which defines seven different

    layers of data communications.

    1. The physical layer, which defines the electrical and mechanical interface.

    2. The data link layer, for control and monitoring of the data traffic.

    3. The network layer, for handling addressing, paths, performance etc.

    4. The transport layer, which handles point-to-point communication, and

    also checks that it is free from errors.

    5. The session layer, which controls the data flow and buffering.

    6. The presentation layer, which is responsible for code transformation, for-

    matting, conversion and encryption.7. The application layer, which handles information for the application,

    secrecy and identification etc.

    The OSI model is not a standard. Instead it is a reference model for the develop-

    ment of different standards.

    Industrial fieldbus systems

    Ethernet-type buses are most commonly used for office communications and

    computer-to-computer communications. This standard is suitable for the type

    of transmission which takes place between several users.

    Industrial applications have different requirements. Industrial communications

    requirements are often less complex while the needs for reliability and perform-ance are higher. At the same time, communication must be carried out in a harsh-

    er environment where there is a high chance of interference. Furthermore, the

    communication distances are long and many different interfaces are involved.

    The specification determines which network design is selected and which com-

    munications protocols are used. The specification also determines which fieldbus

    system or systems are most suitable. Fieldbus systems, such as the simple ASIand

    Cansystems, handle simple communications with simple I/O devices. The more

    complex Interbus-Sand Profibussystems handle communications between one or

    several control systems and between computers and remote-controlled modules.

    Furthermore, more or less standardized fieldbus systems exist as well as a num-

    ber of control system buses which are unique to each supplier.Good industrial data communications systems combine different fieldbus stan-

    dards (see examples in Applications).

    An industrial system which is commonly used is the multidrop networkwhere

    a main computer communicates with a large number of terminals, units, transmit-

    ters or measurement systems.

    OSI Open SystemsInterconnection

    Field Bus Systems

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    7

    6

    5

    4

    3

    2

    1

    Communication takes placevia the different OSI layers.

    67490 89

    ASI

    CAN

    Profibus

    Interbus S

    Ethernet

  • 8/6/2019 Education Eng[1]

    24/47

    33

    Communications productsfor industrial networks

    The building blocks of a communications network consist of physical cables, the

    computer hardware carrying out the communication, computer software as well

    as a number of communications products which enables the data to be transmit-

    ted reliable.

    Transforms and packs digital data into signals which are defined

    for the media which is to transmit the data (4-wire, fibre optic

    cables etc).

    Amplifies and restores signals for long-distance transmission.

    RS-422 and RS-485 allow connections to be made at a maxi-

    mum of 1 200 m with a maximum of 32 loads. By installing a

    repeater, you can add a further 1 200 m and 31 load segments

    to the network.

    Used to save wiring. For example, instead of installing 16 con-

    nections with modems and cables, the same function can beobtained using two multiplexers and one line.

    The multiplexer, recreates the 16 channels

    and each channel can communicate as if it

    was an independent permanent connection

    with full-duplex transmission and an optional

    transmission speed.

    A unit which provides galvanic isolation to isolate connected

    devices from each other, often via optical transmission. An iso-

    lator does not function as a modem. (With a few exeptions all

    of Westermos products are equipped with galvanic isolation).

    Used to enable devices with different interfaces to communicate

    with each other, e.g. RS-422/485 to RS-232/V.24 or from fibre

    optic cables to RS-422/485 and RS-232/V.24.

    A modem with three or four channels, where each channel has

    a separate modem function. Used to create multidrop networks.

    A router is used to separate different segments in a network to

    improve performance and reliability.

    An intelligent connection between two local networks with the

    same standard but with different types of cables.

    An intelligent connection between a local network and external

    networks with completely different structures.

    Multiplexer

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA N NE L 2 P OW ER12-36VDC

    1 2 3 4 5 - +R+ R-T+ T-

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R- T + T - T + T- R + R-

    CHANNEL3

    PWR

    RD

    TD

    DCD2

    DCD3

    DCD4

    C HA N NE L 2 P OW ER12-36VDC

    1 2 3 4 5 - +R+ R-T+ T-

    1 2 3 4 5 6 7 8 91 2 3 4 5 6 7 8 9

    R + R- T + T - T + T- R +

    R-

    Modem

    Repeater

    Multiplexer

    Isolator

    Interface

    converter

    Line-sharing

    device

    Router

    Bridge

    Gateway

  • 8/6/2019 Education Eng[1]

    25/47

    34

    Data communications overthe telecommunications network

    An important complement to local data communications is external

    communications. This is for example the possibility of connecting up to

    external databases in order to search for information on markets, to find

    out stock-exchange rates or to access public registers etc.

    The number of databases which can be accessed has increased enor-

    mously and these databases are linked through global networks. For

    example, you might connect up to a national database and end up in

    an international financial database in New York.

    External data communications can be justified for many reasons. For

    example, the telecommunications network is one way of gaining access

    to your office and your computer when you are engaged in field work.

    Dial-up connections

    External communication via the telecommunications network means that you call

    the receivers modem which answers. Both modems then set up a carrier over thePSTN line. The carrier is a signal which the modems listen for. When the two

    modems connect, it means that they can hear each others carriers and lock into

    or synchronise on the signals.

    Transmission speeds over the telecommunications network have increased, and

    nowadays, 2 40056 000 bit/s are common. It is not only the modem itself which

    determines the speed, but also the PSTN line. The quality of the line is largely

    affected by the distance, the number of stations and relays. Most high-speed

    modems can automatically reduce their speed in order to maintain a high trans-

    mission quality.

    Within telephone communications, it is very important to comply with the

    accepted standards, since the transmitter and receiver have no way of knowing

    what devices are being used on either side. The transmission speeds which are

    used in certain standards are shown in the table on the left.

    Telephone modem

    Standards and speeds

    V.21 300 bit/s V.22 1 200 bit/s V.22 bis 2 400 bit/s V.32 9 600 bit/s V.32 bis 14 400 bit/s

    V.34 28 800 bit/s V.34 bis 33 600 bit/s V.90 56 000 bit/s

  • 8/6/2019 Education Eng[1]

    26/47

    35

    The language of the telephone modem

    In order to communicate via the telecommunications network, in addition to a

    standardized modem, you need a terminal or a computer with communications

    software installed which uses the serial port of the computer.

    Instructions are required to control the telephone modem. Hayes Micro-com-

    puter Products has developed such a language of instruction which has become

    the standard and which is known as the Hayes commands. These are a set of

    instructions to the PSTN modem which can either be manually sent from the com-puter, via the keyboard, or which are automatically sent from the communications

    program when different tasks are carried out.

    Error correction and data compression

    Most telephone modems transmit data synchronously between the modems,

    even if the communication between the computer and the serial port is asyn-

    chronous. In order to monitor the transmission, the data can be divided into

    blocks and each block can be assigned a check sum. If there is interference, the

    check sum will be incorrect and the receiver will request re-transmission, also

    known as an ARQ (Automatic Repeat reQuest). The most common method of

    error correction using the ARQ approach is in accordance with the ITU-T V.42error correction standard which is supported by both MNP (Microcom

    Networking Protocol) and LAPM (Link Access Procedure for Modems).

    On-line services

    The telephone modem can be used to connect to other computers, directly

    or indirectly via a network. The internet has rapidly expanded into the largest

    world-wide network with millions of users. The TCP/IP protocol used on the

    Internet allows electronic mail, discussion groups, world wide web (databases,

    information and marketing), file transmission and retrieval, telephony, video con-

    ferences, chat etc. However, there are also other networks and services available

    via a modem such as MEMO, Lotus Notes, CompuServe, etc. The PSTN modem

    can be used for distance working by connection to a company's computer.

    Superhighways

    Intensive work is being conducted on creating international standards and on con-

    structing "Superhighways" for data communications. Fast digital high-speed net-

    works, such as broadband ISDN, can rapidly convey large quantities of informa-

    tion containing data, sound and graphics, across the continents. The huge capac-

    ity of the cable TV networks can also offer a new resource for faster data traffic.

    However, it is important to remember that the

    foundations of such efficient highways must first

    be laid locally, through efficient local data com-

    munications. With such a vital infrastructure in

    place, it will then be possible to open up and

    access national and global networks.

    The fastest communicationsroute is always in what isknown as direct mode.

    Every stage of compression,error correction and buffer-ing causes a time delay.

    ARQ and MN PMNP Level 1:asynchronous protocol,half duplex

    MNP Level 2:asynchronous protocol, fullduplex. Data divided intoblocks. Actual data transmis-

    sion speed somewhat lowerthan normal.

    MNP Level 3:synchronous protocol, fullduplex. Data in blocks. 10%higher speed with error-freetransmissions.

    MNP Level 4:data in blocks, block sizeaccording to line quality.Smaller blocks than Level 3

    which results in a 20% fastertransmission rate, when freefrom interference.

    MNP Level 5:as in Level 4, but with datacompression which results inup to double the speed.

    M NP Level 10:a further development ofMNP 5 which monitors theline dynamically and guar-antees error-free transmis-

    sion.

    COMP ERRORCORR

    ERRORCORR

    COMP

    BUFFER

    BUFFER

    DSP

    DSP

  • 8/6/2019 Education Eng[1]

    27/47

    36

    Analogue Leased Lines

    A leased line is provided by a telecom company and provides you with

    direct connection between either two sites or multiple sites. Unlike a

    dial- up line the leased line is available at all times, but still can go

    through exchanges.

    There are many configurations of leased lines available. Typically

    these will be 2-wire or 4-wire circuits.

    On 2- and 4-wire leased lines, pairs of modems are used to provide

    point to point full duplex communications. These modems will typical-

    ly use the V.22bis, V.32bis or V.34bis modulation standards to provide

    connections between 2 400 bit/s and 33 600 bit/s. One modem will be

    set to originate and one modem to answer. Ones a connection is estab-

    lished it will remain in place until power is removed or the line is bro-

    ken.

    Leased Line V.23V.23 is an old standard that uses FSK modulation to provide communication cir-

    cuits up to 1 200 baud on 2 or 4 wire circuits.

    One advantage is that V.23 can be used in multidrop configurations, either on

    dedicated wires or on specially provided multipoint circuits. V.23 modems are nor-

    mally terminated with a 600 Ohm impedance. This restricts the number of mul-

    tidropped units on a dedicated circuit to about 6 unless these terminators are

    removed or line equalisers are employed.

    On V.23 multipoint systems only one modem can have an active carrier at one

    time so communications normally have to be controlled by an external control sig-

    nal such as RTS.

    The Westermo solution for V.23

    Westermos V.23 modem allows speeds up to 1 200 baud. Both the 600

    impedance and complex line impedances are supported by this modem.

    The carrier, transmit, and input levels are all adjustable. To avoid problems with

    the line being locked by a faulty unit the modem automatically disconnects from

    the line when there has been no activity for a period of time.

    A built-in switchable termination makes it possible to connect many more

    modems on to one line than the V.23 standard describes.

  • 8/6/2019 Education Eng[1]

    28/47

    37

    Westermos products providefor secure transmission and

    protection against interference

    Balanced transmissionfor secure data communications.

    Balanced transmission results in error-free transmission over long

    distances. Both the Westermo 10 mA balanced current loop and

    RS-422/485 use this technique.

    Reliability that shows

    Surveys show that 70% of the interference during data transmission is

    due to internal interference from installations near to the equipment(transients, earth currents, electromagnetic fields etc.). 10% is due to

    lengthy interference in the electricity distribution network (especially in

    rural areas) and only 20% is due to defective software or hardware.

    Therefore, a network with Westermos modems which are equipped

    with galvanic isolation provides protection against the 70% of the inter-

    ference which is due to transients, earth currents and electromagnetic

    fields. Furthermore, our modems protect your equipment from light-

    ning and external transients. Under are the three symbols which are

    found on modems equipped with:

    Galvanic isolationwhich through optocouplers electrically isolates the net-

    work from your computer equipment. The optocouplers have an isolation

    voltage of up to 4 000 V and the optical signal transmission takes placevia LEDs to transistors which detect the signals. Consequently, the optical

    isolation of the modems prevents interference and earth currents from

    propagating or damaging the equipment.

    Transient protectionTransient protection in the network consists of varis-

    tors and on the line, fast two-way Zener-diodes which effectively divert

    the transients to protective ground, thereby protecting your equipment

    against power surges.

  • 8/6/2019 Education Eng[1]

    29/47

    38

    ISDN, Integrated ServicesDigital Network.

    What is ISDN?

    ISDN (Integrated Services Digital Network) is the all-digital equivalent

    of the conventional telephone network PSTN (Public SwitchedTelephone Network), or POTS (Plain Old Telephone System).

    ISDN technology is standardized according to recommendations of

    the International Telecommunications Union (ITU),

    Signalling

    Instead of the phone company sending a ring voltage signal to ring the

    bell in your phone (In-Band signal), it sends a digital packet on a sep-

    arate channel (Out-of-Band signal). The Out-of-Band signal does not

    disturb established connections, and call setup time is very fast. The sig-

    nalling also indicates who is calling, what type of call it is (data/voice),

    and what number was dialed. Available ISDN equipment is then capable of mak-

    ing intelligent decisions on how to direct the call.

    Services

    Logically, ISDN consists of two types of communications channels: bearer service B-

    channels, which carry data and services at 64 kbit/s; and a single D-channel, which

    usually carries signalling and administrative information which is used to setup and

    tear down calls. The transmission speed of the D-channel depends on the type of

    ISDN service subscribed to. ISDN services available today can be divided into two

    categories: Basic Rate Interface (BRI) service, which gives the subscriber access to two

    B-channels and a 16 kbit/s D-channel; and Primary Rate Interface (PRI) service, which

    provides a 64 kbit/s D-channel and 30 B-channels in Europe and most of Asia, in

    North America and Japan the PRI service gives 23 B-channels.

    When more than one device is connected through a single ISDN BRI connec-

    tion, individual devices are distinguished from one another through the use of

    multiple subscriber numbers, (MSN) whereby a different ISDN number is

    assigned to each device served by the ISDN subscription.

    Up to eight ISDN devices can be connected on single bus, as signals on the D-

    channel automatically take care of contention issues, and route calls and services

    to the appropriate ISDN device. Alternatively, a separate sub-address (SUB) value

    can be used to differentiate between devices.

  • 8/6/2019 Education Eng[1]

    30/47

    39

    Speed

    The modem was a big breakthrough in computer

    communications. It allowed computers to commu-

    nicate by converting their digital information into an

    analogue signal to travel through the public phone

    network. There is an upper limit to the amount of

    information that an analogue telephone line can

    hold. Currently, it is about 56 kbit/s. Commonly

    available modems have a maximum speed of 56

    kbit/s., but are limited by the quality of the analogue connection and practically

    4550 kbit/s is reached.

    The high throughput offered by ISDN 2 x 64 kbit/s, rapid call setup, less than 2 s

    and the high level of accuracy inherent to digital transmission, are the main attractions

    to ISDN technology.The two channels can be bundled to give a virtual 128 kbit channel or used as

    two separate channels enabling simultaneous data and voice calls.

    ISDN Components/Interfaces

    ISDN components include terminals, Terminal Adapters (TA), Network-

    Termination devices (NT), line-termination equipment (LT), and exchange-termi-

    nation equipment (ET). ISDN defines terminals of two types. Specialized ISDN ter-

    minals are referred to as terminal equipment type 1 (TE1). Non-ISDN terminals,

    such as DTE are referred to as terminal equipment type 2 (TE2). TE1s connect to

    the ISDN network through a 4-wire, twisted-pair digital link. TE2s connect to the

    ISDN network through a TA. The TE2 connects to the TA via a standard physical-

    layer interface such as RS-232/V.24 or RS485/V11.

    Beyond the TE1 and TE2 devices, the next connection point in the ISDN net-

    work is the network termination type 1 (NT1) or network termination type 2(NT2)

    device. These are network-termination devices that connect the 4-wire subscriber

    wiring to the conventional 2-wire local loop. In North America, the NT1 is a cus-

    tomer premises equipment(CPE) device. In most other parts of the world, the NT1

    is part of the network provided by the carrier. The NT2 is a more complicated

    device that typically is found in digital private branch exchanges(PBXs) and that

    performs Layer 2 and 3 protocol functions and concentration services. An NT1/2

    device also exists as a single device that combines the functions of a NT1 and a

    NT2.

  • 8/6/2019 Education Eng[1]

    31/47

    Layer 1 Physical layer

    The signalling between the telecom switch and the user is according to the U-inter-

    face and the signalling in the user building is normally according to the S-interface.

    The U-interface uses frames of 240 bit length. At a rate of 160 kbit/s, each frame is

    therefore 1.5 ms long. Each frame consists of:

    Frame structureU-Frame when 2B1Q coding

    ISDN specifies a number of reference points that define logical interfaces between

    functional groupings, such as TAs and NT1s. ISDN reference points include the

    following:

    R---The reference point between non-ISDN equipment and a TA.

    S---The reference point between user terminals and the NT2.

    T---The reference point between NT1 and NT2 devices.

    U---The reference point between NT1 devices and line-termination equipment

    in the carrier network. The U reference point is relevant only in North America,

    where the NT1 function is not provided by the carrier network.

    40

    TE1

    TA

    S/TUVNT-1

    TE1

    TE2R

    Network Termination.Used to convert U to S/T interface

    Supplied in Europe by TelcoISDN equipment

    that can connect directlyto ISDN line

    S/T interfaceTermination point in Europe

    ISDN equipment thatcan connect NOTdirectly to ISDN lineEquipment at phone company switch

    Used to connect TE2devices to ISDN line

    Standard PSTN equipmenthas an R interface

    Switch

    O/M W12 W11 W1W2S S

    DB1B2

    8 bits 8 bits 2 bits

    240 bits, 1.5 ms

    12 words, 216 bits

    S = Synchronitation pattern 18 bitsO/M = Operation and Maintance 6 bits

  • 8/6/2019 Education Eng[1]

    32/47

    41

    Frame Format S interface

    ISDN physical-layer (Layer 1) S frame formats differ depending on whether the

    frame is outbound (from terminal to network) or inbound (from network to ter-

    minal). Both physical-layer interfaces are shown below.

    The frames are 48 bits long, of which 36 bits represent data. The bits of an

    ISDN physical-layer frame are used as follows:

    Layer 2Data Link Layer

    The ISDN Data Link Layer is specified by the ITU Q.920 through Q.923. All of

    the signalling on the D channel is defined in the Q.921 spec.

    Link Access Protocol D channel (LAP-D) is the Layer 2 protocol used. This is

    almost identical to the X.25 LAP-B protocol.

    Here is the structure of a LAP-D frame:

    Flag (1 octet)

    This is always 7E16 (0111 11102)

    Address (2 octets)

    SAPI (Service access point identifier), 6-bits (see next side)

    C/R (Command/Response) bit indicates if the frame is a command or a

    response

    EA0 (Address Extension) bit indicates whether this is the final octet of the

    address or notTEI (Terminal Endpoint Identifier) 7-bit device identifier (see next side)

    EA1 (Address Extension) bit, same as EA0

    A = Activation bitB1 = B1 channel

    (2 x 8 bits / frame)B2 = B2 channel

    (2 x 8 bits / frame)D = D channel (4 x 1 bit / frame)

    E = Echo of previous D bitF = Framing bitL = DC balancingS = S-channelN = Inverted F from NT to TEM = Multiframing bit

    B1 B2 B1 B2L E

    1 1 8 1 1 1 1 1 8 1 1 1 1 1 1 1 8 1 1 1

    D A D M D S DE E E L

    F

    B1 B2 B1 B2D L F L L D L LF L D L L D L L D L

    F N

    48 bits 250s

    NT to TE

    TE to NT

    Flag Address Control Information CRC Flag

    8 7 6 5 4 3 2 1

    SAPI (6 bits) C/R EA0

    TEI (7 bits) EA1

  • 8/6/2019 Education Eng[1]

    33/47

    The figure above gives aview of usage of the SAPIfield,where SAPI = 0 isused for switch control andSAPI = 16 is used for pack-

    age routing when X.31,X.25 over D-channel is used

    Control (2 octets)

    The frame level control field indicates the frame type (Information, Supervisory, or

    Unnumbered) and sequence numbers (N[r] and N[s]) as required.

    Information

    Layer 3 protocol information and User data

    CRC (2 octets)

    Cyclic Redundancy Check is a low-level test for bit errors on the user data.

    Flag (1 octet)

    Closing flag, always 7E16 (0111 11102)

    SAPI

    The Service Access Point Identifier (SAPI) is a 6-bit field that identifies the point

    where Layer 2 provides a service to Layer 3.

    TEIs

    Terminal Endpoint Identifiers (TEIs) are unique IDs given to each device (TE) on

    an ISDN S/T bus. This identifier can be dynamic; the value may be assigned stat-

    ically when the TE is installed, or dynamically when activated.

    42

    SAPI value Related layer 3 or management entity

    0 Call control procedures

    111 Reserved for future standardization

    12 Teleaction communication

    1315 Reserved for future standardization

    16 Packet communication conforming to X.25 level 3 procedures

    1731 Reserved for future standardization

    63 Layer 2 management procedures

    All others Not available for Q.921 procedures

    TEI Value User Type

    063 Non-automatic TEI assignment user equipment

    64126 Automatic TEI assignment user equipment127 Broadcast to all devices

    Package data viaD-channel SAPI-16

    Package data viaB-channel

    TE ET PH TE

    Switch controlSAPI-0

  • 8/6/2019 Education Eng[1]

    34/47

    43

    These are the fields in a Q.931 header:

    Protocol Discriminator (1 octet)

    Identifies the Layer 3 protocol. For a Q.931 header, this value is 0816.Length (1 octet)

    Indicates the length of the next field, the CRV.

    Call Reference Value (CRV) (1 or 2 octets)

    Used to uniquely identify each call on the user-network interface. This value is

    assigned at the beginning of a call, and this value becomes available for another

    call when the call is cleared.

    Message Type (1 octet)

    Identifies the message type (i.e., SETUP, CONNECT, etc.). This determines what

    additional information is required and allowed.

    Mandatory and Optional Information Elements (variable length)

    Are options that are set depending on the Message Type.

    CAPI

    COMMON-ISDN-API (CAPI) is an application programming interface standard

    used to access ISDN equipment connected to basic rate interfaces (BRI) and pri-

    mary rate interfaces (PRI). By adhering to the standard, applications can make use

    of well defined mechanism for communications over ISDN lines, without being

    forced to adjust to the hardware vendor implementations.

    To reflect on the actual situation it can be stated that the international protocol

    specification is finished and almost every telecommunication provider offers BRI /PRI with protocols based on Q.931 / ETSI 300 102. CAPI Version 2.0 was devel-

    oped to support all Q.931 based protocols.

    CAPI is designed to be the base of a whole range of new protocol-stacks for net-

    working, telephony and file-transfer and is embodied in European standard ETS

    300 838 Integrated Service Digital Network (ISDN); Harmonized Programmable

    Communication Interface (HPCI) for ISDN.

    Layer 3Network Layer

    The ISDN Network Layer is specified by the ITU Q.930 through Q.939. Layer 3

    is used for the establishment, maintenance, and termination of logical network

    connections between two devices.

    Information Field Structure

    The Information Field is a variable length field that contains the Q.931 protocol

    data.

    Information Field

    8 7 6 5 4 3 2 1

    Protocol Discriminator

    0 0 0 0 Length of CRV

    Call Reference Value (1 or 2 octets)

    0 Message Type

    Mandatory & Optional Information Elements (variable)

  • 8/6/2019 Education Eng[1]

    35/47

    44

    Radio communications

    Wireless data communications via a radio modem provide a means of

    maintaining communications with

    remote units measuring stations

    external buildings and unmanned installations

    temporary or mobile sites

    The purpose may be that of gathering test readings, controlling or reg-

    ulating equipment or recording various kinds of alarms.

    Radio communications technology and how to plan, dimension and

    cope with noise and interference, differ greatly from local communica-

    tions in a data network.

    How it worksCommunication equipment is provided using a radio modem that converts the

    data signal into radio waves for a specific channel with a specific bandwidth. The

    data signal may require some form of signal processing or filtering before it can

    be transmitted by the radio channel. In addition, the signal is modulated (by a

    modem) to a correct carrier frequency and can be transmitted via a radio link to

    the receiver. Irrespective of whether the source is analogue or digital, the trans-

    mission is nearly always analogue. The receiver equipment decodes and recon-

    structs the original signal.

    The available frequency range for radio communications is limited and regu-

    lated by an international agreement (ITU).

    Radio waves are propagated in the atmosphere in the layer between the iono-

    sphere and the surface of the earth. Communication conditions can vary greatly,

    depending on the frequency band, ranging from the longest wavelengths of up

    to 1 000 metres in the ELF band to shortest ones of l0 mm in the EHF band.

    Radio modems operate in the UHF band at around 440 mhz. The UHF band

    between 300 and 3 000 mHz also contains radar, radio, TV, NMT mobile teleph-

    ony, mobile radio, satellite communications, amateur radio and both GSM and

    wireless telephones.

    Frequency band

    ELF 3003000 Hz

    VLF 330 kHz

    LF 30300 kHz

    MF 3003000 kHz

    HF 330 MHz

    VHF 30300 MHz

    UHF 3003000 MHzSHF 330 GHz

    EHF 30300 GHz

  • 8/6/2019 Education Eng[1]

    36/47

    45

    Attenuation and noise

    A propagated radio wave is affected by both the ground and the air layers

    through which it passes. In the frequency bands in which radio modems operate,

    with wavelengths of around 1 metre, there are many objects such as hills and

    buildings that can cause a radio shadow (cf. Mobile telephony). This is in addition

    to intermittent interference from other equipment. Such interference caused by

    objects is termed shadow or interference fading, and causes signal attenuation or

    distortion.

    The signal reaching the receiver is often very weak compared with the trans-

    mitted signal but this in itself does not imply any quality deterioration of commu-

    nication. What may cause problems is interference outside our control, noise that

    is added to the signal. This not only occurs in the receiving equipment but also

    exists in the form of thermal noise (thermal motion of particles), atmospheric noise

    (electrical phenomena such as lightning), cosmic noise (incipient radio-frequencyradiation from the sun or other so-called galactic noise) and locally generated

    noise (electrical equipment in the receivers surroundings).

  • 8/6/2019 Education Eng[1]

    37/47

    Terminology

    When discussing radio communications and antenna it is vital to under-

    stand a few basic terms and expressions. The first basic formula to

    remember relates frequency (f) to wavelength (l) by the equation: l [m] =

    300 / f [MHz].

    The Radiation pattern is the three dimensional radiation characteristics

    of an antenna in 2 planes, the Electric field (E) and magnetic field (H).

    The gain of the antenna is its capability to force radiation in a specific

    direction in space at the expense of other directions. Gain is expressed in

    dB compared to some reference: for example dBi refers to gain com-

    pared to an isotropic antenna and dBd to a dipole antenna.

    The polarization is defined as the plane of antennas electric field E and

    can be vertical, horizontal, slanted or circular. Typically the antennas physical orien-

    tation equals the antennas polarization. Orthogonal polarizations have a crosspolarization loss of 21 dB. In practice all the antennas in one system should use the

    same polarization.

    The Impedance of an antenna is its AC-resistance and reactance within the oper-

    ating band. Nominal impedance of 50 ohms is a standard. The bandwidth is the fre-

    quency range where the antennas characteristics like impedance, gain and radiation

    pattern remain within the specifications. The commonly used term attenuation is

    mainly related to feeders and radio propagation and is also expressed in dB.

    Antenna circuit components

    An antenna is an electromechanical device whose purpose is to radiate as effec-

    tively as possible the power from the feeder in a specific manner.

    A power splitter matches and combines multiple loads or sources and equally

    splits the power between them without disturbing the characteristic impedance of

    the system. Splitters are used in antenna arrays to combine multiple antennas or

    in RF distribution harnesses. A feed-line is an interconnecting cable between radio

    equipment and antenna. Feeders tend to be lossy components so the type has to

    be carefully selected depending on the required length and operating frequency.

    Lightning protectors can be inserted between the radio equipment and feeder to

    help protect the radio against a lightning strike. Typically a lightning protector is a

    DC short-circuited quarter wave stub. When interconnecting antenna circuit com-

    ponents, impedance match has to be maintained in order to provide ideal flow of

    power without additional losses due to reflections. Impedance match is common-ly measured as VSWR (Voltage Standing Wave Ratio) where a VSWR of 1:1 is

    ideal and 1:1.5 is more realistic in practice.

    46

    Antennas and propagationin radio communications

  • 8/6/2019 Education Eng[1]

    38/47

  • 8/6/2019 Education Eng[1]

    39/47

    48

    The Echelon Corporation through its LonWorks technology has provid-

    ed a platform for developing open control systems offering distributed,

    network intelligence.

    A LonWorks network is usually a peer-to-peer network where each

    device controls its own actions and shares information with its neigh-

    bours as needed to control the entire system.

    Normally the nodes will exchange datarather than commands. In this

    approach, application data items such as temperatures, pressures, states,

    and other data items can be sent to multiple devices, each of which may

    have a different application for using that data item. These data items

    may be considered as global data variables on the network and are in

    LonWorks technology referred to as Network variables. If a device

    updates the value of a network variable this new value will automatically be prop-

    agated on the network so other devices may be aware of the new value.

    Interoperability is the keyword in the LonWorks technology. It is a condition that

    ensures that multiple devices (from different manufactures) talk the same language

    and understand each other on the network.

    To achieve interoperability it is not enough to just be on the same network, have

    the same type of transceiver or be able to send and receive network variables. The

    nodes must also be able to understand the content of the network variable. For

    instance the nodes need to know if the temperature is in degrees, Fahrenheit or

    Celsius or if a flow value is in litre/sec or ml/sec. Hence, a condition for interoperabil-

    ity is that the data items are represented in a standardized way. This has been accom-

    plished by the LonMark Association, an independent organization of LonWorks

    developers, system-integrators, and end-users. Members in the LonMark Associationwork together to define the standards, ensuring interoperability between LonWorks

    devices from multiple manufacturers.

    In LonWorks technology, interoperability is promoted by the use of Standard

    Network Variable Types (SNVT). For a SNVT type network variable, the unit, reso-

    lution and range are defined. For example, if a SNVT_speed network variable is

    used every LonWorks interoperable node knows that the unit is m/s, the resolution

    is 0.1 m/s and the range is 0 to 6553.5 m/s. Today there are more than 140 dif-

    ferent SNVT:s.

    LonWorkstechnology

  • 8/6/2019 Education Eng[1]

    40/47

    49

    1 2 3

    4 5 6

    7 8 9

    0

    Open

    1020

    30

    4050

    5

    4

    3

    2

    1

    BV

    1 4 8 5 4 6 0

    SNVT_stateSNVT_switch

    SNVT_temp

    SNVT_lux

    SNVT_time_stamp

    SNVT_alarm

    The most prevalent transceiver is the FTT-10A free topology transceiver. It com-

    municates at a data rate of 78 kbit/s over a twisted pair cable in any topology

    including star, bus ring or combinations. The convenience of the free topology

    makes it desirable for the interconnection of sensors and controllers in todays

    control networks. The added benefit is a non-polarized interface eliminates one ofthe biggest problems in installation today reversing the communications wires.

    Offering the same flexibility in topology, the LPT-10 link power transceiver can

    be powered from the same pair as it communicates on.

    There is also a 1 250 kbit/s twisted pair bus transceiver as well as the PLT-22

    power line transceiver which has advanced signal processing, error correction and

    an unique dual carrier frequency feature making it possible to communicate very

    effectively in the presence of electric noise, appliance motor noise, dimmers, PCs

    and televisions.

    LonWorks a