RS 485 RS 422

EIA-RS-422 (ITU-T V.ll, X.27) EIA-RS-485 (ISO 8482) , . . UA-UB>0,2 ( - ) (space), UA-UB<-0,2 ( ) (mark). |UA-UB|<0,2 (), . UA UB 0 +5 () +1 +4 (), 1,5-5 . 100 . , . RS-485 . RS-422/485 RS-423. . 2.3, . 2.9.

, , . ( 10 ) ( 25 ). (1200 / - 25 , 9600 / - 30 , 115 / -250 ). (1200 ) .

2.3. RS-422 RS-485
____________________________________ RS-422____________ RS-485_____________

0,2

0,2

-6,8...+6,8

-6,8...+11,8

-7...+7

-7...+12

4

12

10060

60

1

32 (,

+10

)

1200 (100 /)

1200 (100 /)

12(10/)

12(10/)

<150Ha GND

<250

-7...+12

, |UA-UB|, , 1 , 1 ,

,

, , R=100 ,

1 .

. 2.9. : RS-422, RS-485 , RS-485

RS-485 : -. (. 2.9, ) (master), . . (slave) , . (. 2.9, ) .

RS-485 RS-422 , .

RS-485, , , . , .

. (polling) , , () . ( Ethernet).

, . ( ). , , (. 2.10).

RS-422 (, ). RS-485 .

******************************************************************************************


( ), : RS-422A (V.11, .27), RS-423A (V.10, .26), RS-485. . 2.8 , (L) (V). RS-232C RS-423A , RS-423A - . RS-422A RS-485, . () .


. 2.8.

EIA-RS-422 (ITU-T V.ll, X.27) EIA-RS-485 (ISO 8482) , . . UA-UB>0,2 ( - ) (space), UA-UB<-0,2 ( ) (mark). |UA-UB|<0,2 (), . UA UB 0 +5 () +1 +4 (), 1,5-5 . 100 . , . RS-485 . RS-422/485 RS-423. . 2.3, . 2.9.

, , . ( 10 ) ( 25 ). (1200 / - 25 , 9600 / - 30 , 115 / -250 ). (1200 ) .

2.3. RS-422 RS-485
____________________________________ RS-422____________ RS-485_____________

0,2

0,2

-6,8...+6,8

-6,8...+11,8

-7...+7

-7...+12

4

12

10060

60

1

32 (,

+10

)

1200 (100 /)

1200 (100 /)

12(10/)

12(10/)

<150Ha GND

<250

-7...+12

, |UA-UB|, , 1 , 1 ,

,

, , R=100 ,

1 .

. 2.9. : RS-422, RS-485 , RS-485

RS-485 : -. (. 2.9, ) (master), . . (slave) , . (. 2.9, ) .

RS-485 RS-422 , .

RS-485, , , . , .

. (polling) , , () . ( Ethernet).

, . ( ). , , (. 2.10).

RS-422 (, ). RS-485 .

, , .

( ) 20 , . - ( ).

. 2.10. RS-422 RS-485

. ( ). ( ), . , . , MIDI (. . 8.5.3) .

, ( 19 200 / , 9600 / ). . , (4- ). , XON/XOFF. , , CTS ( ) ( ). . , . -. .

, . RS-232C, . RS-232C . 2.11 . , -, . . ( 9600 / ).

. 2.11. RS-232C

**************************************************************************************************************


RS-485

RS-485 ( - EIA/TIA-485) - . - (1 OSI).

, RS-485, , - . RS-485 () . . ( A) , ( B) - . , "1", "0" . , : "1" , "0" - .

. . , . , , , . , RS-232, (""). , - . . , , , . , .

- / ( ) ( UART ). : RS-422 RS-485.

RS-422 - . . .

RS-485 - . . , .

D (driver) - ;
R (receiver) - ;
DI (driver input) - ;
RO (receiver output) - ;
DE (driver enable) - ;
RE (receiver enable) - ;
A - /;
B - /;
Y - (RS-422);
Z - (RS-422).

RS-485. (RO) UART (RX). (DI) UART (TX). , , - . - (RE) (DE). RE , DE . "0" - , "1" - .

, (AB) (UAB) RO. , . 200 . , UAB > +200 - "1", UAB < -200 - "0". , - . , , .

: (A) , (B) - .

(RAB) 12 . , , . RS-485 c 32 . , 32 .

RS-485 10 /. - 1200 . 1200 , - ().

RS-422

RS-485

/

1 / 10

32 / 32

1200

1200

10 /

10 /

"1"

+2...+10

+1.5...+6

"0"

-2...-10

-1.5...-6

-3...+3

-1...+3

-7...+7

-7...+12

200

200

150

250

100

54

4

12

10%

30%

RS-485

RS-485 (bus) , .. . - ""(terminator), .

    :
  • .
  • , " ".

1200 32 , (repeater), . . .

RS-485 , , - " " 120 .

Belden3106A RS485. 120 . Belden3106A 4 . . ""(Common). "" (Drain). , , , .

. . .

, .7 Allen Bradley Belden3106A 1747-AIC (Link Coupler) SLC DH-485.

.7 . DH-485 5-6 ( 120 , 1747-AIC) 1-2 ( ). 5-6 ( )

, , , . . .



MODBUS

Modbus , -.

.

RS-485, RS-422, RS-232,

TCP/IP (Modbus TCP).


MODBUS MODBUS Plus. MODBUS Plus Schneider Electric.

, Ethernet 10BASE-T, , 1 /.

HDLC, MODBUS PDU.


Modbus Modicon ( Schneider Electric) . 1979 [1]. , , .
MODICON RS-232[1]. RS-485, , .
, .


MODBUS.

MODBUS- MODICON RS-232C . .


. (2013 .) , , . MODBUS-.

Modbus , - , , .
, , (. master) , (. slaves) . () ( ). . , , , . .
Modbus . , PDU (Protocol Data Unit). PDU . 1127. 128255 . . PDU 253 .


MODBUS .

-, () ( ). () , . (HOST) . - .

. , . .

- .

8 - 堠 8 -

: . . , 3 .

: , . . , , .

.

MODBUS : ASCII RTU. ( , ..) .

ASCII.

ASCII - ASCII . 1 . .

ASCII-:

: , ASCII- 0-9, A-F

: 1

7 ,

1 ;

1 ; 2

: Longitudinal Redundancy Chek (LRC)

RTU.

ASCII - 4- .

.

RTU-:

: 8- ,

0-9, A-F

8- .

: 1

8 ,

1 ;

1 ; 2

: Cyclical Redundancy Check (CRC)

MODBUS.

ASCII .

ASCII-, "" (:, ASCII 3A hex), " - " (CRLF, ASCII 0D 0A hex).

- 0-9, A-F. "". , ( ) ..

1 . , . .

------T------T------T------T-----T-----

- LRC

+-----+------+------+------+-----+-----+

1 2 2 n 2 2

: CR LF

L-----+------+------+------+-----+------

: 584 984A/B/X ASCII- CRLF . 1 .

RTU .

RTU 3.5 . .

3.5 . .

. 1.5 , .

, 3.5 , . , . .

------------T--------T--------T--------T--------T-----------

CRC

+-----------+--------+--------+--------+--------+-----------+

T1-T2-T3-T4 8 8 n x 16 T1-T2-T3-T4

L-----------+--------+--------+--------+--------+------------

.

(ASCII) 8 (RTU). 0 - 247. 1 247.

0 , . MODBUS , .

.

(ASCII) 8 (RTU). 1 -255. MODICON, - , . 2.

, . . , 1 .

, :

0000 0011 ( 03 hex) , . , :

1000 0011 ( 83 hex) , , .

.

, . , , .

, ( 03), . ( 10 hex), , , .

( ) .

.

MODBUS - . . ASCII ASCII- ASCII-. Longitudinal Redundancy Check (LRC) ":" CRLF. RTU RTU- 16- . Cyclical Redundancy Check . CRC .

.

.

ASCII

------T-----T-----T-----T-----T-----T-----T-----T-----T-----

1 2 3 4 5 6 7

L-----+-----+-----+-----+-----+-----+-----+-----+-----+------

------T-----T-----T-----T-----T-----T-----T-----T-----T-----

1 2 3 4 5 6 7

L-----+-----+-----+-----+-----+-----+-----+-----+-----+------

RTU

------T-----T-----T-----T-----T-----T-----T-----T-----T-----T-----

1 2 3 4 5 6 7 8

L-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------

------T-----T-----T-----T-----T-----T-----T-----T-----T-----T-----

1 2 3 4 5 6 7 8

L-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------

.

MODBUS . (even/odd) . . .

. , .

.

(Even/Odd).

, 8 RTU- :

1100 0101 - 4. , 0, 1- . , 1, 1- 5, .. .

LRC.

LRC ":" CRLF.

LRC 1 . LRC . LRC . , .

CRC.

CRC . . CRC .

FF hex. CRC. , , , .

CRC . , . 1, . 0, .

. () , , . CRC.

.

01

ON/OFF .

. : 1-16 0-15.

20-56 17.

(Hex)

 11

01

Hi 00

Lo 13

Hi 00

Lo 25

(CRC LRC) --

.

, 0. .

(Hex)

 11

01

4 005

( 27-20) CD

( 35-28) 6B

( 43-36) B2

( 51-44) 0E

( 56-52) 1B

(CRC LRC) --

02 Read Input Status

ON/OFF ( 1) .

. 0.

10197-10218 17.

(Hex)

 11

02

. 00

. C4

- . 00

- . 16

ࠠ --

.

, 0. .

(Hex)

 11

01

4 005

( 10204-10197) AC

( 10212-10205) DB

( 10218-10213) 35

(CRC LRC) --

03 Read Holding Registers

( 4) .

. 0: 1-16 0-15.

40108-40110 17.

(Hex)

 11

03

. 00

. 6B

- . 00

- . 03

ࠠ --

. , .

125 984-8 (984-685 ..), 32 . .

:

(Hex)

 11

03

򠠠 06

( 40108) . 02

( 40108) . 2B

( 40109) . 00

( 40109) . 00

( 40110) . 00

( 40110) . 64

ࠠ --

04 Read Input Registers

( 3) .

.

30009 17.

(Hex)

 11

03

. 00

. 6B

- . 00

- . 03

ࠠ --

. , .

125 984-8 (984-685 ..), 32 . .

:

(Hex)

 11

03

򠠠 02

( 30009) . 00

( 30009) . 2A

ࠠ --

05 Force Single Coil

( 1) ON OFF. .

.

. 0. 1 0.

, (ON/OFF) . FF00 Hex - ON. 0000 - OFF. .

173 ON 17.

(Hex)

 11

05

. 00

. AC

. FF

. 00

ࠠ --

.

(Hex)

 11

05

. 00

. AC

. FF

. 00

ࠠ --

06 Preset Single Register

( 4). .

.

, . 0.

, . M84 484 10- , 0. 16 .

40002 0003 Hex 17.

(Hex)

 11

06

. 00

. 01

. 00

. 03

ࠠ --

.

(Hex)

 11

06

. 00

. 01

. 00

. 03

ࠠ --

07 Read Exception Status

. . , " /" .

, ( ).

:

M84,184/384,584,984 1-8

484 257

258-264

884 761

762

763 RIO Health Status

764-768

(Hex)

 11

07

ࠠ --

.

:

(Hex)

 11

06

⠠ 6D

ࠠ --

11 (0B Hex) Fetch Comm Event Ctr

. , .

. , , .

( 08), Restart Communication Option ( 00 01) Clear Counters and Diagnostic Register ( 00 0A).

17:

(Hex)

 11

0B

ࠠ --

, . 1 . .

:

(Hex)

 11

0B

. FF

. FF

. 01

. 08

ࠠ --

FFFF Hex, , . 264, , 264 .

12 (0C Hex) Fetch Comm Event Log

, , , .

11 (0B Hex).

, . ( 08), Return Bus Message Count ( 11).

0-64 , . . 0 .

17:

(Hex)

 11

0C

ࠠ --

, , , 0-64 . .

:

(Hex)

 11

0C

⠠ 08

. 00

. 00

. 01

. 08

. 01

. 21

0 20

1 00

ࠠ --

, 00 00 Hex, , . 264. , 289 .

0- . , Listen Only Mode.

1- . (00) , Communications Restart.

.

, Fetch Communication Event Log, . . , 6.

Slave Modbus Receive Event

- . . 7 "1". "1" :

򠠠

0

1

2

3

4 Character Overrun

5 Currently in Listen Only Mode

6

7 1

Slave Modbus Send Event

. , . 7 0, 6 1. 1 :

򠠠

0 Read Exeption Sent ( 1-3)

1 Slave Abort Exeption Sent ( 4)

2 Slave Busy Exeption Sent ( 5-6)

3 Slave Program NAK Exeption Sent ( 7)

4 Write Timeout Error Occured

5 Currently in Listen Mode

6 1

7 0

Slave Entered Listen Only Mode

Listen Only Mode.

:

򠠠

0 0

1 0

2 1

3 0

4 0

5 0

6 0

7 0

Slave Initiated Communication Restart

. ( 08 Hex) Restart Communication Option ( 00 01).

'Continue on Error' 'Stop on Error'. 'Continue on Error Mode', . 'Stop on Error' 0.

򠠠

0 0

1 0

2 0

3 0

4 0

5 0

6 0

7 0

15 (0F Hex) Force Multiple Coils

( 0) ON OFF. .

.

. 0.

20 ( 19) 17.

2 : CD 01 Hex (1100 1101 0000 0001 ). :

: 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1

: 27 26 25 24 23 22 21 20 - - - - - - 29 28

(Hex)

 11

0F

. 00

. 13

- . 00

- . 0A

򠠠 02

( 27-20) CD

( 29-28) 01

ࠠ --

, , , .

.

(Hex)

 11

0F

. 00

. 13

- . 00

- . 0A

ࠠ --

16 (10 Hex) Preset Multiple Regs

( 4). , .

.

. 0.

. M84 484 10- , 0. 16 .

40002 00 0A 01 02 Hex, 17:

(Hex)

 11

10

񠠠 00

񠠠 01

- . 00

- . 02

򠠠 02

. 00

. 0A

. 01

. 02

ࠠ --

, , , .

17 (11 Hex)

, , .

(Hex)

 11

11

(CRC LRC) --

. .

(Hex)

11

4 0

-ࠠ

ࠠ 00=OFF, FF=ON

...

(CRC LRC) --

𠠠

0 Micro 84

1 484

2 184/384

3 584

8 884

9 984

184/384

184 384 4 74. J347 Modbus Slave Interface , PIB- , 74. - 4.

:

򠠠

1 (2 184/384)

2 (0=OFF, FF=ON)

3,4 :

0 = 0

1 = (0=OFF, 1=ON )

2,3 = :

2=0 3=0 - 184

2=1 3=0 - 384

4-15 =

70 :

򠠠

5,6 PIB-

7,8

9,10

11-74 PIB-.

(. 2).

11,12

13,14

15,16 coil/run

17,18

19,20

21,22

( 16)

23,24

( 16)

25,26



:



: