PPC Modbus protocol V2.0.pdf
《PPC Modbus protocol V2.0.pdf》由会员分享,可在线阅读,更多相关《PPC Modbus protocol V2.0.pdf(33页珍藏版)》请在三一文库上搜索。
1、 Edition:Sep 2010 PPC MODBUS Protocol V2.0 Edition:Sep 2010 1 Revision History Protocol Revision Date Author Remark V1.0 24-Feb-06 Poor 1. ASCII Mode for PPC Q1、Q2、WH、WA、BPS commands V1.1 19-Jun-06 Poor 1. Add RTU Mode 2. Add write function code (0x06) and command data area (0xC00xCF) for change bau
2、d rate 3. Add hexadecimal and decimal comparison table V1.2 06-Sep-06 Poor 1. Add ERD data area (0xE00xFF) for GD、GTS commands V1.3 14-Jan-08 Selina 1. Modified (STATES DATA AREA) S00: Reserved(always 0)0: Bat silence, only for Centralion V1.4 29-Sep-10 Jinhua Junjing 1. Delete all information about
3、 ASCII mode 2. Modify some error words 3. Add CMC connection V1.5 22-Oct-10 Junjing 1. Delete the list of Address Index(dec) In the Appendix A table V1.6 17-Dec-10 Junjing 1. Support Gripower UPS 2. Add data area(0x86-0x87) for Q6 command 3. Add System Mode (0x31, S16-S19), fault(0x45-0x48), warning
4、(0x52-0x55) V1.7 12-Jan-11 Junjing 1. fault (0x45 : F80) Reserved 2. Modify data unit(0x6C-0x6E) for new ups type 3. Modify the definition of Gripower UPS name and States data area. V1.8 31-Mar-11 Junjing 1. Modify data description (0x80-0x81) V1.9 24-Jan-13 Jinhua 1. modify the page number of Conte
5、nts 2. modify the content of page 20: the new content is “ let the pin6(R+) of CMC RJ45 connect the pin (T/R+) of Converter, and pin5(R-) of CMC RJ45 connect the pinping (T/R-) of Converter”. The old content is “let the pin6(T+) of CMC RJ45 connect the pin (T/R+) of Converter, and pin5(T-) of CMC RJ
6、45 connect the pinping (T/R-) of Converter” V2.0 1-April-14 Jinhua Delete ERD address Edition:Sep 2010 2 Contents GENERAL MESSAGE FORMAT . 3 (1) RTU Transmission Mode 3 FUNCTION DESCRIPTION 3 Read Function 0x03 . 3 Write Single Register Function 0x06 . 3 GENERAL TABLE DATA AREA DEFINITION 9 VECTOR D
7、ATA AREA DETAIL 9 DENTIFIERS FRAME . 9 STATES DATA AREA . 10 FAULT CODE AREA 11 WARNING CODE AREA . 14 MEASUREMENT DATA AREA . 16 CONFIGUREATION DATA AREA 17 COOMMAND DATA CODE 18 CMC Connection 19 General CMC . 19 Mini CMC 19 CRC check . 20 Appendix A Index table comparison between hexadecimal and
8、decimal . 24 Appendix B States value table 27 Appendix C Fault Code value table . 28 Appendix D Warnings value table . 31 Edition:Sep 2010 3 GENERAL MESSAGE FORMAT (1) RTU Transmission Mode When devices communicate on a MODBUS serial line using the RTU (Remote Terminal Unit) mode, each 8bit byte in
9、a message contains two 4bit hexadecimal characters. RTU Message Frame Address Function DataCRC 1 byte 1 byte 0 up to 2252 byte(s) 2 bytes CRC LowCRC Hi Note:The maximum size of a MODBUS RTU frame is 256 bytes. FUNCTION DESCRIPTION Read Function 0x03 Master request message:8 bytes RTU mode Slave Addr
10、ess Function Starting Address No. of Registers CRC HiLo HiLo 1 byte 1 byte 1 byte 1 byte 1 byte1 byte2 bytes CRC LowCRC Hi Slave response message: RTU mode Slave Address Function Byte count DataNext data CRC Hi Lo 2 chars 2 chars 2 chars 2 chars2 chars.2 bytes CRC Low CRC Hi Write Single Register Fu
11、nction 0x06 Master request message:8 bytes RTU mode Slave Address Function Register Address Register Value CRC HiLo HiLo 1 byte 1 byte 1 byte 1 byte 1 byte1 byte2 bytes CRC LowCRC Hi Slave response message: RTU mode Slave Address Function Register Address Register Value CRC HiLo HiLo 1 byte 1 byte 1
12、 byte 1 byte 1 byte1 byte2 bytes Edition:Sep 2010 4 CRC LowCRC Hi Data Addresses in PPC Modbus Messages: All data addresses in PPC Modbus messages are referenced to zero. The first occurrence of a data item is addressed as item number zero. For example: The register known as MeasurementData 1 in a p
13、rogrammable controller is addressed as register 0000 in the data address field of a PPC Modbus message. Register 127 decimal is addressed as register 007E hex (126 decimal). The function code field already specifies a holding register operation. Therefore the holding register 108 is addressed as reg
14、ister 006B hex (107 decimal). Error: Error code 2 chars 0x83 Exception 2 chars 01 or 02 or 03 or 04 For error example: The master addresses a query to slave device 1 (01 hex). The function code (03 hex) is for a Read Holding Registers operation. It requests the data of the holding registers at addre
15、ss (0250 hex). If the Holding Registers address is nonexistent in the slave device, the slave will return the exception response with the exception code shown (02 hex). This specifies an illegal data address for the slave. For example, if the slave is a 27 with 8 holding registers, this code would b
16、e returned. MODBUS Exception Codes Code Name Meaning 01 ILLEGAL FUNCTION The function code received in the query is not an allowable action for the server (or slave). This may be because the function code is only Edition:Sep 2010 5 applicable to newer devices, and was not implemented in the unit sel
17、ected. It could also indicate that the server (or slave) is in the wrong state to process a request of this type, for example because it is non-configured and is being asked to return register values. 02 ILLEGAL DATA ADDRESS The data address received in the query is not an allowable address for the
18、server (or slave). More specifically, the combination of reference number and transfer length is invalid. For a controller with 100 registers, a request with offset 96 and length 4 will be success, a request with offset 96 and length 5 will generate exception 02. 03 ILLEGAL DATA VALUE A value contai
19、ned in the query data field is not an allowable value for server (or slave). This indicates a fault in the structure of the remainder of a complex request, such as that the implied length is incorrect. It specifically does NOT mean that a data item submitted for storage in a register has a value out
20、side the expectation of the application program, since the MODBUS protocol is unaware of the significance of any particular value of any particular register. 04 SLAVE DEVICE FAILURE An unrecoverable error occurred while the server (or slave) was attempting to perform the requested action. For read f
21、unction (0x03) example: The master query is a Read Holding Registers request to slave device address 01. The message requests data from two holding registers, 0x2AB through 0x2AC. Note that the message specifies the starting register address as 0683 (02AB hex). The slave response echoes the function
22、 code, indicating this is a normal response. The Byte Count field specifies how many 8bit data items are being returned. It shows the count of 8bit bytes to follow in the data. How to Use the Byte Count Field: When you construct responses in buffers, use a Byte Count value that equals the count of 8
23、bit bytes in your message data. The value is exclusive of all other field contents, including the Byte Count Field. Edition:Sep 2010 6 RTU mode Slave Address Function Starting Address No. of Registers CRC HiLo HiLo 0x01 0x03 0x02 0xAB 0x000x020xb40x53 RESPONSE ExampleASCIIRTU Field NameCharacters8-B
24、it Field Header : (colon)None Slave Address 01 0 10000 0001 Function 03 0 30000 0011 Byte Count 04 0 40000 0110 Data Hi 23 2 30010 0011 Data Lo 05 0 50000 0101 Data Hi 23 2 30010 0110 Data Lo 00 0 00000 0000 Error Check (LRC / CRC) A D (2 chars)1111 1000 (16 bits) 1000 0110 Trailer CR LRNone Total B
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- PPC Modbus protocol V2.0 V2
链接地址:https://www.31doc.com/p-5529782.html