CN105491017B - The more equipment multi-protocol analysis method and system of RS485 buses - Google Patents
The more equipment multi-protocol analysis method and system of RS485 buses Download PDFInfo
- Publication number
- CN105491017B CN105491017B CN201510821145.2A CN201510821145A CN105491017B CN 105491017 B CN105491017 B CN 105491017B CN 201510821145 A CN201510821145 A CN 201510821145A CN 105491017 B CN105491017 B CN 105491017B
- Authority
- CN
- China
- Prior art keywords
- data
- layer
- protocol
- buses
- frame
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol 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 the more equipment multi-protocol analysis method and system of RS485 buses, including physical layer, data link layer and application layer;Physical layer is located at the bottom of three layer protocol of RS485 buses, is responsible for link foundation, release and data receiver, the transmission of RS485 bus physical links;Data link layer is located at the intermediate layer of three layer protocol of RS485 buses, to the data packet from physical layer, identifies data packet related data, and valid data are submitted to application layer is handled;To the data packet from application layer, interpolation data relevant parameter, constructs full communication frame, and data packet is submitted to physical layer by way of sending message to physical layer;Application layer is located at the top of three layer protocol of RS485 buses, is handled for the data packet from data link layer by instruction code;The present invention overcomes traditional RS485 bus host devices, and agreement attempts parsing one by one, and causes to identify that a variety of slave device efficiency are low, slow-footed problem.
Description
Technical field
The present invention relates to Industry Control fieldbus RS485 bussing techniques, and in particular to a kind of more equipment of RS485 buses are more
The method and system of protocol analysis.
Background technology
A main equipment needs and the communication of some slave devices are frequently encountered in Industry Control, its network topology structure is one
The use of the RS485 buses of low cost is at this time most economical practical to more host-guest architectures.RS485 buses are supported one-to-many
Master-slave network structure, respectively from not communicating between node, all communications are initiated by main equipment, and main equipment passes through question-response
Inquiry/response communication method realizes the communication with each slave device.
Main equipment may need to mount some slave devices, such as the Temperature Humidity Sensor with RS485 interfaces, band in scene
The electric energy meter of RS485 interfaces, the photosensitive sensor with RS485 interfaces, since RS485 buses merely specify the physical layer of communication
Electrical characteristic, is not specified by link layer communication protocols, therefore the RS485 slave devices of each producer can run proprietary protocol, so right
For main equipment, the slave device that can identify operation different agreement is exactly the very corn of a subject.
For same category of device, due to running identical agreement, main equipment passes through " the slave device address " in communication protocol
To identify slave device.
For inhomogeneous equipment, due to running different agreements, main equipment needs to call other set communication protocol,
Also with " slave device address to identify slave device " in communication protocol.Specific practice is exactly that main equipment sends inquiry message, so
The data that slave device to be received returns afterwards etc., traditional way is the sending module of agreement and the parsing module of agreement is completely solely
Vertical, and an only protocol resolution module, in this protocol resolution module, every time using a kind of communication protocol to response
Frame is attempted to be parsed, and if can be extracted if successfully resolved to data, otherwise using a kind of lower communication protocol, therefore causes
The problem of be the agreement that the slave device that will be returned is not aware that when protocol analysis is carried out, be likely to occur acknowledgement frame at this time
Data are that electric energy meter returns, and but go to parse by humiture agreement;It is humiture that reply data may also occur, but by electric energy
The agreement of table goes to parse, and when slave device species is few, this method attempted one by one is to receive reluctantly, but working as has
When tens kinds of equipment, this method for attempting parsing one by one, just relatively time consuming, common practice is exactly that more change owner is set
CPU in standby, uses the faster CPU of arithmetic speed, this way using the faster CPU of arithmetic speed, while hardware cost instead
Also it is high, although to a certain extent can problem, if if having 50 kinds of equipment, it is whole to attempt a parsing, be still
It is very slow, so this method does not still solve the problems, such as thoroughly.
The content of the invention
To solve the shortcomings of the prior art, the invention discloses the more equipment multi-protocol analysis methods of RS485 buses and
System, is divided into three layers by the parsing of agreement, is physical layer, data link layer, application layer respectively, and Each performs its own functions for this three layer protocol,
Each interlayer is communicated by way of sending message.
The more equipment multi-protocol analysis methods of RS485 buses, comprise the following steps:
Step 1:Application layer initializes, and identifies corresponding slave device according to user instruction, is led to according to the application layer of slave device
Believe that agreement carries out data group bag, structure main equipment inquiry data packet, and data packet is submitted into data in a manner of sending message
Link layer, while the protocol analysis function of the equipment is registered to data link layer;
Step 2:After data link layer receives application layer data packet, communication frame is constructed, then communication frame is disappeared with sending
The mode of breath submits to physical layer;
Step 3:After physical layer receives communication frame, according to default physical layer configurations, data flow is sent to RS485
Bus;
Step 4:All RS485 slave devices can all receive the communication frame of main equipment transmission, but only be assisted with itself
Discussing the identical slave device of frame correctly could parse communication frame correctly, further only have in that Self address and communication frame
The consistent slave device of destination address can just return to acknowledgement frame;
Step 5:Main equipment receives acknowledgement frame from RS485 buses, after physical layer receives data, is put into reception data and delays
Rush in area, do not receive fresh character in certain time-out, it is believed that reply data frame end, physical layer are received all
Acknowledgement frame data packet submits to data link layer;
Step 6:Data link layer calls the protocol stack analytical function of registration, completes the parsing of response frame data, then will
Valid data submit to application layer;Application layer completes the extraction of data.
Further, the step of detection user instruction is further included before user instruction identification after application layer initialization,
User instruction is detected whether, if without user instruction, delay adjustments detect again after the time.
Further, data link layer calls the protocol stack analytical function of registration, its association of the slave device of every kind of different agreement
It is different to discuss stack analytical function, is merely responsible for parsing this device protocol in protocol analysis call back function, in the parsing of data
When concretely comprise the following steps:
A, searches start-of-frame, if can not find, result code FALSE;If it is found, it is transferred to B;
B, searching data length, if data length is invalid, result code FALSE;If data length is effective, enter
C;
C, carries out data check, if check errors, result code FALSE;If data check is correct, into D;
D, searches frame end symbol, if can not find, result code FALSE;If it is found, it is TRUE to return the result code;
After protocol stack parsing by data link layer, if frame normally if valid data are extracted, and with to application layer
Valid data are submitted application layer by the mode for sending message queue, are then emptied data, if frame is abnormal, are directly emptied number
According to.
Further, when main equipment communicates with slave device, the protocol stack parsing module of this slave device is registered,
Data link layer protocol analytical function exactly is articulated to using protocol analysis function as call back function, data link layer performs above
The protocol analysis call back function of registration carries out the identification of communication frame, and then extracted valid data, further carries valid data
Give application layer protocol to be handled, the processing of concrete function code is carried out in application layer, so as to complete a communication process.
Further, physical layer carries out the reception and transmission of data using interrupt mode;
When physical layer carries out data sending using interrupt mode, a byte sends rear CPU and produces transmission interruption, is sending
Data length will be sent by interrupting in service subtracts 1, if sending data length is more than 0, continues to send data, if equal to 0, say
Bright total data has been sent, and is closed to send at this time and is interrupted, transmission terminates;
The reception of physical layer data often receives a byte by the way of interrupting from RS485 buses, and CPU is produced
The data received, are being saved in the reception data buffer of the overall situation by one interruption in interrupting service, and will receive data
Length adds 1, and a timer is all restarted after a byte is often received, is arrived within the time as defined in agreement without new data
Come, then it is assumed that present communications frame end, then submits to data link layer deals by the data packet received.
The more equipment multi-protocol analysis systems of RS485 buses, including:Physical layer, data link layer and application layer;
Physical layer is located at the bottom of three layer protocol of RS485 buses, the link foundation of responsible RS485 bus physical links,
Release and the reception of data, send;
Data link layer is located at the intermediate layer of three layer protocol of RS485 buses, for the data packet from physical layer, identifies
Then valid data are submitted to application layer and are handled by data packet related data;For the data packet from application layer, addition
Data relevant parameter, constructs complete communication frame, and data packet is submitted to physics by way of sending message to physical layer
Layer;
Application layer is located at the top of three layer protocol of RS485 buses, for the data packet from data link layer according to finger
Code is made to be handled;
Wherein, corresponding protocol stack parsing module, agreement are equipped with for every kind of different agreement slave device in data link layer
Stack parsing module is used to be articulated to data link layer protocol analytical function using protocol analysis function as call back function, and main equipment exists
The reception protocol stack of data link layer is just determined when sending data according to the corresponding slave device protocol type of protocol stack parsing module,
So as to which after slave device reply data is received, rapid call corresponds to protocol stack parsing outgoing packet.
Further, in application layer, different instruction codes corresponds to different functions, the instruction code for needing response, by
User application organizations layer data, then submits to data link layer by way of sending message;For being not required
The instruction code of response, this layer protocol only extract user data and preserve.
Further, for the data packet received from RS485 buses, after physical layer detects communication frame, with to
Data packet is submitted to data link layer by the mode that data link layer sends message, for the data packet from data link layer,
Physical layer directly transmits data to RS485 buses.
Further, in data link layer, the protocol analysis call back function of registration, the slave device of every kind of different agreement are performed
Its protocol stack analytical function is different, is merely responsible for parsing this device protocol in protocol analysis call back function, by data
After the protocol stack parsing of link layer, if frame normally if valid data are extracted, and to send the side of message queue to application layer
Valid data are submitted application layer by formula, then empty data, if frame is abnormal, directly empty data.
Further, the more equipment multi-protocol analysis systems of above-mentioned RS485 buses further include user instruction module, for detecting
Whether user instruction is had, if without user instruction, delay adjustments detect again after the time, there is then progress user instruction identification, this
When according to the application layer communication protocol of corresponding slave device carry out data group bag, structure main equipment inquiry data packet, and with send disappear
Data packet is submitted to data link layer by the mode of breath, while the protocol resolution module of the slave device is noted to data link layer
Volume.
Beneficial effects of the present invention:
The present invention is specifically by every kind of device protocol parsing module, by shifting to an earlier date log-in protocol solution in a data link layer
Module is analysed, informs the specific protocol analysis call back function of data link layer, so as to be directly invoked in protocol resolution module known
Protocol analysis function, thus overcome traditional RS485 bus host devices one by one agreement attempt parsing, caused by identify it is a variety of from
Device efficiency is low, slow-footed problem.
Brief description of the drawings
Fig. 1 protocol layer divisions of the present invention;
Fig. 2 a- Fig. 2 b physical layer communication flow charts of the present invention;
Fig. 3 data link layer communication flow charts of the present invention;
Fig. 4 data link layers of the present invention are according to log-in protocol stack parsing module analysis protocol flow chart;
The several frequently seen RS485 slave devices communication protocol frame formats of Fig. 5;
Fig. 6 application layer communication flow charts of the present invention.
Embodiment:
The present invention is described in detail below in conjunction with the accompanying drawings:
As shown in Figure 1, protocol layer is designed as physical layer, data link layer, application layer by the present invention.Every layer is correspondingly embedded in formula
One process of real time operating system, every layer possesses the independent process space, and Each performs its own functions for each layer, to send out message queue, message
Mailbox, the mode of semaphore communicate.
Physical layer of the present invention is responsible for foundation, release and the reception of data of RS485 bus physical links, is sent.For from
The data packet that RS485 buses receive, after physical layer detects communication frame, in a manner of sending message to data link layer
Data packet is submitted into data link layer.For the data packet from data link layer, it is total directly to transmit data to RS485
Line.
The transmission of physical layer data usually has two ways, and one is CPU inquiry modes, and advantage is simple for process flow,
Shortcoming is too high for CPU usage;Secondly be interrupt mode, it is complicated with respect to inquiry mode process flow, but CPU usage pole
Low, the present invention is designed as improving communication speed, reduces CPU usage, the reception and transmission of data is carried out using interrupt mode, such as
Shown in Fig. 2 a- Fig. 2 b, a byte sends rear CPU and produces transmission interruption, subtracts transmission data length in the service of interruption is sent
1 is gone, if sending data length is more than 0, continues to send data, if equal to 0, illustrate that total data has been sent, at this time
Close to send and interrupt, transmission terminates.
The reception of physical layer data often receives a byte by the way of interrupting from RS485 buses, and CPU is produced
The data received, are being saved in the reception data buffer of the overall situation by one interruption in interrupting service, and will receive data
Length adds 1, and a timer is all restarted after a byte is often received, is arrived within the time as defined in agreement without new data
Come, then it is assumed that present communications frame end, then submits to data link layer deals by the data packet received.
As shown in figure 3, data link layer of the present invention, for the data frame from physical layer, this layer protocol identifies that frame rises
Begin symbol, destination address, source address, data length, valid data, check code, frame end symbol etc., if destination address in data frame
Matched with Self address, then valid data are submitted to application layer is handled;For the data packet from application layer, this association
View addition start-of-frame, destination address, source address, data length, check code, frame end symbol, construct complete communication frame, and with
Communication frame is submitted to physical layer by the mode that message is sent to physical layer.
The core of data link layer is to the scanning from physical layer communication frame, identification, extraction.Due to different types of
RS485 slave device communication protocols are different, it is therefore desirable to design different protocol stack parsing modules, Fig. 5 illustrates several
The common RS485 slave device communication protocol frame formats of kind.
Pin of the present invention designs a kind of protocol stack parsing module, the present invention in data link layer for every kind of different agreement equipment
The description protocol stack mould by taking main equipment mounts 3 kinds of slave devices (Temperature Humidity Sensor, current acquisition module, multifunctional electric energy meter) as an example
Block designs, for example designs Temperature Humidity Sensor protocol stack parsing module to Temperature Humidity Sensor, and electricity is designed to current acquisition module
Acquisition module protocol stack parsing module is flowed, to the design multifunction electric meter protocol stack parsing of DL/T 645-2007 multifunctional electric energy meters
Module, agreement is all carried out for the equipment of every kind of different agreement, is achieved in that every kind of RS485 slave devices and protocol stack parsing mould
Block corresponds.
When main equipment communicates with slave device, the protocol stack parsing module of this equipment is registered, that is, by agreement
Analytical function is articulated to data link layer protocol analytical function as call back function, after main equipment sends communication frame, into number
According to reception state, its physical layer is not received by fresh character in certain time-out, will be considered that present frame sign off, can be to number
Communication frame is submitted according to link layer, data link layer performs the identification that the protocol analysis call back function registered above carries out communication frame,
And then extracted valid data, valid data are further submitted into application layer protocol and are handled, are carried out in application layer specific
The processing of function code, so as to complete a communication process.
Application layer is located at the top of three layer protocol of RS485 buses, for the data packet from data link layer according to finger
Code is made to be parsed, different instruction codes corresponds to different functions.Instruction code for needing response, by user application group
Application layer data is knitted, data link layer is then submitted to by way of sending message;Instruction code for response is not required, this
Layer protocol only extracts user data and preserves.
Host just determines the reception agreement of data link layer when sending data according to slave device protocol type in the present invention
Stack, thus after slave device reply data is received, it is rapid to call corresponding protocol stack parsing outgoing packet, no matter so how many is planted
The scanning of various protocols stack is not present in slave device, its resolving, so it is fixed that it, which parses the time,.
As shown in figure 4, for data link layer of the present invention according to log-in protocol stack parsing module analysis protocol flow chart, data
Link layer can perform the protocol analysis call back function registered before, its protocol stack analytical function of the slave devices of every kind of different agreement
It is different, is merely responsible for parsing this device protocol in protocol analysis call back function, its flow is as follows:
The first step, searches start-of-frame, can not find, then result code is FALSE;Find, into next step.
Second step, searching data length, if data length is invalid, result code FALSE;If data length has
Effect, into the 3rd step.
3rd step, carries out data check, if check errors, result code FALSE;If data check is correct, into
Enter the 4th step.
4th step, searches frame end symbol, if can not find, result code FALSE;If it is found, returning the result code and being
TRUE。
After protocol stack parsing by data link layer, if frame normally if valid data are extracted, and with to application layer
Valid data are submitted application layer by the mode for sending message queue, then empty data.If frame is abnormal, number is directly emptied
According to.
As shown in figure 5, it is several frequently seen RS485 slave devices communication protocol frame format.
As shown in fig. 6, be application layer data flow figure of the present invention, after application layer module initialization, into one repeatedly
Cyclic process, cycle period are 10 milliseconds, and here is detailed processing procedure:
A, user instruction has been detected whether.If without user instruction, detected again after 10 milliseconds of delay, have, enter next
Step.
B, user instruction is identified.User instruction is probably humiture, current acquisition, electric energy meter data reading system, at this time basis
The application layer communication protocol of relevant device carries out data group bag, and structure main equipment inquires about data packet, and in a manner of sending message
Data packet is submitted into data link layer, while the protocol resolution module of the equipment is registered to data link layer.
C, after data link layer receives application layer data packet, addition start-of-frame, data length, check code, frame end
Symbol construction communication frame.Then communication frame is submitted into physical layer in a manner of sending message.
D, after physical layer receives communication frame, according to default physical layer configurations, such as baud rate, start bit, data bit,
Data flow is sent to RS485 buses by stop position etc..
E, all RS485 slave devices can all receive main equipment transmission inquiry frame, but only with its own protocol frame
Identical slave device correctly could parse communication frame correctly, further there was only that Self address and purpose in communication frame
The consistent slave device in address can just return to acknowledgement frame.
F, main equipment receives from RS485 buses and receives acknowledgement frame, after physical layer receives data, is put into reception data buffering
Qu Zhong, does not receive fresh character in certain time-out, it is believed that reply data frame end, physical layer by it is all receive should
Answer frame data bag and submit to data link layer.
G, data link layer calls the protocol stack analytical function registered in preceding step, and frame starting is found in analytical function
Symbol, destination address, source address, check code, frame end symbol etc., and then the parsing of response frame data is completed, then by valid data
Submit to application layer.
H, application layer protocol abstraction function code etc., completes the extraction of application layer data, for example extracts humiture or electricity
Pressure, electric current, power factor either meter reading data etc..
The key of the present invention is G steps, for the data frame received, calls the protocol resolution module registered when sending, directly
Tap into capable parsing, it is not necessary to which protocol stack attempt one by one, thus agreement one by one is avoided that in traditional multi-protocol analysis module
The shortcomings that attempting parsing, greatly accelerates protocol analysis speed, and causes the parsing of protocol stack from the kind of RS485 slaves
Class, quantity limitation.
Although above-mentioned be described the embodiment of the present invention with reference to attached drawing, model not is protected to the present invention
The limitation enclosed, those skilled in the art should understand that, on the basis of technical scheme, those skilled in the art are not
Need to make the creative labor the various modifications that can be made or deformation still within protection scope of the present invention.
Claims (10)
- The more equipment multi-protocol analysis methods of 1.RS485 buses, it is characterized in that, comprise the following steps:Step 1:Application layer initializes, and identifies corresponding slave device according to user instruction, is assisted according to the application layer communication of slave device View carries out data group bag, structure main equipment inquiry data packet, and data packet is submitted to data link in a manner of sending message Layer, while the protocol analysis function of slave device is registered to data link layer;Step 2:After data link layer receives application layer data packet, communication frame is constructed, then by communication frame to send message Mode submits to physical layer;Step 3:After physical layer receives communication frame, according to default physical layer configurations, data flow is sent to RS485 buses;Step 4:All RS485 slave devices can all receive main equipment transmission communication frame, but only its own protocol frame with Communication frame could correctly be parsed correct, further only Self address and mesh in communication frame by the identical slave device of communication frame The consistent slave device in address just return to acknowledgement frame;Step 5:Main equipment receives acknowledgement frame from RS485 buses, after physical layer receives data, is put into reception data buffer In, fresh character is not received in certain time-out, it is believed that reply data frame end, physical layer is by all responses received Frame data bag submits to data link layer;Step 6:Data link layer calls the protocol analysis function of registration, the parsing of response frame data is completed, then by significant figure According to submitting to application layer;Application layer completes the extraction of data.
- 2. the more equipment multi-protocol analysis methods of RS485 buses as claimed in claim 1, it is characterized in that, initialized in application layer The step of detection user instruction is further included before user instruction identification afterwards, has detected whether user instruction, if without user Instruction, delay adjustments detect again after the time.
- 3. the more equipment multi-protocol analysis methods of RS485 buses as claimed in claim 1, it is characterized in that, data link layer is called The protocol analysis function of registration, its protocol analysis function of the slave device of every kind of different agreement are different, are adjusted back in protocol analysis It is merely responsible for parsing this device protocol in function, is concretely comprised the following steps in the parsing of data:A, searches start-of-frame, if can not find, result code FALSE;If it is found, it is transferred to B;B, searching data length, if data length is invalid, result code FALSE;If data length is effective, into C;C, carries out data check, if check errors, result code FALSE;If data check is correct, into D;D, searches frame end symbol, if can not find, result code FALSE;If it is found, it is TRUE to return the result code;After the protocol analysis of data link layer, if frame normally if valid data are extracted, and disappeared with being sent to application layer Valid data are submitted application layer by the mode of breath queue, are then emptied data, if frame is abnormal, are directly emptied data.
- 4. the more equipment multi-protocol analysis methods of RS485 buses as described in claim 1 or 3, it is characterized in that, when main equipment with Slave device communicates, and the protocol resolution module of this slave device is registered, that is, using protocol analysis function as protocol analysis Call back function is articulated to data link layer, and data link layer performs the protocol analysis call back function registered above and carries out communication frame Valid data are further submitted to application layer protocol and are handled by identification, and then extracted valid data, are carried out in application layer The processing of concrete function code, so as to complete a communication process.
- 5. the more equipment multi-protocol analysis methods of RS485 buses as claimed in claim 1, it is characterized in that, physical layer is using interruption Mode carries out the reception and transmission of data;When physical layer carries out data sending using interrupt mode, a byte sends rear CPU and produces transmission interruption, is interrupted sending Data length will be sent in service and subtracts 1, if sending data length is more than 0, continues to send data, if equal to 0, illustrate complete Portion's data have been sent, and are closed to send at this time and are interrupted, transmission terminates;The reception of physical layer data often receives a byte by the way of interrupting from RS485 buses, and CPU produces one Interrupt, the data received are being saved in the reception data buffer of the overall situation in interrupting service, and data length will be received Add 1, a timer all restarted after a byte is often received, does not have new data arrival within the time as defined in agreement, Then think present communications frame end, the data packet received is then submitted into data link layer deals.
- The more equipment multi-protocol analysis systems of 6.RS485 buses, it is characterized in that, including:Physical layer, data link layer and application layer;Physical layer is located at the bottom of three layer protocol of RS485 buses, and the link for being responsible for RS485 bus physical links is established, discharged Reception, transmission with data;Data link layer is located at the intermediate layer of three layer protocol of RS485 buses, for the data packet from physical layer, identifies data Then valid data are submitted to application layer and are handled by bag related data;For the data packet from application layer, interpolation data Relevant parameter, constructs complete communication frame, and data packet is submitted to physical layer by way of sending message to physical layer;Application layer is located at the top of three layer protocol of RS485 buses, for the data packet from data link layer according to instruction code Handled;Wherein, corresponding protocol resolution module, protocol analysis mould are equipped with for every kind of different agreement slave device in data link layer Block is used to be articulated to data link layer using protocol analysis function as protocol analysis call back function, main equipment when sending data just The reception protocol stack of data link layer is determined according to the corresponding slave device protocol type of protocol resolution module, thus receive from It is rapid to call corresponding protocol stack parsing outgoing packet after equipment reply data.
- 7. the more equipment multi-protocol analysis systems of RS485 buses as claimed in claim 6, it is characterized in that, it is different in application layer Instruction code corresponds to different functions, the instruction code for needing response, by user application organizations layer data, Ran Houtong The mode for crossing transmission message submits to data link layer;Instruction code for response is not required, this layer protocol only extract user Data simultaneously preserve.
- 8. the more equipment multi-protocol analysis systems of RS485 buses as claimed in claim 6, it is characterized in that, for from RS485 buses The data packet received, after physical layer detects communication frame, by data packet in a manner of sending message to data link layer Data link layer is submitted to, for the data packet from data link layer, physical layer directly transmits data to RS485 buses.
- 9. the more equipment multi-protocol analysis systems of RS485 buses as claimed in claim 6, it is characterized in that, in data link layer, hold The protocol analysis call back function of row registration, its protocol analysis function of the slave device of every kind of different agreement is different, in agreement solution Analysis call back function in be merely responsible for parsing this device protocol, after the protocol analysis of data link layer, if frame normally if will Valid data extract, and valid data are submitted application layer in a manner of sending message queue to application layer, then empty data, If frame is abnormal, data are directly emptied.
- 10. the more equipment multi-protocol analysis systems of RS485 buses as described in claim 6-9 is any, it is characterized in that, further include use Family instruction module, for detecting whether having user instruction, if without user instruction, delay adjustments are detected, had then again after the time User instruction identification is carried out, data group bag is carried out according to the application layer communication protocol of corresponding slave device at this time, structure main equipment is looked into Data packet is ask, and data packet is submitted into data link layer in a manner of sending message, while by the protocol analysis of the slave device Module is registered to data link layer.
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 CN105491017A (en) | 2016-04-13 |
CN105491017B true 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) |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107026767B (en) * | 2017-03-30 | 2019-10-18 | 上海七牛信息技术有限公司 | Service protocol achievement data collection method and system |
CN108305628B (en) * | 2017-06-27 | 2020-10-02 | 腾讯科技(深圳)有限公司 | Speech recognition method, speech recognition device, computer equipment and storage medium |
CN107942769B (en) * | 2017-10-09 | 2021-04-06 | 深圳市瑞凌实业股份有限公司 | Communication system and method for digital power supply and various digital welding devices |
CN107863140A (en) * | 2017-11-06 | 2018-03-30 | 贵阳朗玛信息技术股份有限公司 | The processing method and processing device of DICOM file |
CN111552274B (en) * | 2018-01-08 | 2021-10-12 | 深圳市道通科技股份有限公司 | Automotive diagnostic method, apparatus, apparatus, system, and diagnostic connection device |
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 |
CN110391877A (en) * | 2019-06-25 | 2019-10-29 | 浙江海印数码科技有限公司 | A kind of serial communication method and device |
CN110445752B (en) * | 2019-06-28 | 2022-08-30 | 福建星云电子股份有限公司 | Implementation method for supporting various CAN devices and flexibly analyzing various CAN messages |
CN110519136B (en) * | 2019-07-10 | 2021-06-29 | 大城绿川(深圳)科技有限公司 | RS485 multi-machine communication system capable of achieving self-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 |
CN112765083A (en) * | 2021-01-29 | 2021-05-07 | 苏州易德龙科技股份有限公司 | RS 232-based communication protocol |
CN113206720B (en) * | 2021-04-08 | 2022-02-15 | 江苏科大亨芯半导体技术有限公司 | Method and device for realizing top-tuning message channel |
CN115037795B (en) * | 2022-06-16 | 2024-02-02 | 上海睿赛德电子科技有限公司 | Multi-machine communication method for embedded equipment |
CN115334175B (en) * | 2022-09-13 | 2024-06-25 | 浙江正泰物联技术有限公司 | 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 |
CN116112523A (en) * | 2023-01-10 | 2023-05-12 | 武汉海微科技有限公司 | Vehicle-mounted transmission system, data transmission method and vehicle |
CN118626433B (en) * | 2024-04-24 | 2025-03-25 | 东莞野火科技有限公司 | A safe and high-speed industrial communication method for high-speed placement machine motion control |
CN118945245B (en) * | 2024-10-15 | 2024-12-10 | 成都汉度科技有限公司 | DLT698 protocol analysis method, system, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002217921A (en) * | 2001-01-22 | 2002-08-02 | Yokogawa Electric Corp | Bus analyzer |
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 |
CN104796415A (en) * | 2015-04-07 | 2015-07-22 | 上海大学 | Method for converting protocols of TCP (transmission control protocol) networks and multiple protocols on RS485 buses |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62274956A (en) * | 1986-05-23 | 1987-11-28 | Mitsubishi Electric Corp | Protocol analyzer additional device |
US9482555B2 (en) * | 2008-04-03 | 2016-11-01 | Electro Industries/Gauge Tech. | System and method for improved data transfer from an IED |
KR101697320B1 (en) * | 2013-01-11 | 2017-01-18 | 한국전자통신연구원 | Apparatus and Method for Supporting Sensor Data Transmission based on Internet |
-
2015
- 2015-11-23 CN CN201510821145.2A patent/CN105491017B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002217921A (en) * | 2001-01-22 | 2002-08-02 | Yokogawa Electric Corp | Bus analyzer |
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 |
CN104796415A (en) * | 2015-04-07 | 2015-07-22 | 上海大学 | Method for converting protocols of TCP (transmission control protocol) networks and multiple protocols on RS485 buses |
Also Published As
Publication number | Publication date |
---|---|
CN105491017A (en) | 2016-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105491017B (en) | The more equipment multi-protocol analysis method and system of RS485 buses | |
CN103701640B (en) | Use the method and system of Intelligent management terminal upgrading ODN equipment | |
CN102891796B (en) | Mining intelligent transmission gateway | |
CN105049304A (en) | IoT terminal access gateway and application system supporting multiple heterogeneous transmission modules | |
CN103200548A (en) | Short message intercommunicating system and method of network client and compass radio determination satellite service (RDSS) terminal | |
CN103220292A (en) | Cross-safe-area data transmission method and system | |
SE0103535D0 (en) | A system of intelligent devices, a method for providing such a system and a computer data signal | |
CN104580187B (en) | A method of realizing that the external device of different MODULEBUS agreements is interacted with server | |
CN203151742U (en) | A short message intercommunicating system between network clients and Beidou RDSS terminals | |
US11330035B2 (en) | Method and server for HTTP protocol-based data request | |
CN103368849A (en) | OAM (Operations, Administration and Management) message processing method and device | |
CN103236976B (en) | A kind of multirouting method that POS WIFI and Ethernet coexist | |
CN107172780A (en) | A kind of navaid lamp control system | |
CN101902448A (en) | Method and system for implementing data transmission through serial ports | |
CN109474614A (en) | A kind of analytic method and system of multi-protocols | |
CN101527707B (en) | Real-time consistency check method and correlative device for warm backup of SCTP protocol stack | |
US20220311644A1 (en) | Data transmission method and device, electronic apparatus and storage medium | |
CN104536934A (en) | Serial port communication method and system | |
CN202111737U (en) | Network management enhanced E1/ETH protocol converter | |
CN208076997U (en) | A kind of equipment high in the clouds monitoring management system | |
CN103533001A (en) | Communication method and communication system based on HTTP multi-proxy, and intermediate proxy server | |
CN110519160A (en) | Things-internet gateway multimode communication means, device and computer readable storage medium | |
CN109120488A (en) | CAN bus data collection system and method | |
EP2911423A1 (en) | Implementation method and device for virtual southbound interface and internet of things management platform | |
CN209088989U (en) | A kind of data acquisition gateway |
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 |