CN106506307A - A kind of Modbus frame formats self-described method - Google Patents
A kind of Modbus frame formats self-described method Download PDFInfo
- Publication number
- CN106506307A CN106506307A CN201611198341.XA CN201611198341A CN106506307A CN 106506307 A CN106506307 A CN 106506307A CN 201611198341 A CN201611198341 A CN 201611198341A CN 106506307 A CN106506307 A CN 106506307A
- Authority
- CN
- China
- Prior art keywords
- self
- byte
- depositor
- relay
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/4013—Management of data rate on the bus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40228—Modbus
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a kind of Modbus frame formats self-described method, can self-described including register data type;Register address low byte can self-described before in front or high byte;Register data low byte can self-described before in front or high byte;The function code that depositor, relay, intake read-write are supported can self-described;Depositor, relay, intake initial address are defined can self-described;Depositor, relay, intake quantity can self-describeds;CRC check low byte can self-described before in front or high byte.Slave computer increases Modbus frame format self-description informations, and host computer goes to call data and parsing data by instructing calling slave computer self-description information, the self-description information according to slave computer, you can easily realize communication coupling and data parsing coupling.So substantially increase between communication apparatus can interconnectivity, increased versatility and the motility of upper computer software, reduce upper computer software change workload.
Description
Technical field
The present invention between industrial control unit (ICU) or between controller and computer using being led to based on Modbus agreements
The occasion of letter;Particularly multiple slave computer Modbus protocol frame formats are inconsistent, and host computer must change program or configuration ability
The application scenario of proper communication.
Background technology
Modbus agreements are a kind of all-purpose languages being applied on electronic controller.By this agreement, controller mutually it
Between, controller can communicate and miscellaneous equipment between via network (such as Ethernet).It has become a kind of universal industrial mark
Accurate.There is it, the control device of different vendor's production can be linked to be industrial network, carry out Centralized Monitoring.This protocol define one
Individual controller can recognize the message structure for using, but regardless of they are communicated through which kind of network.It describes one
Controller request accesses the process of miscellaneous equipment, how to respond the request from miscellaneous equipment, and how to detect mistake and remember
Record.It has formulated the common format of message field layout and content.This agreement support traditional RS-232, RS-422, RS-485 and
Ethernet device.Many industrial equipments, including PLC, DCS, intelligence instrument etc. all between Modbus agreements are used as them
Communication standard.Of all kinds using the equipment based on Modbus agreements, but not all equipment based on Modbus agreements
All communicated in strict accordance with identical frame format.Common difference mainly includes several classes as follows:1st, register data type;2、
Register address low byte is in front or high byte front;3rd, register data low byte in front or high byte front;4th, post
The function code that storage, relay read-write are supported;5th, depositor, relay, the definition of intake initial address;6th, depositor, relay
Device, intake quantity;7th, CRC check low byte in front or high byte front.These differences are all brought to equipment room communication
Inconvenience, the host computer for communicating with must be modified according to its agreement, could proper communication and parsing data.
Content of the invention
It is for deficiency of the existing use based on Modbus protocol devices, inconsistent in order to solve the problems, such as communication equipment agreement,
And host computer must be changed for different agreement, the drawbacks of reducing integrated efficiency and increase cost, the present invention proposes as follows
A kind of new technical scheme.
The technical solution used in the present invention is:A kind of Modbus frame formats self-described method, by being based on to existing
The reductive analysis of Modbus protocol devices frame format differences, increase self-description information to difference section.Original communication equipment is only needed
Increase to self-description information interact support, it is possible to easily realize host computer communicate with slave computer interconnect self adaptation.The next
Machine to above-mentioned inconsistent where increase self-description information;Host computer is by instructing calling slave computer self-description information, Ran Hougen
Go again to call data and parsing data according to the self-description information of slave computer, you can easily realize communication coupling and data parsing
Match somebody with somebody.The interconnectivity between communication apparatus is so substantially increased, the workload of upper computer software change is reduced.
Above-mentioned Modbus frame format self-described technical schemes, which is further characterized by:Register data type can be certainly
Description;Register address low byte can self-described before in front or high byte;Register data low byte is in front or high word
Section can self-described before;The function code that depositor, relay, intake read-write are supported can self-described;Depositor, relay, open
Entering the definition of amount address can self-described;Depositor, relay, intake quantity can self-describeds;CRC check low byte is front or high
Byte can self-described before.
The beneficial effect of the invention:The present invention increases to the existing equipment based on Modbus in a kind of simple and practical method
Plus self-description information, host computer and slave computer need to only increase just easily can be realized interconnecting to the support that self-description information is interacted;
Solve host computer and slave computer because agreement inconsistent cannot proper communication, host computer need to change the drawbacks of program or configuration.
Description of the drawings
Fig. 1 is the self-description information interaction diagrams of the embodiment of the present invention.
Specific embodiment
Technical scheme is described further below by way of specific embodiment.
Define self-description information frame format as follows:
Host computer asks ADU:
Device address | 1 byte | |
Function code | 1 byte | 0x71 |
Check code | 1 byte | 0x5A |
Cumulative and verification | 1 byte |
Slave computer responds ADU:
Wherein register data type definition is as follows:
Register data type | Implication |
0 | Invalid |
1 | 16 signed binaries |
2 | 16 unsigned binary numbers |
3 | 4 binary-coded decimals |
4 | 32 signed binaries |
5 | 32 unsigned binary numbers |
6 | 8 binary-coded decimals |
7 | 32 floating numbers |
8 | ASCII character character string |
Individual address tableau format is defined as follows (m=6):
Note:Sequence number is from 1 open numbering.
The function code that wherein supports accounts for 2 bytes, and front, high byte is rear for low byte;Correspondence position 1 is represented supports this work(
Energy code, per is defined as follows:
An existing slave computer supports the communication based on Modbus agreements, and device address is 1, and register data type is 16
Signed binary, register address high byte front, register data low byte front, CRC check code high byte front,
Modbus address tables and the function code that supports are as follows:
Initial address | Quantity | The function code of support | |
Relay | 0x0000 | 0x08 | 0x01、0x05、0x0F |
Discrete intake | 0x2000 | 0xA8 | 0x02 |
Input register | 0x3000 | 0x2F | 0x03、0x04 |
Output register | 0x5000 | 0x20 | 0x03、0x06、0x10 |
Specified register | 0x8000 | 0x05 | 0x03、0x06、0x16 |
It is as follows that host computer and slave computer interconnect flow process automatically based on Modbus protocol communications:
1st, host computer carries out calling self-description information according to flow process shown in Fig. 1, and it is as follows that host computer sends message:
0x01 0x71 0x5A 0xCC//device address, function code, check code, cumulative and verification
2nd, slave computer receives host computer message, and after judging address and cumulative and verification correctly, response message is as follows:
0x01 0x71 0x5A//device address, function code, check code
0x01//register data type is 16 signed binaries
0x21//register address high byte is front
0x12//register data low byte is front
0x21//CRC high bytes are front
0x05//5 address table
0x1E//address table byte number
0x01 0x00 0x00 0x08 0x00 0x51//address table 1
0x02 0x20 0x00 0xA8 0x00 0x02//address table 2
0x03 0x30 0x00 0x2F 0x00 0x0C//address table 3
0x04 0x50 0x00 0x20 0x00 0xA4//address table 4
0x05 0x80 0x00 0x05 0x01 0x24//address table 5
0x9F//cumulative and verification
3rd, host computer receives self-description information message, after judging address, check code and cumulative and verification correctly, according to certainly
The function code of the byte sequence, address table and the support that provide in description information carries out calling slave computer data, according to depositor class
Type and byte sequence parsing data.
The present invention is disclosed as above with preferred embodiment, but they are not for limiting the present invention, any are familiar with this skill
Skill person, without departing from the spirit and scope of the invention, can make various changes or retouch from working as, therefore protection scope of the present invention
Should be by being defined that claims hereof protection domain is defined.
Claims (6)
1. a kind of Modbus frame formats self-described method, it is characterised in that:Slave computer increases Modbus frame format self-description informations,
Host computer goes to call data and parsing number by instructing calling slave computer self-description information, the self-description information according to slave computer
According to realizing communicating mating parses coupling with data.
2. Modbus frame formats self-described method according to claim 1, it is characterised in that:It includes register data class
Type can self-described;Register address low byte can self-described before in front or high byte;Register data low byte is gone back front
It is that high byte can self-described before;The function code that depositor, relay, intake read-write are supported can self-described;Depositor, relay
Device, intake initial address are defined can self-described;Depositor, relay, intake quantity can self-describeds;CRC check low byte
Can self-described before in front or high byte.
3. Modbus frame formats self-described method according to claim 1, it is characterised in that:The calling that host computer is issued is certainly
Description information frame includes:Device address, function code, check code and cumulative and verification.
4. Modbus frame formats self-described method according to claim 2, it is characterised in that:The register data type
Can self-described, select:16 signed binaries, 16 unsigned binary numbers, 4 binary-coded decimals, 32 have symbol binary system
Number, 32 unsigned binary numbers, 8 binary-coded decimals, 32 floating numbers, ASCII character character strings.
5. Modbus frame formats self-described method according to claim 2, it is characterised in that the register address, post
Latch data and CRC check low byte front or high byte before can self-described, 0x12 represents low byte front, and 0x21 is represented
High byte is front.
6. Modbus frame formats self-described method according to claim 2, it is characterised in that the depositor, relay,
The function code that intake read-write is supported can self-described, represented by 16 control words per and support different function codes to select.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611198341.XA CN106506307B (en) | 2016-12-22 | 2016-12-22 | A kind of Modbus frame format self-described method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611198341.XA CN106506307B (en) | 2016-12-22 | 2016-12-22 | A kind of Modbus frame format self-described method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106506307A true CN106506307A (en) | 2017-03-15 |
CN106506307B CN106506307B (en) | 2019-08-16 |
Family
ID=58335030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611198341.XA Active CN106506307B (en) | 2016-12-22 | 2016-12-22 | A kind of Modbus frame format self-described method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106506307B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112180881A (en) * | 2020-10-22 | 2021-01-05 | 华能青岛热电有限公司 | Thermal power generating unit main control DCS trans-regional data communication integration system |
CN112822083A (en) * | 2021-01-25 | 2021-05-18 | 华电通用轻型燃机设备有限公司 | MODBUS application layer-oriented data verification method and system |
CN113824626A (en) * | 2021-09-24 | 2021-12-21 | 广东科瑞德电气科技有限公司 | Communication management method for preventing information interaction loss |
CN114598567A (en) * | 2022-03-03 | 2022-06-07 | 深圳市元征科技股份有限公司 | Communication method, apparatus and storage medium |
CN115174306A (en) * | 2022-07-04 | 2022-10-11 | 北京广利核系统工程有限公司 | Modbus communication memory optimization method, communication method and related device |
CN116489254A (en) * | 2023-06-21 | 2023-07-25 | 中储粮成都储藏研究院有限公司 | Method for debugging lower computer by using upper computer |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102478797A (en) * | 2010-11-22 | 2012-05-30 | 中国科学院空间科学与应用研究中心 | Monitoring system with configurable communication protocol |
CN103545933A (en) * | 2013-11-11 | 2014-01-29 | 国家电网公司 | Instation I/O interface protocol of intelligent substation online monitoring system |
CN104052631A (en) * | 2014-05-22 | 2014-09-17 | 中兴通讯股份有限公司 | Equipment information collecting method, device and system |
CN104578419A (en) * | 2015-01-07 | 2015-04-29 | 山东鲁能智能技术有限公司 | Transformer substation communication power supply monitoring system and method |
CN104734980A (en) * | 2015-04-10 | 2015-06-24 | 常州多维信息科技有限公司 | Industrial field bus multi-protocol router and multi-protocol conversion method |
-
2016
- 2016-12-22 CN CN201611198341.XA patent/CN106506307B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102478797A (en) * | 2010-11-22 | 2012-05-30 | 中国科学院空间科学与应用研究中心 | Monitoring system with configurable communication protocol |
CN103545933A (en) * | 2013-11-11 | 2014-01-29 | 国家电网公司 | Instation I/O interface protocol of intelligent substation online monitoring system |
CN104052631A (en) * | 2014-05-22 | 2014-09-17 | 中兴通讯股份有限公司 | Equipment information collecting method, device and system |
CN104578419A (en) * | 2015-01-07 | 2015-04-29 | 山东鲁能智能技术有限公司 | Transformer substation communication power supply monitoring system and method |
CN104734980A (en) * | 2015-04-10 | 2015-06-24 | 常州多维信息科技有限公司 | Industrial field bus multi-protocol router and multi-protocol conversion method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112180881A (en) * | 2020-10-22 | 2021-01-05 | 华能青岛热电有限公司 | Thermal power generating unit main control DCS trans-regional data communication integration system |
CN112822083A (en) * | 2021-01-25 | 2021-05-18 | 华电通用轻型燃机设备有限公司 | MODBUS application layer-oriented data verification method and system |
CN112822083B (en) * | 2021-01-25 | 2022-03-01 | 华电通用轻型燃机设备有限公司 | MODBUS application layer-oriented data verification method and system |
CN113824626A (en) * | 2021-09-24 | 2021-12-21 | 广东科瑞德电气科技有限公司 | Communication management method for preventing information interaction loss |
CN113824626B (en) * | 2021-09-24 | 2023-12-22 | 广东科瑞德电气科技有限公司 | Communication management method for preventing information interaction loss |
CN114598567A (en) * | 2022-03-03 | 2022-06-07 | 深圳市元征科技股份有限公司 | Communication method, apparatus and storage medium |
CN115174306A (en) * | 2022-07-04 | 2022-10-11 | 北京广利核系统工程有限公司 | Modbus communication memory optimization method, communication method and related device |
CN115174306B (en) * | 2022-07-04 | 2023-07-25 | 北京广利核系统工程有限公司 | Modbus communication memory optimization method, communication method and related device |
CN116489254A (en) * | 2023-06-21 | 2023-07-25 | 中储粮成都储藏研究院有限公司 | Method for debugging lower computer by using upper computer |
CN116489254B (en) * | 2023-06-21 | 2023-09-08 | 中储粮成都储藏研究院有限公司 | Method for debugging lower computer by using upper computer |
Also Published As
Publication number | Publication date |
---|---|
CN106506307B (en) | 2019-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106506307A (en) | A kind of Modbus frame formats self-described method | |
CN103414753B (en) | A kind of multichannel information unifies dissemination method | |
US7966413B2 (en) | Method for configuring a programmable logic controller using a schema to validate extensible markup language file | |
CN102736565B (en) | Communication method of automatic control equipment based on upper and lower computer structures | |
CN106095376B (en) | A kind of implementation method of quick configuration monitoring picture | |
CN107122343A (en) | A kind of online contract template edit methods and system | |
CN101996148B (en) | Instrument test board configuration method for a plurality of communication protocols | |
CN108141464A (en) | A kind of communication protocol parsing code automatic generation method and system | |
CN104698962B (en) | PLC man-machine communication's method and system | |
WO2022222586A1 (en) | Code conversion method and apparatus | |
CN110460473B (en) | Communication configuration method and device of configuration software and computer readable storage medium | |
CN112306473B (en) | Program interface parameter transmission method, system and related equipment | |
CN106599058A (en) | RCD file model checking method and checking device | |
CN109241167A (en) | List data introduction method based on B/S framework | |
CN107301067A (en) | Beidou subscriber machine remote update system and its upgrade method based on IAP technologies | |
CN105917307A (en) | User interface framework | |
CN205281479U (en) | Intelligent substation's SCD file inspection device | |
CN101159641B (en) | Can bus extension method | |
CN113259230B (en) | BACnet gateway with multiple Modbus ports and communication method thereof | |
CN105242592B (en) | The method and system of HART meter parameter are directly read by PROFIBUS PA active station | |
CN104460595B (en) | A kind of method and apparatus of extended power monitoring system function | |
CN202394459U (en) | LED (light-emitting diode) electronic display system | |
CN203786520U (en) | Information control system for Chinese medicinal herb discontinuous production unit | |
CN106375284A (en) | STM32F103 based Mitsubishi FX type PLC communication converter and conversion method thereof | |
CN105354120A (en) | SCD file document check device for intelligent substation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |