0% found this document useful (0 votes)
32 views9 pages

RS485 English

Uploaded by

ngowosbae567
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)
32 views9 pages

RS485 English

Uploaded by

ngowosbae567
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/ 9

Machine Translated by Google

Modbus communication protocol

Serial port: 8 data bits, 1 stop bit, no parity

Baud rate: 1200, 2400, 4800, 9600

RTU mode

When the controller is set to communicate in RTU (Remote Terminal Unit) mode on the Modbus network, each 8Bit byte in the message

contains two 4Bit hexadecimal characters. The main advantage of this method is that at the same baud rate, it can transmit more

data.

code system

• 8-bit binary, hexadecimal 0...9, A...F


• Each 8-bit field in the message consists of one or two hexadecimal characters

bits per byte

• 1 start bit • 8
data bits, the least significant bit is sent first
• 1 parity bit, no parity
• 1 stop bit (with parity), 2 bits (without parity)

Error detection domain

• CRC (Cyclic Redundancy Check)

RTU ÿ

Using RTU mode, message transmission begins with a pause interval of at least 3.5 character times. This is the easiest to implement with a variety

of character times at the network baud rate (as shown in T1-T2-T3-T4 in the figure below). The first field of the transfer is the device address. The transfer

characters that can be used are 0...9,A...F in hexadecimal. The network device continuously detects the network bus, including the pause interval. When

the first field (address field) is received, each device decodes it to determine whether it is destined for its own. After the last transmitted character, a pause

of at least 3.5 character times marks the end of the message. A new message can start after this pause.

The entire message frame must be transmitted as a continuous stream. If there is a pause of more than 1.5 character times before the frame is complete, receive

The device will flush the incomplete message and assume that the next byte is the address field of a new message. Likewise, if a new message follows

the previous message in less than 3.5 characters, the receiving device will consider it a continuation of the previous message. This will cause an error

because the value in the final CRC field cannot be correct. A typical message frame looks like this:

start bit device address function code data CRC check terminator

T1-T2-T3-T4 8Bit 8Bit n 8Bits _ 16Bit T1-T2-T3-T4

RTU message frame


Machine Translated by Google

Example of reading PV parameter data in RTU mode

example 1. Read PV value

host request

start high start low number of registers number of registers


address function code CRC check
address address high volume the bottom of the amount

01 03 00 00 00 02 C40B

Slave responds

decimal point decimal point


address Function code byte count data high byte data low byte CRC check
high byte low byte

01 03 04 03 E8 00 01 BB83

The decimal integer represented by the hexadecimal number 03E8.0001 is 1000*10-1=100.0, and the CRC check value depends on the transmission method.

Read the PV value data as 100.0

Example 2. Read PUH value

host request

start high start high number of registers number of registers


address function code CRC check
address address high volume the bottom of the amount

01 03 02 0C 00 02 05B0

Slave responds

decimal point decimal point


address Function code byte count data high byte data low byte CRC check
high byte low byte

01 03 04 13 88 00 01 BF5D

The decimal integer represented by the hexadecimal number 1388.0001 is 5000*10-1=500.0, and the CRC check value depends on the transmission method.

Read the PV value data as 500.0

When reading data, the address (01) and function code (03) are unchanged, only the starting high-high address and the starting high-high address are different.

Example of writing parameter data in RTU mode


Machine Translated by Google

example 1. Write AH value (AH=100.0)

host request

start high start low register register byte data data decimal point decimal point CRC
Address function code
bit address address high number low number count high low high byte low byte check

01 10 01 00 00 02 04 03 E8 00 01 BF8F

Slave responds

Address function code start high-order address start low-order address register number high-order register number low-order CRC check

01 10 01 00 00 02 XX

The decimal integer represented by the hexadecimal number 03E8.0001 is 1000*10-1=100.0, and the CRC check value depends on the transmission method.

Example 2. Write SN value (SN=08)

host request

start high start low register register byte data data decimal point decimal point CRC
Address function code
bit address address high number low number count high low high byte low byte check

01 10 02 00 00 02 04 00 08 00 00 6B0D

Slave responds

Address function code start high-order address start low-order address register number high-order register number low-order CRC check

01 10 02 00 00 02 XX

The decimal integer represented by the hexadecimal number 0008.0000 is 8*1=8, and the CRC check value depends on the transmission method.

The Modbus communication protocol is compatible with the Modbus communication protocol format, but the data field increases the decimal point unit. Modbus communication protocol is a

Master-slave protocol. Only one device can send on the wire at any time. The exchange of information is managed by the master and only it can initiate. It will

The slave stations are polled one after another, otherwise no slave station can send a message. Direct communication between slave stations is not possible.

Single point form communication address

parameter Read and write high Lower address decimal point unit

PV 00
address read 00 According to DOT value
Machine Translated by Google

AH 00 DOT
RW 01 RW 01

IE 04 DOT
RW 01 RW 01

TO THE 08 DOT
RW 01 RW 01

DL 0C DOT
RW 01 RW 01

AHH 10 DOT

DHH 14 DOT

ALL 18 DOT

ETC 1C DOT

SN 00 0
RW02 RW02

DOT 04 0
RW02 RW02

PUL 08 DOT
RW02 RW02

TEL 0C DOT
RW02 RW02

PBIA 10 DOT
RW02 RW02

BLANKET 14 3
RW02 RW02

K1 18 3
RW02 RW02

OR THE 1C 0
RW02 RW02

PH 20 0

PL 24 0

PHH 28 0

PLL 2C 0

INPH 30 0

INPL 34 0

BAUD 38 0

ID 3C 0

Kingview and instrument online operation

Modicon modbus (RTU) unpack protocol

Parameter read and write register (command + ground data type decimal point unit
Machine Translated by Google

site)

PV 41
read SHORT is determined according to the DOT value

SHORT

4257 SHORT DOT


AH read and write

4261 SHORT DOT


DH read and write

4265 SHORT DOT


AL read and write

4269 SHORT DOT


DL read and write

4273 SHORT DOT


AHH read and write

4277 SHORT DOT


DHH read and write

4271 SHORT DOT


ALL read and write

4285 SHORT DOT


DLL read and write

4513 SHORT 0
SN read and write

4517 SHORT 0
DOT read and write

4521 SHORT DOT


PUL read and write

4525 SHORT DOT


PUH read and write

4529 SHORT DOT


PBIA read and write

4533 SHORT 3
FILT read and write

K1 4537 SHORT 3
read and write

4541 SHORT 0
OU-A read and write

4555 SHORT 0
PH read-write read-write

PL 4559 SHORT 0

4563 SHORT 0
PHH read and write

4567 SHORT 0
PLL read and write

4571 SHORT 0
INPH read and write

4575 SHORT 0
INPL read and write

4579 SHORT 0
BAUD read-write read-write

ID 4583 SHORT 0

1. modbus drive move repair Ding install Pack

Version 6.52 or lower version of Kingview must install Kingview modbus protocol patch for normal communication.

Run the CD-ROM "DriverSetup.exe" installation tool software to install the new modbus protocol driver
ÿ ÿ again

Copy the "KVModbusRtuEx.ini" file to the "kingview\ directory"; copy the "KVD_ModbusRTU.dl" file to

"kingview\DRIVER\ directory".

update file

Copy KVD_ModbusRTU.dll to "kingview\DRIVER\"

Copy KVModbusRtuEx.ini to "kingview\ directory"


Machine Translated by Google

2. The flow chart of the connection between the instrument and Kingview
Machine Translated by Google
Machine Translated by Google

3. The decimal point displayed on the configuration screen corresponds to the decimal point of the instrument, which requires special processing

The decimal point is actually displayed by the meter (PV divided by 10 is due to the decimal point of the meter = 1 digit)

Display as integer
Machine Translated by Google

You might also like