CN104580187A - Method for achieving interaction of external devices of different MODULEBUS protocols and server - Google Patents

Method for achieving interaction of external devices of different MODULEBUS protocols and server Download PDF

Info

Publication number
CN104580187A
CN104580187A CN201410848024.2A CN201410848024A CN104580187A CN 104580187 A CN104580187 A CN 104580187A CN 201410848024 A CN201410848024 A CN 201410848024A CN 104580187 A CN104580187 A CN 104580187A
Authority
CN
China
Prior art keywords
data
register
function code
protocol
external device
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
Application number
CN201410848024.2A
Other languages
Chinese (zh)
Other versions
CN104580187B (en
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.)
XIAMEN GUANGKONG IOT TECHNOLOGY CO.,LTD.
Original Assignee
XIAMEN WINER 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 XIAMEN WINER TECHNOLOGY Co Ltd filed Critical XIAMEN WINER TECHNOLOGY Co Ltd
Priority to CN201410848024.2A priority Critical patent/CN104580187B/en
Publication of CN104580187A publication Critical patent/CN104580187A/en
Application granted granted Critical
Publication of CN104580187B publication Critical patent/CN104580187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller

Abstract

The invention provides a method for achieving interaction of external devices of different MODULEBUS protocols and a server. The method includes the steps that 1, the external devices of the different MODULEBUS protocols are connected with a communication device; 2, whether the device serial numbers and register addresses in data are consistent with those of the communication device or not is judged; if not, the data are converted to the corresponding protocol messages corresponding to the external devices and sent to the external devices, and the step 3 is executed; if yes, a data request is processed; 3, response from the external devices is waited for after the data of the converted protocol messages are sent to the external devices; if when response from the external devices is not received during the preset time, an abnormal response data package is generated and sent to the server; if after data of the external devices are received, the data are parsed, the data are converted into the data of the corresponding protocols of the server and sent to the server. By means of the method, conversion between MODULEBUSes of the external devices and the MODULEBUS of the server can be supported, and the purpose that devices of the different MODULEBUS protocols are connected to one server is achieved.

Description

A kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction
Technical field
The present invention relates to communication transmission technology field, particularly relate to and a kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction.
Background technology
The communication data transfer of the external device that serial ports, network interface etc. are connected that the communication equipment had now is simple to server or by the transfer of data above server in external device.Some communication or control or collecting device itself support MODULEBUS(electrically/optical fiber communication line) agreement, just simple equipment and server carry out data interaction.
In a system, in a region may multiple external devices, and multiple external device possibly cannot be mutually compatible with MODULEBUS agreement above server, so the difficulty that communication just produces.Existing method can only be that server is supported lower end external device or the unified a kind of agreement of external device and removes back-level server, and such versatility is relatively poor.
When existing equipment itself supports MODULEBUS, the equipment access that support that substantially all can not be a lot of is external, just needs another communication equipment when needing external access in a region, and this way is relatively wasted and is also unfavorable for management.
Summary of the invention
The technical problem to be solved in the present invention, be that providing a kind of realizes the different external device of MODULEBUS agreement and the method for server interaction, the conversion between the MODULEBUS of external device and the MODULEBUS of server can be supported, the problem of the equipment access server of different MODULEBUS agreements can be solved.
The present invention is achieved in that and a kind ofly realizes the different external device of MODULEBUS agreement and the method for server interaction, comprises the steps:
Step 1, be connected with communication equipment by the external device of different MODULEBUS agreement, described communication equipment and server carry out wireless or wired connection;
The data of step 2, server received communication device transmission, and whether resolved detection reception data are legal; No, then abandon; Then judge that whether device numbering in data and register address arranged with communication equipment itself consistent; No, then data are transformed into the corresponding protocol massages of external device, send to external device; Enter step 3; Be then request of data is processed, after completing, give server transmission processing response data and process ends;
Step 3, when outwards install preparation send conversion after protocol massages data after wait for that external device is responded; If when not receiving external device response in Preset Time, then produce the abnormal Packet Generation responded on server; If after receiving external device data, resolve data, check legitimacy; If legal, then data changed into the data of the respective protocol on server, and send to server; If illegal, then abandon data, continue to wait for until arrive time-out time, produce abnormal response data bag and be sent on server.
Further, describedly data are transformed into the corresponding protocol massages of external device, are specially:
1, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-RTU agreement;
By when receiving the MODULEBUS-RTU agreement of server, resolution data, the data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is formed new RTU packet, and generate CRC check, and address field, function code and the register address that issues are saved, for judgement and the inspection of response data;
2, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
3, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon, resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
4, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If desired outwards put equipment sending data, then the register that address field, function code and needs issue is filled in the address field of ASCII protocol, function code and data volume, form ASCII protocol packet, and generate LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
5, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of ASCII, function code and data volume and forms packet, and generates LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
6, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition be filled into ASCII protocol address field, function code and data volume in form packet, and generate LRC verification; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
7, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
8, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
9, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-TCP/IP agreement
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that MBAP heading, function code and the needs in ICP/IP protocol issued composition be filled into ICP/IP protocol MBAP message, function code and data volume in form packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message.
Further, described data data being changed into the respective protocol on server, are specially:
1, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged and form new RTU data response bag, and generate CRC check; Send it back server;
2, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC, end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
3, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
4, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
5, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
6, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
7, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the rtu protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
8, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-TCP/IP agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ASCII protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
9, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ICP/IP protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server.
Further, described external device is the equipment with collection, controlling functions, comprising: smart machine, transducer, PLC device, RTU equipment.
Tool of the present invention has the following advantages: the function such as MODULEBUS control, alarm of communication equipment support equipment of the present invention itself, can solve again the access of external device simultaneously, and support the conversion between the MODULEBUS of external device and the MODULEBUS of server.So just can solve the problem of the equipment access server of different MODULEBUS agreements, can solve again equipment itself and the collision problem of external device, reduce fund waste.
Accompanying drawing explanation
Fig. 1 is structural principle block diagram of the present invention.
Fig. 2 is method flow schematic diagram of the present invention.
Embodiment
As depicted in figs. 1 and 2, of the present inventionly a kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction, comprise the steps:
Step 1, be connected with communication equipment by the external device of different MODULEBUS agreement, described communication equipment and server carry out wireless or wired connection;
The data of step 2, server received communication device transmission, and whether resolved detection reception data are legal; No, then abandon; Then judge that whether device numbering in data and register address arranged with communication equipment itself consistent; No, then data are transformed into the corresponding protocol massages of external device, send to external device; Enter step 3; Be then request of data is processed, after completing, give server transmission processing response data and process ends;
Step 3, when outwards install preparation send conversion after protocol massages data after wait for that external device is responded; If when not receiving external device response in Preset Time, then produce the abnormal Packet Generation responded on server; If after receiving external device data, resolve data, check legitimacy; If legal, then data changed into the data of the respective protocol on server, and send to server; If illegal, then abandon data, continue to wait for until arrive time-out time, produce abnormal response data bag and be sent on server.Wherein, described external device is the equipment with collection, controlling functions, comprising: smart machine, transducer, PLC device and RTU equipment.In actual applications, collecting device or control appliance also can use the mode of the communication equipment in the method.
Describedly data are transformed into the corresponding protocol massages of external device, are specially:
1, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-RTU agreement;
By when receiving the MODULEBUS-RTU agreement of server, resolution data, the data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is formed new RTU packet, and generate CRC check, and address field, function code and the register address that issues are saved, for judgement and the inspection of response data;
2, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
3, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon, resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
4, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If desired outwards put equipment sending data, then the register that address field, function code and needs issue is filled in the address field of ASCII protocol, function code and data volume, form ASCII protocol packet, and generate LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
5, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of ASCII, function code and data volume and forms packet, and generates LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
6, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition be filled into ASCII protocol address field, function code and data volume in form packet, and generate LRC verification; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
7, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
8, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
9, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-TCP/IP agreement
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that MBAP heading, function code and the needs in ICP/IP protocol issued composition be filled into ICP/IP protocol MBAP message, function code and data volume in form packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message.
Described data data being changed into the respective protocol on server, are specially:
1, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged and form new RTU data response bag, and generate CRC check; Send it back server;
2, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC, end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
3, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
4, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
5, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
6, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
7, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the rtu protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
8, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-TCP/IP agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ASCII protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
9, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ICP/IP protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server.
In a word, the present invention carries out data transaction, detection, differentiating and processing to external device, this communication equipment and server three aspects.It is this equipment or external device that equipment of the present invention can well carry out distinguishing packet, is easy to operate and also can not causes conflict.
The foregoing is only preferred embodiment of the present invention, all equalizations done according to the present patent application the scope of the claims change and modify, and all should belong to covering scope of the present invention.

Claims (4)

1. realize the different external device of MODULEBUS agreement and a method for server interaction, it is characterized in that, comprise the steps:
Step 1, be connected with communication equipment by the external device of different MODULEBUS agreement, described communication equipment carries out wired or wireless connection with server;
The data of step 2, server received communication device transmission, and whether resolved detection reception data are legal; No, then abandon; Then judge that whether device numbering in data and register address arranged with communication equipment itself consistent; No, then data are transformed into the corresponding protocol massages of external device, send to external device; Enter step 3; Be then request of data is processed, after completing, give server transmission processing response data and process ends;
Step 3, when outwards install preparation send conversion after protocol massages data after wait for that external device is responded; If when not receiving external device response in Preset Time, then produce the abnormal Packet Generation responded on server; If after receiving external device data, resolve data, check legitimacy; If legal, then data changed into the data of the respective protocol on server, and send to server; If illegal, then abandon data, continue to wait for until arrive time-out time, produce abnormal response data bag and be sent on server.
2. according to claim 1ly a kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction, it is characterized in that: describedly data are transformed into the corresponding protocol massages of external device, be specially:
1, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-RTU agreement;
By when receiving the MODULEBUS-RTU agreement of server, resolution data, the data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is formed new RTU packet, and generate CRC check, and address field, function code and the register address that issues are saved, for judgement and the inspection of response data;
2, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon, parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
3, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-RTU agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon, resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition is filled in the address field of RTU, function code and data volume and forms packet, and generates CRC check; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
4, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If desired outwards put equipment sending data, then the register that address field, function code and needs issue is filled in the address field of ASCII protocol, function code and data volume, form ASCII protocol packet, and generate LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
5, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that the address field of ASCII, function code and needs issued composition is filled in the address field of ASCII, function code and data volume and forms packet, and generates LRC verification; And address field, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
6, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-ASCII agreement;
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If desired outwards put equipment sending data, then the register that the element identifier (element ID) in ICP/IP protocol, function code and needs issued composition be filled into ASCII protocol address field, function code and data volume in form packet, and generate LRC verification; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
7, server is MODULEBUS-RTU agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-RTU agreement of server time, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
8, server is MODULEBUS-ASCII agreement, and external device is MODULEBUS-TCP/IP agreement;
By receive the MODULEBUS-ASCII agreement of server time, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with this equipment? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If desired outwards equipment sending data is put, then the register that address field, function code and needs issue is filled into the element identifier (element ID) of ICP/IP protocol, function code and data volume, and automatic filling transaction identifier, protocol identifier and length, form new TCP/IP packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message;
9, server is MODULEBUS-TCP/IP agreement, and external device is MODULEBUS-TCP/IP agreement
By receive the MODULEBUS-TCP/IP agreement of server time, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with the length of complete package data, abnormal then abandon; Resolve the register address in MBAP heading, function code and data and corresponding value;
Do you judge that the element identifier (element ID) in MBAP heading is corresponding with this device address? inconsistent, be then the packet of external device; Does is if consistent, then arbitration functions code the function code that equipment itself is supported? not supporting, is then the packet of external device; Do you if consistent, then judge that whether each register address in data volume is all the register of this equipment use? then this register is operated accordingly and result is formed back message; If there is incongruent register, then the operation of this register is the operation of external device;
If desired outwards put equipment sending data, then the register that MBAP heading, function code and the needs in ICP/IP protocol issued composition be filled into ICP/IP protocol MBAP message, function code and data volume in form packet; And MBAP heading, function code and the register address that issues are saved, for the judgement of response data, inspection and conversion back message.
3. according to claim 1ly a kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction, it is characterized in that: described data data being changed into the respective protocol on server, are specially:
1, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged and form new RTU data response bag, and generate CRC check; Send it back server;
2, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC, end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
3, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-RTU agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of rtu protocol is: address field+function code+data volume+CRC;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into rtu protocol respectively, form the data response bag of new rtu protocol, and generate CRC check; Send it back server;
4, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
5, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding with the address information of preserving when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then the register of address field, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
6, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-ASCII agreement;
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
If correct response data, then the register of the element identifier (element ID) in MBAP heading, function code and the register returned and operating result and this equipment and operating result are merged in address field, function code and the data volume being filled into ASCII protocol respectively, form the data response bag of new ASCII protocol, and generate LRC verification; Send it back server;
7, external device is MODULEBUS-RTU agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the rtu protocol response that external device sends over, resolution data; The data format of rtu protocol is: address field+function code+data volume+CRC;
First judge that CRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the rtu protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
8, external device is MODULEBUS-ASCII agreement, and server is MODULEBUS-TCP/IP agreement;
Receive the back message of the ASCII protocol response that external device sends over, resolution data; The data format of ASCII protocol is: starting character+address field+function code+data volume+LRC+ end mark;
First judge that LRC is whether normal, abnormal then abandon; Parse the register address in address field, function code and data and corresponding value;
Do you first judge that address field is corresponding consistent to element identifier (element ID) in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ASCII protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server;
9, external device is MODULEBUS-TCP/IP agreement, and server is MODULEBUS-TCP/IP agreement
Receive the back message of the ICP/IP protocol response that external device sends over, resolution data; The data format of ICP/IP protocol is: MBAP heading+function code+data volume; Described MBAP heading comprises: transaction identifier, protocol identifier, length, element identifier (element ID);
First judge that whether the length in MBAP heading is consistent with message length, abnormal then abandon; Parse the register address in MBAP heading, function code and data and corresponding value;
Do you first judge that transaction identifier, protocol identifier and element identifier (element ID) in MBAP heading are consistent with respective field in the MBAP heading preserved when sending? inconsistent, be then illegal packet; Does is if consistent, then arbitration functions code corresponding with the function code of preserving when sending? inconsistent, judging whether it is that corresponding mistake is responded, is not be invalid data; Be then, the packet before being is responded; If function code is consistent, then the register address information of each register address information in data volume with preservation when sending is compared, whether unanimously? that the packet before being then is responded; If there is incongruent register, then it is invalid data;
If correct response data, then merging preserving function code in the transaction mark of MBAP heading, protocol identifier, element identifier (element ID), the ICP/IP protocol that returns, the register of register and operation and this equipment and operating result before in heading, function code and the data volume being filled into ICP/IP protocol respectively, forming the data response bag of new ICP/IP protocol; Send it back server.
4. according to claim 1ly a kind ofly realize the different external device of MODULEBUS agreement and the method for server interaction, it is characterized in that: described external device is the equipment with collection, controlling functions, comprising: smart machine, transducer, PLC device, RTU equipment.
CN201410848024.2A 2014-12-31 2014-12-31 A method of realizing that the external device of different MODULEBUS agreements is interacted with server Active CN104580187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410848024.2A CN104580187B (en) 2014-12-31 2014-12-31 A method of realizing that the external device of different MODULEBUS agreements is interacted with server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410848024.2A CN104580187B (en) 2014-12-31 2014-12-31 A method of realizing that the external device of different MODULEBUS agreements is interacted with server

Publications (2)

Publication Number Publication Date
CN104580187A true CN104580187A (en) 2015-04-29
CN104580187B CN104580187B (en) 2018-09-04

Family

ID=53095368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410848024.2A Active CN104580187B (en) 2014-12-31 2014-12-31 A method of realizing that the external device of different MODULEBUS agreements is interacted with server

Country Status (1)

Country Link
CN (1) CN104580187B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533621A (en) * 2016-11-15 2017-03-22 合肥工业大学智能制造技术研究院 Communication method for monitoring permanent magnet synchronous motor in real time based on simplified MODBUS protocol
CN109246203A (en) * 2018-08-24 2019-01-18 日立楼宇技术(广州)有限公司 Data communication method, device, computer equipment and storage medium
CN110221937A (en) * 2019-06-05 2019-09-10 河南卫华重型机械股份有限公司 A kind of analytic method of communication between plates data
CN111327493A (en) * 2020-01-23 2020-06-23 北京和利时系统工程有限公司 Data acquisition method and device
CN112269351A (en) * 2020-12-25 2021-01-26 中国航空油料集团有限公司 PLC-based data processing method and system, electronic device and storage medium
CN114448947A (en) * 2022-01-17 2022-05-06 武汉魅客科技有限公司 Device for improving automatic adaptation of intelligent gateway to multiple message formats

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010018712A1 (en) * 1998-10-06 2001-08-30 Schneider Automation Inc. Messaging application layer (modbus) over ethernet to transport layer (TCP) communications method and apparatus for a modular terminal input/output system
CN101420435A (en) * 2008-11-18 2009-04-29 上海电力学院 Communication protocol conversion device and method based on embedded multiple MCU
CN102045334A (en) * 2010-09-27 2011-05-04 北京泰豪智能工程有限公司 Protocol conversion method and device
CN102053935A (en) * 2010-11-25 2011-05-11 广东雅达电子股份有限公司 MODBUS serial communication protocol-based communication method
CN102546619A (en) * 2011-12-29 2012-07-04 浙江工业大学 Modbus protocol conversion system based on 3G (The 3rd Generation Telecommunication) Internet access
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN103454981A (en) * 2012-05-29 2013-12-18 苏州汇云鼎信息科技有限公司 Embedded multiple master-slave Modbus controller
CN103546467A (en) * 2013-10-23 2014-01-29 上海爱控自动化设备有限公司 Method for transmitting Modbus RTU protocol on TCP/IP network
CN103929439A (en) * 2014-05-07 2014-07-16 昆山华恒焊接股份有限公司 Data transmission method and MODBUS server
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010018712A1 (en) * 1998-10-06 2001-08-30 Schneider Automation Inc. Messaging application layer (modbus) over ethernet to transport layer (TCP) communications method and apparatus for a modular terminal input/output system
CN101420435A (en) * 2008-11-18 2009-04-29 上海电力学院 Communication protocol conversion device and method based on embedded multiple MCU
CN102045334A (en) * 2010-09-27 2011-05-04 北京泰豪智能工程有限公司 Protocol conversion method and device
CN102053935A (en) * 2010-11-25 2011-05-11 广东雅达电子股份有限公司 MODBUS serial communication protocol-based communication method
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN102546619A (en) * 2011-12-29 2012-07-04 浙江工业大学 Modbus protocol conversion system based on 3G (The 3rd Generation Telecommunication) Internet access
CN103454981A (en) * 2012-05-29 2013-12-18 苏州汇云鼎信息科技有限公司 Embedded multiple master-slave Modbus controller
CN103546467A (en) * 2013-10-23 2014-01-29 上海爱控自动化设备有限公司 Method for transmitting Modbus RTU protocol on TCP/IP network
CN103929439A (en) * 2014-05-07 2014-07-16 昆山华恒焊接股份有限公司 Data transmission method and MODBUS server
CN104038499A (en) * 2014-06-17 2014-09-10 宁波三星电气股份有限公司 MODBUS RTU protocol based data transmission method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106533621A (en) * 2016-11-15 2017-03-22 合肥工业大学智能制造技术研究院 Communication method for monitoring permanent magnet synchronous motor in real time based on simplified MODBUS protocol
CN106533621B (en) * 2016-11-15 2019-07-19 合肥工业大学智能制造技术研究院 The means of communication of permanent magnet synchronous motor real time monitoring based on simplified MODBUS agreement
CN109246203A (en) * 2018-08-24 2019-01-18 日立楼宇技术(广州)有限公司 Data communication method, device, computer equipment and storage medium
CN109246203B (en) * 2018-08-24 2021-07-06 日立楼宇技术(广州)有限公司 Data communication method, device, computer equipment and storage medium
CN110221937A (en) * 2019-06-05 2019-09-10 河南卫华重型机械股份有限公司 A kind of analytic method of communication between plates data
CN111327493A (en) * 2020-01-23 2020-06-23 北京和利时系统工程有限公司 Data acquisition method and device
CN112269351A (en) * 2020-12-25 2021-01-26 中国航空油料集团有限公司 PLC-based data processing method and system, electronic device and storage medium
CN112269351B (en) * 2020-12-25 2021-05-11 中国航空油料集团有限公司 PLC-based data processing method and system, electronic device and storage medium
CN114448947A (en) * 2022-01-17 2022-05-06 武汉魅客科技有限公司 Device for improving automatic adaptation of intelligent gateway to multiple message formats

Also Published As

Publication number Publication date
CN104580187B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN104580187A (en) Method for achieving interaction of external devices of different MODULEBUS protocols and server
CN105491017B (en) The more equipment multi-protocol analysis method and system of RS485 buses
CN101207604B (en) Virtual machine system and communication processing method thereof
CN101877659B (en) Method, device and system for monitoring packet loss
EP3490304B1 (en) Method for identifying access point and hotspot, and related products
US20100202451A1 (en) Modified internet protocol (ip) data packet for asynchronous ip communications
CN101605078B (en) Power system communication server based on WEB mass communication modes and control method thereof
CN102404306B (en) Protocol configuration method and device
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN104283749A (en) Communication system based on RS-485 half-duplex bus and service disc communication upgrading method
JP5792866B2 (en) Profibus DP master device
CN109936566B (en) Data transmission method, system and device and computer readable storage medium
CN106534342B (en) Connect control method, host and system
CN101119374A (en) iSCSI communication method and corresponding initiation equipment and objective equipment
CN103763167B (en) Communication system and communication method thereof
CN103973677A (en) Protocol conversion device from IPv6 to PROFIBUS
WO2016110070A1 (en) Data acquiring method and device, and storage medium
JP5931224B2 (en) Data access method and apparatus
CN103781098A (en) Wireless network adapter and method for configuring same
CN101902458A (en) Interprocess communication method across host machine, device thereof and system thereof
CN105281944B (en) Method for setting network protocol address and service management system
CN103533001A (en) Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server
CN101662391B (en) SNMPv3-based cluster management method of Ethernet switches
CN106845974B (en) Method and device for realizing point-to-point communication of near field communication
CN102932208A (en) Site monitoring method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220629

Address after: 361000 Room 502, No. 58, Binlang Dongli, Siming District, Xiamen City, Fujian Province

Patentee after: XIAMEN GUANGKONG IOT TECHNOLOGY CO.,LTD.

Address before: 361012 room 10e, No. 4, Luling Road, Siming District, Xiamen City, Fujian Province

Patentee before: XIAMEN WINER TECHNOLOGY Co.,Ltd.