You are on page 1of 15

1

Mr.sc.Davor Gade
davor.gadze@tvz.hr
Komunikacija
izmeu dva ureaja
Analognim signalima
Digitalnim signalima
2
to je to OSI ?
ISO - International Organization for
Standardization
Open Systems Interconnection (OSI) model
1974.
7 slojeva
omoguava sklapanje komunikacijskog lanca
od modula razliitih proizvoaa
3
4
ISO OSI Seven Layer Model: Simple Repeated Bits
7 Application- < -------End--------to--------End------- > Application-
6 Presentation < -------End--------to--------End------- > Presentation
5 --Session--- < -------End--------to--------End------- > --Session---
4 -Transport-- < -------End--------to--------End------- > -Transport--
3 --Network--- < -------End--------to--------End------- > --Network---
2 -Data Link-- < -------End--------to--------End------- > -Data Link--
1 --Physical-- < ## > --Physical-- < ## > --Physical-- < ## > --Physical--
L Stack Num 1 Link Stack Num 2 Link Stack Num 3 Link Stack Num 4
ISO OSI Seven Layer Model: Data Link Layer Switching
7 Application- < -------End--------to--------End------- > Application-
6 Presentation < -------End--------to--------End------- > Presentation
5 --Session--- < -------End--------to--------End------- > --Session---
4 -Transport-- < -------End--------to--------End------- > -Transport--
3 --Network--- < -------End--------to--------End------- > --Network---
2 -Data Link-- < ## > -Data Link-- < ## > -Data Link-- < ## > -Data Link--
1 --Physical-- < == > -PHY- -- -PHY- < == > -PHY- -- -PHY- < == > --Physical--
L Stack Num 1 Link Stack Num 2 Link Stack Num 3 Link Stack Num 4
5
ISO OSI Seven Layer Model: Routed/Filtered Transmissions
7 Application- < -------End--------to--------End------- > Application-
6 Presentation < -------End--------to--------End------- > Presentation
5 --Session--- < -------End--------to--------End------- > --Session---
4 -Transport-- < -------End--------to--------End------- > -Transport--
3 --Network--- < ## > --Network--- < ## > --Network--- < ## > --Network---
2 -Data Link-- < -- > -DLL- -- -DLL- < -- > -DLL- -- -DLL- < -- > -Data Link--
1 --Physical-- < == > -PHY- -- -PHY- < == > -PHY- -- -PHY- < == > --Physical--
L Stack Num 1 Link Stack Num 2 Link Stack Num 3 Link Stack Num 4
6
Monomode
Multimode stepped
index
Multimode graded index
RS-232 prednosti: jeftin, rasprostranjen
RS485/422 prednosti: pouzdan,
rasprostranjen, strujni prijenos signala
ETHERNET prednosti: jeftin, rasprostranjen
7
0 1 0 0 1 1 0 0
Transmisijski
signal (+V)
Transmisijski
signal (+V)
Prijemni
signal
Uzorak
0 1 0 0 0 1 0 0
Primljeni
podatak
t
8
9
Sloj TCP/IP MODBUS
TCP
MODBUS
RS232/RS4422/RS485
PROFIBUS
Aplikacijski FTP
HTTP
Modbus Modbus Profibus
Prezentacijski
Sekvencijski
Transportni TCP TCP
Mreni IP IP
Link 802.3/802.2 802.3/802.2
Fiziki 10/100/1000
BaseT
10/100/1000
BaseT
RS232/RS4422
/RS485
RS485
10
Definicija fizikog sloja: RS232, RS422, RS485
9600 bps, 8 data bits, 1 stop bit, bez pariteta
Prijenosni mod RTU
Funkcija 3 (Read Multiply Registers)
Funkcija 6 (Write Single Register)
Funkcija 16 (Write Multiply Registers)
11
12
Check field calculation
The check field allows the receiver to check the
validity of the message. The check field value is
the
Cyclical Redundancy Check (CRC) based on the
polynomial x16+x15+x2+1. CRC is counted
from all
message bytes preceding the check field.
a) Upit - Request:
0103201500019E0E (in HEX)
01 = Adresa kontrolera
03 = Modbus function number (reading)
2015 = 2015 HEX = 8213 DEC = podatak o
naponu Baterije
0001 = Podatak o duini registara
9E0E = CRC (Check field calculation)
b) Odgovor - Answer
01 03 02 00F9 7806 (in HEX)
01 = Adresa kontrolera
03 = Kao i u upitu
02 = duina podataka u bajtovima
00F9 = podatak =249 u decimalnom prikazu, ali
je 8213 objekt definiran s jednim decimalnim
mjestom.
Zadnji dio je 7806 (CRC).
13
14
15