0% found this document useful (0 votes)
7 views39 pages

Open Control Network

Uploaded by

Kalpana Parab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views39 pages

Open Control Network

Uploaded by

Kalpana Parab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Chapter 2

OPEN CONTROL NETWORK

1
Open Control Network
● RS-232
● RS-422
● EIA 485
● MODBUS
● GPIB

● PROPRIETARY CONTROL
NETWORK-MODBUS PLUS
AMG-98900431622
Digital Interfaces

● The point at which one device connects to


another
● Standards define what signals are sent,
and how
● Some standards also define the physical
connector to be used

3
Generic Communications
Interface Illustration

4
DTE and DCE

5
RS-232 and RS-449
● It is a physical protocol to interface computers with
modems
● specify mechanical, electrical, functional, and
procedural interface

Protective Ground (1)


Transmit (2)
Receive (3)
Request to Send (4)
Computer
Clear to Send (5)
or Modem
Terminal Data Set Ready (6)
Common Return (7)
Carrier Detect (8)
Date Terminal Ready (20)

6
RS-232C (EIA 232C)

● EIA’s “Recommended Standard” (RS)


● Specifies mechanical, electrical, functional,
and procedural aspects of the interface
● Used for connections between DTEs and
voice-grade modems, and many other
applications

EIA-Electronics Industries Association

7
Mechanical Specifications

● 25-pin connector with a specific


arrangement of leads
● DTE devices usually have male DB25
connectors while DCE devices have female
● In practice, fewer than 25 wires are
generally used in applications

8
RS-232 DB-25 Connectors

DB-25 Female

DB-25 Male

DB Connector-Data Bus Connector 9


RS-232 DB-25 Pinouts

10
RS-232 DB-9 Connectors

● Limited RS-232

11
RS-422 DIN-8
● Found on mouse, some IBM compatible computers,
network processor panels

DIN-8 Male DIN-8 Female

DIN Connector-Deutsche Industrie


Norm Connector 12
Electrical Specifications

● Specifies signaling between DTE and DCE


● Uses NRZ-L encoding
● Voltage -25v to -3V = binary 1
● Voltage +3V to +25v= binary 0
● Voltage could be as high as ± 25 volts
● Rated for 20Kbps to 15Mbps
● greater distances and rates are theoretically
possible, but not necessarily wise

13
RS-232 Signals (Asynch)

Even Parity

Odd Parity

No Parity

14
See ASCII Table 3.1, Page 83
Functional Specifications

● Specifies the role of the individual circuits


● Data circuits in both directions allow
full-duplex communication
● Timing signals allow for synchronous
transmission (although asynchronous
transmission is more common)

15
Procedural Specifications

● Multiple procedures are specified


● Simple example: exchange of
asynchronous data on private line
● Provides means of attachment between
computer and modem
● Specifies method of transmitting
asynchronous data between devices
● Specifies method of cooperation for exchange
of data between devices
16
See Table 6.1, Page 184
For the older RS-232-C standard, some of the pin definitions are:
Pin Number Name (function)
2 TD (Transmitted Data)
3 RD (Received Data)
4 RS (Request to Send)
5 CS (Clear to Send)
6 DSR (Data Set Ready)
20 DTR (Data Terminal Ready)
8 CD (Carrier Detect)
21 SQ (Signal Quality detector)

17
Null Modem Cable

● Allows DTE to DTE direct communication


SG SG
DTR DTR
DSR DSR
RTS RTS
CTS CTS
CD CD
TD TD
RD RD
18
EIA-232-D

● newer version of RS-232-C adopted in


1987

● improvements in grounding shield, test


and loop-back signals

19
RS-449
● an EIA standard that improves on the
capabilities of RS-232-C
● provides for a 37-pin connection, cable
lengths up to 200 feet, and data
transmission rates up to 2 million bps
● equates with the functional and procedural
portions of R-232-C
● the electrical and mechanical specifications are
covered by RS-422 and RS-423
20
Difference between
RS-232,RS-422 and RS-485
PORT RS-232 RS-422 RS-485

Half duplex (2
Transfer type Full duplex Full duplex wires),
full duplex (4 wires)

15 meters at 9600 1200 meters at 9600 1200 meters at 9600


Maximum distance
bps bps bps

TxD, RxD, RTS, CTS,


TxA, TxB, RxA, RxB,
Contacts in use DTR, DSR, DCD, DataA, DataB, GND
GND
GND*

Topology Point-to-Point Point-to-Point Multi-point

32 (with repeaters
Max. Number of 1 (10 devices in
1 larger, usually up to
connected devices receive mode) 21
256)
RS-232

22
RS-422

23
RS-485

24
Modbus
protocol
MODBUS Protocol is a messaging structure created by MODICON
company to connect PLC to programming tools.

It is now widely used to establish master-slave communication


between intelligent devices.

MODBUS is independent of the physical layer.

It can be implemented using RS232, RS422, or RS485 or over a


variety of media (e.g. fiber, radio, cellular, etc...).

25
Modbus

26
Modbus Serial line RS485
MODBUS Serial line RS485 is a low cost network using a master/slave
medium access with a transmission speed from 1.2Kbps to 120 Kbps.

7 Applicatio Modbu
6 n s
Presentatio
5 n Sessio
n
4 Transpo
3 rtNetwor
k
2
Link Master - Slave
1
Physica RS485
l

27
Modbus TCP/IP

MODBUS TCP/IP uses TCP/IP and Ethernet 10 Mbps or 100


Mbps to carry the MODBUS messaging structure.

7 Applicatio Modbu
6 n s
Préeentatio
5 n Sessio
n
4 Transpo TC
P
3 rtNetwor I
k P
2
Link CSMA / CD
1
ETHERNET V2 ou
Physica 802.3
l

28
Modbus Plus
MODBUS PLUS is a higher speed network 1 Mbit/s uses token passing
that uses the MODBUS messaging structure.

7 Applicatio Modbu
6 n s
Presentatio
5 n Sessio
n
4 Transpo
3 rtNetwor
k
2
Link 802.4 Token passing
1
Physica RS485
l

29
Modbus ASCII and Modbus
RTU

The MODBUS protocol comes in 2 types :

■ ASCII transmission mode


Each eight-bit or byte in a message is sent as 1 ASCII characters.

■ RTU transmission mode


Each eight-bit or byte in a message is sent as 2 four-bit
hexadecimal character.

30
Modbus frame structure

The Modbus frame structure is the same for requests (master to


slave messages) and responses (slave to master messages).

Modbus RTU
silen silen
ce Address Function Data Checksum ce

Silence >= 3,5 characters

Modbus
ASCII

: Address Function Data Checksum CR LF

3A 0D 0A
Hex Hex Hex
31
Addres field
Addres
Function Data Checksum
s

Valid slave device addresses are in the range of 0 ... 247 decimal.
The individual slave devices are assigned addresses in the range of 1 ...
247.
Value 0 is reserved for broadcast messages (no response).
Request :
A master addresses a slave by placing the slave address in the address
field of
the message.

Response :
When the slave sends its response, it places its own address in this
address field
of the response to let the master know which slave is responding.
32
Function field
Functio
Address Data Checksum
n

Valid codes are in the range of 1 ... 255 decimal.

Request :
The function code field tells the slave what kind of action to perform.

Response :
For a normal response, the slave simply echoes the original function
code.

For an exception response, the slave returns a code that is


equivalent to
the original function code with its most significant bit set to a logic 1.
33
Function code examples
● Code Type

● 01 Read n consecutive output bits
● 02 Read n consecutive input bits
● 03 Read n consecutive output words
● 04 Read n consecutive input words
● 05 Write 1 output bit
● 06 Write 1 output word
● 07 Read exception status
● 08 Access diagnostic counters
● 11 Read event counter
● 12 Read connection events
● 15 Write n output bits
● 16 Write n output words
● 17 Read identification
34
Data field
Address Function Data Checksum

Valid codes are in the range of 0 ... 255 decimal.

Request :
The data field contains additional information which the slave must use
to take
the action defined by the function code. This can include items like
register
addresses, quantity of items to be handled, etc...
Response :
If no error occurs, the data field contains the data requested.

If an error occurs, the field contains an exception code that the master
application can use to determine the next action to be taken.
35
Checksum field
Address Function Data Checksum

Valid codes are in the range of 0 ... 255 decimal.

Modbus RTU uses CRC : Cyclycal Reduncy Check (2 byte)


Modbus ASCII uses LRC : Longitudinal Redundancy Check (1
bytes)

Request :
The checksum is calculated by the master and sends to the slave.

Response :
The checksum is re-calculated by the slave and compared to the value
sent
by the master.
If a difference is detected, the slave will not construct a response to the
master.
36
Frame exemple in RTU
mode
■ Function code = 03 : Read Holding
Registers
Request
:
1 1 2 2 2
byte Functio
byte bytes bytes of bytes
Slave Number
n First word
Addres words to CRC16
code = address
s read
03

Response
:
1 1 2 2 2 2
byte Functio
byte bytes bytesof bytes of bytes
Slave Value Value
n Number of
Addres the the CRC16
code = bytes read
s first word last word
03

37
Modbus Network
Architecture

38
Modbus

39

You might also like