CN105491017A - RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system - Google Patents

RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system Download PDF

Info

Publication number
CN105491017A
CN105491017A CN201510821145.2A CN201510821145A CN105491017A CN 105491017 A CN105491017 A CN 105491017A CN 201510821145 A CN201510821145 A CN 201510821145A CN 105491017 A CN105491017 A CN 105491017A
Authority
CN
China
Prior art keywords
data
layer
protocol
bus
equipment
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
CN201510821145.2A
Other languages
Chinese (zh)
Other versions
CN105491017B (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.)
Taihua Wisdom Industry Group Co Ltd
Original Assignee
Taihua Wisdom Industry Group 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 Taihua Wisdom Industry Group Co Ltd filed Critical Taihua Wisdom Industry Group Co Ltd
Priority to CN201510821145.2A priority Critical patent/CN105491017B/en
Publication of CN105491017A publication Critical patent/CN105491017A/en
Application granted granted Critical
Publication of CN105491017B publication Critical patent/CN105491017B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses an RS485 bus multi-device multi-protocol analysis method and an RS485 bus multi-device multi-protocol analysis system, wherein the system comprises a physical layer, a data link layer and an application layer; the physical layer is located at the lowermost layer of an RS485 bus three-tier protocol, and takes charge of link establishment, release and data receiving and transmitting of an RS485 bus physical link; the data link layer is located at the middle layer of the RS485 bus three-tier protocol, and for data packets from the physical layer, identifies related data of the data packets and submits valid data to the application layer for processing; and for the data packets from the application layer, the data link layer adds related parameters of data, constructs a complete communication frame, and submits the data packets to the physical layer in a manner of transmitting messages to the physical layer; and the application layer is located at the topmost layer of the RS485 bus three-tier protocol, and processes the data packets from the data link layer according to command codes. The method and the system, provided by the invention, overcome a problem that the conventional RS485 bus host device tries to analyze protocols one by one and consequently causes low efficiency and a slow speed in the identification of various slave devices.

Description

RS485 bus many equipment multi-protocol analysis method and system
Technical field
The present invention relates to Industry Control fieldbus RS485 bussing technique, be specifically related to a kind of method and system of RS485 bus many equipment multi-protocol analysis.
Background technology
Often run into a main equipment in Industry Control to need and some communication from equipment, its network topology structure is the host-guest architecture of one-to-many, now uses the RS485 bus of low cost to be most economical practicality.RS485 bus is supported the master-slave network structure of one-to-many, is not respectively communicated between node, and all communication is all initiated by main equipment, and main equipment is realized and each communication from equipment by the inquiry/response communication method of question-response.
In scene, main equipment may need mounting some from equipment, such as be with the electric energy meter of the Temperature Humidity Sensor of RS485 interface, band RS485 interface, the light sensor of band RS485 interface, because RS485 bus merely specify the physical layer electrical characteristic of communication, do not specify link layer communication protocols, therefore the RS485 of each producer can run proprietary protocol from equipment, like this for main equipment, can identify run different agreement from equipment be exactly the very corn of a subject.
For same category of device, owing to running identical agreement, main equipment is identified from equipment by " from the device address " in communication protocol.
For inhomogeneous equipment, owing to running different agreements, main equipment needs to call other a set of communication protocol, in communication protocol, utilize " identifying from equipment from device address " equally.Specific practice is exactly that main equipment sends inquiry message, then the data that return from equipment of wait-receiving mode, traditional way is the sending module of agreement and the parsing module of agreement is completely independently, and only have a protocol resolution module, in this protocol resolution module, a kind of communication protocol of each use attempts resolving to acknowledgement frame, if energy successfully resolved, extracts data, otherwise use lower a kind of communication protocol, therefore the problem caused is when carrying out protocol analysis and does not know the agreement from equipment that will return, now may occur that acknowledgement frame data are that electric energy meter returns, but humiture agreement is taken to go to resolve, also may occur that reply data is humiture, but the agreement of electric energy meter is taken to go to resolve, when few from device category time, this way of attempting one by one is to receive reluctantly, but in time having tens kinds of equipment, this way of attempting resolving one by one, with regard to suitable time-consuming, common way is exactly change the CPU in main equipment, use arithmetic speed CPU faster instead, the way of this use arithmetic speed CPU faster, hardware cost is also high simultaneously, although to a certain extent can problem, if but there are the words of 50 kinds of equipment, whole trial is resolved for one time, still slowly, so this way is not still dealt with problems thoroughly.
Summary of the invention
For solving the deficiency that prior art exists, the invention discloses RS485 bus many equipment multi-protocol analysis method and system, the parsing of agreement is divided into three layers, physical layer, data link layer, application layer respectively, Each performs its own functions for this three layer protocol, and each interlayer is communicated by the mode sending message.
RS485 bus many equipment multi-protocol analysis method, comprises the following steps:
Step one: application layer initialization, according to user instruction identification accordingly from equipment, data group bag is carried out according to the application layer communication protocol from equipment, build main equipment data query bag, and in the mode sending message, packet is submitted to data link layer, the protocol analysis function of this equipment is registered to data link layer simultaneously;
Step 2: after data link layer receives application layer data bag, structure communication frame, then submits to physical layer by communication frame in the mode sending message;
Step 3: after physical layer receives communication frame, according to the physical layer configurations preset, by data flow to RS485 bus;
Step 4: all RS485 can receive the communication frame of main equipment transmission from equipment, but only have identical with its own protocol frame from equipment could be correct communication frame is resolved correctly, further only have that Self address consistent with destination address in communication frame just can return acknowledgement frame from equipment;
Step 5: main equipment receives acknowledgement frame from RS485 bus, after physical layer receives data, put into reception data buffer, in certain time-out, do not receive fresh character, think reply data frame end, all acknowledgement frame packets received are submitted to data link layer by physical layer;
Step 6: data link layer calls the protocol stack analytical function of registration, completes the parsing of acknowledgement frame data, then valid data is submitted to application layer; Application layer completes the extraction of data.
Further, also comprise the step detecting user instruction after application layer initialization before user instruction identification, detect whether have user instruction, if do not have user instruction, delay adjustments detects after the time again.
Further, data link layer calls the protocol stack analytical function of registration, often kind of different agreement from its protocol stack analytical function of equipment be different, in protocol analysis call back function be only responsible for resolve this device protocol, when the parsing of data, concrete steps are:
A, searches start-of-frame, if can not find, then result code is FALSE; If found, proceed to B;
B, searches data length, if data length is invalid, then result code is FALSE; If data length is effective, enter C;
C, carries out data check, if check errors, then result code is FALSE; If data check is correct, enter D;
D, search frame end symbol, if can not find, then result code is FALSE; If found, returning results code is TRUE;
After the protocol stack of data link layer is resolved, if frame is normal, valid data are extracted, and submit valid data to application layer in the mode sending message queue to application layer, then empty data, if frame is abnormal, then directly empty data.
Further, when main equipment is communicating with from equipment, this protocol stack parsing module from equipment is registered, namely protocol analysis function is articulated to data link layer protocol analytical function as call back function, data link layer performs the identification that the protocol analysis call back function registered carries out communication frame above, and then extracted valid data, further valid data is submitted to application layer protocol and processes, carry out the process of concrete function code in application layer, thus complete a communication process.
Further, physical layer adopts interrupt mode to carry out reception and the transmission of data;
When physical layer adopts interrupt mode to carry out data transmission, a byte sends rear CPU and produces transmission interruption, in transmission break in service, transmission data length is deducted 1, if send data length to be greater than 0, continue to send data, if equal 0, illustrate that total data sends, now close to send and interrupt, send and terminate;
The reception of physical layer data adopts the mode of interrupting, often receive a byte from RS485 bus, CPU produces an interruption, the data received are saved in the reception data buffer of the overall situation in break in service, and reception data length is added 1, after often receiving a byte, all restart a timer, in agreement official hour, do not have new data to arrive, then think present communications frame end, then the packet received is submitted to data link layer deals.
RS485 bus many equipment multi-protocol analysis system, comprising: physical layer, data link layer and application layer;
Physical layer is positioned at the bottom of RS485 bus three layer protocol, the link being responsible for RS485 bus physical link is set up, release and the reception of data, transmission;
Data link layer is positioned at the intermediate layer of RS485 bus three layer protocol, for the packet from physical layer, identifies packet related data, then valid data is submitted to application layer and process; For the packet from application layer, add data relevant parameter, construct complete communication frame, and by the mode sending message to physical layer, packet is submitted to physical layer;
Application layer is positioned at the most top layer of RS485 bus three layer protocol, processes according to command code for the packet from data link layer;
Wherein, corresponding protocol stack parsing module is provided with for often kind of different agreement from equipment in data link layer, protocol stack parsing module is used for protocol analysis function to be articulated to data link layer protocol analytical function as call back function, the reception protocol stack from device protocol type determination data link layer that main equipment is just corresponding according to protocol stack parsing module when sending data, thus receiving after device acknowledge data, call rapidly corresponding protocol stack and parse message.
Further, in application layer, the function that different command codes is corresponding different, for the command code needing response, by user application organizations layer data, the mode then by sending message submits to data link layer; For the command code not needing to reply, this layer protocol only extracts user data and preserves.
Further, for the packet received from RS485 bus, after physical layer detects that communication frame terminates, in the mode sending message to data link layer, packet is submitted to data link layer, for the packet from data link layer, data are directly sent to RS485 bus by physical layer.
Further, in data link layer, perform registration protocol analysis call back function, often kind of different agreement from its protocol stack analytical function of equipment be different, in protocol analysis call back function be only responsible for resolve this device protocol, after the protocol stack of data link layer is resolved, if frame is normal, valid data are extracted, and submit valid data to application layer in the mode sending message queue to application layer, then empty data, if frame is abnormal, then directly empty data.
Further, above-mentioned RS485 bus many equipment multi-protocol analysis system also comprises user instruction module, for detecting whether have user instruction, if there is no user instruction, delay adjustments detects after the time again, have, carry out user instruction identification, now carry out data group bag according to the corresponding application layer communication protocol from equipment, build main equipment data query bag, and in the mode sending message, packet is submitted to data link layer, this protocol resolution module from equipment is registered to data link layer simultaneously.
Beneficial effect of the present invention:
The present invention specifically will often kind of device protocol parsing module, by shifting to an earlier date log-in protocol parsing module in a data link layer, inform the protocol analysis call back function that data link layer is concrete, thus known protocol analytical function is directly called in protocol resolution module, thus overcome the agreement trial parsing one by one of traditional RS485 bus host device, and the identification caused is multiple low from device efficiency, slow-footed problem.
Accompanying drawing explanation
Fig. 1 protocol layer of the present invention divides;
Fig. 2 a-Fig. 2 b physical layer communication flow chart of the present invention;
Fig. 3 data link layer communication flow chart of the present invention;
Fig. 4 data link layer of the present invention is according to log-in protocol stack parsing module analysis protocol flow chart;
The several frequently seen RS485 of Fig. 5 is from devices communicating protocol frame format;
Fig. 6 application layer communication flow chart of the present invention.
Embodiment:
Below in conjunction with accompanying drawing, the present invention is described in detail:
As shown in Figure 1, protocol layer is designed to physical layer, data link layer, application layer by the present invention.A process of every layer of corresponding embedded real-time operating system, every layer has the independently process space, and Each performs its own functions for each layer, communicates in the mode of a message queue, message mailbox, semaphore.
Physical layer of the present invention is responsible for the foundation of RS485 bus physical link, the reception of release and data, transmission.For the packet received from RS485 bus, after physical layer detects that communication frame terminates, in the mode sending message to data link layer, packet is submitted to data link layer.For the packet from data link layer, directly data are sent to RS485 bus.
The transmission of physical layer data has two kinds of modes usually, and one is CPU inquiry mode, and advantage is that handling process is simple, and shortcoming is that CPU usage is too high; It two is interrupt mode, relative inquiry mode handling process is complicated, but CPU usage is extremely low, the present invention is designed to improve communication speed, reduce CPU usage, interrupt mode is adopted to carry out reception and the transmission of data, as shown in Fig. 2 a-Fig. 2 b, a byte sends rear CPU and produces transmission interruption, in transmission break in service, transmission data length is deducted 1, if send data length to be greater than 0, continue to send data, if equal 0, illustrate that total data sends, now close to send and interrupt, send and terminate.
The reception of physical layer data adopts the mode of interrupting, often receive a byte from RS485 bus, CPU produces an interruption, the data received are saved in the reception data buffer of the overall situation in break in service, and reception data length is added 1, after often receiving a byte, all restart a timer, in agreement official hour, do not have new data to arrive, then think present communications frame end, then the packet received is submitted to data link layer deals.
As shown in Figure 3, data link layer of the present invention, for the Frame from physical layer, this layer protocol identifies start-of-frame, destination address, source address, data length, valid data, check code, frame end symbol etc., if destination address mates with Self address in Frame, then valid data are submitted to application layer and process; For the packet from application layer, this agreement adds start-of-frame, destination address, source address, data length, check code, frame end symbol, constructs complete communication frame, and in the mode sending message to physical layer, communication frame is submitted to physical layer.
The core of data link layer is to from the scanning of physical layer communication frame, identification, extracts.Because different types of RS485 is different from devices communicating agreement, therefore need to design different protocol stack parsing modules, Fig. 5 illustrates that several frequently seen RS485 is from devices communicating protocol frame format.
Pin of the present invention in data link layer for a kind of protocol stack parsing module of often kind of different agreement equipment de-sign, the present invention mounts 3 kinds from equipment (Temperature Humidity Sensor with main equipment, current acquisition module, multifunctional electric energy meter) be example description protocol stack modular design, such as to Temperature Humidity Sensor design Temperature Humidity Sensor protocol stack parsing module, to current acquisition modular design current acquisition module protocol stack parsing module, to DL/T645-2007 multifunctional electric energy meter design multifunction electric meter protocol stack parsing module, equipment for often kind of different agreement all carries out agreement, such realization often plants RS485 from equipment and protocol stack parsing module one_to_one corresponding.
When main equipment is communicating with from equipment, the protocol stack parsing module of this equipment is registered, namely protocol analysis function is articulated to data link layer protocol analytical function as call back function, after communication frame sends by main equipment, enter data receiving state, its physical layer does not receive fresh character in certain time-out, can think present frame sign off, communication frame can be submitted to data link layer, data link layer performs the identification that the protocol analysis call back function registered carries out communication frame above, and then extracted valid data, further valid data are submitted to application layer protocol to process, the process of concrete function code is carried out in application layer, thus complete a communication process.
Application layer is positioned at the most top layer of RS485 bus three layer protocol, resolves according to command code for the packet from data link layer, the function that different command codes is corresponding different.For the command code needing response, by user application organizations layer data, the mode then by sending message submits to data link layer; For the command code not needing to reply, this layer protocol only extracts user data and preserves.
In the present invention main frame when sending data just according to the reception protocol stack from device protocol type determination data link layer, thus receiving after device acknowledge data, call rapidly corresponding protocol stack and parse message, no matter have how many kinds of like this from equipment, there is not the scanning of various protocols stack in its resolving, so its parsing time is fixing.
As shown in Figure 4, for data link layer of the present invention is according to log-in protocol stack parsing module analysis protocol flow chart, the protocol analysis call back function of registration before data link layer can perform, its protocol stack analytical function of the slave devices of often kind of different agreement is different, only be responsible for resolving this device protocol in protocol analysis call back function, its flow process is as follows:
The first step, searches start-of-frame, can not find, then result code is FALSE; Find, enter next step.
Second step, searches data length, if data length is invalid, then result code is FALSE; If data length is effective, enter the 3rd step.
3rd step, carries out data check, if check errors, then result code is FALSE; If data check is correct, enter the 4th step.
4th step, search frame end symbol, if can not find, then result code is FALSE; If found, returning results code is TRUE.
After the protocol stack of data link layer is resolved, if frame is normal, valid data are extracted, and submit valid data to application layer in the mode sending message queue to application layer, then empty data.If frame is abnormal, then directly empty data.
As shown in Figure 5, for several frequently seen RS485 is from devices communicating protocol frame format.
As shown in Figure 6, be application layer data flow process figure of the present invention, after application layer module initialization, enter a cyclic process repeatedly, cycle period is 10 milliseconds, and here is detailed processing procedure:
Whether A, detection have user instruction.If there is no user instruction, detect again after time delay 10 milliseconds, have, enter next step.
B, identification user instruction.User instruction may be humiture, current acquisition, electric energy meter data reading system, now carry out data group bag according to the application layer communication protocol of relevant device, build main equipment data query bag, and in the mode sending message, packet is submitted to data link layer, the protocol resolution module of this equipment is registered to data link layer simultaneously.
After C, data link layer receive application layer data bag, add start-of-frame, data length, check code, frame end symbol structure communication frame.Then communication frame is submitted to physical layer in the mode sending message.
After D, physical layer receive communication frame, according to preset physical layer configurations, such as baud rate, start bit, data bit, position of rest etc. by data flow to RS485 bus.
E, all RS485 can receive the inquiry frame of main equipment transmission from equipment, but only have identical with its own protocol frame from equipment could be correct communication frame is resolved correctly, further only have that Self address consistent with destination address in communication frame just can return acknowledgement frame from equipment.
F, main equipment receive and receive acknowledgement frame from RS485 bus, after physical layer receives data, put into reception data buffer, in certain time-out, do not receive fresh character, think reply data frame end, all acknowledgement frame packets received are submitted to data link layer by physical layer.
G, data link layer call the protocol stack analytical function registered in preceding step, start-of-frame, destination address, source address, check code, frame end symbol etc. are found in analytical function, and then complete the parsing of acknowledgement frame data, then valid data are submitted to application layer.
H, application layer protocol abstraction function code etc., complete the extraction of application layer data, such as extract humiture or voltage, electric current, power factor or meter reading data etc.
Key of the present invention is G step, for the Frame received, the protocol resolution module registered when calling transmission, directly resolve, the carrying out of protocol stack one by one is not needed to attempt, thus can avoid the shortcoming of agreement trial parsing one by one in traditional multi-protocol analysis module, greatly accelerate protocol analysis speed, and make the parsing of protocol stack by kind, the restricted number of RS485 from machine.
By reference to the accompanying drawings the specific embodiment of the present invention is described although above-mentioned; but not limiting the scope of the invention; one of ordinary skill in the art should be understood that; on the basis of technical scheme of the present invention, those skilled in the art do not need to pay various amendment or distortion that creative work can make still within protection scope of the present invention.

Claims (10)

1.RS485 bus many equipment multi-protocol analysis method, is characterized in that, comprise the following steps:
Step one: application layer initialization, according to user instruction identification accordingly from equipment, data group bag is carried out according to the application layer communication protocol from equipment, build main equipment data query bag, and in the mode sending message, packet is submitted to data link layer, the protocol analysis function of this equipment is registered to data link layer simultaneously;
Step 2: after data link layer receives application layer data bag, structure communication frame, then submits to physical layer by communication frame in the mode sending message;
Step 3: after physical layer receives communication frame, according to the physical layer configurations preset, by data flow to RS485 bus;
Step 4: all RS485 can receive the communication frame of main equipment transmission from equipment, but only have identical with its own protocol frame from equipment could be correct communication frame is resolved correctly, further only have that Self address consistent with destination address in communication frame just can return acknowledgement frame from equipment;
Step 5: main equipment receives acknowledgement frame from RS485 bus, after physical layer receives data, put into reception data buffer, in certain time-out, do not receive fresh character, think reply data frame end, all acknowledgement frame packets received are submitted to data link layer by physical layer;
Step 6: data link layer calls the protocol stack analytical function of registration, completes the parsing of acknowledgement frame data, then valid data is submitted to application layer; Application layer completes the extraction of data.
2. RS485 bus many equipment multi-protocol analysis method as claimed in claim 1, it is characterized in that, after application layer initialization, before user instruction identification, also comprise the step detecting user instruction, detect whether have user instruction, if do not have user instruction, delay adjustments detects after the time again.
3. RS485 bus many equipment multi-protocol analysis method as claimed in claim 1, it is characterized in that, data link layer calls the protocol stack analytical function of registration, often kind of different agreement from its protocol stack analytical function of equipment be different, only be responsible for resolving this device protocol in protocol analysis call back function, when the parsing of data, concrete steps are:
A, searches start-of-frame, if can not find, then result code is FALSE; If found, proceed to B;
B, searches data length, if data length is invalid, then result code is FALSE; If data length is effective, enter C;
C, carries out data check, if check errors, then result code is FALSE; If data check is correct, enter D;
D, search frame end symbol, if can not find, then result code is FALSE; If found, returning results code is TRUE;
After the protocol stack of data link layer is resolved, if frame is normal, valid data are extracted, and submit valid data to application layer in the mode sending message queue to application layer, then empty data, if frame is abnormal, then directly empty data.
4. the RS485 bus many equipment multi-protocol analysis method as described in claim 1 or 3, it is characterized in that, when main equipment is communicating with from equipment, this protocol stack parsing module from equipment is registered, namely protocol analysis function is articulated to data link layer protocol analytical function as call back function, data link layer performs the identification that the protocol analysis call back function registered carries out communication frame above, and then extracted valid data, further valid data are submitted to application layer protocol to process, the process of concrete function code is carried out in application layer, thus complete a communication process.
5. RS485 bus many equipment multi-protocol analysis method as claimed in claim 1, is characterized in that, physical layer adopts interrupt mode to carry out reception and the transmission of data;
When physical layer adopts interrupt mode to carry out data transmission, a byte sends rear CPU and produces transmission interruption, in transmission break in service, transmission data length is deducted 1, if send data length to be greater than 0, continue to send data, if equal 0, illustrate that total data sends, now close to send and interrupt, send and terminate;
The reception of physical layer data adopts the mode of interrupting, often receive a byte from RS485 bus, CPU produces an interruption, the data received are saved in the reception data buffer of the overall situation in break in service, and reception data length is added 1, after often receiving a byte, all restart a timer, in agreement official hour, do not have new data to arrive, then think present communications frame end, then the packet received is submitted to data link layer deals.
6.RS485 bus many equipment multi-protocol analysis system, is characterized in that, comprising: physical layer, data link layer and application layer;
Physical layer is positioned at the bottom of RS485 bus three layer protocol, the link being responsible for RS485 bus physical link is set up, release and the reception of data, transmission;
Data link layer is positioned at the intermediate layer of RS485 bus three layer protocol, for the packet from physical layer, identifies packet related data, then valid data is submitted to application layer and process; For the packet from application layer, add data relevant parameter, construct complete communication frame, and by the mode sending message to physical layer, packet is submitted to physical layer;
Application layer is positioned at the most top layer of RS485 bus three layer protocol, processes according to command code for the packet from data link layer;
Wherein, corresponding protocol stack parsing module is provided with for often kind of different agreement from equipment in data link layer, protocol stack parsing module is used for protocol analysis function to be articulated to data link layer protocol analytical function as call back function, the reception protocol stack from device protocol type determination data link layer that main equipment is just corresponding according to protocol stack parsing module when sending data, thus receiving after device acknowledge data, call rapidly corresponding protocol stack and parse message.
7. RS485 bus many equipment multi-protocol analysis system as claimed in claim 6, it is characterized in that, in application layer, the function that different command codes is corresponding different, for the command code needing response, by user application organizations layer data, the mode then by sending message submits to data link layer; For the command code not needing to reply, this layer protocol only extracts user data and preserves.
8. RS485 bus many equipment multi-protocol analysis system as claimed in claim 6, it is characterized in that, for the packet received from RS485 bus, after physical layer detects that communication frame terminates, in the mode sending message to data link layer, packet is submitted to data link layer, for the packet from data link layer, data are directly sent to RS485 bus by physical layer.
9. RS485 bus many equipment multi-protocol analysis system as claimed in claim 6, it is characterized in that, in data link layer, perform the protocol analysis call back function of registration, often kind of different agreement from its protocol stack analytical function of equipment be different, only be responsible for resolving this device protocol in protocol analysis call back function, after the protocol stack of data link layer is resolved, if frame is normal, valid data are extracted, and submit valid data to application layer in the mode sending message queue to application layer, then empty data, if frame is abnormal, then directly empty data.
10. the RS485 bus many equipment multi-protocol analysis system as described in as arbitrary in claim 6-9, it is characterized in that, also comprise user instruction module, for detecting whether have user instruction, if there is no user instruction, delay adjustments detects after the time again, have, carry out user instruction identification, now carry out data group bag according to the corresponding application layer communication protocol from equipment, build main equipment data query bag, and in the mode sending message, packet is submitted to data link layer, this protocol resolution module from equipment is registered to data link layer simultaneously.
CN201510821145.2A 2015-11-23 2015-11-23 The more equipment multi-protocol analysis method and system of RS485 buses Active CN105491017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510821145.2A CN105491017B (en) 2015-11-23 2015-11-23 The more equipment multi-protocol analysis method and system of RS485 buses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510821145.2A CN105491017B (en) 2015-11-23 2015-11-23 The more equipment multi-protocol analysis method and system of RS485 buses

Publications (2)

Publication Number Publication Date
CN105491017A true CN105491017A (en) 2016-04-13
CN105491017B CN105491017B (en) 2018-05-15

Family

ID=55677735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510821145.2A Active CN105491017B (en) 2015-11-23 2015-11-23 The more equipment multi-protocol analysis method and system of RS485 buses

Country Status (1)

Country Link
CN (1) CN105491017B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026767A (en) * 2017-03-30 2017-08-08 上海七牛信息技术有限公司 Service protocol achievement data collection method and system
CN107863140A (en) * 2017-11-06 2018-03-30 贵阳朗玛信息技术股份有限公司 The processing method and processing device of DICOM file
CN107942769A (en) * 2017-10-09 2018-04-20 深圳市瑞凌实业股份有限公司 The communication system and method for digital power and a variety of digital welding equipments
CN108305628A (en) * 2017-06-27 2018-07-20 腾讯科技(深圳)有限公司 Audio recognition method, device, computer equipment and storage medium
CN109510759A (en) * 2018-10-22 2019-03-22 智强通达科技(北京)有限公司 A kind of Universal-purpose quick multi-protocol gateway realization system and method
CN110391877A (en) * 2019-06-25 2019-10-29 浙江海印数码科技有限公司 A kind of serial communication method and device
CN110445752A (en) * 2019-06-28 2019-11-12 福建星云电子股份有限公司 A kind of implementation method for supporting a variety of CAN devices and flexibly parse all kinds of CAN messages
CN110519136A (en) * 2019-07-10 2019-11-29 大城绿川(深圳)科技有限公司 A kind of RS485 multi-machine communication system of adaptive networking
CN111385172A (en) * 2018-12-27 2020-07-07 杭州萤石软件有限公司 Control system, control method and storage medium based on bus
CN111552274A (en) * 2018-01-08 2020-08-18 深圳市道通科技股份有限公司 Automobile diagnosis method, device, equipment, system and diagnosis connecting equipment
CN112489409A (en) * 2020-11-06 2021-03-12 烽火通信科技股份有限公司 Data processing method and system for hybrid access of multi-protocol Internet of things terminal to RS485 bus
CN112527720A (en) * 2020-12-05 2021-03-19 青岛鼎信通讯股份有限公司 Data communication method applied to rack-mounted plant station terminal
CN113206720A (en) * 2021-04-08 2021-08-03 江苏科大亨芯半导体技术有限公司 Method and device for realizing top-adjusting message path
CN115037795A (en) * 2022-06-16 2022-09-09 上海睿赛德电子科技有限公司 Multi-machine communication method for embedded equipment
CN115334175A (en) * 2022-09-13 2022-11-11 浙江正泰物联技术有限公司 Multi-protocol self-adaptive analysis method, internet of things metering device, equipment and medium
CN115914415A (en) * 2022-11-11 2023-04-04 贵州电网有限责任公司 RS485 communication fault detection method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62274956A (en) * 1986-05-23 1987-11-28 Mitsubishi Electric Corp Protocol analyzer additional device
JP2002217921A (en) * 2001-01-22 2002-08-02 Yokogawa Electric Corp Bus analyzer
US20110040809A1 (en) * 2008-04-03 2011-02-17 Electro Industries/Gauge Tech. System and method for improved data transfer from an ied
CN102045334A (en) * 2010-09-27 2011-05-04 北京泰豪智能工程有限公司 Protocol conversion method and device
CN102279835A (en) * 2011-06-29 2011-12-14 厦门雅迅网络股份有限公司 Serial bus communication method and dynamic recognition method of master equipment and slave equipment in embedded system
US20140198713A1 (en) * 2013-01-11 2014-07-17 Electronics And Telecommunications Research Institute Device and method for supporting internet-based sensor data transmission
CN104796415A (en) * 2015-04-07 2015-07-22 上海大学 Method for converting protocols of TCP (transmission control protocol) networks and multiple protocols on RS485 buses

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62274956A (en) * 1986-05-23 1987-11-28 Mitsubishi Electric Corp Protocol analyzer additional device
JP2002217921A (en) * 2001-01-22 2002-08-02 Yokogawa Electric Corp Bus analyzer
US20110040809A1 (en) * 2008-04-03 2011-02-17 Electro Industries/Gauge Tech. System and method for improved data transfer from an ied
CN102045334A (en) * 2010-09-27 2011-05-04 北京泰豪智能工程有限公司 Protocol conversion method and device
CN102279835A (en) * 2011-06-29 2011-12-14 厦门雅迅网络股份有限公司 Serial bus communication method and dynamic recognition method of master equipment and slave equipment in embedded system
US20140198713A1 (en) * 2013-01-11 2014-07-17 Electronics And Telecommunications Research Institute Device and method for supporting internet-based sensor data transmission
CN104796415A (en) * 2015-04-07 2015-07-22 上海大学 Method for converting protocols of TCP (transmission control protocol) networks and multiple protocols on RS485 buses

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107026767A (en) * 2017-03-30 2017-08-08 上海七牛信息技术有限公司 Service protocol achievement data collection method and system
CN107026767B (en) * 2017-03-30 2019-10-18 上海七牛信息技术有限公司 Service protocol achievement data collection method and system
CN108305628A (en) * 2017-06-27 2018-07-20 腾讯科技(深圳)有限公司 Audio recognition method, device, computer equipment and storage medium
CN108305628B (en) * 2017-06-27 2020-10-02 腾讯科技(深圳)有限公司 Speech recognition method, speech recognition device, computer equipment and storage medium
CN107942769A (en) * 2017-10-09 2018-04-20 深圳市瑞凌实业股份有限公司 The communication system and method for digital power and a variety of digital welding equipments
CN107863140A (en) * 2017-11-06 2018-03-30 贵阳朗玛信息技术股份有限公司 The processing method and processing device of DICOM file
CN111552274A (en) * 2018-01-08 2020-08-18 深圳市道通科技股份有限公司 Automobile diagnosis method, device, equipment, system and diagnosis connecting equipment
CN109510759A (en) * 2018-10-22 2019-03-22 智强通达科技(北京)有限公司 A kind of Universal-purpose quick multi-protocol gateway realization system and method
CN109510759B (en) * 2018-10-22 2021-08-06 智强通达科技(北京)有限公司 System and method for realizing rapid universal multi-protocol gateway
CN111385172B (en) * 2018-12-27 2021-11-26 杭州萤石软件有限公司 Control system, control method and storage medium based on bus
CN111385172A (en) * 2018-12-27 2020-07-07 杭州萤石软件有限公司 Control system, control method and storage medium based on bus
CN110391877A (en) * 2019-06-25 2019-10-29 浙江海印数码科技有限公司 A kind of serial communication method and device
CN110445752A (en) * 2019-06-28 2019-11-12 福建星云电子股份有限公司 A kind of implementation method for supporting a variety of CAN devices and flexibly parse all kinds of CAN messages
CN110445752B (en) * 2019-06-28 2022-08-30 福建星云电子股份有限公司 Implementation method for supporting various CAN devices and flexibly analyzing various CAN messages
CN110519136A (en) * 2019-07-10 2019-11-29 大城绿川(深圳)科技有限公司 A kind of RS485 multi-machine communication system of adaptive networking
CN112489409A (en) * 2020-11-06 2021-03-12 烽火通信科技股份有限公司 Data processing method and system for hybrid access of multi-protocol Internet of things terminal to RS485 bus
CN112527720A (en) * 2020-12-05 2021-03-19 青岛鼎信通讯股份有限公司 Data communication method applied to rack-mounted plant station terminal
CN113206720A (en) * 2021-04-08 2021-08-03 江苏科大亨芯半导体技术有限公司 Method and device for realizing top-adjusting message path
CN115037795A (en) * 2022-06-16 2022-09-09 上海睿赛德电子科技有限公司 Multi-machine communication method for embedded equipment
CN115037795B (en) * 2022-06-16 2024-02-02 上海睿赛德电子科技有限公司 Multi-machine communication method for embedded equipment
CN115334175A (en) * 2022-09-13 2022-11-11 浙江正泰物联技术有限公司 Multi-protocol self-adaptive analysis method, internet of things metering device, equipment and medium
CN115914415A (en) * 2022-11-11 2023-04-04 贵州电网有限责任公司 RS485 communication fault detection method and system

Also Published As

Publication number Publication date
CN105491017B (en) 2018-05-15

Similar Documents

Publication Publication Date Title
CN105491017A (en) RS485 bus multi-device multi-protocol analysis method and RS485 bus multi-device multi-protocol analysis system
CN109981435B (en) Gateway and communication system based on CAN-ModBus to MQTT
WO2011149252A2 (en) Nas-based signaling protocol for overload protection of random access in massive machine type communication
CN105430113A (en) SDN APR message processing method and device, SDN controller and SDN switch
CN103368849A (en) OAM (Operations, Administration and Management) message processing method and device
CN105262683A (en) Network system and method of controlling path
CN105989539A (en) Financial trading condition acquisition system and method
CN107959620B (en) Fully mechanized mining equipment identification method, device, system, gateway and storage medium
CN103595598A (en) Remote transparent transmission serial server based on fiber and control mode thereof
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN103036780A (en) Intelligent hot standby redundant double network cards and hot standby redundant method
CN101924659A (en) Network equipment and method for detecting links of physical ports of same
CN102195946A (en) Intelligent communication controller based on ARM (Advanced RISC Machines) technology
CN104580187B (en) A method of realizing that the external device of different MODULEBUS agreements is interacted with server
CN103684857A (en) Method and device for setting working modes of member ports of stacking ports of switchboards
CN101119374B (en) iSCSI communication method and corresponding initiation equipment and objective equipment
CN105243039A (en) Serial port communication system and method
CN1281563A (en) Network controller for processing status queries
CN102065508B (en) Wireless bridge forwarding equipment and method
CN106657115A (en) Frequency converter control system and protocol conversion card thereof
CN106301871A (en) A kind of forwarding detection (BFD) method based on lacp and system
CN104486217A (en) Cross network message transmitting method and equipment
CN101105747A (en) Power station communication system and its reduction procedure implement method
CN106506306A (en) A kind of method and apparatus of data-message transmission
CN103200084A (en) Message preprocessing method and device based on network processing unit and network processing unit

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