Hammer riveting process control method and device based on single-chip microcomputer, single-chip microcomputer and medium
By using a microcontroller-based riveting process control method, an automatic control strategy is generated by utilizing a target process parameter array and a preset strategy. This solves the problems of low efficiency and poor consistency caused by reliance on worker experience in pneumatic riveting systems, and achieves efficient riveting process control.
Patent Information
- Application Number
- CN202510207833.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-10-17
AI Technical Summary
In existing technologies, the parameter control of pneumatic hammer riveting systems relies on worker experience, resulting in low efficiency and difficulty in ensuring consistency during the riveting process.
A microcontroller-based riveting process control method is adopted. By determining the target process parameter array of the current riveting process, the current data set is obtained, and a target control strategy is generated based on preset parameter judgment criteria and strategies to automatically control the target riveting gun.
The automatic control of the riveting process has been achieved, which has improved work efficiency and ensured the consistency of riveting quality.
Smart Images

Figure CN120802698A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quality control of aviation assembly process, and particularly relates to a hammer riveting process control method and device based on a single-chip microcomputer, a single-chip microcomputer and a medium. BACKGROUND
[0002] In the field of aircraft manufacturing, the assembly link is an important link in the aircraft manufacturing process, and the pneumatic hammer riveting, as a traditional manual riveting technology, is widely used in the assembly connection of small space or complex connection due to its small and flexible tool and convenient operation.
[0003] Generally, the pneumatic hammer riveting system is a collision system composed of a rivet gun system, a rivet and a anvil. The forming mode of riveting is that the rivet hammer in the rivet gun system impacts the rivet to produce elastic-plastic deformation, and then forms a head. In the riveting production practice, the size of the input air pressure is adjusted to change the riveting impact force and frequency. In the prior art, the input air pressure, the clamping force and the riveting force of the pneumatic hammer riveting gun and other parameters are directly or indirectly controlled by the riveting skill personnel. The control method depends on the process experience and the operation experience of workers.
[0004] However, the quality of manual riveting mainly based on experience is difficult to unify, and the consistency is difficult to control, which reduces the working efficiency of the hammer riveting process. Therefore, how to realize automatic control of the hammer riveting process and improve the working efficiency of the hammer riveting process is a problem to be solved at present. SUMMARY
[0005] The present application provides a hammer riveting process control method and device based on a single-chip microcomputer, a single-chip microcomputer and a medium, which can solve the problem of low working efficiency of the hammer riveting process.
[0006] According to an aspect of the present application, a hammer riveting process control method based on a single-chip microcomputer is provided, the method is executed by a single-chip microcomputer, and the method comprises:
[0007] determining a target process parameter array corresponding to the current riveting process based on the current riveting process and the rivet gun type of the target rivet gun, and obtaining a current data set corresponding to the current time in the current riveting process;
[0008] performing numerical judgment on the current data set based on a preset parameter judgment standard and the target process parameter array, to generate a numerical judgment result set corresponding to the current riveting process;
[0009] generating a target control strategy corresponding to the current riveting process based on a preset strategy generation process and the numerical judgment result set, and performing hammer riveting process control on the target rivet gun based on the target control strategy.
[0010] According to another aspect of the present application, there is provided a hammering process control device based on a single-chip microcomputer, which is integrated in a single-chip microcomputer, and which comprises:
[0011] a data acquisition module configured to determine a target process parameter array corresponding to the current riveting process based on the current riveting process and a rivet gun type of the target rivet gun, and to acquire a current data set corresponding to a current time in the current riveting process;
[0012] a numerical judgment module configured to perform numerical judgment on the current data set based on a preset parameter judgment standard and the target process parameter array, and to generate a numerical judgment result set corresponding to the current riveting process;
[0013] a strategy generation module configured to generate a target control strategy corresponding to the current riveting process based on a preset strategy generation process and the numerical judgment result set, and to perform hammering process control on the target rivet gun based on the target control strategy.
[0014] According to another aspect of the present application, there is provided a single-chip microcomputer, which comprises:
[0015] at least one processor; and
[0016] a memory in communication connection with the at least one processor; wherein
[0017] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the hammering process control method based on a single-chip microcomputer according to any one of the embodiments of the present application.
[0018] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to perform the hammering process control method based on a single-chip microcomputer according to any one of the embodiments of the present application when executed by the processor.
[0019] According to another aspect of the present application, there is provided a computer program product comprising a computer program for enabling a processor to perform the hammering process control method based on a single-chip microcomputer according to any one of the embodiments of the present application when executed by the processor.
[0020] The technical solution of the embodiment of the present invention determines the target process parameter array corresponding to the current riveting process based on the current riveting process and the rivet gun type of the target riveting gun, and obtains the current data set corresponding to the current moment in the current riveting process. Furthermore, a numerical judgment is performed on the current data set based on the preset parameter judgment criteria and the target process parameter array to generate a numerical judgment result set corresponding to the current riveting process. Finally, a target control strategy corresponding to the current riveting process is generated based on the preset strategy generation process and the numerical judgment result set, and the hammer riveting process of the target riveting gun is controlled based on the target control strategy. By using a unified algorithm process to control the hammer riveting process, the problem of low working efficiency of the hammer riveting process is solved, and the hammer riveting process can be automatically controlled, thereby improving the working efficiency of the hammer riveting process.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is a flow chart of a method for controlling a hammer riveting process based on a single chip microcomputer according to the first embodiment of the present invention;
[0024] Figure 2 This is a flow chart of a single chip microcomputer-based hammer riveting process control method according to the second embodiment of the present invention;
[0025] Figure 3 This is a flow chart of an optional single chip microcomputer-based hammer riveting process control method provided according to the second embodiment of the present invention;
[0026] Figure 4 This is a flow chart of a target control strategy generation process provided in accordance with the second embodiment of the present invention;
[0027] Figure 5 2 is a schematic structural diagram of a single-chip microcomputer-based hammer riveting process control device according to a third embodiment of the present invention;
[0028] Figure 6 The present invention is a schematic structural diagram of a single chip microcomputer for implementing a single chip microcomputer-based hammer riveting process control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", "target" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment one
[0032] Figure 1 A flow chart of a single-chip microcomputer-based hammer riveting process control method is provided for the first embodiment of the present application. The present embodiment can be applicable to the automatic control of manual pneumatic hammer riveting process. The method can be executed by a single-chip microcomputer-based hammer riveting process control device, which can be realized in the form of hardware and / or software, and can be configured in a single-chip microcomputer. As shown in the figure, the method comprises: Figure 1
[0033] S110, determining a target process parameter array corresponding to the current riveting process based on the current riveting process and the rivet gun type of the target rivet gun, and obtaining a current data set corresponding to the current time in the current riveting process.
[0034] Among them, the riveting process can refer to the operation process that needs to be riveted. Generally, different rivets correspond to different riveting processes. The current riveting process can refer to the riveting process that needs to be completed at the current time. The target rivet gun can refer to the selected rivet gun for riveting operation. Generally, the corresponding target rivet gun can be determined according to the actual application needs. The rivet gun type can refer to the model parameter of the target rivet gun.
[0035] The process parameters can refer to basic indicators required to achieve the riveting process. For example, the process parameters can be a number of hits indicator, a clamping force indicator, and a riveting force indicator. The process parameter array can refer to a set of various process parameters corresponding to the same riveting process. The target process parameter array can refer to a process parameter array corresponding to the current riveting process. In an optional embodiment, the target process parameter array can include a target number of hits threshold, a target clamping force interval, and a target riveting force peak interval. The target number of hits threshold can refer to a value in the target process parameter array for evaluating the number of hits. Generally, the target number of hits threshold can represent the number of hits of the riveting force indicator that should be reached in the process of the riveting process from the initial state to the deformation of the rivet. For example, the target number of hits threshold can be 20 or 30. The target clamping force interval can refer to a value in the target process parameter array for evaluating the range of the clamping force indicator. Generally, the target clamping force interval can represent the range of the axial force applied by the artificial hammer to the rivet gun-rivet to limit the displacement of the rivet gun in the artificial hammer riveting process. For example, the target clamping force interval can be [50, 70]. The target riveting force peak interval can refer to a value in the target process parameter array for evaluating the range of the riveting force indicator. Generally, the target riveting force peak interval can represent the range of the peak value of the single hit force signal of the rivet gun in the riveting process. For example, the target riveting force peak interval can be [300, ∞).
[0036] The current data can refer to data collected at the current time. For example, the current data can be the number of hits or a riveting force signal sequence. The current data set can refer to a set of various current data corresponding to the same current time. In an optional embodiment, the current data set can include a current number of hits and a current riveting force signal sequence. The current number of hits can refer to the number of hits of the hammer riveting corresponding to the current time. For example, the current number of hits can represent the number of hits of the riveting force indicator reached from the start of the hammer riveting process to the current time. The current riveting force signal sequence can refer to a riveting force signal sequence corresponding to the current time. For example, the current riveting force signal sequence can represent the number of all riveting force signals from the start of the hammer riveting process to the current time. Generally, the number of data points in the current riveting force signal sequence can represent the current number of data points. The current number of data points can refer to the total number of data points corresponding to the current time. For example, the current number of data points can represent the number of all riveting force signals from the start of the hammer riveting process to the current time.
[0037] It is worth noting that in the embodiment of the present application, the force sensor integrated on the top iron behind the rivet can be used to collect data of the riveting force signal.
[0038] S120, numerical value judgment is performed on the current data set based on the preset parameter judgment standard and the target process parameter array, and a numerical value judgment result set corresponding to the current riveting process is generated.
[0039] The preset parameter judgment standard can refer to a standard condition preset for numerical value judgment of each current data in the current data set. For example, the preset parameter judgment standard can be numerical value judgment of the current number of hits using the target number of hits threshold, or numerical value judgment of the current riveting force signal sequence using the target jacking force interval and the target riveting force peak value interval.
[0040] The numerical value judgment result can refer to a judgment result obtained by numerical value judgment of the current data based on the preset parameter judgment standard and the target process parameter array. The numerical value judgment result set can refer to a set composed of each numerical value judgment result corresponding to the same current data set.
[0041] S130, a target control strategy corresponding to the current riveting process is generated based on the preset strategy generation process and the numerical value judgment result set, and the target riveting gun is controlled based on the target control strategy.
[0042] The preset strategy generation process can refer to a standard process preset for limiting the control strategy generation process. For example, the preset strategy generation process can include each process of secondary evaluation of the numerical value judgment result set. The target control strategy can refer to a control method for indicating the pneumatic hammer riveting operation corresponding to the current riveting process. For example, the target control strategy can be to turn off the pneumatic hammer riveting operation, or to turn on the pneumatic hammer riveting operation.
[0043] The technical scheme of the embodiment of the application determines the target process parameter array corresponding to the current riveting process through the current riveting process and the riveting gun type of the target riveting gun, and obtains the current data set corresponding to the current time in the current riveting process. Further, numerical value judgment is performed on the current data set based on the preset parameter judgment standard and the target process parameter array, and a numerical value judgment result set corresponding to the current riveting process is generated. Finally, a target control strategy corresponding to the current riveting process is generated based on the preset strategy generation process and the numerical value judgment result set, and the target riveting gun is controlled based on the target control strategy. Since the hammer riveting process is controlled using a unified algorithm process, the problem of low work efficiency of the hammer riveting process is solved, and automatic control of the hammer riveting process is achieved, thereby improving the work efficiency of the hammer riveting process.
[0044] Embodiment two
[0045] Figure 2A flowchart of a hammer riveting process control method based on a single-chip microcomputer is provided for Embodiment Two of the present application. This embodiment is based on the above-mentioned embodiment and is refined. In this embodiment, the operation of determining the target process parameter array corresponding to the current riveting process based on the current riveting process and the riveting gun type of the target riveting gun is refined. Specifically, it can include: determining the rivet parameters of the target rivet corresponding to the current riveting process based on the current riveting process and the preset process standard; and determining the target process parameter array corresponding to the current riveting process in the preset process parameter set based on the riveting gun type of the target riveting gun and the rivet parameters of the target rivet. As shown in FIG. 10, the method includes: Figure 2
[0046] S210, determining the rivet parameters of the target rivet corresponding to the current riveting process based on the current riveting process and the preset process standard.
[0047] The preset process standard can refer to a rule predefined for process flow definition of the riveting process. For example, the preset process standard can include various riveting processes and rivet types corresponding to various riveting processes. The target rivet can refer to a rivet selected for use in the current riveting process. For example, the current riveting process can be matched in the preset process standard to determine the rivet corresponding to the riveting process consistent with the current riveting process as the target rivet corresponding to the current riveting process. The rivet parameters can refer to specification parameters of the rivet. For example, the rivet parameters can include rivet number and rivet length, etc.
[0048] S220, determining the target process parameter array corresponding to the current riveting process in the preset process parameter set based on the riveting gun type of the target riveting gun and the rivet parameters of the target rivet.
[0049] The preset process parameter set can refer to a set predefined for combination of process parameters included in various riveting processes. Generally, the process parameters corresponding to various riveting processes can be determined based on historical test processes and preset riveting acceptance standards, and the various riveting processes and corresponding process parameters can be combined to generate the preset process parameter set.
[0050] Specifically, before obtaining the current data set corresponding to the current time in the current riveting process, the rivet parameters of the target rivet corresponding to the current riveting process can be matched in the preset process standard based on the current riveting process, and then the target process parameter array corresponding to the current riveting process can be matched in the preset process parameter set based on the riveting gun type of the target riveting gun and the rivet parameters of the target rivet, thereby providing an effective basis for subsequent operations.
[0051] It is worth noting that in the embodiment of the present application, even if the rivet guns are of the same type, the peak striking force and the striking frequency output by the rivet guns will be different in different riveting processes. Therefore, in order to accurately limit the process parameters of the riveting process, it is necessary to set corresponding parameter reference indexes according to the output characteristics of different rivet guns and different rivet models and sizes. Generally, the process parameter array corresponding to the same model of rivet gun and the same rivet model and length of rivet is fixed.
[0052] S230, acquiring a current data set corresponding to a current time in a current riveting process; wherein the target process parameter array comprises a target striking number threshold, a target clamping force interval and a target riveting force peak interval; and the current data set comprises a current striking number and a current riveting force signal sequence.
[0053] It is worth noting that before acquiring the current data set corresponding to the current time in the current riveting process, the variable parameters involved in the hammer riveting process control method can be initialized in advance. For example, the current data point number i, the current riveting force signal sequence {F(i)} and the current striking number n can be reset to zero, thereby ensuring the independent judgment of the current riveting process and avoiding judgment errors caused by data overlap.
[0054] S240, threshold judging the current striking number based on the target striking number threshold, to generate a first numerical judgment result corresponding to the current riveting process.
[0055] The first numerical judgment result can refer to the judgment result generated by threshold judging the current striking number with the target striking number threshold. For example, the first numerical judgment result can be that the current striking number is greater than the target striking number threshold, or that the current striking number is less than the target striking number threshold.
[0056] S250, determining a candidate riveting force signal of a target historical time corresponding to the current riveting process based on the first numerical judgment result and the current riveting force signal sequence, and numerically judging the candidate riveting force signal based on the target clamping force interval, to generate a second numerical judgment result corresponding to the current riveting process.
[0057] The target historical time can refer to a preselected historical time point. Generally, the target historical time can be determined according to the data acquisition point. For example, if the current data point number is i, the target historical time can be (i-5). The candidate riveting force signal can refer to the riveting force signal value corresponding to the target historical time. For example, if the current riveting force signal sequence is {F(i)} and the target historical time is (i-5), the candidate riveting force signal can be represented as F(i-5).
[0058] The second numerical judgment result can be a judgment result generated after the target riveting force interval is used to perform numerical judgment on the candidate riveting force signal. For example, the second numerical judgment result can be that the candidate riveting force signal is greater than the target riveting force interval, or that the candidate riveting force signal is less than the target riveting force interval.
[0059] It is worth noting that generally, when the first numerical judgment result is that the current number of hits is less than the target number of hits threshold, the judgment process of the second numerical judgment result is performed. If the second numerical judgment result is that the candidate riveting force signal is greater than the maximum value of the target riveting force interval, it can be indicated that the data read at the current moment should enter the calculation process of the riveting hit force peak value, otherwise it is indicated that the data read at the current moment belongs to the category of the riveting force. Therefore, it can be prevented that misjudgment occurs, and it is ensured that the riveting process is performed after the riveting force is in place, thereby ensuring the accuracy of the automatic hammer riveting process.
[0060] S260, determining a first preset subsequence corresponding to the current riveting process based on the second numerical judgment result and the current riveting force signal sequence, and performing numerical judgment on the candidate riveting force signal based on the first preset subsequence to generate a third numerical judgment result corresponding to the current riveting process.
[0061] The first preset subsequence can be a subsequence in the current riveting force signal sequence that is pre-set for performing numerical judgment on the candidate riveting force signal. For example, the first preset subsequence can include the riveting force signal values from the target historical moment to the current moment in the current riveting force signal sequence. Specifically, taking the current riveting force signal sequence as {F(i)} and the target historical moment as (i-5) as an example, the first preset subsequence can be represented as {F(i-5:i)}.
[0062] The third numerical judgment result can be a judgment result generated after the first preset subsequence is used to perform numerical judgment on the candidate riveting force signal. For example, the third numerical judgment result can be that the candidate riveting force signal is a peak value of the first preset subsequence, or that the candidate riveting force signal is not a peak value of the first preset subsequence.
[0063] It is worth noting that generally, when the second numerical judgment result is that the candidate riveting force signal is less than the maximum value of the target riveting force interval, the first preset subsequence corresponding to the current riveting process is determined.
[0064] S270, combining the first numerical judgment result, the second numerical judgment result and the third numerical judgment result to generate a numerical judgment result set corresponding to the current riveting process.
[0065] Specifically, after obtaining the current data set corresponding to the current time in the current riveting process, the current number of hits can be threshold judged based on the target number of hits threshold to generate a first numerical judgment result corresponding to the current riveting process. If the first numerical judgment result is that the current number of hits is less than the target number of hits threshold, a candidate riveting force signal of the target historical time corresponding to the current riveting process is determined, and the candidate riveting force signal is numerically judged using the maximum value of the target hold-down force interval to generate a second numerical judgment result corresponding to the current riveting process. If the second numerical judgment result is that the candidate riveting force signal is less than the maximum value of the target hold-down force interval, a first preset subsequence corresponding to the current riveting process is determined, and the candidate riveting force signal is numerically judged using the first preset subsequence to generate a third numerical judgment result corresponding to the current riveting process. Thus, the first, second, and third numerical judgment results are combined to generate a numerical judgment result set corresponding to the current riveting process, providing an effective basis for subsequent operations.
[0066] S280、If the first numerical judgment result is that the current number of hits is greater than the target number of hits threshold, a target control strategy containing a close electromagnetic valve instruction is generated.
[0067] The electromagnetic valve can refer to an electrically controlled valve element that controls the on-off of the input gas of the rivet gun. The close electromagnetic valve instruction can refer to an instruction for controlling the electromagnetic valve to perform a closing operation. The close electromagnetic valve instruction can achieve the closing of the pneumatic hammer riveting operation.
[0068] Specifically, if the first numerical judgment result is that the current number of hits is greater than the target number of hits threshold, a target control strategy containing a close electromagnetic valve instruction can be generated. Thus, the hammer riveting process can be stopped after meeting the effective number of hits requirement. This not only ensures the forming quality of riveting, but also reduces the probability of damaging the plate and rivet.
[0069] It is worth noting that before the first numerical judgment result is that the current number of hits is greater than the target number of hits threshold, a target control strategy containing a close electromagnetic valve instruction can be generated according to a pre-set hit strategy. For example, if the target number of hits threshold is 20 times, and the pre-set hit strategy is to hit 10 times, wait for 10 seconds to make the metal rebound, and hit again after 10 seconds. When the current number of hits is 10, a target control strategy containing a close electromagnetic valve instruction can be generated, thereby avoiding unnecessary waste of resources.
[0070] S290, if the second numerical judgment result is that the candidate riveting force signal is greater than the target clamping force interval, determining a current clamping force value corresponding to the current time based on the current riveting force signal sequence, performing numerical judgment on the current clamping force value based on the target clamping force interval, generating a fourth numerical judgment result corresponding to the current riveting process, and generating a target control strategy corresponding to the current riveting process based on the fourth numerical judgment result.
[0071] The current clamping force value can refer to a clamping force value corresponding to the current time. In an optional implementation, determining the current clamping force value corresponding to the current time based on the current riveting force signal sequence can include: determining a second preset subsequence corresponding to the current riveting process based on the current riveting force signal sequence; the second preset subsequence is different from the first preset subsequence; and calculating a mean value of the second preset subsequence to generate a mean value calculation result, and taking the mean value calculation result as the current clamping force value corresponding to the current time. The second preset subsequence can refer to a subsequence in the current riveting force signal sequence that is used to calculate the current clamping force value. Generally, the second preset subsequence can include riveting force signal values in a historical time period in the current riveting force signal sequence. For example, the current riveting force signal sequence is {F(i)}, and the historical time period is (i-40) to (i-6), and the second preset subsequence can be represented as {F(i-40:i-6)}. Specifically, before generating the fourth numerical judgment result, the second preset subsequence corresponding to the current riveting process can be determined in advance in the current riveting force signal sequence, and the mean value of the second preset subsequence is calculated, and the mean value calculation result is taken as the current clamping force value corresponding to the current time. Thus, the problem of insufficient data acquisition caused by only one set of force sensors is avoided, and an effective basis is provided for subsequent operations.
[0072] The fourth numerical judgment result can refer to a judgment result generated by performing numerical judgment on the current clamping force value using the target clamping force interval. For example, the fourth numerical judgment result can be that the current clamping force value is in the target clamping force interval, or that the current clamping force value is not in the target clamping force interval.
[0073] In another optional embodiment, the target control strategy corresponding to the current riveting process is generated based on the fourth numerical judgment result, including: if the fourth numerical judgment result is that the current clamping force value is in the target clamping force interval, a target control strategy containing an electromagnetic valve opening instruction is generated. The electromagnetic valve opening instruction can be an instruction for controlling the electromagnetic valve to open. The opening of the electromagnetic valve can start the pneumatic hammer riveting operation. Specifically, after the fourth numerical judgment result corresponding to the current riveting process is generated, the fourth numerical judgment result can be evaluated again. If the fourth numerical judgment result is that the current clamping force value is in the target clamping force interval, a target control strategy containing an electromagnetic valve opening instruction is generated. Otherwise, if the fourth numerical judgment result is that the current clamping force value is not in the target clamping force interval, a target control strategy containing an electromagnetic valve closing instruction is generated. Thus, by judging the current clamping force value, the riveter is allowed to work when the clamping force meets the requirements, and the riveting process that does not meet the clamping force requirements is interrupted, so that the clamping force in the hammer riveting process is ensured to be within the required range, and automatic hammer riveting is achieved.
[0074] S2100, if the third numerical judgment result is that the selected riveting force signal is the peak value of the first preset subsequence, the selected riveting force signal is numerically judged based on the target riveting force peak interval, the fifth numerical judgment result corresponding to the current riveting process is generated, and the target control strategy corresponding to the current riveting process is generated based on the fifth numerical judgment result.
[0075] The fifth numerical judgment result can be a judgment result generated by numerically judging the selected riveting force signal using the target riveting force peak interval. For example, the fifth numerical judgment result can be that the selected riveting force signal is in the target riveting force peak interval, or that the selected riveting force signal is not in the target riveting force peak interval.
[0076] In an optional embodiment, the target control strategy corresponding to the current riveting process is generated based on the fifth numerical judgment result, including: if the fifth numerical judgment result is that the selected riveting force signal is in the target riveting force peak interval, a target control strategy containing an electromagnetic valve closing instruction is generated. Specifically, after the fifth numerical judgment result corresponding to the current riveting process is generated, the fifth numerical judgment result can be evaluated again. If the fifth numerical judgment result is that the selected riveting force signal is in the target riveting force peak interval, a target control strategy containing an electromagnetic valve closing instruction is generated. If the fifth numerical judgment result is that the selected riveting force signal is not in the target riveting force peak interval, the operation of obtaining the current data set corresponding to the current time in the current riveting process is returned. Thus, the number of hits can be ensured to be valid, providing an effective basis for subsequent operations.
[0077] S2110, control the hammering process of the target riveting gun based on the target control strategy.
[0078] The technical scheme of the embodiment of the application determines the rivet parameters of the target rivet corresponding to the current riveting process according to the current riveting process and the preset process standard, determines the target process parameter array corresponding to the current riveting process in the preset process parameter set based on the riveting gun type of the target riveting gun and the rivet parameters of the target rivet, and acquires the current data set corresponding to the current time in the current riveting process. Then, the threshold value of the target number of hits is used to judge the current number of hits to generate the first numerical judgment result corresponding to the current riveting process. The selected riveting force signal of the target historical time corresponding to the current riveting process is determined based on the first numerical judgment result and the current riveting force signal sequence, and the selected riveting force signal is numerically judged based on the target jacking force interval to generate the second numerical judgment result corresponding to the current riveting process. The first preset subsequence corresponding to the current riveting process is determined based on the second numerical judgment result and the current riveting force signal sequence, and the selected riveting force signal is numerically judged based on the first preset subsequence to generate the third numerical judgment result corresponding to the current riveting process. The first numerical judgment result, the second numerical judgment result and the third numerical judgment result are combined to generate the numerical judgment result set corresponding to the current riveting process. Further, if the first numerical judgment result is that the current number of hits is greater than the target number of hits, the target control strategy containing the closing electromagnetic valve instruction is generated. If the second numerical judgment result is that the selected riveting force signal is greater than the target jacking force interval, the current jacking force value corresponding to the current time is determined based on the current riveting force signal sequence, and the current jacking force value is numerically judged based on the target jacking force interval to generate the fourth numerical judgment result corresponding to the current riveting process, and the target control strategy corresponding to the current riveting process is generated based on the fourth numerical judgment result. If the third numerical judgment result is that the selected riveting force signal is the peak value of the first preset subsequence, the selected riveting force signal is numerically judged based on the target riveting force peak interval to generate the fifth numerical judgment result corresponding to the current riveting process, and the target control strategy corresponding to the current riveting process is generated based on the fifth numerical judgment result. Finally, the target control strategy is used to control the hammering process of the target riveting gun. Since the hammering process is controlled by using a unified algorithm process, the problem of low work efficiency of the hammering process is solved, automatic control of the hammering process is realized, and the work efficiency of the hammering process is improved.
[0079] Figure 3An optional flow chart of the hammering process control method based on the single-chip microcomputer is shown. Specifically, first, the type of the target riveting gun is determined, and the target process parameter array corresponding to the current riveting process is determined based on the current riveting process and the type of the target riveting gun, so as to realize preprocessing. Then, the variable parameters in the hammering process control method are initialized, and the current data set corresponding to the current time in the current riveting process is obtained. Further, the current data set is numerically judged based on the preset parameter judgment standard and the target process parameter array, a value judgment result set corresponding to the current riveting process is generated, and a target control strategy corresponding to the current riveting process is generated based on the preset strategy and the value judgment result set. Finally, the target riveting gun is controlled in the hammering process based on the target control strategy, so as to realize the automatic hammering process.
[0080] It is worth noting that in the embodiment of the present application, the sending of the closing electromagnetic valve instruction involves the time delay interruption of the single-chip microcomputer, so the single-chip microcomputer does not read data during the closing process of the electromagnetic valve.
[0081] Figure 4A flow chart of a target control strategy generation process provided by the embodiment of the application is shown. Specifically, first, based on the current riveting process and the rivet gun type of the target rivet gun, a target process parameter array corresponding to the current riveting process is determined, and the variable parameters in the hammer riveting process control method are initialized, realizing parameter setting and initialization. Then, the current number of hits corresponding to the current time in the current riveting process is obtained. If the current number of hits meets the pre-set hit strategy, a target control strategy containing a close solenoid valve instruction is generated. The current number of hits is threshold judged using a target number of hits threshold, and a first numerical judgment result corresponding to the current riveting process is generated. If the first numerical judgment result is that the current number of hits is greater than the target number of hits threshold, a target control strategy containing a close solenoid valve instruction is generated. If the first numerical judgment result is that the current number of hits is less than the target number of hits threshold, the current riveting force signal sequence corresponding to the current time in the current riveting process is obtained, the candidate riveting force signal of the target historical time corresponding to the current riveting process is determined using the current riveting force signal sequence, and the candidate riveting force signal is numerically judged based on the target jacking force interval, generating a second numerical judgment result corresponding to the current riveting process. If the second numerical judgment result is that the candidate riveting force signal is greater than the maximum value of the target jacking force interval, the current jacking force value corresponding to the current time is determined based on the current riveting force signal sequence, and the current jacking force value is numerically judged based on the target jacking force interval, generating a fourth numerical judgment result corresponding to the current riveting process. If the fourth numerical judgment result is that the current jacking force value is in the target jacking force interval, a target control strategy containing an open solenoid valve instruction is generated. Otherwise, if the fourth numerical judgment result is that the current jacking force value is not in the target jacking force interval, a target control strategy containing a close solenoid valve instruction is generated. If the second numerical judgment result is that the candidate riveting force signal is less than the maximum value of the target jacking force interval, the first preset subsequence corresponding to the current riveting process is determined based on the current riveting force signal sequence, and the candidate riveting force signal is numerically judged based on the first preset subsequence, generating a third numerical judgment result corresponding to the current riveting process. If the third numerical judgment result is that the candidate riveting force signal is not the peak value of the first preset subsequence, the operation of obtaining the current data set corresponding to the current time in the current riveting process is returned. If the third numerical judgment result is that the candidate riveting force signal is the peak value of the first preset subsequence, the candidate riveting force signal is numerically judged based on the target riveting force peak interval, generating a fifth numerical judgment result corresponding to the current riveting process. If the fifth numerical judgment result is that the candidate riveting force signal is in the target riveting force peak interval, the current number of hits is incremented by one, and a target control strategy containing a close solenoid valve instruction is generated. If the fifth numerical judgment result is that the candidate riveting force signal is not in the target riveting force peak interval, the operation of obtaining the current data set corresponding to the current time in the current riveting process is returned.
[0082] Embodiment three
[0083] Figure 5 A structure schematic diagram of a hammering process control device based on a single-chip microcomputer is provided for the third embodiment of the present application. The device is integrated in a single-chip microcomputer, as shown in the figure, and includes a data acquisition module 310, a numerical value judgment module 320, and a strategy generation module 330. Figure 5
[0084] The data acquisition module 310 is configured to determine a target process parameter array corresponding to the current riveting process based on the current riveting process and the riveting gun type of the target riveting gun, and to acquire a current data set corresponding to the current time in the current riveting process.
[0085] The numerical value judgment module 320 is configured to perform numerical value judgment on the current data set based on a preset parameter judgment standard and the target process parameter array, and to generate a numerical value judgment result set corresponding to the current riveting process.
[0086] The strategy generation module 330 is configured to generate a target control strategy corresponding to the current riveting process based on a preset strategy generation process and the numerical value judgment result set, and to perform hammering process control on the target riveting gun based on the target control strategy.
[0087] The technical solution of the embodiment of the present application determines a target process parameter array corresponding to the current riveting process based on the current riveting process and the riveting gun type of the target riveting gun, and acquires a current data set corresponding to the current time in the current riveting process. Then, numerical value judgment is performed on the current data set based on a preset parameter judgment standard and the target process parameter array, and a numerical value judgment result set corresponding to the current riveting process is generated. Finally, a target control strategy corresponding to the current riveting process is generated based on a preset strategy generation process and the numerical value judgment result set, and hammering process control is performed on the target riveting gun based on the target control strategy. Since a unified algorithm process is used to control the hammering process, the problem of low work efficiency of the hammering process is solved, and automatic control of the hammering process is achieved, thereby improving the work efficiency of the hammering process.
[0088] Optionally, the data acquisition module 310 can be specifically configured to:
[0089] determine the rivet parameters of a target rivet corresponding to the current riveting process based on the current riveting process and a preset process standard;
[0090] determine a target process parameter array corresponding to the current riveting process in a preset process parameter set based on the riveting gun type of the target riveting gun and the rivet parameters of the target rivet.
[0091] Optionally, the target process parameter array comprises a target number of hits threshold, a target clamping force interval, and a target riveting force peak value interval; and the current data set comprises a current number of hits and a current riveting force signal sequence.
[0092] Optionally, the numerical value judgment module 320 can be specifically configured to:
[0093] perform threshold value judgment on the current number of hits based on the target number of hits threshold, to generate a first numerical value judgment result corresponding to the current riveting process;
[0094] determine a candidate riveting force signal of a target historical moment corresponding to the current riveting process based on the first numerical value judgment result and the current riveting force signal sequence, and perform numerical value judgment on the candidate riveting force signal based on the target clamping force interval, to generate a second numerical value judgment result corresponding to the current riveting process;
[0095] determine a first preset subsequence corresponding to the current riveting process based on the second numerical value judgment result and the current riveting force signal sequence, and perform numerical value judgment on the candidate riveting force signal based on the first preset subsequence, to generate a third numerical value judgment result corresponding to the current riveting process;
[0096] combine the first, second, and third numerical value judgment results to generate a numerical value judgment result set corresponding to the current riveting process.
[0097] Optionally, the strategy generation module 330 can be specifically configured to:
[0098] if the first numerical value judgment result is that the current number of hits is greater than the target number of hits threshold, generate a target control strategy comprising a closing electromagnetic valve instruction;
[0099] if the second numerical value judgment result is that the candidate riveting force signal is greater than the target clamping force interval, determine a current clamping force numerical value corresponding to a current moment based on the current riveting force signal sequence, perform numerical value judgment on the current clamping force numerical value based on the target clamping force interval, to generate a fourth numerical value judgment result corresponding to the current riveting process, and generate a target control strategy corresponding to the current riveting process based on the fourth numerical value judgment result;
[0100] if the third numerical value judgment result is that the candidate riveting force signal is a peak value of the first preset subsequence, perform numerical value judgment on the candidate riveting force signal based on the target riveting force peak value interval, to generate a fifth numerical value judgment result corresponding to the current riveting process, and generate a target control strategy corresponding to the current riveting process based on the fifth numerical value judgment result.
[0101] Optionally, the strategy generation module 330 can be specifically configured to:
[0102] determine a second preset sub-sequence corresponding to the current riveting process based on the current riveting force signal sequence; wherein the second preset sub-sequence is different from the first preset sub-sequence;
[0103] calculate a mean value of the second preset sub-sequence to generate a mean value calculation result, and take the mean value calculation result as a current clamping force value corresponding to a current time.
[0104] Optionally, the strategy generation module 330 can be specifically used for:
[0105] if the fourth numerical value judgment result is that the current clamping force value is in the target clamping force interval, generating a target control strategy containing an open electromagnetic valve instruction;
[0106] if the fifth numerical value judgment result is that the to-be-selected riveting force signal is in the target riveting force peak value interval, generating a target control strategy containing a close electromagnetic valve instruction.
[0107] The hammer riveting process control device based on the single-chip microcomputer provided in the embodiments of the present application can execute the hammer riveting process control method based on the single-chip microcomputer provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0108] Embodiment four
[0109] Figure 6 A structural schematic diagram of a single-chip microcomputer 410 that can be used to implement the embodiments of the present application is shown. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present application described herein and / or claimed.
[0110] As shown in Figure 6 The single-chip microcomputer 410 includes at least one processor 420, and a memory, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., which is communicatively connected to the at least one processor 420, wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 420 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 into the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the single-chip microcomputer 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other through a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.
[0111] A plurality of components in the single-chip microcomputer 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, and the like; an output unit 480, such as various types of displays, a speaker, and the like; a storage unit 490, such as a magnetic disk, an optical disk, and the like; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 4100 allows the single-chip microcomputer 410 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0112] The processor 420 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, and the like. The processor 420 performs various methods and processes described above, such as the single-chip microcomputer-based hammer riveting process control method.
[0113] The method includes:
[0114] determining a target process parameter array corresponding to the current riveting process based on the current riveting process and a rivet gun type of the target rivet gun, and obtaining a current data set corresponding to a current time in the current riveting process;
[0115] performing numerical judgment on the current data set based on a preset parameter judgment standard and the target process parameter array, to generate a numerical judgment result set corresponding to the current riveting process;
[0116] generating a target control strategy corresponding to the current riveting process based on a preset strategy generation process and the numerical judgment result set, and performing hammer riveting process control on the target rivet gun based on the target control strategy.
[0117] In some embodiments, the single-chip microcomputer-based hammer riveting process control method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 490. In some embodiments, part or all of the computer program can be loaded and / or installed on the single-chip microcomputer 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the single-chip microcomputer-based hammer riveting process control method described above can be performed. Alternatively, in other embodiments, the processor 420 can be configured to perform the single-chip microcomputer-based hammer riveting process control method by any other appropriate means, such as by means of firmware.
[0118] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0119] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.
[0120] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0121] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0122] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain network, and the Internet.
[0123] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0124] The application further discloses a computer program product, the computer program product comprising a computer program which, when executed by a processor, implements the single-chip microcomputer-based hammering process control method provided by any of the embodiments of the application. The program product and the single-chip microcomputer-based hammering process control method disclosed in the embodiments of the application belong to the same inventive concept, and thus will not be described here.
[0125] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps recited in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which are not limited herein.
[0126] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A hammer riveting process control method based on a single chip microcomputer, characterized in that: The method is executed by a single chip microcomputer, and the method includes: Determining a target process parameter array corresponding to the current riveting process based on the current riveting process and the riveting gun type of the target riveting gun, and obtaining a current data set corresponding to a current moment in the current riveting process; Performing numerical judgment on the current data set based on the preset parameter judgment standard and the target process parameter array, and generating a numerical judgment result set corresponding to the current riveting process; A target control strategy corresponding to the current riveting process is generated based on a preset strategy generation process and the numerical judgment result set, and the target riveting process of the target riveting gun is controlled based on the target control strategy.
2. The method according to claim 1, characterized in that The determining of the target process parameter array corresponding to the current riveting process based on the current riveting process and the rivet gun type of the target riveting gun includes: Determining rivet parameters of a target rivet corresponding to the current riveting process based on the current riveting process and a preset process standard; Based on the rivet gun type of the target rivet gun and the rivet parameters of the target rivet, a target process parameter array corresponding to the current riveting process is determined in the preset process parameter set.
3. The method according to claim 1, characterized in that The target process parameter array includes: a target strike count threshold, a target tightening force interval, and a target riveting force peak interval; the current data set includes: a current strike count and a current riveting force signal sequence.
4. The method according to claim 3, characterized in that The performing of numerical judgment on the current data set based on the preset parameter judgment standard and the target process parameter array to generate a numerical judgment result set corresponding to the current riveting process includes: performing a threshold judgment on the current number of strikes based on the target number of strikes threshold, and generating a first numerical judgment result corresponding to the current riveting process; determining a candidate riveting force signal at a target historical moment corresponding to the current riveting process based on the first numerical judgment result and the current riveting force signal sequence, and performing a numerical judgment on the candidate riveting force signal based on the target tightening force range to generate a second numerical judgment result corresponding to the current riveting process; determining a first preset subsequence corresponding to the current riveting process based on the second numerical judgment result and the current riveting force signal sequence, and performing a numerical judgment on the selected riveting force signal based on the first preset subsequence to generate a third numerical judgment result corresponding to the current riveting process; The first numerical judgment result, the second numerical judgment result, and the third numerical judgment result are combined and processed to generate a numerical judgment result set corresponding to the current riveting process.
5. The method according to claim 4, characterized in that The target control strategy corresponding to the current riveting process is generated based on the preset strategy generation process and the numerical judgment result set, including: If the first numerical judgment result is that the current number of strikes is greater than the target number of strikes threshold, generating a target control strategy including an instruction to close the solenoid valve; If the second numerical judgment result is that the selected riveting force signal is greater than the target tightening force range, determining a current tightening force value corresponding to the current moment based on the current riveting force signal sequence, and performing a numerical judgment on the current tightening force value based on the target tightening force range to generate a fourth numerical judgment result corresponding to the current riveting process, and generating a target control strategy corresponding to the current riveting process based on the fourth numerical judgment result; If the third numerical judgment result is that the to-be-selected riveting force signal is a peak value of the first preset subsequence, a numerical judgment is performed on the to-be-selected riveting force signal based on the target riveting force peak range to generate a fifth numerical judgment result corresponding to the current riveting process, and a target control strategy corresponding to the current riveting process is generated based on the fifth numerical judgment result.
6. The method according to claim 5, characterized in that The determining of the current tightening force value corresponding to the current moment based on the current riveting force signal sequence includes: determining a second preset subsequence corresponding to the current riveting process based on the current riveting force signal sequence; wherein the second preset subsequence is different from the first preset subsequence; The second preset subsequence is averaged to generate an average calculation result, and the average calculation result is used as the current tightening force value corresponding to the current moment.
7. The method according to claim 5, characterized in that Generating a target control strategy corresponding to the current riveting process based on the fourth numerical judgment result includes: If the fourth value judgment result is that the current tightening force value is within the target tightening force range, generating a target control strategy including an instruction to open the solenoid valve; Generating a target control strategy corresponding to the current riveting process based on the fifth numerical judgment result includes: If the fifth numerical judgment result is that the to-be-selected riveting force signal is in the target riveting force peak range, a target control strategy including an instruction to close the solenoid valve is generated.
8. A hammer riveting process control device based on a single chip microcomputer, characterized in that: The device is integrated into a single chip microcomputer and comprises: a data acquisition module, configured to determine a target process parameter array corresponding to the current riveting process based on the current riveting process and the riveting gun type of the target riveting gun, and to acquire a current data set corresponding to a current moment in the current riveting process; A numerical judgment module, configured to perform numerical judgment on the current data set based on a preset parameter judgment standard and the target process parameter array, and generate a numerical judgment result set corresponding to the current riveting process; The strategy generation module is used to generate a target control strategy corresponding to the current riveting process based on a preset strategy generation process and the numerical judgment result set, and to control the hammer riveting process of the target riveting gun based on the target control strategy.
9. A single chip microcomputer, characterized in that: The single chip microcomputer comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the single-chip microcomputer-based hammer riveting process control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hammer riveting process control method based on a single-chip microcomputer according to any one of claims 1 to 7 when executed.