A character input method for numerical control system
By using multiple clicks or long pressing buttons in a short time to switch characters, the complex character switching problem of the existing technology is solved, efficient character output is achieved, programming difficulty and manufacturing cost are reduced, and user experience is improved.
Patent Information
- Application Number
- CN202211102012.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-09-09
AI Technical Summary
The character switching method of existing CNC systems is complex, especially difficult for novice users to operate, which can easily lead to program code input errors, especially when frequently switching character modes are required, which increases programming difficulty and error rate.
By clicking multiple times or pressing the keys in a short time, we can switch characters, analyze the number of characters defined by the key and clicking, quickly output the corresponding characters, and simplify the character switching process.
It improves character output efficiency, reduces programming difficulty, improves user experience, and saves manufacturing costs. It is suitable for economical CNC systems.
Smart Images

Figure CN115454260B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control systems, and in particular to a character input method for numerical control systems. Background Art
[0002] The CNC machine tool operation panel is a tool for operators to interact with CNC machine tools (systems), mainly consisting of display devices, NC keyboards, MCPs, status lights, handheld units, etc. Among them, the key part is classified into many categories, including 26 English letters, 10 numeric characters, mathematical operation symbols and other functional keys. In order to maintain the beauty, cost and compactness of the system panel key layout in a limited space, a single key often has multiple characters in addition to the functional keys.
[0003] At present, when CNC systems at home and abroad want to switch to other characters corresponding to the keys when manually inputting or modifying programs, there are mainly two modes: one is to press the character conversion key to enter the character switching mode, enter the characters, and then switch out of the character switching mode; the other is to hold down the character conversion key and press the corresponding key at the same time to get the corresponding switching character.
[0004] The existing character switching method requires the use of a character conversion key, which is not conducive to novice operation. Often, due to forgetting to press the character conversion key or forgetting to restore the character conversion mode, program code input errors occur. In particular, when compiling macro programs, it is necessary to frequently switch character conversion modes, which increases the programming difficulty and the code error rate is high. In some special cases, such as when the program can only be input with one hand, it is extremely obvious.
[0005] If the CNC system is equipped with an additional auxiliary input sub-panel, the user experience can also be improved, but the manufacturing cost is increased, and the CNC panel installation structure of the machine tool needs to be modified. Especially in economical CNC systems, the use of an independent character key panel is not in line with the market. Summary of the invention
[0006] The object of the present invention is to provide a character input method for a numerical control system, which achieves the purpose of switching characters by clicking a key multiple times in a short period of time or long pressing a key, so as to solve the problems encountered in the above-mentioned background technology.
[0007] To achieve the above object, the technical solution of the present invention is as follows:
[0008] A character input method for a numerical control system comprises the following steps:
[0009] The first step is to judge: when a key is pressed, judge the way the key is pressed, whether it is a single press or a long press;
[0010] The second step is analysis: within a certain period of time, the number of defined characters and click conditions of the key are analyzed to determine the output character;
[0011] The third step is display: displaying the characters and the corresponding definitions of the characters in the input area of the display device.
[0012] In the above scheme, in the first step of judgment, the corresponding analysis logic is executed according to the way of pressing the key in the judgment step.
[0013] In the above scheme, in the second step of analysis, if the key does not have multiple definitions, a unique character, namely the first defined character, is directly output without determining the key pressing method.
[0014] In the above scheme, in the second step of analysis, the key has multiple definitions, the key pressing mode is single-click, and if no key operation is performed within the specified character switching time, the first defined character will be displayed.
[0015] In the above scheme, in the second step of analysis, if the key has multiple definitions and the key is pressed for a long time, the last defined character will be displayed directly. If there are two definitions, the second defined character will be displayed. If there are three definitions, the third defined character will be displayed.
[0016] In the above scheme, in the second step analysis, the key has multiple definitions, the key pressing method is single-click, and the key operation is performed within the specified character switching time; if the key is different from the previous key, the first defined character is directly output; if it is the same, it is switched to the second defined character and the character switching time is reset; if no key operation is performed or other keys are pressed within a certain period of time, the second defined character is displayed; if the same key is pressed again, the first defined character is directly displayed.
[0017] In the above solution, in the second step of analysis, when the displayed character is switched to the second defined character, the corresponding character switching time is shortened and then re-timed.
[0018] In the above scheme, in the third step of display, when in the defined switching time, the corresponding characters are displayed on a background having distinguishing features from the current background.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides an efficient character input method for a numerical control system, which outputs corresponding characters in the numerical control system by clicking a key multiple times in a short period of time or long pressing a key to switch characters. Double-defined or triple-defined characters can be output quickly, greatly improving character output efficiency, reducing programming difficulty, improving user experience, and saving manufacturing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The disclosure of the present invention is described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the accompanying drawings, the same reference numerals are used to refer to the same components. Among them:
[0021] Figure 1 A schematic diagram of a character input operation process during implementation of the present invention;
[0022] Figure 2 A schematic diagram of another character input operation process when the present invention is implemented;
[0023] Figure 3 It is a schematic diagram of the process of the present invention;
[0024] Figure 4 It is a schematic diagram of the flow chart of the present invention during the logic analysis of a key click;
[0025] Figure 5 It is a flow chart of the present invention during the logic analysis of long pressing a key.
[0026] Numbers in the figure: 10 - simplified CNC system operation panel; 12 - display device; 13 - character switching state format; 14 - key input area; 15 - single-defined character key; 16 - double-defined character key; 17 - triple-defined character key. DETAILED DESCRIPTION
[0027] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the present invention is now further described in detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the relevant components of the present invention.
[0028] According to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and the accompanying drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the entirety of the present invention or as a limitation or restriction to the technical solution of the present invention.
[0029] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0030] Embodiment 1, as Figures 3 to 5 As shown, a character input method for a numerical control system comprises the following steps:
[0031] The first step is to judge: when the key is pressed, judge the way the key is pressed, whether it is a single press or a long press. According to the way the key is pressed in the judgment step, the corresponding analysis logic is executed, which is divided into the logic of single-click key and the logic of long-press key. For the logic of single-click key, please refer to Figure 4 , please refer to the logic of long pressing the button Figure 5 .
[0032] The second step is analysis: within a certain period of time, the number of defined characters and click conditions of the keys are analyzed to determine the output characters.
[0033] If the key does not have multiple definitions, a unique character, namely the first defined character, is directly output without determining the key pressing method.
[0034] The key has multiple definitions, and the key pressing mode is single-click. If no key operation is performed within the specified character switching time, the first defined character will be displayed.
[0035] If the key has multiple definitions and the key is pressed for a long time, the last defined character will be displayed directly. If there are two definitions, the second defined character will be displayed. If there are three definitions, the third defined character will be displayed.
[0036] The key has multiple definitions, and the key pressing method is single-click, and the key operation is performed within the specified character switching time; if the key is different from the previous key, the first defined character is directly output; if it is the same, it is switched to the second defined character and the character switching time is reset; if no key operation is performed or other keys are pressed within a certain period of time, the second defined character is displayed; if the same key is pressed again, the first defined character is directly displayed.
[0037] When the displayed character is switched to the second defined character, the corresponding character switching time is shortened and then reset to improve the character input efficiency.
[0038] The third step is display: the character and the definition corresponding to the character are displayed in the input area of the display device. When in the definition switching time, the corresponding character is displayed with a background that has characteristics different from the current background to increase operability. For example, if the current background is white, when switching characters, the background of the character is shadow mode, oblique line mode, or flash mode.
[0039] Embodiment 2, as Figure 1 and Figure 2As shown, a character input method for a numerical control system 10 is a simplified numerical control system operation panel, including a display device 12 and a key input area 14, in which a single-defined character key 15, a double-character definition key 16, and a triple-character definition key 17 are provided. The display device 12 displays a character switching state format 13 in a switching state, and the character switching state is one of them. When implemented, it is not limited to this format.
[0040] When the operator clicks a single-defined character, the corresponding character will be directly displayed or the function corresponding to the character will be executed, and the character switching state will not be entered.
[0041] If the operator presses a double-defined character, such as the key "O E ", the character "O" with the character switching status background as shown in 13 will appear in the display area, and this state will last for a period of time. After this time, the character will exit the character switching state. When in the character switching state, pressing other character keys will directly determine the character as the currently displayed character. If the key is pressed again, the displayed character "O" will be switched to the character "E". At this time, the character switching time will be reset and shortened. If this time is exceeded or other character keys are pressed, the character "E" will be directly displayed. If the character key is pressed again, the character "O" will be directly displayed.
[0042] If the operator needs to enter "X > "Procedure, such as Figure 2 As shown in the figure, the character "X" and the character ">" are on the same key, and you can press the "X" key three times in a row. > ", output the character "X", then click the button "X" twice in succession > ", output character ">", no need to pause during click, no need to press other keys, greatly improve the efficiency of program writing; if you need to input ">X" program, you need to click the "X" key twice. > ", wait for the character switching state to disappear, then click the button "X > ", the corresponding program can be obtained, because the character switching state time in the second character state is reduced, and the input efficiency of the program will not be reduced.
[0043] Outputting the character "X" by clicking the "X>" button three times in a row is only one of the quick ways to output "X>". In normal applications, you can also click the "X>" button once, and "X" will be directly output when the switching time expires or other buttons are pressed.
[0044] The operator can directly input the last defined character of a multi-defined character by long pressing a character key, such as the triple-defined character key 17, and can directly display the character "," by long pressing the key "(-,", or can display the second character "-" of a double-defined key.
[0045] Figure 3 1 is a flow chart of a character input method according to an embodiment of the present invention. In step S1, a key on a numerical control system is pressed to input a character or execute a function. In step S2, the method of pressing the key in step S1 is judged to determine whether it is a long press or a single press. In step S3, the content displayed on the display screen of the numerical control system is determined according to an efficient logical analysis method. For example, if the key "X" is clicked three times in a row, the character input or the function is executed. > ", confirm the output character "X", and then click the button "X" twice in succession > ", determine the output character ">"; long press the "(-," key to directly determine the character ",". In display step S4, the character to be output determined in S3 is displayed on the display screen of the numerical control system.
[0046] in, Figure 4 It is a flow chart of the present invention during the logic analysis of a key click. S31 determines whether the key is a multi-defined character key. Double definition and triple definition are collectively referred to as multi-defined characters. Characters with three definitions or more are not considered. If it is a single definition, directly execute S41 program to display the first defined character, otherwise execute step S32; step S32 determines whether there is a key-related operation within the character definition switching time. If there is no related operation, execute S41 program to display the first defined character, otherwise execute step S33; step S33 determines whether the key pressed in the previous step is the same as the key in step S1. If different, execute S41 program to display the first defined character, otherwise execute step S34; step S34 updates and resets the character switching time, and then executes step S35; step S35 determines whether there is a key-related operation within the character definition switching time. If there is no related operation, execute S42 program to display the second defined character, otherwise execute step S36; step S36 determines whether the key pressed in S32 is the same as the key in step S1. If different, execute S42 program to display the second defined character, otherwise execute step S41 to display the first defined character.
[0047] Figure 5 It is a flow chart of the present invention during the logic analysis of long-pressing a key. Among them, S31 determines the number of key character definitions, that is, defines the number of single clicks. If the number is 1, step S41 is executed to display the first defined character; if the number is 2, step S42 is executed to display the second defined character; if the number is 3, step S43 is executed to display the third defined character.
[0048] In summary, the present invention provides an efficient character input method for a numerical control system. By clicking a button multiple times in a short period of time or long pressing a button to switch characters, the corresponding characters are output in the numerical control system. Double-defined or triple-defined characters can be output quickly, which greatly improves the character output efficiency, reduces the programming difficulty, enhances the user experience, and saves manufacturing costs.
[0049] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0050] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A character input method for a numerical control system, characterized in that: The following steps are involved: The first step is to judge: when a key is pressed, judge the way the key is pressed, whether it is a single press or a long press; The second step is analysis: within a certain period of time, the number of defined characters and click conditions of the key are analyzed to determine the output character; The key has multiple definitions. The key pressing mode is single-click. If no key operation is performed within the specified character switching time, the first defined character is displayed. If the key has multiple definitions and the key is pressed in a long press mode, the last defined character will be displayed directly. If there are two definitions, the second defined character will be displayed. If there are three definitions, the third defined character will be displayed. The key has multiple definitions. The key pressing mode is single-click. The key operation is performed within the specified character switching time. If the key is different from the previous key, the first defined character is directly output; if it is the same, it is switched to the second defined character and the character switching time is reset. If no key operation is performed or other keys are pressed within a certain period of time, the second defined character is displayed; if the same key is pressed again, the first defined character is directly displayed. The third step is display: displaying the characters and the corresponding definitions of the characters in the input area of the display device.
2. A character input method for a numerical control system according to claim 1, characterized in that: In the first step of judgment, the corresponding analysis logic is executed according to the way the keys are pressed in the judgment step.
3. The character input method of a numerical control system according to claim 1, characterized in that: In the second step of analysis, when the displayed character is switched to the second defined character, the corresponding character switching time is shortened and then re-timed.
4. The character input method of a numerical control system according to claim 1, characterized in that: In the third step of display, when in the defined switching time, the corresponding characters are displayed against a background having distinguishing features from the current background.
