CN107229531B - Communication interrupt data processing method based on high-voltage generator - Google Patents
Communication interrupt data processing method based on high-voltage generator Download PDFInfo
- Publication number
- CN107229531B CN107229531B CN201610179536.3A CN201610179536A CN107229531B CN 107229531 B CN107229531 B CN 107229531B CN 201610179536 A CN201610179536 A CN 201610179536A CN 107229531 B CN107229531 B CN 107229531B
- Authority
- CN
- China
- Prior art keywords
- data
- voltage generator
- communication
- timer
- interrupt
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a method for processing communication interrupt data based on a high-voltage generator, which writes communication interrupt data into a buffer area by judging whether a timer in the high-voltage generator is interrupted within an interrupt time interval and judging whether communication interrupt occurs or not, accelerates the communication receiving speed, and scans a communication data flag bit through a main program to process the data. The invention can avoid the phenomenon of equipment crash by reasonably processing the problem of large data volume of communication interruption, and can effectively save the running time of the program, thereby ensuring high scanning efficiency and high real-time performance of the main program.
Description
Technical Field
The invention relates to the technical field of communication interruption of high-voltage generators, in particular to a method for processing communication interruption data based on a high-voltage generator.
Background
At present, the technology of domestic medical X-ray machines is gradually mature, and manufacturers for domestic production of direct Digital Radiography (DR) equipment are in the endlessly like bamboo shoots in spring after rain. However, most manufacturers do not have the production technology of the high-voltage generator as the key component in the DR device, but adopt an Original designer production (ODM) or branding production (OEM) mode. However, because the protocol of the ODM or OEM mode high voltage generator is complex, if the communication interruption data volume is large, the communication interruption data is not processed by a reasonable algorithm, which may easily cause a machine crash.
Disclosure of Invention
The invention aims to provide a method for processing communication interrupt data based on a high-voltage generator, which is used for solving the problem that the high-voltage generator is easy to crash due to large communication data volume in the prior art.
The invention aims to provide a method for processing communication interrupt data based on a high-voltage generator, which comprises the following steps:
step 101, initializing a high voltage generator;
step 102, determining whether a timer in a high voltage generator is interrupted within a preset interruption time interval;
step 103, if the timer is not interrupted in the interruption time interval, determining whether communication interruption occurs;
step 104, if the communication interruption is determined to occur, further determining whether the data length of the buffer area is larger than a preset data length; otherwise, starting the main program and executing the step 106;
step 105, if the data length of the buffer area is determined to be larger than the preset data length, step 106 is executed;
step 106, judging whether the data flag bit is set;
step 107, if the data flag bit is determined to be set, reading the data in the buffer area, and clearing the data flag bit; otherwise, the step 102 is executed.
Further, the method also comprises the step of setting the execution flag if the timer is determined to be interrupted in the interruption time interval.
Further, the operation of setting the execution flag specifically includes: clearing the timer timing flag bit, starting the timer to count again, and setting the data flag.
Further, if the data length of the buffer area is determined not to be larger than the preset data length, the interrupt data is written into the buffer area.
Further, step 102 is preceded by: and setting the interrupt time interval of the timer in the high-voltage generator.
The technical scheme of the invention has the beneficial effects that: by judging whether a timer in a high-voltage generator is interrupted within an interruption time interval and judging whether communication interruption occurs or not, communication interruption data is written into a buffer area, the communication receiving speed is accelerated, and a main program scans a communication data zone bit to process data. The invention can avoid the phenomenon of equipment crash by reasonably processing the problem of large data volume of communication interruption, and can effectively save the running time of the program, thereby ensuring high scanning efficiency and high real-time performance of the main program.
Drawings
FIG. 1 is a flow chart of a method for processing data based on communication interrupt of a high voltage generator according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
The invention discloses a method for processing communication interrupt data based on a high-voltage generator, which comprises the following steps as shown in figure 1:
step S101, initializing a high-voltage generator;
step S102, determining whether a timer in a high-voltage generator is interrupted within a preset interruption time interval;
in the embodiment of the present invention, after the initialization process is performed on the high voltage generator, the interrupt time interval of the timer in the high voltage generator may be set, for example, the interrupt time interval of the timer may be set to 3 ms. And further judging whether the timer in the high voltage generator is interrupted within a preset interruption time interval, if the timer is determined not to be interrupted within the interruption time interval, executing step S103, and if the timer is interrupted within the interruption time interval, executing step S107.
Step S103, determining whether communication interruption occurs;
when it is determined that the timer is not interrupted within the interruption time interval, it is determined whether a communication interruption occurs, and if the communication interruption occurs, step S104 is performed, and if the communication interruption does not occur, the main program is started, and step 105 is performed.
Step S104, determining whether the data length of the buffer area is larger than the preset data length;
in this embodiment, when it is determined that the communication interruption occurs, it is further determined whether the data length of the buffer is greater than the preset data length, and if it is determined that the data length of the buffer is greater than the preset data length, step 105 is performed; if it is determined that the buffer data length is not greater than (i.e., less than or equal to) the preset data length, step S108 is performed.
Step S105, judging whether the data flag bit is set;
in this embodiment, the main program may be started to scan the data flag bit, if it is determined that the data flag bit is set, step S106 is executed, and if it is determined that the data flag bit is not set, step S102 is executed again;
step S106, reading the data in the buffer area and clearing the data zone bit;
step S107, setting an execution flag;
in this embodiment, the operation of setting the execution flag specifically includes: clearing the timer timing flag bit, starting the timer to count again, and setting the data flag.
Step S108, writing the interrupt data into the buffer.
The invention judges whether the timer in the high voltage generator is interrupted in the interruption time interval or not and judges whether the communication interruption occurs or not, thereby writing the communication interruption data into the buffer area, accelerating the communication receiving speed, and scanning the communication data zone bit through the main program to process the data. The invention can avoid the phenomenon of equipment crash by reasonably processing the problem of large data volume of communication interruption, and can effectively save the running time of the program, thereby ensuring high scanning efficiency and high real-time performance of the main program.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (5)
1. A method for interrupting data processing based on high voltage generator communication, the method comprising the steps of:
step 101, initializing a high voltage generator;
step 102, determining whether a timer in a high voltage generator is interrupted within a preset interruption time interval;
step 103, if the timer is not interrupted in the interruption time interval, determining whether communication interruption occurs;
step 104, if the communication interruption is determined to occur, further determining whether the data length of the buffer area is larger than a preset data length; otherwise, starting the main program and executing the step 106;
step 105, if the data length of the buffer area is determined to be larger than the preset data length, step 106 is executed;
step 106, judging whether the data flag bit is set;
step 107, if the data flag bit is determined to be set, reading the data in the buffer area, and clearing the data flag bit; otherwise, the step 102 is executed.
2. The method for high voltage generator communication interrupt data processing as recited in claim 1, further comprising performing a flag setting if it is determined that a timer is interrupted within the interrupt time interval.
3. The method for processing data based on high voltage generator communication interruption of claim 2, wherein the operation of setting the execution flag is specifically as follows: clearing the timer timing flag bit, starting the timer to count again, and setting the data flag.
4. The method of claim 2, wherein the interrupt data is written into the buffer if it is determined that the data length of the buffer is not greater than the predetermined data length.
5. The method for high voltage generator communication interrupt data processing as claimed in claim 2, wherein said step 102 further comprises: and setting the interrupt time interval of the timer in the high-voltage generator.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610179536.3A CN107229531B (en) | 2016-03-26 | 2016-03-26 | Communication interrupt data processing method based on high-voltage generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610179536.3A CN107229531B (en) | 2016-03-26 | 2016-03-26 | Communication interrupt data processing method based on high-voltage generator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107229531A CN107229531A (en) | 2017-10-03 |
CN107229531B true CN107229531B (en) | 2020-04-21 |
Family
ID=59931947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610179536.3A Active CN107229531B (en) | 2016-03-26 | 2016-03-26 | Communication interrupt data processing method based on high-voltage generator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107229531B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011164525A (en) * | 2010-02-15 | 2011-08-25 | Nec Corp | Multi-core system, and control method and program of multi-core system |
CN103176932A (en) * | 2011-12-23 | 2013-06-26 | 重庆重邮信科通信技术有限公司 | Method and system for DMA data transmission |
-
2016
- 2016-03-26 CN CN201610179536.3A patent/CN107229531B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011164525A (en) * | 2010-02-15 | 2011-08-25 | Nec Corp | Multi-core system, and control method and program of multi-core system |
CN103176932A (en) * | 2011-12-23 | 2013-06-26 | 重庆重邮信科通信技术有限公司 | Method and system for DMA data transmission |
Also Published As
Publication number | Publication date |
---|---|
CN107229531A (en) | 2017-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102981825B (en) | A kind of management method of mobile terminal back-end data and system | |
US11217279B2 (en) | Method and device for adjusting video playback speed | |
US10943010B2 (en) | Generation of a random value for a child process | |
EP2863320A2 (en) | Method, terminal and electronic device for processing an e-book document | |
CN104077194A (en) | Text input protection method and text input protection device | |
JP2013219766A (en) | Wireless data network switching method and electronic device | |
KR20200135790A (en) | Method and terminal for random access | |
CN107229531B (en) | Communication interrupt data processing method based on high-voltage generator | |
CN116820828B (en) | Method and device for setting correctable error threshold, electronic equipment and storage medium | |
CN107469352A (en) | The resource caching method of game front end, storage medium | |
CN106162577A (en) | A kind of information push method, and message pushing equipment | |
CN105680983B (en) | A kind of method and apparatus solving rate-matched and deinterleaving | |
US11895662B2 (en) | Method and device for determining size of resource block group and storage medium | |
CN106683033B (en) | Out-of-order OpenGL interface processing method | |
EP3144934B1 (en) | Audio play method and device | |
CN110362448A (en) | A kind of GPU management-control method and relevant apparatus | |
CN110851433A (en) | Key optimization method for key value storage system, storage medium, electronic device and system | |
CN108781170B (en) | Configuration device and method | |
US10020825B1 (en) | Method and apparatus for turbo decoder dynamic iteration control | |
US8224357B2 (en) | Method for paging a mobile unit based on previous network interactions | |
CN111615841A (en) | Method for determining UE moving state, user equipment and computer storage medium | |
CN106535084A (en) | MTC terminal control method and device | |
CN110955515A (en) | File processing method and device, electronic equipment and storage medium | |
CN105527637A (en) | BCH decoding method and device in Beidou satellite navigation positioning system | |
CN113270120B (en) | Data compression method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |