CN104834587B - The method and system of on-line debugging RS-485 bus slave computers - Google Patents

The method and system of on-line debugging RS-485 bus slave computers Download PDF

Info

Publication number
CN104834587B
CN104834587B CN201410047846.0A CN201410047846A CN104834587B CN 104834587 B CN104834587 B CN 104834587B CN 201410047846 A CN201410047846 A CN 201410047846A CN 104834587 B CN104834587 B CN 104834587B
Authority
CN
China
Prior art keywords
slave
data frame
debugged
parsing
monitoring item
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
Application number
CN201410047846.0A
Other languages
Chinese (zh)
Other versions
CN104834587A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201410047846.0A priority Critical patent/CN104834587B/en
Publication of CN104834587A publication Critical patent/CN104834587A/en
Application granted granted Critical
Publication of CN104834587B publication Critical patent/CN104834587B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method and system of 485 bus slave computers of on-line debugging RS.Wherein method includes the following steps:The instruction items and monitoring item information of slave debugging are read from configuration file;According to the slave to be debugged, the instruction items content to be debugged is set, and selects the monitoring item to be monitored;Instruction items content is packaged as command frame, and command frame is sent to the slave to debug, the slave to be debugged is debugged;The responsive data frame that the slave debugged returns is received, and resolution response data frame obtains the state value of each monitoring item for the slave debugged.It monitors the debugging process of 485 bus slave computers of RS on-line, and return to the operating condition of slave, the assistance of 485 bus masters of RS is not needed, it avoids data exchange between different developers or links up the waste for causing time and resource, slave developer can in real time be adjusted the hardware of slave or software simultaneously, the efficiency of equipment debugging is improved, debugging totle drilling cost is reduced.

Description

The method and system of on-line debugging RS-485 bus slave computers
Technical field
The present invention relates to a kind of method of automation field more particularly to on-line debugging RS-485 bus slave computers and it is System.
Background technology
At present in RS-485 bus slave computers development process, the debugging method that uses for:RS-485 bus slave computers, therewith The RS-485 bus masters matched, the computer equipped with SCC softwares while RS-485 buses are connected to, master control is responsible under being recycled to slave Send out control instruction various, SCC is responsible for the operating status of monitoring slave in real time.
Since in development process, the status data frame of control command frame and response will often make tune according to debugging situation It is whole, and master control and slave are developed for different designs person, therefore instruction adjustment each time is both needed to master control developer assistance modification and issues To the command frame of slave, to ensure the master control after modification instruction and slave normal communication.In addition, SCC passes through RS-485 buses The data frame of reception is the initial data that slave is sent out, these data are made of hexadecimal byte, the state letter carried Breath must can just parse the meaning of each monitoring variable of slave by compareing communications protocol, therefore readable poor, be unfavorable in real time Grasp the state and fault message of slave.
Invention content
Based on this, it is necessary to provide a kind of independent software of use and save master control designer assistance, and grasp slave shape in real time The method and system of the on-line debugging RS-485 bus slave computers of state.
A kind of method for on-line debugging RS-485 bus slave computers that purpose provides to realize the present invention, includes the following steps:
The instruction items and monitoring item information of slave debugging are read from configuration file;
According to the slave to be debugged, the instruction items content to be debugged is set, and selects the prison to be monitored Survey item;
Described instruction item content is packaged as command frame, and by described instruction frame be sent to it is described to debug from Machine debugs the slave to be debugged;
The responsive data frame that the slave debugged returns is received, and analyzes the response to data frame and obtains described adjusted The state value of each monitoring item of the slave of examination.
It is further comprising the steps of as a kind of embodiment of method of on-line debugging RS-485 bus slave computers:
When needing to change the instruction items and/or monitoring item for the slave to be debugged, reset in described instruction item Hold and/or reselect the monitoring item to be monitored.
It is described to beat described instruction item content as a kind of embodiment of method of on-line debugging RS-485 bus slave computers Packet is command frame, and described instruction frame is sent to the slave to debug, to the slave to be debugged into Row debugging, includes the following steps:
Described instruction item content is packaged as command frame;
Instruction items content is checked whether there is to be changed;
When there is instruction items content to be changed, it is new command frame to repack modified instruction items content, and is sent The new command frame is debugged to the slave to be debugged;
When not having instruction items content to be changed, the command frame for directly transmitting packing is adjusted to the slave to be debugged Examination.
As a kind of embodiment of method of on-line debugging RS-485 bus slave computers, the slave that the reception is debugged The responsive data frame of return, and analyze the response to the state that data frame obtains each monitoring item of the slave debugged Value, includes the following steps:
Response data frame parser and monitoring item set are generated according to configuration file and selected monitored item, and described in Monitoring item set is shown on interface;
The responsive data frame that the slave debugged returns is received, and is sent in parsing queue;
The response data frame parser analyzes the response to data frame one by one by first in first out, obtains slave and respectively supervises Survey the state value of item;
Corresponding each prison in the monitoring item set on the display interface is updated with the state value of each monitoring item of the slave Survey the value of item.
It is described to use the responsive data frame as a kind of embodiment of method of on-line debugging RS-485 bus slave computers Resolver analyzes the response to data frame one by one by first in first out, obtains the state value of each monitoring item of slave, including following Step:
It when there is responsive data frame to be sent to the parsing queue, and parses mark and is that fictitious time starts to parse, and described in being arranged It is true to parse mark;
The response data frame parser takes out a responsive data frame by first in first out from the parsing queue;
The responsive data frame of the response data frame parser parsing taking-up is simultaneously parsed, and the slave debugged is obtained Each monitoring item state value;
Judge whether also have responsive data frame in the parsing queue, execution is returned if having and is taken from the parsing queue The step of going out responsive data frame;
If not responding to data frame in the parsing queue, it is false that the parsing mark, which is arranged, completes one parsing.
It is further comprising the steps of as a kind of embodiment of method of on-line debugging RS-485 bus slave computers:
In the state value to database for storing each monitoring item for the slave debugged.
It is further comprising the steps of as a kind of embodiment of method of on-line debugging RS-485 bus slave computers:
When needing to increase or change the instruction items or monitoring item that carry out slave debugging, weight is carried out to the configuration file New setting, obtains new instruction configuration file or new operating status configuration file;
The configuration file includes instruction configuration file and operating status configuration file.
A kind of system of on-line debugging RS-485 bus slave computers based on same inventive concept, including import modul, setting Module, instruction sending module and parsing module, wherein:
The import modul, instruction items and monitoring item information for reading slave debugging from configuration file;
The setup module, for according to the slave to be debugged, the instruction items content to be debugged being arranged, and select Select the monitoring item to be monitored;
Described instruction sending module for described instruction item content to be packaged as command frame, and described instruction frame is sent To the slave to be debugged, the slave to be debugged is debugged;
The parsing module, the responsive data frame returned for receiving the slave debugged, and analyze the response to count The state value of each monitoring item of the slave debugged is obtained according to frame.
A kind of embodiment of system as on-line debugging RS-485 bus slave computers, further includes modified module, is used for When needing to change the instruction items and/or monitoring item for the slave to be debugged, described instruction item content and/or again is reset Newly select the monitoring item to be monitored.
A kind of embodiment of system as on-line debugging RS-485 bus slave computers, described instruction sending module include It is packaged submodule, submodule is checked, beats again steamed stuffed bun module, and directly transmit submodule, wherein:
The packing submodule, for described instruction item content to be packaged as command frame;
The inspection submodule is changed for checking whether there is instruction items content;
It is described to beat again steamed stuffed bun module, for when there is instruction items content to be changed, repacking in modified instruction items It is new command frame to hold, and sends the new command frame and debugged to the slave to be debugged;
It is described to directly transmit submodule, for when there is no instruction items content to be changed, directly transmitting the instruction of packing Frame is debugged to the slave to be debugged.
A kind of embodiment of system as on-line debugging RS-485 bus slave computers, the parsing module include parsing Device generates submodule, data frame receipt submodule, data frame analyzing submodule and status display submodule, wherein:
The resolver generates submodule, for generating responsive data frame solution according to configuration file and selected monitored item Parser and monitoring item set, and the monitoring item set is shown on interface;
The data frame receipt submodule, the responsive data frame returned for receiving the slave debugged, and be sent to It parses in queue;
The data frame analyzing submodule, for being solved one by one by first in first out using the response data frame parser The responsive data frame is analysed, the state value of each monitoring item of slave is obtained;
The status display submodule, for being updated on the display interface with the state value of each monitoring item of the slave The value of corresponding each monitoring item in monitoring item set.
A kind of embodiment of system as on-line debugging RS-485 bus slave computers, the data frame analyzing submodule Mark setting unit is analysed including true solution, data frame extraction unit, resolution unit, judging unit is false to parse mark setting unit, In:
The true solution analyses mark setting unit, has responsive data frame to be sent to the parsing queue for working as, and parse mark Will is that fictitious time starts to parse, and it is true that the parsing mark, which is arranged,;
The data frame extraction unit, for pressing first in first out from the solution using the response data frame parser It analyses and takes out a responsive data frame in queue;
The resolution unit for the responsive data frame using response data frame parser parsing taking-up and is solved Analysis, obtains the state value of each monitoring item for the slave debugged;
The judging unit turns the data for judging whether also have responsive data frame in the parsing queue if having Frame extraction unit is handled;
The false parsing mark setting unit, for when not responding to data frame in the parsing queue, described in setting Parsing mark is false, completes one parsing.
A kind of embodiment of system as on-line debugging RS-485 bus slave computers, further includes memory module, is used for In the state value to database for storing each monitoring item for the slave debugged.
Beneficial effects of the present invention include:
The method and system of a kind of on-line debugging RS-485 bus slave computers provided by the invention, to RS-485 bus slave computers Debugging process is monitored on-line, and returns to the operating condition of slave.The assistance for not needing RS-485 bus masters, avoids difference Data exchange or communication cause the waste of time and resource between developer, while slave developer can observe slave in real time Operating status is in time adjusted the hardware of slave or software, improves the efficiency of equipment debugging, reduces debugging totle drilling cost.
Description of the drawings
Fig. 1 is a kind of flow chart of a specific embodiment of the method for on-line debugging RS-485 bus slave computers of the present invention;
Fig. 2 is the overall flow figure including software development that slave debugging is carried out using software;
Fig. 3 is that a kind of instruction of a specific embodiment of the method for on-line debugging RS-485 bus slave computers of the present invention issues stream Cheng Tu;
Fig. 4 is a kind of data frame analyzing of a specific embodiment of the method for on-line debugging RS-485 bus slave computers of the present invention Flow chart;
Fig. 5 is that a kind of system structure of a specific embodiment of the system of on-line debugging RS-485 bus slave computers of the present invention is shown It is intended to;
Fig. 6 is a kind of data frame analyzing of a specific embodiment of the method for on-line debugging RS-485 bus slave computers of the present invention Submodule constitutes schematic diagram.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, below in conjunction with attached drawing to the present invention's The specific implementation mode of the method and system of on-line debugging RS-485 bus slave computers illustrates.It should be appreciated that described herein Specific embodiment be only used to explain the present invention, be not intended to limit the present invention.
The method of the on-line debugging RS-485 bus slave computers of the embodiment of the present invention, as shown in Figure 1, including the following steps:
S100 reads the instruction items and monitoring item information of slave debugging from configuration file.The configuration file includes referring to Enable configuration file and operating status configuration file.
The instruction items content to be debugged is arranged according to the slave to be debugged in S200, and selects to be monitored Monitoring item.RS-485 slave developers provide slave data communication protocol used at present(Including command frame and operating status The content of data framing protocol)And the type for all instructions item and monitoring item that may be used gives Monitoring software development personnel.Such as The type example of instruction items and monitoring item is respectively as shown in table 1, table 2.
1 instruction items type example of table
2 monitoring item type example of table
Instruction items shown in table 1, table 2 and monitoring item are made to configure as follows respectively:
(1)Command frame configuration example:
<byte pos="9"set Type="unit8">
<itemName>Setpoint frequency</itemName>
<unit>Hz</unit>
<minValue>1</minValue>
<maxValue>255</maxValue>
<default>20</default>
</byte>
<byte pos="11"set Type="unit8"isEnum="1">
<itemName>Operation control</itemName>
<default>0</default>
<enums>
<Enum value=" 0 " text=" stopping "/>
<Enum value=" 1 " text=" operation "/>
<Enum value=" 2 " text=" removing mistake "/>
</enums>
</byte>
<byte pos="12"set Type="unit8">
<itemName>Raising frequency speed</itemName>
<unit>Hz/10s</unit>
<minValue>0</minValue>
<max Value>100</maxValue>
<default>20</default>
</byte>
<byte pos="14"set Type="unit8"isEnum="1">
<itemName>Operational mode</itemName>
<default>0</default>
<enums>
<Enum value=" 0 " text=" refrigeration "/>
<Enum value=" 1 " text=" heating "/>
<Enum value=" 2 " text=" defrost "/>
</enums>
</byte>
(2)Running state data frame configuration example:
<item dataType="Unit16"orderNum="100">
<itemNane>Busbar voltage virtual value</itemName>
<detail>Compressor DC bus-bar voltage virtual value</detail>
<bytepos>14</bytepos>
<unit></unit>
</item>
itemdat aType="Unit8"isOffset="1"orderNun="120">
<itemNane>Heatsink temperature</itemName>
<det ail>Driven compressor heat sink modules temperature</detail>
<byt epos>18</bytePos>
<offset>100</offset>
<unit></unit>
</item>
<item dataType="Unit16"orderNum="140">
<itemName>Source current virtual value</itemName>
<detail>Driven compressor input power current effective value</detail>
<bytePos>19</bytePos>
<unit></unit>
</item>
<item dataType="Unit8"isOffset="1"orderNum="200">
<itemName>" environment temperature sensing package temperature</itemName>
<det ail>Driven compressor electrical appliance kit environment temperature sensing package temperature</detail>
<bytePos>25</bytePos>
<offset>100</offset>
<unit></unit>
</item>
In this way, the configuration for the various instruction items that may be used can be integrated in software, an instruction configuration file is used in combination to protect Deposit the information for each instruction items for needing to issue.When tuner adjusts the instruction items that slave receives, need to only send instructions configuration under Instruction items in file are accordingly increased or are deleted, and are sent instructions under making and are set the instruction items in file and the slave after adjustment connects The instruction items matching received.After software starts, what slave developer need to only be monitored according to the selection of the profile information of reading Corresponding instruction items content is arranged in monitored item and modification, to issue required instruction to slave, realizes the debugging to slave.
Described instruction item content is packaged as command frame by S300, and described instruction frame is sent to described to debug Slave, the slave to be debugged is debugged.The instruction used will be needed by software to instruct in this step The form of frame is issued to the bus slave computer to be debugged.It is different from and instruction is sent by the assistance of bus master, software is direct Under send instructions to bus slave computer.
S400 receives the responsive data frame that the slave debugged returns, and analyze the response to data frame obtain it is described The state value of each monitoring item for the slave debugged.It is integrated with the various monitoring running state items that may be used in software Configuration is used in combination an operating status configuration file to preserve the information of each monitoring item to match with slave response data.Step After S300 issues command frame, bus slave computer debugging starts, and the software started on rear computer is built by interface and the slave of debugging The operating parameter namely responsive data frame sent back are not received and dispatched in disconnecting for vertical connection, and software is obtained by analyzing responsive data frame The state value of slave each monitoring item in debugging process.So as to make adjustor obtain the operating status of slave in real time, and in time Software or hardware to slave are adjusted more satisfied to achieve the effect that.
The embodiment of the present invention monitors the debugging process of RS-485 bus slave computers on-line by the software on computer, And return to the operating condition of slave.The assistance for not needing RS-485 bus masters avoids data exchange between different developers Or the waste for causing time and resource is linked up, while slave developer can observe slave operating status in real time, in time to slave Hardware or software be adjusted, improve the efficiency of equipment debugging, reduce debugging totle drilling cost.The slave can be arbitrary The slave of RS-485 buses.As adjusted within air-conditioning systems to variable-frequency air conditioner driver using the method for the embodiment of the present invention Examination.
It is further comprising the steps of in the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer:
S500 resets described instruction when needing to change the instruction items and/or monitoring item for the slave to be debugged Content and/or reselect the monitoring item to be monitored.When the content of instruction items or monitoring item need change, only need Wanting slave developer, setting needs the related content of the instruction items issued according to demand again, or reselects and to be monitored Monitoring item.Such as the instruction in table 1, the value of frequency instruction item can be revised as by the 20Hz given tacit consent in debugging process 30Hz, the instruction items content that also can other be integrated in configuration file certainly are modified.
As shown in Fig. 2, being above-mentioned step as the exploitation of monitoring software and the overall process used.Whole process packet Include following steps:
A100, the instruction items and monitoring item kind that slave developer provides command frame and status data Frame Protocol and may use Class;
A200, software developer develop monitoring software according to the parameters that slave developer provides;
A300, the modification of slave developer's Fast Learning software configuration file;In actual use, the instruction items used and The type of monitoring item is simultaneously few, and slave developer grasps configuration method by ability in several minutes completely.
A400, connection monitoring software debug slave;
A500 judges whether the software of slave or hardware are problematic and modify in debugging process;
A600 disconnects monitoring software when the software or hardware to slave are modified, and stops debugging;
A700, slave developer modify to the software or hardware that need the slave changed;
A800 checks whether the command frame of slave and the agreement of status data frame are changed after modification, is held if modification Row step A900, it is no to then follow the steps A1000;
A900, slave developer voluntarily change the configuration file of monitoring software, and continue to execute step A1000;
A1000 connects monitoring software and returns to step A500.
In the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer, as shown in figure 3, step S300 packets Include following steps:
Described instruction item content is packaged as command frame by S310.
S320 checks whether there is instruction items content and is changed.
S330, when there is instruction items content to be changed, it is new command frame to repack modified instruction items content, and The new command frame is sent to be debugged to the slave to be debugged.The content of any one or more instruction items is changed When, it is new command frame all to repack modified instruction items content.
S340 directly transmits the command frame of packing to the slave to be debugged when not having instruction items content to be changed It is debugged.When all instructions item content is not all changed, then the command frame being packaged in step S310 is directly transmitted It is debugged to slave.
In the embodiment of the present invention, tuner can be adjusted operating instruction in slave operational process, to conduct Monitoring software checks whether instruction items have modification in time in the process of running, and update is issued to slave when instruction items have modification Instruction, so as to be debugged in real time to slave.
In the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer, as shown in figure 4, step S400, Include the following steps:
S410 generates response data frame parser and monitoring item set according to configuration file and selected monitored item, and The monitoring item set is shown on interface.
S420 receives the responsive data frame that the slave debugged returns, and is sent in parsing queue.
S430, the response data frame parser analyze the response to data frame one by one by first in first out, obtain from The state value of each monitoring item of machine.
S440 is updated corresponding in the monitoring item set on the display interface with the state value of each monitoring item of the slave The value of each monitoring item.
The state value real-time update for the monitored item that the basis of the monitored item of the display of display interface parses.
In the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer, as shown in figure 4, step S430, Include the following steps:
S431, when there is responsive data frame to be sent to the parsing queue, and it is that fictitious time starts to parse, and is arranged to parse mark The parsing mark is true;
S432, the response data frame parser take out a number of responses by first in first out from the parsing queue According to frame;
S433, the responsive data frame of the response data frame parser parsing taking-up are simultaneously parsed, obtain being debugged Slave each monitoring item state value;
S434 judges whether also have responsive data frame in the parsing queue, execution is returned if having from the parsing team The step of responsive data frame is taken out in row;
S435, if not responding to data frame in the parsing queue, it is false that the parsing mark, which is arranged, completes primary solution Analysis.
In the embodiment of the present invention, as slave running state monitoring software, load operating state configuration text after software is opened Part, monitoring software generate response data frame parser and monitoring item set according to configuration file and selected monitored item, later Software starts constantly to receive the responsive data frame that slave is sent, and the responsive data frame is cached to computer thread-safe Parse the medium device parsing to be resolved of queue.Stop receiving responsive data frame after monitoring software receives the instruction for stopping monitoring, Primary complete slave debugging monitoring terminates.
It is further comprising the steps of in the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer:
S600, in the state value to database for storing each monitoring item of slave debugged.It can be incited somebody to action as monitoring software The state value of each monitoring item of the slave parsed is saved in database, is carried out according to tune-up data convenient for slave developer Comprehensive analysis.
It is further comprising the steps of in the embodiment of the method for wherein one on-line debugging RS-485 bus slave computer:
S700, when needing to increase or change the instruction items or monitoring item that carry out slave debugging, to the configuration file It is reset, obtains new instruction configuration file or new operating status configuration file.
The configuration file includes instruction configuration file and operating status configuration file.
If introducing a kind of instruction items type not accounted for or monitoring item type in debugging, that can only seek to supervise The assistance for controlling software developer, the type of the instruction items or monitoring item that are newly introduced into is integrated into software, it is made to can also be configured.
Based on same inventive concept, a kind of system of on-line debugging RS-485 bus slave computers is also provided, due to this system solution Certainly the principle of problem is similar to a kind of aforementioned method of on-line debugging RS-485 bus slave computers, and therefore, the implementation of the system can be with Realize that overlaps will not be repeated according to the specific steps of preceding method.
The system of the on-line debugging RS-485 bus slave computers of the embodiment of the present invention, as shown in figure 5, include import modul 100, Setup module 200, instruction sending module 300 and parsing module 400, wherein:The import modul 100, for literary from configuration The instruction items and monitoring item information of slave debugging are read in part;The setup module 200, for according to be debugged from Machine is arranged the instruction items content to be debugged, and selects the monitoring item to be monitored;Described instruction sending module 300 is used In described instruction item content is packaged as command frame, and described instruction frame is sent to the slave to debug, to institute The slave that stating will be debugged is debugged;The parsing module 400, the number of responses returned for receiving the slave debugged According to frame, and analyze the response to the state value that data frame obtains each monitoring item of the slave debugged.
The embodiment of the present invention monitors the debugging process of RS-485 bus slave computers on-line by the software on computer, And return to the operating condition of slave.The assistance for not needing RS-485 bus masters avoids data exchange between different developers Or the waste for causing time and resource is linked up, while slave developer can observe slave operating status in real time, in time to slave Hardware or software be adjusted, improve the efficiency of equipment debugging, reduce debugging totle drilling cost.
Further include modified module 500 in the embodiment of the system of wherein one on-line debugging RS-485 bus slave computer, uses In when need change to be debugged slave instruction items and/or monitoring item when, reset described instruction item content and/ Or reselect the monitoring item to be monitored.
When the content of instruction items or monitoring item need change, it is only necessary to which slave developer is literary according to the configuration of importing Part information changes the monitoring item needed for corresponding instruction items content and selection, without asking RS-485 bus master developers' It assists, reduces debugging link, shorten resulting debug time.
In the embodiment of the system of wherein one on-line debugging RS-485 bus slave computer, described instruction sending module 300 Including being packaged submodule 310, checks submodule 320, beat again steamed stuffed bun module 330, and directly transmit submodule 340.Wherein:Institute It states and is packaged submodule 310, for described instruction item content to be packaged as command frame;The inspection submodule 320, for check be It is no to there is instruction items content to be changed;It is described to beat again steamed stuffed bun module 330, for when there is instruction items content to be changed, repacking Modified instruction items content is new command frame, and sends the new command frame and adjusted to the slave to be debugged Examination;It is described to directly transmit submodule 340, for when there is no instruction items content to be changed, directly transmitting the instruction of packing Frame is debugged to the slave to be debugged.
In the embodiment of the present invention, tuner may be adjusted operating instruction in slave operational process, to conduct Monitoring software checks whether instruction items content has modification in time in the process of running, and updates and be issued to when instruction items have modification The instruction of slave, so as to be debugged in real time to slave.
In the embodiment of the system of wherein one on-line debugging RS-485 bus slave computer, the parsing module 400 includes Resolver generates submodule 410, data frame receipt submodule 420, data frame analyzing submodule 430 and status display submodule Block 440.Wherein:The resolver generates submodule 410, for being generated according to the operating status configuration file being set Response data frame parser and monitoring item set, and the monitoring item set is shown on interface;Data frame receipt Module 420, the responsive data frame returned for receiving the slave debugged, and be sent in parsing queue;The data frame Analyzing sub-module 430, for analyzing the response to data one by one by first in first out using the response data frame parser Frame obtains the state value of each monitoring item of slave;The status display submodule 340, for the shape with each monitoring item of the slave State value updates the value of corresponding each monitoring item in the monitoring item set on the display interface.
Slave developer can intuitively observe slave operating status from reality interface, and make adaptation in time.
In the embodiment of the system of wherein one on-line debugging RS-485 bus slave computer, as shown in fig. 6, the data frame Analyzing sub-module 430 includes that true solution analyses mark setting unit 431, data frame extraction unit 432, resolution unit 433, judging unit 434, vacation parsing mark setting unit 435.Wherein:The true solution analyses mark setting unit 431, has responsive data frame hair for working as It is sent to the parsing queue, and it is that fictitious time starts to parse, and it is true that the parsing mark, which is arranged, to parse mark;The data frame carries Unit 432 is taken, for taking out one from the parsing queue by first in first out using the response data frame parser Responsive data frame;The resolution unit 433, the responsive data frame for being taken out using response data frame parser parsing is simultaneously It is parsed, obtains the state value of each monitoring item for the slave debugged;The judging unit 434, for judging the solution It analyses in queue and whether also has responsive data frame, handled if having and turning the data frame extraction unit;The false parsing mark is set Unit 435 is set, is false for the parsing mark when not responding to data frame in the parsing queue, to be arranged, completes primary Parsing.
Further include memory module 600 in the embodiment of the system of wherein one on-line debugging RS-485 bus slave computer, uses In the state value to database of each monitoring item for the slave that storage is debugged.Convenient for slave developer according to tune-up data Carry out comprehensive analysis.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously Cannot the limitation to the scope of the claims of the present invention therefore be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention Protect range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (11)

1. a kind of method of on-line debugging RS-485 bus slave computers, which is characterized in that include the following steps:
The instruction items and monitoring item information of slave debugging are read from configuration file;
According to the slave to be debugged, the instruction items content to be debugged is set, and selects the monitoring item to be monitored;
Described instruction item content is packaged as command frame, and by described instruction frame be sent directly to it is described to debug from Machine debugs the slave to be debugged;
It receives the responsive data frame that the slave debugged returns, and analyzes the response to data frame and obtain described debugged The state value of each monitoring item of slave;
Wherein, described that described instruction item content is packaged as command frame, and described instruction frame is sent directly to described to carry out The slave of debugging debugs the slave to be debugged, including,
Described instruction item content is packaged as command frame;
Instruction items content is checked whether there is to be changed;
When there is instruction items content to be changed, it is new command frame to repack modified instruction items content, and described in transmission New command frame is debugged to the slave to be debugged;
When not having instruction items content to be changed, the command frame for directly transmitting packing is debugged to the slave to be debugged.
2. the method for on-line debugging RS-485 bus slave computers according to claim 1, which is characterized in that further include following step Suddenly:
When need change to be debugged slave instruction items and/or monitoring item when, reset described instruction item content and/ Or reselect the monitoring item to be monitored.
3. the method for on-line debugging RS-485 bus slave computers according to claim 2, which is characterized in that the reception carries out The responsive data frame that the slave of debugging returns, and analyze the response to data frame and obtain each monitoring of the slave debugged The state value of item, includes the following steps:
Response data frame parser and monitoring item set are generated according to configuration file and selected monitored item, and the monitoring Item set is shown on interface;
The responsive data frame that the slave debugged returns is received, and is sent in parsing queue;
The response data frame parser analyzes the response to data frame one by one by first in first out, obtains each monitoring item of slave State value;
Corresponding each monitoring item in the monitoring item set on the display interface is updated with the state value of each monitoring item of the slave Value.
4. the method for on-line debugging RS-485 bus slave computers according to claim 3, which is characterized in that the response data Frame parser analyzes the response to data frame one by one by first in first out, obtains the state value of each monitoring item of slave, including with Lower step:
When there is responsive data frame to be sent to the parsing queue, and it is that fictitious time starts to parse, and the parsing is arranged to parse mark Mark is true;
The response data frame parser takes out a responsive data frame by first in first out from the parsing queue;
The responsive data frame of the response data frame parser parsing taking-up is simultaneously parsed, and each of the slave debugged is obtained The state value of monitoring item;
Judge whether also have responsive data frame in the parsing queue, execution is returned if having and is taken out from the parsing queue and is rung The step of answering data frame;
If not responding to data frame in the parsing queue, it is false that the parsing mark, which is arranged, completes one parsing.
5. the method for on-line debugging RS-485 bus slave computers according to any one of claims 1 to 4, which is characterized in that also Include the following steps:
In the state value to database for storing each monitoring item for the slave debugged.
6. the method for on-line debugging RS-485 bus slave computers according to claim 5, which is characterized in that further include following step Suddenly:
When needing to increase or change the instruction items or monitoring item that carry out slave debugging, the configuration file is set again It sets, obtains new instruction configuration file or new operating status configuration file;
The configuration file includes instruction configuration file and operating status configuration file.
7. a kind of system of on-line debugging RS-485 bus slave computers, which is characterized in that including import modul, setup module, instruction Sending module and parsing module, wherein:
The import modul, instruction items and monitoring item information for reading slave debugging from configuration file;
The setup module for according to the slave to be debugged, the instruction items content to be debugged to be arranged, and selects to want The monitoring item being monitored;
Described instruction sending module for described instruction item content to be packaged as command frame, and described instruction frame is directly transmitted To the slave to be debugged, the slave to be debugged is debugged;
The parsing module, the responsive data frame returned for receiving the slave debugged, and analyze the response to data frame Obtain the state value of each monitoring item of the slave debugged;
Wherein, described instruction sending module includes being packaged submodule, checks submodule, beats again steamed stuffed bun module, and directly transmit Submodule,
The packing submodule, for described instruction item content to be packaged as command frame;
The inspection submodule is changed for checking whether there is instruction items content;
It is described to beat again steamed stuffed bun module, be for when there is instruction items content to be changed, repacking modified instruction items content New command frame, and send the new command frame and debugged to the slave to be debugged;
It is described to directly transmit submodule, for when there is no instruction items content to be changed, directly transmitting the command frame of packing to wanting The slave debugged is debugged.
8. the system of on-line debugging RS-485 bus slave computers according to claim 7, which is characterized in that further include modification mould Block, for when needing to change the instruction items and/or monitoring item for the slave to be debugged, resetting described instruction item content And/or reselect the monitoring item to be monitored.
9. the system of on-line debugging RS-485 bus slave computers according to claim 8, which is characterized in that the parsing module Submodule, data frame receipt submodule, data frame analyzing submodule and status display submodule are generated including resolver, In:
The resolver generates submodule, for generating response data frame parser according to configuration file and selected monitored item With monitoring item set, and the monitoring item set is shown on interface;
The data frame receipt submodule, the responsive data frame returned for receiving the slave debugged, and it is sent to parsing In queue;
The data frame analyzing submodule, for parsing institute one by one by first in first out using the response data frame parser Responsive data frame is stated, the state value of each monitoring item of slave is obtained;
The status display submodule, for updating the monitoring on the display interface with the state value of each monitoring item of the slave The value of corresponding each monitoring item in item set.
10. the system of on-line debugging RS-485 bus slave computers according to claim 9, which is characterized in that the data frame Analyzing sub-module includes true solution analysis mark setting unit, data frame extraction unit, resolution unit, judging unit, vacation parsing mark Setting unit, wherein:
The true solution analyses mark setting unit, has responsive data frame to be sent to the parsing queue for working as, and parse mark and be Fictitious time starts to parse, and it is true that the parsing mark, which is arranged,;
The data frame extraction unit, for pressing first in first out from the parsing team using the response data frame parser A responsive data frame is taken out in row;
The resolution unit for the responsive data frame using response data frame parser parsing taking-up and is parsed, Obtain the state value of each monitoring item for the slave debugged;
The judging unit is carried for judging whether also have responsive data frame in the parsing queue if having and turning the data frame Unit is taken to be handled;
The false parsing mark setting unit, for when not responding to data frame in the parsing queue, the parsing to be arranged Mark is false, completes one parsing.
11. according to the system of claim 7 to 10 any one of them on-line debugging RS-485 bus slave computers, which is characterized in that Further include memory module, in the state value to database of each monitoring item for storing the slave debugged.
CN201410047846.0A 2014-02-11 2014-02-11 The method and system of on-line debugging RS-485 bus slave computers Active CN104834587B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410047846.0A CN104834587B (en) 2014-02-11 2014-02-11 The method and system of on-line debugging RS-485 bus slave computers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410047846.0A CN104834587B (en) 2014-02-11 2014-02-11 The method and system of on-line debugging RS-485 bus slave computers

Publications (2)

Publication Number Publication Date
CN104834587A CN104834587A (en) 2015-08-12
CN104834587B true CN104834587B (en) 2018-09-11

Family

ID=53812493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410047846.0A Active CN104834587B (en) 2014-02-11 2014-02-11 The method and system of on-line debugging RS-485 bus slave computers

Country Status (1)

Country Link
CN (1) CN104834587B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550118B (en) * 2016-01-27 2018-01-30 珠海格力电器股份有限公司 Debugging system and adjustment method
CN111462468A (en) * 2019-08-16 2020-07-28 中石化石油工程技术服务有限公司 Pre-debugging method for RS485 data acquisition system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135894A (en) * 2007-09-30 2008-03-05 江阴众和电力仪表有限公司 Built-in rotating machinery operation monitoring protecting equipment and setting method thereof
CN102508769A (en) * 2011-10-11 2012-06-20 北京锐安科技有限公司 Debugged program debugging method based on core-implanted debugger

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8306689B2 (en) * 2009-08-11 2012-11-06 The United States Of America As Represented By The Secretary Of The Navy Integrated net-centric diagnostics dataflow for avionics systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101135894A (en) * 2007-09-30 2008-03-05 江阴众和电力仪表有限公司 Built-in rotating machinery operation monitoring protecting equipment and setting method thereof
CN102508769A (en) * 2011-10-11 2012-06-20 北京锐安科技有限公司 Debugged program debugging method based on core-implanted debugger

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CserialPort类的RS-485多机通信设计与实现;王雷阳,李正生;《电子设计工程》;20111030;第19卷(第19期);正文第172-175页 *

Also Published As

Publication number Publication date
CN104834587A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
US20210352148A1 (en) Remote management for a computing device
CN102890481B (en) There is the handheld field maintenance tool in procedure communication tunnel
JP6073287B2 (en) Method and apparatus for sending a device description file to a host
US8793366B2 (en) Method and arrangement for diagnosing networks including field bus systems
JP5514040B2 (en) Operation management system, operation management method, and operation management apparatus
WO2011153792A1 (en) Method and system for running state detection
WO2016197737A1 (en) Self-check processing method, apparatus and system
US20140189103A1 (en) System for monitoring servers and method thereof
CN111052087A (en) Control system, information processing device, and abnormality factor estimation program
CN104834587B (en) The method and system of on-line debugging RS-485 bus slave computers
CN109032867A (en) A kind of method for diagnosing faults, device and equipment
CN108780486B (en) Context aware security self-evaluation
EP3926429A1 (en) Control system
JP2005291610A (en) Air conditioner control monitoring device and building control system
CN111124828A (en) Data processing method, device, equipment and storage medium
CN111917692A (en) Fuzzy test method, device, equipment and computer readable storage medium
Vitale et al. FTU toroidal magnet power supply slow control using ITER CODAC Core System
CN107769968B (en) Debugging and testing system of SNMP (simple network management protocol) agent in AFDX (avionics full Duplex switched Ethernet) network
CN105049217A (en) Method and system for controlling debugging interface of intelligent network equipment
JP2001356915A (en) Method for setting up communication link between incorporated server and client computer
JP2008134684A (en) Apparatus and program for verifying information communication device
WO2014167733A1 (en) Peripheral device of control system, and program for specifying location of fault in communication protocol
CN204406097U (en) The operation supervise and control device of Pneumatic silk feeding and environmental dust removal equipment
CN112968920B (en) Real-time monitoring system and method for fuel cell engine test data
US9386130B2 (en) Method of communications in a network interconnecting at least two power generators, and corresponding interfacing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant