0% found this document useful (0 votes)
9 views

InstructionManual_Modbus_Data

Uploaded by

shapan2501
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

InstructionManual_Modbus_Data

Uploaded by

shapan2501
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Communication Protocol

1 physical layer
1.1 RS485 communication port, asynchronous half-duplex mode;
1.2 Communication speed 1200-38400bps can be set, factory default 9600dps;
1.3 Byte transfer format: 1 bit for initial bit, 8 bit for data bits, odd-even check (N81, E81, 081 can be
selected), factory default N81.
2 Digital communication protocol
The meter is provided with serial asynchronism half-duplex RS485 communication port, adopt
MODBUS-RTU protocol, various data can be transferred through communication line. One line can
connect 32pcs meter at the same time, each meter can set different communication address. The
communication terminal number of different series meters is different. communication should be
connected by the shielded twisted-pair cable with copper network, and the diameter not less than
0.5mm2.When wiring, keep the communication wire away from strong electric cables or other
strong electric field, T type network Wiring is recommended (see Fig.1.0),Star-type or other wring is
not recommended.

Computer

RS - 485

A
B

Power Supply

Meter 1 Meter 2 Meter N

Fig: 1.0

MODBUS-RTU communication protocol:


MODBUS protocol adopt host-slave response mode in one communication line. The signal of host
computer addressing to the terminal device (Slave computer) with one address, then the terminal
device send response signal back to host computer in the opposite direction. In one
communication line, the communication data flow is transmitted in two opposite directions. (half-
duplex working mode). MODUBUS protocol only allow the communication between Host
computer (PC,PLC, etc.) and terminal device(see Fig.1.1), not allow the data exchange between
terminal devices, so each terminal device will not occupy the communication lines when
initialized, but only response the query signal to the host computer.

Query info of host device Device Address

Device Address Function Code

Function Code Data Segment

Data Segment Error Checkout

Error Checkout Response info of slave device

Fig: 1.1 1

Revision: 2.5.1; December, 2023


Host PC enquiry
The query information frames include device address code, function code, data information code,
checkout code. The address code indicate the selected slave PC device; The function code indicate
the executed function of selected slave device, for example, function code 03 or 04 means that the
slave device will read the register and send back the content; The data segment include the other
additional information of executed function, for example, in reading command, reading from which
register? How many register to be read? The checkout code used for checking the correctness of
one frame information, providing the information verification method for slave device, it adopts
CRC 16 checkout rules.
Slave PC response
If slave PC respond normally, the information include the slave address code, function code, data
code and CRC 16 checkout code. Data code include the collected data from slave device, for
example, register value or status. If the error occurs, the slave device will not respond. The
transmission mode means one series independence data structure in one data frame and the rules
for data transmission. The below defines the transmission mode compatible with MODBUS protocol
RTU mode. Each bit of byte: 1 start bit, 8 data bit,(odd-even check bit), 1 stop bit (with odd-even
check bit) or 1 stop bit ( without odd-even check bit)
Data frame structure (Message format)

Address Code Function Code Data Code Checkout Code

1 Byte 1 Byte N Byte 2 Byte

Table: Data Frame Structure

Slave PC response
If slave PC respond normally, the information include the slave address code, function code, data
code and CRC 16 checkout code. Data code include the collected data from slave device, for
example, register value or status. If the error occurs, the slave device will not respond. The
transmission mode means one series independence data structure in one data frame and the rules
for data transmission. The below defines the transmission mode compatible with MODBUS protocol
RTU mode. Each bit of byte: 1 start bit, 8 data bit,(odd-even check bit),1 stop bit (with odd-even
check bit) or 1 stop bit ( without odd-even check bit).

Function code
The code indicate which function should be operated by the terminal. Below Table shows the
function code and their meaning and function.
Code Meaning Action

01 Read Switching Output Status Get Switching Output Data

02 Remote Switch Capacity Input Status Get Switching Output Status

03 Read Value of Data Register

04 Read Value of Data Register

05 Remote Control Single Switching Output


Operation
06 Write Single Register Get Present Binary Value To Relative One
Register
0F Remote Control More Than One Switching Get Present Binary Value Of One or More
Output Operation Register
10H Write Present Register Set The Binary Value To Relative Register

Fig: Function Code

Revision: 2.5.1; December, 2023


Checkout code
Error checkout (CRC) domain take 2 bytes, include one 16 bit binary value. CRC value is calculated
by transmission device, then attached to data frame; When receiving device receive data, CRC value
will be calculated again, then compare with the received value of CRC domain, if two values are not
equal, the error occurs.

Start

CRC=0xFFFF

CRC=CRC Xor Byte

N=0

CRC Right Shift One Bit

Yes
Carry

CRE=CRC Xor 0xA001


NO

N=N+1

NO
N>7

Yes
Next Byte

NO
Frame Finish

Yes

Finish

Message instruction format


Reading switching output status 0 x 01

Host PC Query Command Slave PC Response

Slave PC Address 1 Byte 1 – 247 Slave PC Address 1 Byte

Function Code 1 Byte 0x01 Function Code 1 Byte

Starting Relay Address 2 Bytes 0x0000 (Fixed) Byte Number Of Register 1 Byte

Relay Quantity 2 Bytes 0x0004 (Max) Register Value N Bytes

CRC Checkout Code 2 Bytes CRC Checkout Code 2 Bytes

Fig: Reading Switching Output Status

Revision: 2.5.1; December, 2023


Input Status Command Of Remote-Check Switch 0x02
Host PC Query Command Slave PC Response

Slave PC Address 1 Byte 1 – 247 Slave PC Address 1 Byte

Function Code 1 Byte 0x02 Function Code 1 Byte

Starting Switch Address 2 Bytes 0x0000 (Fixed) Byte Number Of Register 1 Byte

Remote-Check Switch Quantity 2 Bytes 0x000C (Max) Register Value N Bytes

CRC Checkout Code 2 Bytes CRC Checkout Code 2 Bytes

Message examples
Reading remote-control/Alarm switching output status (Function code0 x 01 )

Host PC Request:
CRC Checkout Code
Relay Quantity (Max 4 Loops)
Starting Relay (This Meter Reads from 0)
Reading Relay Status Function Code
Slave PC Address

Slave PC Response:
CRC Checkout Code
Relay Status Value (0x0 Means 1st Relay Close)
Register Quantity (BYTE numbers)
Function Code
Slave PC Address

Description: The relay status value corresponds to the status value of each switch output starting
from the lowest bit of each byte according to the MODBUS protocol. 1 means the ON status and 0
means the OFF status. Binary “ 0000 0011” of “0x03” Indicates that the first and second relays are
closed.

Remote-check switching input status (Function code0 x 02 )

Host PC Request:

Switching Quantity (Max 12 Loops)


Starting Address (Fixed 0)

Function Code Of Reading Relay Status

Slave PC Response:

Switching Input Status Value (No 4 & 9 Switching


Register BYTE Numbers

Description: The switching input status value corresponds to the status value of each switching
input starting from the lowest bit of each byte according to the MODBUS protocol. 1 means the ON
status and 0 means the OFF status.

Revision: 2.5.1; December, 2023


Command of remote-control single-loop switching output 0 x 05
Host PC Query Command Slave PC Response

Slave PC Address 1 Byte 1 – 247 Slave PC Address 1 Byte

Function Code 1 Byte 0x05 Function Code 1 Byte

Starting Relay Address 2 Bytes 0x0000 - 0x0003 Starting Relay Address 2 Bytes

Relay Action Value 2 Bytes 0xFF00/0x0000 Relay Action Value 2 Bytes

CRC Checkout Code 2 Bytes CRC Checkout Code 2 Bytes

Output command of remote-check multi-loop switch 0 x 0F


Host PC Query Command Slave PC Response

Slave PC Address 1 Byte 1 – 247 Slave PC Address 1 Byte

Function Code 1 Byte 0x0000 (Fixed) Function Code 1 Byte

Relay Quantity 2 Bytes 0x0004 (Fixed) Starting Relay Address 2 Bytes

Byte Numbers Of Data 1 Byte 0x01 Relay Quantity 2 Bytes

Multi Relay Action Value 1 Byte CRC Checkout Code 2 Bytes

CRC Checkout Code 2 Bytes

Message examples
Reading remote-control/Alarm switching output status (Function code0 x 01 )

Host PC Request:
CRC Checkout Code
Relay Quantity (Max 4 Loops)
Starting Relay (This Meter Reads from 0)
Reading Relay Status Function Code
Slave PC Address

Revision: 2.5.1; December, 2023


MODBUS Address Data Table
Data Data Read/
Address Description Explanation
Format Length Write
0001
Corresponding Item Of Output 1 Uchar 1 R/W Corresponding Item Of Output
0002
Level Delay Of Output 1 Uchar 1 R/W Unit: Second
0003 Corresponding Item Of Output 1 Uint 2 R/W Alarm Value
Return Difference Value Of
0004
Output 1 Uint 2 R/W Returned Value
0005 Limit Alarm Of Output 1 Uint 2 R/W Min Value Of Lower Alarm
0006-0019 Output 2-6 Loops
Corrresponding Item Of Analog
Output 1 Uchar 1 R/W Corresponding Item Of Output
001A
Coreesponding Mode Of Analog
Output 1 Uchar 1 R/W 0.4-20 mA, 1.0-20 mA
Corresponding Value Of Analog
001B
Output 1 Uint 2 R/W Analog Corresponding Value
001C-0021 2-4 Loops Of Analog Output
0022-0027 Backup
Power Display Setting Uchar 1 R/W Reserve
0028
Wiring Mode Selection Uchar 1 R/W See The Address Explanation
Power-on Display Uchar 1 R/W Displayed Contents
0029
Back-light Delay Time Uchar 1 R/W Back-light Delay Time
Luminance Uchar 1 R/W LED Luminance
002A
CT Quantity Uchar 1 R/W 0: 3 CT, 1: 2 CT
002B Time Setting Of Scrolling Display
002C Voltage Multiplying Power Uint 2 R/W 1-999
002D PT Divisor Uint 2 R/W 1-999
002E Current Multiplying Uint 2 R/W 1-999
002F Backup
0030 Voltage Null Uint 2 R/W 0.001-9.999
0031 Current Null Uint 2 R/W 0.001-0.500
0032 Power Null Uint 2 R/W 0.001-9.999
0033 Communication Protocol Uint 2 R/W 0-RS485Modbus
0034 Communication Address Uint 2 R/W 0-247
1-6, 1:1200, 2:2400, 3:4800, 4:9600 (Default), 5:19200,
0035
Baud Rate Uint 2 R/W 6:38400
0-2; 0: Even Checking, 1: Odd Checking, 2: No Checking
0036
Checking Uint 2 R/W (Default)
0037 Backup
0038-003B 645 Communication Address Uchar 8 R/W BCD Code
1-6, 1: 1200, 2: 2400, 3: 4800, 4: 9600 (Default), 5:
003C
Buad Rate Of No 2 Loop Uint 2 R/W 19200, 6: 38400
0-2; 0: Even Checking, 1: Odd Checking, 2: No Checking
003D
No 2 Loop Checking Uint 2 R/W (Default)
003E-003F Backup
0040 Switching Output Information Uint 2 R High 8 Bit Backup, Low 8 Bit Valid; 0: OFF, 1: ON
0041 Switching Input Information Uint 2 R 0: OFF, 1: ON
0042
A Phase Voltage Ulong 4 Decimal Point (0.0001V)
0043 4 R
0044
B Phase Voltage Ulong 4 Decimal Point (0.0001V)
0045 4 R
0046
C Phase Voltage Ulong 4 Decimal Point (0.0001V)
0047 4 R
0048
Average Phase Voltage Ulong 4 Decimal Point (0.0001V)
0049 4 R
004A
Phase Voltage Unbalance Ulong 0.01-99.99, 2 Decimal Point (%)
004B 4 R
004C
AB Line Voltage Ulong 4 Decimal Point (0.0001V)
004D 4 R
004E
BC Line Voltage Ulong 4 Decimal Point (0.0001V)
004F 4 R
0050
CA Line Voltage Ulong 4 4 Decimal Point (0.0001V)
0051 R
0052
Average Line Voltage Ulong 4 R 4 Decimal Point (0.0001V)
0053
0054
Zero Sequence Voltage Ulong 4 R 4 Decimal Point (0.0001V)
0055

Revision: 2.5.1; December, 2023


MODBUS Address Data Table (Continuation)
0056
Line Voltage Unbalance Ulong 4 R 0.01-99.99, 2 Decimal Point (%)
0057
0058
A Phase Current 4 Decimal Point (0.0001 A)
0059 Ulong 4 R
005A
B Phase Current Ulong 4 Decimal Point (0.0001 A)
005B 4 R
005C
C Phase Current
005D Ulong 4 R 4 Decimal Point (0.0001 A)
005E
Average Current Ulong 4 Decimal Point (0.0001 A)
005F 4 R
0060
Zero Sequence Current Ulong 4 Decimal Point (0.0001 A)
0061 4 R
0062
Current Unbalance Ulong 0.01-99.99, 2 Decimal Point (%)
0063 4 R
0064
A Phase Active Power Long 4 Decimal Point (0.0001 kW)
0065 4 R
0066
B Phase Active Power Long 4 Decimal Point (0.0001 kW)
0067 4 R
0068
C Phase Active Power Long 4 Decimal Point (0.0001 kW)
0069 4 R
006A
Total Active Power Long 4 Decimal Point (0.0001 kW)
006B 4 R
006C
A Phase Reactive Power Long 4 Decimal Point (0.0001 kVAR)
006D 4 R
006E
B Phase Reactiev Power Long 4 Decimal Point (0.0001 kVAR)
006F 4 R
0070
C Phase Reactive Power Long 4 Decimal Point (0.0001 kVAR)
0071 4 R
0072
Total Reactive Power 4 Decimal Point (0.0001 kVAR)
0073 Long 4 R
0074
A Phase Apparent Power Long 4 Decimal Point (0.0001 kVA)
0075 4 R
0076
B Phase Apparent Power Long 4 Decimal Point (0.0001 kVA)
0077 4 R
0078
C Phase Apparent Power Long R 4 Decimal Point (0.0001 kVA)
0079 4
007A
Total Apparent Power Long 4 R 4 Decimal Point (0.0001 kVA)
007B
007C A Phase Power Factor Int 2 R 3 Decimal Point
007D B Phase Power Factor Int 2 R 3 Decimal Point
007E C Phase Power Factor Int 2 R 3 Decimal Point
007F Total Power Factor Int 2 R 3 Decimal Point
0080 Frequency Uint 2 R 2 Decimal Point
0081 Backup
0082
Total Positive Active Energy Ulong 3 R Secondary Side (0.001 kWH)
0083
0084
Total Negative Active Energy Ulong 3 R Secondary Side (0.001 kWH)
0085
0086
Total Positive Reactive Energy Ulong 3 R Secondary Side (0.001 kVARH)
0087
0088
Total Negative Reactive Energy Ulong 3 R Secondary Side (0.001 kVARH)
0089
008A
Total Positive Active Energy Float R Primary Side
008B
008C
Total Negative Active Energy Float R Primary Side
008D
008E
Total Positive Reactive Energy Float R Primary Side
008F
0090
Total Negative Reactive Energy Float R Primary Side
0091

Revision: 2.5.1; December, 2023

You might also like