CN116155322A - Method for debugging serial port of HPLC power line carrier module - Google Patents
Method for debugging serial port of HPLC power line carrier module Download PDFInfo
- Publication number
- CN116155322A CN116155322A CN202310221447.0A CN202310221447A CN116155322A CN 116155322 A CN116155322 A CN 116155322A CN 202310221447 A CN202310221447 A CN 202310221447A CN 116155322 A CN116155322 A CN 116155322A
- Authority
- CN
- China
- Prior art keywords
- command
- processing
- function
- serial port
- program
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B3/00—Line transmission systems
- H04B3/02—Details
- H04B3/46—Monitoring; Testing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B3/00—Line transmission systems
- H04B3/54—Systems for transmission via power distribution lines
Abstract
The invention discloses a method for debugging an HPLC power line carrier module serial port, which is characterized in that after a module debugging serial port receives an input command, the module debugging serial port carries out analysis processing according to the received command, and different operation processing is carried out according to the corresponding command; performing correct analysis according to the received setting command, and ending the program which cannot be analyzed correctly; the analysis command can be accurately analyzed, and the analysis command is processed; setting command parameters and judging whether the command parameters are legal or not; when the judgment is illegal, ending the program, and setting the program as a configuration value when the judgment is legal; outputting a power configuration result by the log; and (5) ending. The invention has the beneficial effects that: the serial port debugging method can reduce debugging time consumption, quickly inquire and set key information of the module, and improve development and problem positioning efficiency; by using the serial port debugging method, program flow test, problem and function verification can be more efficiently performed, and code reliability and product stability are improved.
Description
Technical Field
The invention relates to a method for positioning and solving problems through serial port debugging of all nodes in an HPLC power line carrier network, in particular to a method for serial port debugging of an HPLC power line carrier module.
Background
The HPLC power line carrier network has a plurality of field practical application scenes, and a large number of tests need to be carried out in advance in a laboratory during practical use, so that the problems that the field practical use is problematic and the data acquisition rate is influenced due to the fact that the field use cannot be normally used are avoided, and the practical field application is realized.
In a laboratory or actual field application, when a problem occurs in a module, the log information of the module can be checked by connecting the serial port software with a debugging serial port of the module, but the log information may not provide beneficial information for solving the problem, and the method for checking the problem is too single, so that the time cost for searching the problem is intangibly added. Because the module quantity is large, the large scale can reach two thousand scales, and all modules cannot be connected with logs, the difficulty of problem searching is greatly increased if the problem is unnecessary.
When functions are developed or problems are found, some processes need larger-scale environment triggering, some processes need specified environment operation and are limited by the environment, some processes cannot be quickly reproduced, only a large amount of time can be consumed, and more environments or scales are increased to realize the functions. When the module program is executed, the module program has no breakpoint function, if the module program is required to execute in a single step or select a specified step flow, multiple functional versions are required to be prepared, more time and effort are required, and in order to reduce the time cost, the invention provides a method for debugging the serial port of the HPLC power line carrier module.
Disclosure of Invention
In order to solve the problems, the invention provides a method for debugging a serial port of an HPLC power line carrier module.
The technical scheme of the invention is as follows: a method for debugging an HPLC power line carrier module serial port;
step one: command analysis processing, wherein after the module debugging serial port receives an input command, analysis processing is performed according to the received command, and different operation processing is performed according to the corresponding command; the input command is a setting command or a query command;
step two: performing correct analysis according to the received setting command, and ending the program which cannot be analyzed correctly; the analysis command can be accurately analyzed, and the analysis command is processed; setting command parameters and judging whether the command parameters are legal or not; when the judgment is illegal, ending the program, and when the judgment is legal, transmitting the frequency and setting the frequency as a configuration value; outputting a power configuration result by the log;
step three: and (5) ending.
The analysis processing selects two corresponding processing modes:
(1) When the input command is a setting command, setting the default carrying parameters of the command; the default carrying parameter is usually the value of the digital application to be validated in the function or the value of the contrast calculation bit operation; the set command exists in two forms:
the first form is: after the parameter value is set, the function flow process judges according to the parameter value, the judgment adopts a bit operation mode, and 32 bit operation of 32 bits can support 32 function judgment processes; the program calculates the result through the bit operation with the maximum support number reaching 32, and executes corresponding function processing, so that the function is judged according to the result of the bit operation; performing single-step/multi-step flow processing;
the second form is: setting the set parameter value to the corresponding parameter value processed by the function, and using the reset value to process the function when the function is processed; the general flow is a protocol flow of HPLC communication; the custom function flow is a scalable development flow developed by a developer;
the input command is a query command, the program analyzes the input query command, the corresponding query function is the running information of the module program, the information query is stored for processing, and then the designated query information is output to the log file in a serial port mode.
The setting command parameters are specifically as follows: when the command is a set command and when the command is a query command.
(1) When the command is a set command, the default carrying parameters of the set command are generally carried;
s1, judging whether the function performs bit operation processing according to a set command, if not, entering the designated function to set and assign the parameter;
s2, if the bit operation processing is carried out, corresponding function processing is carried out according to the bit operation result, and a user can carry out query setting according to different command operations so as to efficiently and rapidly debug the program code and verify the problem;
(2): when the command is a query command, carrying out designated command query, transmitting the queried corresponding information to debugging software through a serial port, and displaying the queried log information;
the single step/multi-step flow process is as follows:
inputting parameter values and judging bits of functions, performing operation calculation, and processing according to true results obtained by calculation results, wherein the results can be processed in 0-32 steps according to judgment of a developer user-defined processing flow; inputting parameter values to perform bit operation to take values, and executing flow processing of processing if the values are 1; the flow process specifically comprises the following steps: the function processing flow developed by the developer comprises a general protocol flow and a custom flow.
Compared with the prior art, the invention has the beneficial effects that: the serial port debugging method can reduce debugging time consumption, quickly inquire and set key information of the module, and improve development and problem positioning efficiency; by using the serial port debugging method, program flow test, problem and function verification can be more efficiently performed, and code reliability and product stability are improved.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Fig. 2 is a schematic flow chart showing the configuration of the parameter values of the present invention as the log display setting result of the current transmit power value.
FIG. 3 is a schematic diagram of a flow chart of displaying neighbor table information of a module through a log in the function processing of the invention.
Description of the embodiments
As shown in the figure: the method for debugging the serial port of the HPLC power line carrier module is characterized by comprising the following steps of:
step one: command analysis processing, wherein after the module debugging serial port receives an input command, analysis processing is performed according to the received command, and different operation processing is performed according to the corresponding command; the input command is a setting command or a query command;
step two: performing correct analysis according to the received setting command, and ending the program which cannot be analyzed correctly; the analysis command can be accurately analyzed, and the analysis command is processed; setting command parameters and judging whether the command parameters are legal or not; when the judgment is illegal, ending the program, and when the judgment is legal, transmitting the frequency and setting the frequency as a configuration value; outputting a power configuration result by the log;
step three: and (5) ending.
The analysis processing selects two corresponding processing modes:
(1) When the input command is a setting command, setting the default carrying parameters of the command; the default carrying parameter is usually the value of the digital application to be validated in the function or the value of the contrast calculation bit operation; the set command exists in two forms:
the first form is: after the parameter value is set, the function flow process judges according to the parameter value, the judgment adopts a bit operation mode, and 32 bit operation of 32 bits can support 32 function judgment processes; the program calculates the result through the bit operation with the maximum support number reaching 32, and executes corresponding function processing, so that the function is judged according to the result of the bit operation; performing single-step/multi-step flow processing;
the second form is: setting the set parameter value to the corresponding parameter value processed by the function, and using the reset value to process the function when the function is processed; the general flow is a protocol flow of HPLC communication; the custom function flow is a scalable development flow developed by a developer;
the input command is a query command, the program analyzes the input query command, the corresponding query function is the running information of the module program, the information query is stored for processing, and then the designated query information is output to the log file in a serial port mode.
The setting command parameters are specifically as follows: when the command is a set command and when the command is a query command.
(1) When the command is a set command, the default carrying parameters of the set command are generally carried;
s1, judging whether the function performs bit operation processing according to a set command, if not, entering the designated function to set and assign the parameter;
s2, if the bit operation processing is carried out, corresponding function processing is carried out according to the bit operation result, and a user can carry out query setting according to different command operations so as to efficiently and rapidly debug the program code and verify the problem;
(2): when the command is a query command, carrying out designated command query, transmitting the queried corresponding information to debugging software through a serial port, and displaying the queried log information;
the single step/multi-step flow process is as follows:
inputting parameter values and judging bits of functions, performing operation calculation, and processing according to true results obtained by calculation results, wherein the results can be processed in 0-32 steps according to judgment of a developer user-defined processing flow; inputting parameter values to perform bit operation to take values, and executing flow processing of processing if the values are 1; the flow process specifically comprises the following steps: the function processing flow developed by the developer comprises a general protocol flow and a custom flow.
The HPLC carrier module can verify the function processing flow in the development process through a serial port debugging method, a general protocol specification standard flow needs a specific scene to trigger, and can process the fault-tolerant processing flow in some error flows, the conventional flow can not trigger, and the processing beyond the threshold value, such as the read-write processing of program flash, can not do abnormal processing, can cause the program to enter the error flow through command processing in the crash, thereby verifying whether the program can normally run and process, and further verifying the reliability of the code; when the program upgrading service function is tested, the normal interactive execution is required by constructing some special command upgrading processes, the processing function of the upgrading processes, namely the inquiring site information of the upgrading processes, is directly called by the constructed commands, all sites are inquired in a multi-broadcasting mode, all the sites are reported, and whether the abnormal situation occurs to the module is repeatedly checked for many times; the file is quickly transmitted, different transmission rates are adjusted, whether the module can normally receive a processing pressure test or not is checked, a read-write address parameter of a program flash of some abnormal parameters is input in a fault tolerance test, the size parameter is applied to a program memory, the parameter processed by a general business process of the program is valid in the program, and the problem that whether the module normally operates or not is reduced is avoided by compiling a code programming program again is not needed, so that the stability of a product is improved.
Examples
When the program operation needs to enter the appointed step for execution, the method is used for processing. When the time consumption of the meter reading business function block is found to be longer, adding bit operation judgment of a plurality of processes in the function, and searching specific time-consuming function processing by configuring different parameter values, namely adding judgment of a plurality of bit operations in meter reading process; and the program serial port receives the setting command, the program analyzes the command, if the command is illegal, the program ends, different operation flows are selected according to the configured parameter values and the function processing, namely, according to the input parameter values, the function with longer time consumption is verified through the results obtained by the different parameter values to carry out bit operation judgment, the function executes the appointed step, whether the result can reach the expected result or not is judged through the displayed log information, and the specific flow chart is shown in the following figure 2.
Example 2
When the module operates, the power of the module is found to be required to be adjusted, and the power is amplified or reduced through a set command; the program serial port receives the setting command, the program analyzes and processes, if the command is illegal, the program ends, whether the command is legal is judged according to the configured parameter value, if the parameter value is configured as the current transmitting power value by a rule, the log displays the setting result, and a specific flow chart is shown in the following figure 2.
Example 33: when the module operates, the communication condition (uplink and downlink communication success rate and message receiving quantity) of the current module and other modules can be checked by checking neighbor table information of the module; and the program serial port receives the setting command, the program analyzes and processes, if the command is illegal, the function processing is finished, and neighbor table information of the module is displayed through a log, and a specific flow chart is shown in the following figure 3.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and a person skilled in the art may still make modifications and equivalents to the specific embodiments of the present invention with reference to the above embodiments, and any modifications and equivalents not departing from the spirit and scope of the present invention are within the scope of the claims of the present invention as filed herewith.
Claims (4)
1. The method for debugging the serial port of the HPLC power line carrier module is characterized by comprising the following steps of:
step one: command analysis processing, wherein after the module debugging serial port receives an input command, analysis processing is performed according to the received command, and different operation processing is performed according to the corresponding command; the input command is a setting command or a query command;
step two: performing correct analysis according to the received setting command, and ending the program which cannot be analyzed correctly; the analysis command can be accurately analyzed, and the analysis command is processed; setting command parameters and judging whether the command parameters are legal or not; when the judgment is illegal, ending the program, and setting the program as a configuration value when the judgment is legal; outputting configuration results by the log;
step three: and (5) ending.
2. The method for serial port debugging of an HPLC power line carrier module of claim 1, wherein:
the analysis processing selects two corresponding processing modes:
(1) When the input command is a setting command, setting the default carrying parameters of the command; the default carrying parameter is usually the value of the digital application to be validated in the function or the value of the contrast calculation bit operation; the set command exists in two forms:
the first form is: after the parameter value is set, the function flow process judges according to the parameter value, the judgment adopts a bit operation mode, and 32 bit operation of 32 bits can support 32 function judgment processes; the program calculates the result through the bit operation with the maximum support number reaching 32, and executes corresponding function processing, so that the function is judged according to the result of the bit operation; performing single-step/multi-step flow processing;
the second form is: setting the set parameter value to the corresponding parameter value processed by the function, and using the reset value to process the function when the function is processed; the general flow is a protocol flow of HPLC communication; the custom function flow is a scalable development flow developed by a developer;
the input command is a query command, the program analyzes the input query command, the corresponding query function is the running information of the module program, the information query is stored for processing, and then the designated query information is output to the log file in a serial port mode.
3. The method for serial port debugging of an HPLC power line carrier module of claim 1, wherein:
the setting command parameters are specifically as follows: when the command is a set command and when the command is a query command;
(1) When the command is a set command, the default carrying parameters of the set command are generally carried;
s1, judging whether the function performs bit operation processing according to a set command, if not, entering the designated function to set and assign the parameter;
s2, if the bit operation processing is carried out, corresponding function processing is carried out according to the bit operation result, and a user can carry out query setting according to different command operations so as to efficiently and rapidly debug the program code and verify the problem;
(2): when the command is a query command, performing designated command query, transmitting the queried corresponding information to debugging software through a serial port, and displaying the queried log information.
4. The method for serial port debugging of an HPLC power line carrier module of claim 2, wherein: the single step/multi-step flow process is as follows:
inputting parameter values and judging bits of functions, performing operation calculation, and processing according to true results obtained by calculation results, wherein the results can be processed in 0-32 steps according to judgment of a developer user-defined processing flow; inputting parameter values to perform bit operation to take values, and executing flow processing of processing if the values are 1; the flow process specifically comprises the following steps: the function processing flow developed by the developer comprises a general protocol flow and a custom flow.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310221447.0A CN116155322A (en) | 2023-03-09 | 2023-03-09 | Method for debugging serial port of HPLC power line carrier module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310221447.0A CN116155322A (en) | 2023-03-09 | 2023-03-09 | Method for debugging serial port of HPLC power line carrier module |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116155322A true CN116155322A (en) | 2023-05-23 |
Family
ID=86339033
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310221447.0A Pending CN116155322A (en) | 2023-03-09 | 2023-03-09 | Method for debugging serial port of HPLC power line carrier module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116155322A (en) |
-
2023
- 2023-03-09 CN CN202310221447.0A patent/CN116155322A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111459794B (en) | Communication network testing method, device, computer equipment and storage medium | |
WO2017000424A1 (en) | Protocol detection method and apparatus | |
CN112653738B (en) | Internet of things network debugging system and method | |
CN104850499A (en) | Automatic test method and device for base band software | |
CN114741283A (en) | Automatic interface testing method and device based on python design | |
CN105515893A (en) | Method for determining location of sample point | |
CN116107893A (en) | Heterogeneous platform embedded software test verification system and method | |
CN110928796B (en) | Automatic test platform | |
CN111381150B (en) | Chip automatic verification system and method thereof | |
CN107293330B (en) | Method and system for performing simulation verification on Random Access Memory (RAM) | |
CN115391219A (en) | Test case generation method and device, electronic equipment and storage medium | |
CN110888800A (en) | Service interaction function test method, device, storage medium and test system | |
CN113064816B (en) | Testing device and testing method for programmable logic device software | |
CN111459730A (en) | PCH (physical channel) end parameter adjusting method and system under Whitley platform | |
CN116545891A (en) | Automatic distribution network testing method based on intelligent equipment | |
CN116155322A (en) | Method for debugging serial port of HPLC power line carrier module | |
CN111427582A (en) | Management method, device and equipment of RT L code and computer readable storage medium | |
CN115014828A (en) | Automated device testing method and related device | |
CN113645052B (en) | Firmware debugging method and related equipment | |
CN111541589B (en) | Method, device and equipment for testing expansion module interface of intelligent terminal | |
CN111813665A (en) | Big data platform interface data testing method and system based on python | |
CN113535578A (en) | CTS (clear to send) testing method, device and testing equipment | |
CN111414299A (en) | SSD extended information obtaining method and device based on hdparm | |
CN111835590A (en) | Automatic interface test architecture and test method for cloud host product | |
CN110688299A (en) | Automatic test platform for application software of nuclear power plant |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |