Macrovariable processing method and system of numerical control system, numerical control system and numerical control machine tool
By generating a private macro variable array in the decoder of the CNC system, the interference problem caused by the shared variable table between the decoder and the human-computer interactive system is solved, and a more stable and accurate CNC system processing is achieved.
Patent Information
- Application Number
- CN202411317657.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-03-18
AI Technical Summary
In the existing CNC system, the decoder and the human-computer interaction system share a set of variable tables, resulting in easy interference or influence during the decoding process.
By generating a private macro variable array in the decoder and using the private macro variable array for value and assignment during the decoding process, avoiding sharing the variable table with the human-computer interaction system.
It effectively reduces interference or influence of the processing of the decoder and human-computer interaction system based on variable tables, and improves the stability and accuracy of the CNC system.
Smart Images

Figure CN119644915A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of numerical control, and in particular to a macro variable processing method and system for a numerical control system, a numerical control system and a numerical control machine tool. Background Art
[0002] One of the core components of the CNC system is the decoder, which converts NC codes into motion control instructions to achieve precise processing of workpieces.
[0003] Macro variables refer to a mechanism for storing and managing parameter data. These macro variables are different from programming macros in the usual sense. They are actually predefined variables that can be used in NC programming, rather than the concept of code expansion or code reuse. Ordinary machining programs directly specify G codes and movement amounts with numerical values. When using user macro programs, you can specify variable numbers to provide numerical values. The values of variable numbers can be modified and entered through the program or MDI (Manual Data Input) mode.
[0004] Macro variable format: #i or #[<expression>]
[0005] 1. Variable number: The number following '#' is the variable number, which is used to distinguish different variables. The variable number can be a number or an expression whose result is a number. The expression must be written in "[]". The variable number can only be an integer.
[0006] 2. Variable value: When a variable is not assigned a value, the default initial value is an indefinite value. Be sure to assign a value before use. The value range of the variable is the same as that of a double-precision floating-point number.
[0007] Macro variables can be divided into local variables, public variables, and system variables. The uses and characteristics of each type of variable are different. Read-only dedicated system variables and referenceable read-only system constants are also set for users.
[0008] The inventors have found that in the existing macro variable processing mechanism, the CNC system decoder and the CNC system human-computer interaction system share a set of variable tables, and the processing based on the variable table between the decoder and the human-computer interaction system is prone to interference or influence. Summary of the invention
[0009] The embodiments of the present application provide a macro variable processing method, system, numerical control system and numerical control machine tool for a numerical control system, so as to at least solve the technical problem that the processing based on the variable table between the decoder and the human-computer interaction system is prone to interference or influence.
[0010] According to a first aspect of an embodiment of the present application, a macro variable processing method for a numerical control system is provided, the method comprising:
[0011] Get the address of the macro variable array from the human-computer interaction system;
[0012] Acquire the macro variable array according to the address of the macro variable array, and save the macro variable array as a private macro variable;
[0013] During the decoding process, the macro variables in the program to be decoded are valued according to the private macro variables.
[0014] In combination with the first aspect, in an optional implementation of the embodiment of the present application, the data structure of the macro variable array includes:
[0015] Registers the activation identifier, variable value, read permission level, and write permission level.
[0016] In combination with the first aspect, in an optional implementation manner of the embodiment of the present application, the method further includes:
[0017] Obtaining a read permission level and a write permission level from the human-computer interaction system;
[0018] During the decoding process, the private macro variables are read and written according to the read permission level and the write permission level.
[0019] In combination with the first aspect, in an optional implementation manner of the embodiment of the present application, the method further includes:
[0020] In the decoding process, the macro variables in the private macro variables are assigned values according to the variable values of the updated macro variables, and the coordinate information corresponding to the variable number, variable value and program segment line number of the updated macro variables is saved as the first decoding result.
[0021] In combination with the first aspect, in an optional implementation manner of the embodiment of the present application, the method further includes:
[0022] During the execution of the decoded program, the number of lines of the currently executed program segment is uploaded to the human-computer interaction system, so that the human-computer interaction system can obtain the first decoding result based on the number of lines of the currently executed program segment.
[0023] According to a second aspect of an embodiment of the present application, a macro variable processing method for a numerical control system is provided, the method comprising:
[0024] generating a macro variable array in response to a trigger signal of the numerical control system;
[0025] The address of the macro variable array is sent to a decoder so that the decoder obtains the macro variable array according to the address of the macro variable array.
[0026] In combination with the second aspect, in an optional implementation manner of the embodiment of the present application, the method further includes: sending the read permission and the write permission to the decoder.
[0027] In conjunction with the second aspect, in an optional implementation manner of the embodiment of the present application, the method further includes:
[0028] During the execution of the program decoded by the decoder, obtaining the number of lines of the currently executed program segment;
[0029] Obtaining a first decoding result from the decoder according to the number of lines of the currently executed program segment, wherein the first decoding result includes coordinate information corresponding to the number of lines of the currently executed program segment and a variable number and a variable value of an updated macro variable;
[0030] The macro variables are updated and the coordinate information is displayed according to the coordinate information and the variable number and variable value of the updated macro variable.
[0031] According to a third aspect of an embodiment of the present application, a macro variable processing system for a numerical control system is provided, the system comprising:
[0032] A human-computer interaction system stores a first variable table, wherein the first variable table includes a macro variable array;
[0033] A decoder, corresponding to a second variable table different from the first variable table, wherein the second variable table stores private macro variables;
[0034] The decoder is used to obtain the macro variable array from the human-computer interaction system to generate the second variable table, and perform decoding according to the second variable table.
[0035] In combination with the third aspect, in an optional implementation method of the embodiment of the present application, the decoder assigns values to the macro variables in the private macro variables according to the variable values of the updated macro variables during the decoding process, and saves the coordinate information corresponding to the variable number, variable value and program segment line number of the updated macro variables as the first decoding result.
[0036] In conjunction with the third aspect, in an optional implementation of the embodiment of the present application, the decoder is further used to upload the number of lines of the currently executed program segment to the human-computer interaction system during the execution of the decoded program;
[0037] The human-computer interaction system is also used to obtain a first decoding result from the decoder according to the number of lines of the currently executed program segment, and update the macro variable and display the coordinate information according to the first decoding result.
[0038] According to a fourth aspect of the embodiments of the present application, a numerical control system is provided, wherein the numerical control system includes the macro variable processing system according to the third aspect of the embodiments of the present application.
[0039] According to a fifth aspect of the embodiments of the present application, a numerically controlled machine tool is provided, wherein the numerically controlled machine tool comprises a numerical control system according to the third aspect of the embodiments of the present application.
[0040] By adopting the embodiments of the present application, it is possible to solve the technical problem that the processing based on the variable table between the decoder and the human-computer interaction system is prone to interference or influence. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of a macro variable processing method of a numerical control system provided in an embodiment of the present application;
[0042] Figure 2 It is a flowchart of a macro variable processing method of a numerical control system provided in an embodiment of the present application;
[0043] Figure 3 is a system schematic diagram of a macro variable processing system of a numerical control system provided according to an embodiment of the present application;
[0044] Figure 4 It is a schematic diagram of a decoder internal and external macro variable processing mechanism provided according to an embodiment of the present application;
[0045] Figure 5 It is a flow chart of information interaction between a human-computer interaction system and a decoder provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0047] It should be understood that the "plurality" mentioned in this article refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and so on are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and so on do not limit the quantity and execution order, and the words "first", "second" and so on do not limit certain different
[0048] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0049] First, the terms involved in the embodiments of the present application are introduced.
[0050] CNC machine tools: CNC machine tools use digital information to control the movement and operation of machine tools to achieve high-precision and high-efficiency processing. Its control system can logically process programs specified by control codes or other symbolic instructions, decode them, express them in coded numbers, and input them into the CNC device through information carriers to control the movement of the machine tools.
[0051] Numerical control system: The numerical control system (NCS) of a CNC machine tool is the core system that controls the operation of the CNC machine tool. It is responsible for receiving the processing program, converting it into control signals, and controlling the movement and processing of the machine tool. It usually includes a computer numerical control (CNC) unit, a servo system, a machine tool, an operation panel, a display device, an input / output device, a power module, and auxiliary devices.
[0052] Human-Computer Interaction System: Human-Computer Interaction (HCI) is an important part of the CNC system of CNC machine tools. It is responsible for establishing effective communication and interaction between humans and computers. The main functions include operation interface, command input, status display and feedback mechanism.
[0053] Decoder: A decoder is a logic circuit used in a CNC system to convert input coded data into output signals. In CNC machine tools, decoders play an important role in decoding the instructions and parameters in the machining program into control signals that can be executed by the machine tool. More specifically, its role is to convert NC codes into motion control instructions to achieve precise machining of workpieces. NC code (Numerical Control Code) is a sequence of instructions used to control the movement and operation of machine tools. These codes consist of numbers, letters, and symbols, and can guide the machine tool to perform machining according to predetermined parameters such as path, speed, feed, etc.
[0054] The above introduces the terms involved in the embodiments of the present application. Next, the application scenarios of macro variables in the field of numerical control are exemplarily introduced.
[0055] Macro variables refer to a mechanism for storing and managing parameter data. These macro variables are different from programming macros in the usual sense. They are actually predefined variables that can be used in NC programming, rather than the concept of code expansion or code reuse. Ordinary machining programs directly specify G codes and movement amounts with numerical values. When using user macro programs, you can specify variable numbers to provide numerical values. The values of variable numbers can be modified and entered through programs or MDI mode.
[0056] Macro variable format: #i or #[<expression>]
[0057] 1. Variable number: The number following '#' is the variable number, which is used to distinguish different variables. The variable number can be a number or an expression whose result is a number. The expression must be written in "[]". The variable number can only be an integer.
[0058] 2. Variable value: When a variable is not assigned a value, the default initial value is an indefinite value. Be sure to assign a value before use. The value range of the variable is the same as that of a double-precision floating-point number.
[0059] Macro variables can be divided into local variables, public variables, and system variables. The uses and characteristics of each type of variable are different. Read-only dedicated system variables and referenceable read-only system constants are also set for users.
[0060] The following are examples of macro variable usage:
[0061] #1=100;
[0062] G91 G00 X#1;
[0063] Equivalent NC code:
[0064] G91 G00 X100;
[0065] The inventors have found that in the mainstream CNC systems currently on the market, the CNC system decoder and the CNC system human-computer interaction system share a set of variable tables, and the processing based on the variable table between the decoder and the human-computer interaction system is prone to interference or influence.
[0066] The inventor has found that in the mainstream CNC systems currently on the market, the decoders all adopt an advance decoding strategy, that is, they will send several segments of motion instructions after the current line to the real-time system in advance. If the CNC system decoder and the CNC system human-computer interaction system share a set of variable tables, whether the macro variables are changed during advance decoding or after the sentence is executed, problems will occur. Specifically, (1) Because of advance decoding, the macro variable value is modified when the decoder processes the NC code, which will cause the parameters to be modified before the line is executed, resulting in a series of problems such as interface display errors. For example, after the origin value of the workpiece coordinate system is modified by the decoder in advance, before the sentence is executed, the absolute coordinate display calculation error of the interface is displayed. (2) If the macro variable is changed after the execution of the sentence, the subsequent decoding will not be able to use the modified parameter value, but use the value before the modification, which will cause the decoding result to be wrong.
[0067] Based on the above research, the inventor believes that there is an urgent need to build an internal and external macro variable mechanism for the decoder to separate the macro variables of the human-computer interaction system from the macro variables of the decoder and realize data interaction between the two.
[0068] Based on this, the embodiment of the present application provides a macro variable processing method for a numerical control system, referring to Figure 1 The flowchart of the macro variable processing method of the numerical control system shown is as follows, and the method includes the following processing process.
[0069] 100: Get the address of the macro variable array from the human-computer interaction system.
[0070] 102: Obtain the macro variable array according to the address of the macro variable array, and save the macro variable array as a private macro variable. The private macro variable here, also known as a private array variable, is a concept in object-oriented programming. It refers to an array variable declared in the definition of a class that can only be accessed by methods, properties or other members within the class. This encapsulation feature helps protect data and prevents external code from directly accessing or modifying the internal state of a class, thereby enhancing the security and maintainability of the program.
[0071] 104: During the decoding process, a value is taken for a macro variable in the program to be decoded according to the private macro variable.
[0072] The macro variable processing method provided in this embodiment can be applied to a decoder of a numerical control system, that is, the above-mentioned processes 100 to 104 are executed by the decoder.
[0073] The macro variable processing method provided in this embodiment can effectively reduce the technical problems of interference or influence between the decoder and the human-computer interaction system based on the processing of the variable table, because the values are taken according to the private macro variables during the decoding process, compared with the prior art that shares a set of variable tables with the human-computer interaction system.
[0074] In addition, since a set of variables is generated inside the decoder and separated from the human-computer interaction variables, they are two variable tables. During the decoding process, the decoder only modifies the internal macro variables (private macro variables), and the human-computer interaction system only modifies the external macro variables. This also ensures that the two sets of variables do not interfere with each other or affect each other during the processing process.
[0075] Optionally, in an implementation of this embodiment, the data structure of the macro variable array includes: a registration activation identifier, a variable value, a read permission level (eg, a minimum read permission level) and a write permission level (eg, a minimum write permission level).
[0076] Among them, registration activation identifier: if the macro variable is not registered, it means that the variable does not exist in the database. Value: stores the value of the variable. Read permission and write permission: determine the permission of the variable, for example, some system variables are not provided to some low-privileged users for reading and writing. In other implementations of this embodiment, there may be only read permission or write permission.
[0077] Optionally, in an implementation of this embodiment, specifically, in order to implement processing 100, in order to solve the problem that the decoder lacks system parameters for instruction decoding after separating the variable table, an internal macro variable assignment interface of the decoder is designed. Before the NC program decoding starts, the human-computer interaction system calls the interface to copy and assign the internal macro variables of the decoder according to the human-computer interaction macro variables. That is, the human-computer interaction system is allowed to transfer the macro variable values to the decoder before the NC program is decoded through the interface, ensuring that the decoder has the necessary system parameters when processing instructions.
[0078] Optionally, in an implementation of this embodiment, the method further includes: obtaining a read permission level and / or a write permission level from the human-computer interaction system; and during the decoding process, performing read and write operations on the private macro variables according to the read permission level and / or the write permission level.
[0079] Specifically, this implementation method designs a decoder macro variable permission interface to control the read and write permissions of macro variables in the decoder due to the lack of user permission level information. Before decoding begins, the human-computer interaction system calls this interface to set user permissions, which determines whether the user has the read and write permissions of each macro variable inside the decoder, thereby enhancing the security and stability of the system.
[0080] Optionally, in an implementation of this embodiment, during the decoding process, the macro variables in the private macro variables are assigned values according to the variable values of the updated macro variables, and the coordinate information corresponding to the variable number, variable value and program segment line number (i.e., the program segment line number where the macro variable is currently updated) of the updated macro variables is saved as the first decoding result. In this way, a basis for querying and data synchronization can be provided for the human-computer interaction system based on the first decoding result.
[0081] Further optionally, in this implementation, during the execution of the decoded program, the number of lines of the currently executed program segment is uploaded to the human-computer interaction system, so that the human-computer interaction system can obtain the first decoding result based on the number of lines of the currently executed program segment.
[0082] This implementation method is used to solve the display error problem caused by the modification of system variables in the line but the human-computer interaction system lacks the modified parameter data. A list of macro variable changes for each line and the coordinates of each coordinate system origin (for example, the local coordinate system origin, the external offset coordinate system origin, etc.) is created to enable the human-computer interaction system to accurately obtain and assign internal variables, thereby avoiding display errors.
[0083] Figure 2 1 is a flow chart of a macro variable processing method of a numerical control system according to an embodiment of the present application. Figure 2 , the method includes the following processing steps.
[0084] 200: Generate a macro variable array in response to a trigger signal of the numerical control system. For example, when the "start" button of the machine tool is pressed, the human-machine interaction system transmits the macro variable array address to the decoder through the pre-created decoder macro variable interface.
[0085] 202: Send the address of the macro variable array to a decoder, so that the decoder obtains the macro variable array according to the address of the macro variable array, and then saves the macro variable array as a private macro variable.
[0086] The macro variable processing method provided in this embodiment can be implemented by a human-computer interaction system of a numerical control system.
[0087] The macro variable processing method provided in this embodiment changes the traditional way in which the decoder and the human-computer interaction system share a set of variable tables, and can effectively reduce the technical problem of interference or influence between the decoder and the human-computer interaction system based on the processing of the variable table.
[0088] Optionally, in an implementation of this embodiment, the method further includes: sending the read permission and the write permission to the decoder. By setting the read and write permissions of different users to the macro variables inside the decoder, the security and stability of the system are enhanced.
[0089] Optionally, in an implementation of this embodiment, the method further includes:
[0090] During the execution of the program decoded by the decoder, obtaining the number of lines of the currently executed program segment;
[0091] Obtaining a first decoding result from the decoder according to the number of lines of the currently executed program segment, wherein the first decoding result includes coordinate information corresponding to the number of lines of the currently executed program segment and a variable number and a variable value of an updated macro variable;
[0092] The macro variables are updated and the coordinate information is displayed according to the coordinate information and the variable number and variable value of the updated macro variable.
[0093] This implementation method can help the human-computer interaction system accurately obtain and assign internal variables, thereby avoiding display errors.
[0094] Figure 3 is a system schematic diagram of a macro variable processing system of a numerical control system according to an embodiment of the present application. Figure 3 , the macro variable processing system includes a human-computer interaction system and a decoder.
[0095] The human-computer interaction system stores a first variable table, which includes a macro variable array. The decoder has a second variable table different from the first variable table, which stores private macro variables. The decoder is used to obtain the macro variable array from the human-computer interaction system to generate the second variable table, and perform decoding according to the second variable table. With this implementation, the variables of the decoder and the human-computer interaction system are separated.
[0096] Optionally, in an implementation of the present embodiment, the decoder assigns values to macro variables in the private macro variables according to the variable values of the updated macro variables during the decoding process, and saves the coordinate information corresponding to the variable number, variable value and program segment line number of the updated macro variables as the first decoding result.
[0097] Furthermore, the decoder is also used to upload the number of lines of the currently executed program segment to the human-computer interaction system during the execution of the decoded program; the human-computer interaction system is also used to obtain a first decoding result from the decoder according to the number of lines of the currently executed program segment, and update the macro variable and display the coordinate information according to the first decoding result. In this way, the display error problem caused by the lack of the modified parameter data in the human-computer interaction system when the system variable in the line is modified is solved.
[0098] For the relevant description of the processing performed by the human-computer interaction system and the decoder, please refer to the previous text and will not be repeated here.
[0099] An embodiment of the present application also provides a numerical control system, which includes the macro variable processing system described above.
[0100] An embodiment of the present application also provides a CNC machine tool, which includes the CNC system described above.
[0101] The present application also provides a design concept and technical details for achieving the invention purpose of the present application and related embodiments. The details are as follows.
[0102] (1) Design a macro variable data structure consisting of a registration activation identifier, a value, a minimum read permission level, and a minimum write permission level.
[0103] (2) Create a decoder macro variable interface. When the "start" button of the machine tool is pressed, the human-machine interaction system passes the address of the macro variable array composed of the so-called elements of the structure described in (1) through the interface. The number of bits of the element in the array is the number of the macro variable. In order to save memory resources, only the address of the array can be passed into the decoder interface instead of directly passing it into the array.
[0104] (3) Create a decoder user authority interface through which the human-computer interaction system transmits the current user authority level. The level must be higher than the macro variable read and write level to operate the macro variable.
[0105] (4) Construct a decoder macro variable class and design its value acquisition, value assignment, and permission level setting interfaces. Its attributes include a macro variable array, a user variable array, and a user permission level. Instantiate it in the private variable of the decoder class.
[0106] (5) The decoder copies the array of addresses described in (2) to the private array variables in its own macro variable class, that is, it generates its own internal macro variables according to the current system variables of the numerical control system.
[0107] (6) When the decoder core performs NC code decoding operations, all operations involving obtaining values from macro variables call the value obtaining interface described in (4) to obtain values from internal macro variables.
[0108] (7) When the decoder core performs NC code decoding operations, the assignment interface described in (4) is called to assign values to internal macro variables when macro variables are assigned values. At the same time, a hash table consisting of elements consisting of macro variable numbers and assigned values (key, value) is generated, and the origin values of each coordinate system in the current row (the origin of the workpiece coordinate system, the origin of the local coordinate system, etc.) are stored in the row decoding result for the human-computer interaction system to update the external macro variables.
[0109] (8) Create an internal macro variable initialization function and add it to the decoder reset function. When the user presses the reset button, its internal macro variables are also initialized.
[0110] (9) During the execution of the NC program, the real-time system will upload the number of lines of the currently executed program segment to the human-computer interaction system. The human-computer interaction system obtains the hash table corresponding to the line according to the current line number to update the external macro variable value and display the coordinates of the current line.
[0111] Through the above implementation steps, it is achieved that the system variables will not be changed until the NC program is executed to the current line under the premise of advance decoding by the decoder. Since the decoder has an internal macro variable array for decoding only, subsequent NC program decoding errors will not be caused by the external macro variables not being modified.
[0112] Figure 4 Schematic diagram of a decoder internal and external macro variable processing mechanism according to an embodiment of the present application. Figure 4 ,Combined with the above design ideas and technical details, the processing mechanism includes the following processing contents.
[0113] After decoding begins, the human-computer interaction system generates a macro variable array; transmits the array address to the decoder; copies the array to the decoder's private macro variable; and transmits the address of the decoder's private macro variable to the decoder core class.
[0114] The human-computer interaction system passes in the user's permission level.
[0115] The decoder starts decoding line by line.
[0116] The decoder obtains the internal macro variables through the value-getting interface; the decoder assigns the internal macro variables through the value-assigning interface and generates a variable assignment hash table for this row.
[0117] Calculate the total offset of the coordinate system of the current row; generate motion instructions; execute motion instructions. Among them, the offset of the coordinate system is stored in the decoder as a private variable. When the human-computer interaction system displays the coordinates, the coordinate offset of the current execution row is required to perform absolute coordinate calculations based on the mechanical coordinates uploaded by the real-time system, and then refresh the coordinate display. In other words, the decoder can send its internal private variables to the human-computer interaction system for display processing.
[0118] Determine whether the variable input hash table of the current row is empty? If it is empty, calculate the origin of the local coordinate system and external offset coordinate system of the current row. If it is not empty, the human-computer interaction system changes the external macro variables according to the hash table, and then calculates the origin of the local coordinate system and external offset coordinate system of the current row.
[0119] Assign each coordinate system origin to the human-computer interaction system coordinate origin variable; the human-computer interaction system calculates the display coordinates.
[0120] Figure 5 1 is a flow chart of information interaction between a human-computer interaction system and a decoder according to an embodiment of the present application. Figure 5 , combined with the design ideas and technical details described above, including the following interactive content and process.
[0121] Press the "Start" button of the CNC machine tool; call the decoder reset function; the reset function calls the initialization function; the initialization function clears the decoder error list, file manager, decoding result buffer, local coordinate system, temporary coordinate system, etc.
[0122] Save the current spindle speed; create a new compile class instance; assign the instance's spindle speed and current workpiece coordinate system variables; reset the tool compensation data list.
[0123] The human-computer interaction system passes the decoder variable macro variable list (copy); the human-computer interaction system passes the decoder user authority level.
[0124] Set tool compensation data; set decoding text; after decoding is completed, motion data is sent; the real-time system sends the current line number, and the human-computer interaction system obtains the decoder data of the line; calculate and refresh the display.
[0125] In the above, the process of information interaction between the human-computer interaction system and the decoder is described by taking an actual application scenario as an example. Those skilled in the art should understand that there may be other application scenarios, which are not described in detail in this application.
[0126] The sequence of serial numbers or introduction of the embodiments of the present application is for description only and does not represent the superiority or inferiority of the embodiments.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0131] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the scene data of the current frame in the three-dimensional virtual scene, the device information of the client, and the scene interaction information involved in the embodiments of this application are all obtained with full authorization.
[0132] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A macro variable processing method for a numerical control system, characterized in that: The method comprises: Get the address of the macro variable array from the human-computer interaction system; Acquire the macro variable array according to the address of the macro variable array, and save the macro variable array as a private macro variable; During the decoding process, the macro variables in the program to be decoded are valued according to the private macro variables.
2. The method according to claim 1, characterized in that The data structure of the macro variable array includes: Registers the activation identifier, variable value, read permission level, and write permission level.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining a read permission level and a write permission level from the human-computer interaction system; During the decoding process, the private macro variables are read and written according to the read permission level and the write permission level.
4. The method according to claim 1, characterized in that The method further comprises: In the decoding process, the macro variables in the private macro variables are assigned values according to the variable values of the updated macro variables, and the coordinate information corresponding to the variable number, variable value and program segment line number of the updated macro variables is saved as the first decoding result.
5. The method according to claim 4, characterized in that The method further comprises: During the execution of the decoded program, the number of lines of the currently executed program segment is uploaded to the human-computer interaction system, so that the human-computer interaction system can obtain the first decoding result based on the number of lines of the currently executed program segment.
6. A macro variable processing method for a numerical control system, characterized in that: The method comprises: generating a macro variable array in response to a trigger signal of the numerical control system; The address of the macro variable array is sent to a decoder so that the decoder obtains the macro variable array according to the address of the macro variable array.
7. The method according to claim 6, characterized in that The method further comprises: The read permission and the write permission are sent to the decoder.
8. The method according to claim 6, characterized in that The method further comprises: During the execution of the program decoded by the decoder, obtaining the number of lines of the currently executed program segment; Obtaining a first decoding result from the decoder according to the number of lines of the currently executed program segment, wherein the first decoding result includes coordinate information corresponding to the number of lines of the currently executed program segment and a variable number and a variable value of an updated macro variable; The macro variables are updated and the coordinate information is displayed according to the coordinate information and the variable number and variable value of the updated macro variable.
9. A macro variable processing system for a numerical control system, characterized in that: The system comprises: A human-computer interaction system stores a first variable table, wherein the first variable table includes a macro variable array; A decoder, corresponding to a second variable table different from the first variable table, wherein the second variable table stores private macro variables; The decoder is used to obtain the macro variable array from the human-computer interaction system to generate the second variable table, and perform decoding according to the second variable table.
10. The system according to claim 9, characterized in that During the decoding process, the decoder assigns values to the macro variables in the private macro variables according to the variable values of the updated macro variables, and saves the coordinate information corresponding to the variable number, variable value and program segment line number of the updated macro variables as the first decoding result.
11. The system according to claim 10, characterized in that The decoder is also used to upload the number of lines of the currently executed program segment to the human-computer interaction system during the execution of the decoded program; The human-computer interaction system is also used to obtain a first decoding result from the decoder according to the number of lines of the currently executed program segment, and update the macro variable and display the coordinate information according to the first decoding result.
12. A numerical control system, characterized in that: The numerical control system comprises a macro variable processing system as claimed in any one of claims 9 to 11.
13. A numerically controlled machine tool, characterized in that: The numerical control machine tool comprises the numerical control system as claimed in claim 11.