CN103825870A - Communication method of universal communication protocol generator - Google Patents

Communication method of universal communication protocol generator Download PDF

Info

Publication number
CN103825870A
CN103825870A CN201210469500.0A CN201210469500A CN103825870A CN 103825870 A CN103825870 A CN 103825870A CN 201210469500 A CN201210469500 A CN 201210469500A CN 103825870 A CN103825870 A CN 103825870A
Authority
CN
China
Prior art keywords
data
frame
equipment
communication
check code
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.)
Pending
Application number
CN201210469500.0A
Other languages
Chinese (zh)
Inventor
邓洪波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Industrial Park New Hongbo Communication Technology Co Ltd
Original Assignee
Suzhou Industrial Park New Hongbo Communication Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Industrial Park New Hongbo Communication Technology Co Ltd filed Critical Suzhou Industrial Park New Hongbo Communication Technology Co Ltd
Priority to CN201210469500.0A priority Critical patent/CN103825870A/en
Publication of CN103825870A publication Critical patent/CN103825870A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention provides a communication method of a universal communication protocol generator. The communication method includes the following steps that: protocol frame functional domains are divided; byte size and in-frame location are configured for each functional domain; a frame of data content is extracted from a received data buffer according to a frame start domain and a frame determination domain; a frame of data is analyzed and processed according to configuration parameters; whether an address domain is consistent with the address code of equipment is judged; the current check code CRC of a received data frame is calculated; whether the current check code CRC is consistent with received check code data is judged; a command function of a control code is identified, and the method enters a corresponding function execution function; effective data are put forward according to data length, the effective data are used by the function execution function, and the analysis and communication of one frame of data can be accomplished.

Description

The communication means of omnipotent communication protocol maker
Technical field
The invention belongs to communication application, be specifically related to a kind of communication means of omnipotent communication protocol maker.
Background technology
Along with the develop rapidly of Computer Applied Technology and embedded microcontroller technology, various communication protocol becomes the important information bridge that connects computer or microcontroller.Communication protocol is of a great variety, has network communication protocol, serial communication protocol etc.Every field has all been released the standard communication protocol that a part is most widely used, and procotol is as TCP/IP procotol, GPRS wireless transmission protocol; Serial port protocol is as RS232 agreement, RS485 agreement, I2C agreement, CAN bus protocol etc.And in actual industrial applications, for the different actual demand of industry equipment, segmented respectively again numerous professional standard agreements, as RS485 agreement derives again MODBUS agreement, D/L645-2007 agreement, PROFIBUS agreement, BACNET agreement etc.In addition, still have the legacy version agreement of using value still to exist, as D/L645-1997 agreement; Also have a lot of user-defined nonstandard protocols.Therefore in the foundation of real application systems, the protocol compatibility between distinct device, becomes the key factor that can communication correctly set up.
But the communication protocol that different device fabrication business adopts is had nothing in common with each other, and how to make to support the devices interconnect of different agreement, makes protocol-compliant, it has been the bottleneck of the current communication technology.
At present, most industries solution is between two equipment, to connect a protocol converter, but protocol converter is to be also directionally another kind of agreement by a kind of protocol conversion, in the time running into the third agreement, must connect again other models protocol converter could with the 3rd devices interconnect.And the cycle of development agreement transducer and human and material resources cost larger, cause protocol converter high cost, and major part is the conversion between standard agreement, do not support self-defined communications protocol.Therefore in the time running into the situation that agreement cannot change, agreement can not embody its advantage: make data communication easier.
The present invention, just based on this problem, has proposed a kind of omnipotent communication protocol maker, for supporting the equipment of different agreement that a kind of communication connection solution is provided.
Summary of the invention
Summary of the invention of the present invention only provides a basic comprehension to part of the present invention aspect and feature, and it is not to general introduction widely of the present invention, neither be used for particularly pointing out the key element of key of the present invention or delineate scope of invention.Its unique object is to present simplifiedly concepts more of the present invention, for follow-up detailed description the present invention makes some place mats.
The communication means that the invention provides a kind of omnipotent communication protocol maker, comprises the steps:
Step S1: divide protocol frame functional domain;
Step S2: be followed successively by position in each functional domain configuration byte size and frame;
Step S3: extract a frame data content according to frame domain and end territory from the data buffer zone receiving;
Step S4: according to configuration item parameter, to a frame data analyzing and processing, extract respectively, obtain out address field, control code, data length, valid data and check code, be saved in each temporary variable;
Step S5: first judge that address field is consistent with this device address coding? if be judged as YES this device address coding, enter step S7: continue these frame data to carry out analyzing and processing; Otherwise, entering step S6, these frame data are invalid, abandon this frame data;
Step S7: according to check code computation rule, calculate the current check code CRC of the Frame of receiving;
Step S8: judge that whether current check code CRC is consistent with the check code data that receive, if consistent, transfer of data is correct, and enters step S10; Otherwise, assert that transfer of data makes mistakes, enter step S9, and abandon this frame data;
Step S10: the command functions of identification control code, enters corresponding function and carry out function;
Step S11: according to data length, propose valid data;
Step S12: valid data are carried out function for function, completes parsing and the communication process of frame data.
Further, described step S1 comprises: according to agreement fundamental, protocol frame is divided into eight large functional domains: domain, address field, control code, data length, data field, check code, end territory and frame period territory.
Further, described method applies between two equipment, the unite agreement of one or two equipment room of described method, take the agreement of one of them equipment as standard, for another equipment generates new interim application protocol.
Further, described method applies to more than between two equipment, and it is main equipment that described method is set one of them equipment, then generates several diverse new application protocols for main equipment.
The communication means of omnipotent communication protocol maker provided by the present invention, a kind of omnipotent communication protocol communication means can have been proposed, for supporting the equipment of different agreement that a kind of communication connection solution is provided, can solve the problem of the equipment room data communication of supporting different agreement, it can support various communication protocol, comprises user-defined various data communication protocol.The present invention can realize and utilize the unite agreement of one or two equipment room of omnipotent communication protocol maker, take the agreement of one of them equipment as standard, for another equipment generates new interim application protocol.If want not only one of matching unit, can generate several diverse new application protocols for main equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing relevant of the present invention in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 has shown the communication means flow chart of the omnipotent communication protocol maker of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, inventive principle of the present invention and enforcement are described further.
The problem that the object of the invention is to solve the equipment room data communication of supporting different agreement, it can support various communication protocol, comprises user-defined various data communication protocol.Formulating the most basic object of communication protocol is that effective order and data are passed to another one equipment from an equipment, and the consistency of agreement can make transfer of data simple, reliable.The agreement of formulating unified standard can make equipment range of application wider.But run into the inconsistent situation of agreement, two kinds of incompatible agreements agreement that is just equal to nothing.
Therefore, the object of the invention is to utilize the omnipotent communication protocol maker agreement of one or two equipment room of uniting, take the agreement of one of them equipment as standard, for another equipment generates new interim application protocol.If want not only one of matching unit, can generate several diverse new application protocols for main equipment.
Fig. 1 has shown the communication means flow chart of the omnipotent communication protocol maker of the present invention.
As shown in Figure 1, the communication means of omnipotent communication protocol maker of the present invention, comprises the steps:
Step S1: divide protocol frame functional domain: according to agreement fundamental, protocol frame is divided into eight large functional domains: domain, address field, control code, data length, data field, check code, end territory and frame period territory.
Step S2: be followed successively by position in each functional domain configuration byte size and frame.
Step S3: extract a frame data content according to frame domain and end territory from the data buffer zone receiving.
Step S4: according to configuration item parameter, to a frame data analyzing and processing, extract respectively, obtain out address field, control code, data length, valid data and check code, be saved in each temporary variable.
Step S5: first judge that address field is consistent with this device address coding? if be judged as YES this device address coding, enter step S7: continue these frame data to carry out analyzing and processing; Otherwise, entering step S6, these frame data are invalid, abandon this frame data.
Step S7: according to check code computation rule, calculate the current check code CRC of the Frame of receiving.
Step S8: judge that whether current check code CRC is consistent with the check code data that receive, if consistent, transfer of data is correct, and enters step S10; Otherwise, assert that transfer of data makes mistakes, enter step S9, and abandon this frame data.
Step S10: the command functions of identification control code, enters corresponding function and carry out function.
Step S11: according to data length, propose valid data.
Step S12: valid data are carried out function for function, completes parsing and the communication process of frame data.
Should be appreciated that method provided by the present invention can apply to two communications between equipment, the unite agreement of one or two equipment room of described method, take the agreement of one of them equipment as standard, for another equipment generates new interim application protocol.
Method provided by the present invention can also apply to more than the communication between two equipment, and it is main equipment that described method is set one of them equipment, then generates several diverse new application protocols for main equipment.
The communication means of omnipotent communication protocol maker provided by the present invention, a kind of omnipotent communication protocol communication means can have been proposed, for supporting the equipment of different agreement that a kind of communication connection solution is provided, can solve the problem of the equipment room data communication of supporting different agreement, it can support various communication protocol, comprises user-defined various data communication protocol.
Term and expression way used in this specification embodiment are for describing invention rather than restriction, should not getting rid of any equivalent or refill so these are expressed.In addition, those skilled in the art, by the understanding to specification of the present invention with to practice of the present invention, can easily expect other implementation.In multiple embodiment described herein, various aspects and/or parts can be adopted separately or be combined employing.It is emphasized that specification and embodiment only as an example, the scope of reality of the present invention and thinking define by claim below.

Claims (4)

1. a communication means for omnipotent communication protocol maker, is characterized in that: comprise the steps:
Step S1: divide protocol frame functional domain;
Step S2: be followed successively by position in each functional domain configuration byte size and frame;
Step S3: extract a frame data content according to frame domain and end territory from the data buffer zone receiving;
Step S4: according to configuration item parameter, to a frame data analyzing and processing, extract respectively, obtain out address field, control code, data length, valid data and check code, be saved in each temporary variable;
Step S5: first judge that address field is consistent with this device address coding? if be judged as YES this device address coding, enter step S7: continue these frame data to carry out analyzing and processing; Otherwise, entering step S6, these frame data are invalid, abandon this frame data;
Step S7: according to check code computation rule, calculate the current check code CRC of the Frame of receiving;
Step S8: judge that whether current check code CRC is consistent with the check code data that receive, if consistent, transfer of data is correct, and enters step S10; Otherwise, assert that transfer of data makes mistakes, enter step S9, and abandon this frame data;
Step S10: the command functions of identification control code, enters corresponding function and carry out function;
Step S11: according to data length, propose valid data;
Step S12: valid data are carried out function for function, completes parsing and the communication process of frame data.
2. the communication means of omnipotent communication protocol maker according to claim 1, it is characterized in that: described step S1 comprises: according to agreement fundamental, protocol frame is divided into eight large functional domains: domain, address field, control code, data length, data field, check code, end territory and frame period territory.
3. the communication means of omnipotent communication protocol maker according to claim 1, it is characterized in that: described method applies between two equipment, the unite agreement of one or two equipment room of described method, take the agreement of one of them equipment as standard, for another equipment generates new interim application protocol.
4. the communication means of omnipotent communication protocol maker according to claim 1, it is characterized in that: described method applies to more than between two equipment, it is main equipment that described method is set one of them equipment, then generates several diverse new application protocols for described main equipment.
CN201210469500.0A 2012-11-19 2012-11-19 Communication method of universal communication protocol generator Pending CN103825870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210469500.0A CN103825870A (en) 2012-11-19 2012-11-19 Communication method of universal communication protocol generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210469500.0A CN103825870A (en) 2012-11-19 2012-11-19 Communication method of universal communication protocol generator

Publications (1)

Publication Number Publication Date
CN103825870A true CN103825870A (en) 2014-05-28

Family

ID=50760700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210469500.0A Pending CN103825870A (en) 2012-11-19 2012-11-19 Communication method of universal communication protocol generator

Country Status (1)

Country Link
CN (1) CN103825870A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105006122A (en) * 2015-07-01 2015-10-28 浙江工业大学 Wireless interface communication protocol of automatic inspection robot
CN105278437A (en) * 2014-06-16 2016-01-27 上海宝信软件股份有限公司 Modbus RTU/ASCII protocol realization method based on S7-300/400 PLC
CN107070589A (en) * 2016-12-30 2017-08-18 国网浙江省电力公司电力科学研究院 A kind of electric energy meter adaptive approach, device and electric energy meter based on object-oriented agreement and legacy protocol
CN109587157A (en) * 2018-12-19 2019-04-05 南京视察者图像识别科技有限公司 A kind of bus Internet of Things communications protocol
CN110471654A (en) * 2019-07-17 2019-11-19 深圳文理子科技有限公司 The cloud development system and computer software program product of communication protocol
CN117889347A (en) * 2024-01-25 2024-04-16 广东未来信息有限公司 Liquefied gas filling control method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046665A1 (en) * 2006-05-24 2008-02-21 Kyoung-Park Kim Multiport Memory Device, Multiprocessor System Including the Same, and Method of Transmitting Data In Multiprocessor System
CN102170430A (en) * 2011-03-24 2011-08-31 华中科技大学 Multi-port multi-network protocol converter
CN102255908A (en) * 2011-07-08 2011-11-23 北京邮电大学 Internet of things gateway protocol consistency realization method
CN102480462A (en) * 2010-11-23 2012-05-30 中国电信股份有限公司 Universal protocol adapting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080046665A1 (en) * 2006-05-24 2008-02-21 Kyoung-Park Kim Multiport Memory Device, Multiprocessor System Including the Same, and Method of Transmitting Data In Multiprocessor System
CN102480462A (en) * 2010-11-23 2012-05-30 中国电信股份有限公司 Universal protocol adapting method and device
CN102170430A (en) * 2011-03-24 2011-08-31 华中科技大学 Multi-port multi-network protocol converter
CN102255908A (en) * 2011-07-08 2011-11-23 北京邮电大学 Internet of things gateway protocol consistency realization method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105278437A (en) * 2014-06-16 2016-01-27 上海宝信软件股份有限公司 Modbus RTU/ASCII protocol realization method based on S7-300/400 PLC
CN105006122A (en) * 2015-07-01 2015-10-28 浙江工业大学 Wireless interface communication protocol of automatic inspection robot
CN105006122B (en) * 2015-07-01 2018-07-10 浙江工业大学 Wireless interface communication method for automatic inspection robot
CN107070589A (en) * 2016-12-30 2017-08-18 国网浙江省电力公司电力科学研究院 A kind of electric energy meter adaptive approach, device and electric energy meter based on object-oriented agreement and legacy protocol
CN109587157A (en) * 2018-12-19 2019-04-05 南京视察者图像识别科技有限公司 A kind of bus Internet of Things communications protocol
CN110471654A (en) * 2019-07-17 2019-11-19 深圳文理子科技有限公司 The cloud development system and computer software program product of communication protocol
CN117889347A (en) * 2024-01-25 2024-04-16 广东未来信息有限公司 Liquefied gas filling control method and system

Similar Documents

Publication Publication Date Title
CN103825870A (en) Communication method of universal communication protocol generator
CN102891796B (en) Mining intelligent transmission gateway
CN103984323A (en) Integrated configurable industrial information monitoring, analyzing and controlling system
CN103532835A (en) Universal internet of things gateway
CN103326936A (en) Multi-protocol gateway of Internet of Things allowing unified access of various heterogeneous sensing layer networks
CN105577439A (en) Simulation method based on sensing device
EP2804361B1 (en) Integrated interface system for power-system monitoring and control system
CN103905410A (en) Multi-channel communication protocol converter capable of converting user-defined protocol to Modbus protocol
CN106209968A (en) A kind of Internet of Things data intelligence integration middleware
CN104678798A (en) Method for operating a field device
CN104486783A (en) Multi-state wireless gateway system for multi-state wireless monitoring network and control method
CN109361585A (en) A kind of method that child node baud rate and address is arranged in host node automatically
CN203299613U (en) Intelligent building control system
CN102970201B (en) Mobility integrated method for industrial field device
CN203552252U (en) Data conversion device based on internet of things
CN104901990B (en) Sensor flexibility access system and its flexible cut-in method based on Internet of Things
CN104290095A (en) High-altitude cleaning robot control system and method based on RC
CN105447153A (en) Local hardware device and Web application real-time communication system
KR101038619B1 (en) Implementation of network based control module for smart actuator with multi degree of freedom used in robot
CN204206201U (en) A kind of Internet of things system gateway
CN110098991B (en) Equipment for accessing EtherCAT bus system to universal Internet of things cloud platform
CN203084527U (en) A pressure transmitter controller real-time monitoring system
Xie et al. Design and implementation of embedded protocol conversion gateway for intelligent buildings
CN105323313A (en) Mobile Internet of things platform integrating industrial monitoring
CN109343460A (en) For establishing and the method for plc communication

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140528

WD01 Invention patent application deemed withdrawn after publication