CN102231717A - Method for rapidly making MODBUS protocol conversion gateway - Google Patents
Method for rapidly making MODBUS protocol conversion gateway Download PDFInfo
- Publication number
- CN102231717A CN102231717A CN2011101704287A CN201110170428A CN102231717A CN 102231717 A CN102231717 A CN 102231717A CN 2011101704287 A CN2011101704287 A CN 2011101704287A CN 201110170428 A CN201110170428 A CN 201110170428A CN 102231717 A CN102231717 A CN 102231717A
- Authority
- CN
- China
- Prior art keywords
- message
- smart machine
- chip microcomputer
- software
- modbus protocol
- 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
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention relates to a method for rapidly making a MODBUS protocol conversion gateway. The method comprises the following steps: finding message contents sent and received between intelligent equipment and monitoring software by using the monitoring software; simulating the monitoring software to send a message by using a single chip microcomputer; receiving a message code from the intelligent equipment; processing the received message and storing in the single chip microcomputer according to a MODBUS protocol; realizing a transition between a non-standard protocol, a non disclosure protocol and the general MODBUS protocol. A mismatching problem of the intelligent equipment for accessing various kinds of monitoring software can be solved by the following steps: firstly recording the contents of the sent and received messages according to a message format of the intelligent equipment communication and intelligent equipment software communication and under the condition of knowing knowledge of the single chip microcomputer; analyzing meanings of each byte in the received contents; sending data to the intelligent equipment according to the format of the sent message by using the single chip microcomputer; storing the received data in a register so that the communication between the monitoring software and the intelligent equipment is converted into the communication between the monitoring software and the single chip microcomputer according to the standard MODBUS protocol.
Description
Technical field
The present invention relates to a kind of method that transforms gateway, particularly relate to a kind of method of the quick Fabrication MODBUS protocol translation gateway in the intelligent monitor system engineering.
Background technology
In the process of smart machine communication, whether the communications protocol between the equipment is standard agreement, decision device can with the basis of other device talks.The communications protocol of various device may be difficult to be integrated in the same configuration software in intelligent monitor system, so just needs a kind of equipment that variety of protocol is converted into standard agreement.Have now the exploitation of a lot of Communication Gateways need technology very the professional could develop, increase development difficulty and progress so greatly.Needing a kind of quick Fabrication MODBUS protocol translation gateway device to finish supervisory control system in the intelligent monitor system engineering now.
Summary of the invention
At the problems referred to above, main purpose of the present invention is to provide a kind of method of the quick Fabrication MODBUS protocol translation gateway in the intelligent monitor system engineering.
The present invention solves above-mentioned technical problem by following technical proposals: a kind of method of quick Fabrication MODBUS protocol translation gateway, described method comprises the steps:
(1), sets two computers;
(2), install software that smart machine is installed in first computer, directly and the smart machine communication, AccessPort software is installed, usefulness first computer of AccessPort software supervision and smart machine communication in second computer; Note and send message and the data that receive message;
(3), by the transmission of contrast AccessPort software and the content of message that receives, the message code that finds the smart machine monitoring software to send, and recorded message code full content to smart machine;
(4), use the full content of single-chip microcomputer, by the past smart machine transmission of serial ports toward the message code of smart machine transmission record.Smart machine returns to single-chip microcomputer with the equipment relevant parameter with message format after receiving the code that single-chip microcomputer sends;
(5), single-chip microcomputer receives the data that come from smart machine, be stored among the ROM, and transfer among the EEROM, single-chip microcomputer is through loading the MODBUS protocol-driven, all informations parameter are arranged as the form of the MODBUS protocol massages of standard, wait for the inquiry request of host computer.
In specific embodiments of the invention, the step of writing gateway communication device in the described single-chip microcomputer is as follows:
(1), writes MODBUS protocol-driven main program;
(2), show that according to AccessPort software sending data format sends data;
(3), receive the data of returning from smart machine;
(4), the data of returning are deposited among the single-chip microcomputer ROM in order;
(5), deposit actual parameter among the EEPROM in order;
(6), wait for host computer computer to access equipment, possess MODBUS standard agreement access function.
In specific embodiments of the invention, find nonstandard protocol or non-public protocol monitor software to the smart machine content that sends datagram.
In specific embodiments of the invention,, send the message code of record with AccessPort software simulation monitoring software, and find and to receive with the same message code format of monitoring software according to smart machine transmitting-receiving content of message.
In specific embodiments of the invention, at first with smart machine with monitoring software and smart machine carry out communication, obtain communication packet wherein.
In specific embodiments of the invention, with communication packet AccessPort software simulation, the message that obtains compares with the message that obtains with monitoring software.
In specific embodiments of the invention, twice message format of comparison and content, form and content are all mated, send the message that AccessPort software sends at the single-chip microcomputer that will finish writing the MODBUS driving in advance, the storage that receives is being transferred to behind the ROM among the EEROM, formed the device gateway of the MODBUS agreement of a new standard by MODBUS protocol-driven and the data that receive.
Positive progressive effect of the present invention is: the method for quick Fabrication MODBUS protocol translation gateway provided by the invention has the following advantages: the present invention is simple, operation easily, the single-chip microcomputer knowledge that only need understand, according to the message format of smart machine with the software communication of oneself being with, noting message earlier sends and the content that receives, analyze the implication of each byte of received content, send data according to the form that sends message to smart machine with single-chip microcomputer, the data of receiving deposit register in, and the communication of monitoring software and smart machine is converted into the MODBUS agreement communication according to standard of monitoring software and single-chip microcomputer like this. can solve the unmatched problem of agreement that smart machine inserts various monitoring softwares.
Description of drawings
Fig. 1 is a hardware configuration schematic diagram of the present invention.
Fig. 2 is a message analysis hardware connection layout of the present invention.
Fig. 3 is a single-chip microcomputer process chart of the present invention.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to describe technical scheme of the present invention in detail.
Fig. 1 is a hardware configuration schematic diagram of the present invention, as shown in Figure 1: the present invention includes single-chip microcomputer and send being connected of energy device talk port with intelligence.Single-chip microcomputer smart machine in the past sends data, and smart machine also can send data to single-chip microcomputer.
Fig. 2 is a message analysis hardware connection diagram of the present invention, as shown in Figure 2: the present invention includes with the monitoring software and the intelligence of smart machine oneself band and send the energy device talk.Send the data message content with other computer monitor smart machine transmitting-receiving.
Fig. 3 is the schematic diagram of single-chip microcomputer handling process of the present invention, as shown in Figure 3: the present invention uses the single-chip simulation monitoring software to send message to smart machine, smart machine is replied message, actual parameter in the message is handled, be stored among the EEROM, the data arrangement among the EEROM waited for the form visit of other watch-dogs according to standard agreement well with the single-chip microcomputer of the agreement of being with MODBUS to drive.
The smart machine of each producer can both can communication with the software of oneself configuration, see to relevant parameter and setting.
Now a lot of equipment all are the smart machines with reference to the exploitation of MODBUS communications protocol, and a series of mutation communications protocol.Form is device address code function code equipment relevant parameter basically.At first use smart machine and dataphone to find the code message of computer and smart machine communication.
With following form is example:
The address | Function | |||||||
Send | 01 | 03 | 000X | 000X | ||||
The address | Function | Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 | Parameter 5 | ||
Receive | 01 | 03 | 000X | 000X | 000X | 000X | 000X |
According on the computer with the AccessPort software monitors to data record get off, arrange out the order of parameter.As parameter 1, parameter 2, parameter 3, parameter 4 etc.Single-chip microcomputer is according to the good program of MODBUS agreement of standard.Send data according to the data format that computer sends to smart machine with single-chip microcomputer then, the data that receive are sorted to N according to parameter 1 store in the register then.The direct like this MODBUS standard agreement that can use carries out communication to equipment.
More than show and described basic principle of the present invention and principal character and advantage of the present invention.The technical staff of the industry should understand; the present invention is not restricted to the described embodiments; that describes in the foregoing description and the specification just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications; these changes and improvements all fall in the claimed scope of the invention, and the claimed scope of the present invention is defined by appending claims and equivalent thereof.
Claims (7)
1. the method for a quick Fabrication MODBUS protocol translation gateway, it is characterized in that: described method comprises the steps:
(1), sets two computers;
(2), install software that smart machine is installed in first computer, directly and the smart machine communication, AccessPort software is installed, usefulness first computer of AccessPort software supervision and smart machine communication in second computer; Note and send message and the data that receive message;
(3), by the transmission of contrast AccessPort software and the content of message that receives, the message code that finds the smart machine monitoring software to send, and recorded message code full content to smart machine;
(4), use the full content of single-chip microcomputer, by the past smart machine transmission of serial ports toward the message code of smart machine transmission record.Smart machine returns to single-chip microcomputer with the equipment relevant parameter with message format after receiving the code that single-chip microcomputer sends;
(5), single-chip microcomputer receives the data that come from smart machine, be stored among the ROM, and transfer among the EEROM, single-chip microcomputer is through loading the MODBUS protocol-driven, all informations parameter are arranged as the form of the MODBUS protocol massages of standard, wait for the inquiry request of host computer.
2. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1 is characterized in that: the step of writing gateway communication device in the described single-chip microcomputer is as follows:
(1), writes MODBUS protocol-driven main program;
(2), show that according to AccessPort software sending data format sends data;
(3), receive the data of returning from smart machine;
(4), the data of returning are deposited among the single-chip microcomputer ROM in order;
(5), deposit actual parameter among the EEPROM in order;
(6), wait for host computer computer to access equipment, possess MODBUS standard agreement access function.
3. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1 is characterized in that: find nonstandard protocol or non-public protocol monitor software to the smart machine content that sends datagram.
4. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1, it is characterized in that: according to smart machine transmitting-receiving content of message, send the message code of record with AccessPort software simulation monitoring software, and find and to receive with the same message code format of monitoring software.
5. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1 is characterized in that: with smart machine with monitoring software and smart machine carry out communication, obtain communication packet wherein.
6. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1 is characterized in that: with communication packet AccessPort software simulation, the message that obtains compares with the message that obtains with monitoring software.
7. the method for quick Fabrication MODBUS protocol translation gateway according to claim 1, it is characterized in that: twice message format of comparison and content, form and content are all mated, send the message that AccessPort software sends at the single-chip microcomputer that will finish writing the MODBUS driving in advance, the storage that receives is being transferred to behind the ROM among the EEROM, formed the device gateway of the MODBUS agreement of a new standard by MODBUS protocol-driven and the data that receive.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110170428.7A CN102231717B (en) | 2011-06-22 | 2011-06-22 | Method for rapidly making MODBUS protocol conversion gateway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110170428.7A CN102231717B (en) | 2011-06-22 | 2011-06-22 | Method for rapidly making MODBUS protocol conversion gateway |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102231717A true CN102231717A (en) | 2011-11-02 |
CN102231717B CN102231717B (en) | 2014-08-06 |
Family
ID=44844254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110170428.7A Active CN102231717B (en) | 2011-06-22 | 2011-06-22 | Method for rapidly making MODBUS protocol conversion gateway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102231717B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017041550A1 (en) * | 2015-09-08 | 2017-03-16 | 中兴通讯股份有限公司 | Device simulator communication method and system |
CN106843807A (en) * | 2016-12-22 | 2017-06-13 | 天津力神特种电源科技股份公司 | The adjustment method that vehicle-mounted Li-ion batteries piles are quickly analyzed and positioned |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1728703A (en) * | 2005-06-29 | 2006-02-01 | 上海大学 | Method for converting protocol between Modbus and DeviceNet |
CN201328123Y (en) * | 2008-11-19 | 2009-10-14 | 北京赛德高科铁道电气科技有限责任公司 | Protocol conversion card |
CN101626351A (en) * | 2008-07-09 | 2010-01-13 | 青岛高校信息产业有限公司 | Multiprotocol data acquisition gateway |
CN101741770A (en) * | 2009-12-23 | 2010-06-16 | 上海电器科学研究所(集团)有限公司 | Ethernet/IP communication gateway and implementation method thereof |
-
2011
- 2011-06-22 CN CN201110170428.7A patent/CN102231717B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1728703A (en) * | 2005-06-29 | 2006-02-01 | 上海大学 | Method for converting protocol between Modbus and DeviceNet |
CN101626351A (en) * | 2008-07-09 | 2010-01-13 | 青岛高校信息产业有限公司 | Multiprotocol data acquisition gateway |
CN201328123Y (en) * | 2008-11-19 | 2009-10-14 | 北京赛德高科铁道电气科技有限责任公司 | Protocol conversion card |
CN101741770A (en) * | 2009-12-23 | 2010-06-16 | 上海电器科学研究所(集团)有限公司 | Ethernet/IP communication gateway and implementation method thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017041550A1 (en) * | 2015-09-08 | 2017-03-16 | 中兴通讯股份有限公司 | Device simulator communication method and system |
CN106843807A (en) * | 2016-12-22 | 2017-06-13 | 天津力神特种电源科技股份公司 | The adjustment method that vehicle-mounted Li-ion batteries piles are quickly analyzed and positioned |
Also Published As
Publication number | Publication date |
---|---|
CN102231717B (en) | 2014-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101459618B (en) | Data packet forwarding method and device for virtual machine network | |
CN105260337B (en) | A kind of automatic addressing method and system of single-chip microcomputer | |
CN100424605C (en) | Intelligent management apparatus and management method for distributed control network based on CAN bus | |
CN100570566C (en) | The method of coordinated scheduling and heterogeneous multi-core system between a kind of heterogeneous polynuclear | |
CN102137007B (en) | Method and system for generating network topology as well as coordinator | |
CN102752219B (en) | Method for implementing virtual device (VD) interconnection and switching equipment | |
CN103139018B (en) | Network card status monitoring under a kind of modulation integral system and TCP communication method | |
CN102855143B (en) | All purpose communication framework in a kind of SCADA system | |
CN108462956A (en) | The method and electronic equipment connected at once after discovering device | |
CN112055096A (en) | Method and device for automatically setting communication address of equipment | |
CN105550238A (en) | Architecture system of database appliance | |
CN102521356A (en) | Regular expression matching equipment and method on basis of deterministic finite automaton | |
CN102231717B (en) | Method for rapidly making MODBUS protocol conversion gateway | |
CN100347990C (en) | Method and system for monitoring performance of large scale memory system based on storage area network | |
CN103728961B (en) | Collecting method, transferring equipment and electric-bag complex dust collector supervisory system | |
CN104113454A (en) | Gasoline station intelligent controller and communication system based on the same | |
CN106789449A (en) | A kind of CAN exploitation and method of testing and system | |
CN101636963A (en) | The method and apparatus of the data communication feature of test network system | |
CN111224929B (en) | Software connection management system and method | |
CN113886472A (en) | Data access system, access method, computer equipment and storage medium | |
CN101986664A (en) | Communication network-based three-level remote monitoring system of medicinal equipment | |
CN111680319A (en) | Distributed equipment information acquisition system and method | |
CN101741880A (en) | Power service mobile service system-based method for interacting wireless remote data | |
Wang et al. | Research on the Cross-disciplinary Data Fusion Framework Based on Unified Computational Operational Platform | |
CN215222499U (en) | Device for computer group operation management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |