Open Control Network
Open Control Network
1
Open Control Network
● RS-232
● RS-422
● EIA 485
● MODBUS
● GPIB
● PROPRIETARY CONTROL
NETWORK-MODBUS PLUS
AMG-98900431622
Digital Interfaces
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
6
RS-232C (EIA 232C)
7
Mechanical Specifications
8
RS-232 DB-25 Connectors
DB-25 Female
DB-25 Male
10
RS-232 DB-9 Connectors
● Limited RS-232
11
RS-422 DIN-8
● Found on mouse, some IBM compatible computers,
network processor panels
13
RS-232 Signals (Asynch)
Even Parity
Odd Parity
No Parity
14
See ASCII Table 3.1, Page 83
Functional Specifications
15
Procedural Specifications
17
Null Modem Cable
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)
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.
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
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
30
Modbus frame structure
Modbus RTU
silen silen
ce Address Function Data Checksum ce
Modbus
ASCII
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
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.
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
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