CN112859748A - G code processing file generation method and device and processor - Google Patents

G code processing file generation method and device and processor Download PDF

Info

Publication number
CN112859748A
CN112859748A CN202011630735.4A CN202011630735A CN112859748A CN 112859748 A CN112859748 A CN 112859748A CN 202011630735 A CN202011630735 A CN 202011630735A CN 112859748 A CN112859748 A CN 112859748A
Authority
CN
China
Prior art keywords
code
response
predetermined operation
coordinate
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011630735.4A
Other languages
Chinese (zh)
Other versions
CN112859748B (en
Inventor
刘阳
王立松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Leadshine Control Technology Co Ltd
Original Assignee
Shenzhen Leadshine Control Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Leadshine Control Technology Co Ltd filed Critical Shenzhen Leadshine Control Technology Co Ltd
Priority to CN202011630735.4A priority Critical patent/CN112859748B/en
Publication of CN112859748A publication Critical patent/CN112859748A/en
Application granted granted Critical
Publication of CN112859748B publication Critical patent/CN112859748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4097Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by using design data to control NC machines, e.g. CAD/CAM
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36242Convert program for different machines with different M-code, G-code, header
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a generation method and a generation device of a G code processing file and a processor. The method comprises the following steps: recognizing an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface; in response to an operation on the initial interface, determining G code information, wherein the G code information at least comprises a G code type; and generating a G code processing file according to the G code information. According to the method, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw a graph through CAD software such as UG (user generated content), Solid Works and the like, the operator can easily generate the G code processing file, and compared with the prior art, the method has the advantages that the requirement on the operator is lowered, and convenience and high efficiency are realized.

Description

G code processing file generation method and device and processor
Technical Field
The application relates to the field of automation control, in particular to a generation method and a generation device of a G code processing file, a computer readable storage medium and a processor.
Background
For traditional standard machining equipment, such as CNC machine tools, a corresponding G code machining file is generated by drawing graphs through CAD software, UG, Solid Works and the like. However, this approach is relatively demanding on personnel for some specialized non-standard machining equipment.
The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.
Disclosure of Invention
The application mainly aims to provide a generation method, a generation device, a computer readable storage medium and a processor of a G code processing file, so as to solve the problem that the generation of the G code processing file in the prior art has high requirements on operators.
According to an aspect of an embodiment of the present invention, there is provided a method for generating a G code machining file, including: recognizing an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface; in response to an operation on the initial interface, determining G code information, wherein the G code information at least comprises a G code type; and generating a G code processing file according to the G code information.
Optionally, the initial interface includes an edit identification area, the edit identification area includes a plurality of operation identifications, and in response to an operation on the initial interface, determining G code information includes: responding to a second preset operation acted in the operation identifier, and displaying an editing interface; and in response to a third preset operation acted on the editing interface, determining the G code information, wherein the G code information comprises an axis number of a target moving axis, an execution starting coordinate and the G code type, the moving axis is a moving axis of the processing equipment, the execution starting coordinate is a starting coordinate of the moving axis for executing the G code, and the axis number of the target moving axis is an axis number of a moving axis corresponding to the G code.
Optionally, the plurality of operation identifiers include an editing identifier, and in response to a second predetermined operation acting on the operation identifier, displaying an editing interface includes: and responding to the second preset operation acted on the editing identification, and displaying the editing interface.
Optionally, in response to a second predetermined operation acting on the operation identifier, displaying an editing interface, including: analyzing the original parameter information of the G code in response to the second preset operation to obtain the axis number of the target moving axis, the execution initial coordinate of the moving axis and the execution rate of the G code; the display includes the axle number of target removal axle the execution of the initial coordinate of removal axle and the execution rate of G code edit interface, edit interface includes coordinate operation area and removal axle selection region, wherein, coordinate operation area includes a plurality of coordinate edit boxes and first removal axle characters sign, the initial coordinate of execution that shows corresponding removal axle in the coordinate edit box, first removal axle characters sign one-to-one is located one side of coordinate edit box, removal axle selection region includes a plurality of removal axle check boxes and a plurality of second removal axle characters sign, second removal axle characters sign one-to-one is located one side of removal axle check boxes, is in the state of checking removal axle check boxes correspond the axle number of removal axle is the axle number of target removal axle.
Optionally, in response to a third predetermined operation acting on the editing interface, determining the G-code information includes: receiving a third predetermined operation acting on at least one of the coordinate edit boxes in a case where a check state of the movement axis check box in the movement axis selection area coincides with a predetermined state; updating the coordinates in the coordinate edit box in response to the third predetermined operation to update the execution start coordinates.
Optionally, the editing interface further includes a moving axis area, where the moving axis area includes a plurality of moving axis adjustment identifiers, the moving axis adjustment identifiers include first text information and second text information, the first text information is an axis number of the moving axis, and the second text information is a plus sign or a minus sign, where the plus sign represents that an execution start coordinate of the moving axis is increased, and the minus sign represents that an execution start coordinate of the moving axis is decreased, and the G code information is determined in response to a third predetermined operation acting on the editing interface, including: receiving the third predetermined operation acting on the movement axis adjustment mark; updating an execution start coordinate of the movement axis in response to the third predetermined operation.
Optionally, the editing interface further includes a collection identifier, and after updating the execution start coordinate of the corresponding movement axis in response to the third predetermined operation, before generating a G code machining file according to the G code information, the method further includes: receiving a fourth predetermined operation acting on the acquisition identifier; updating the updated execution start coordinate in the corresponding coordinate editing frame in response to the fourth predetermined operation.
Optionally, the editing interface further includes a positioning identifier, and the method further includes: receiving a fifth predetermined operation acting on the positioning identifier; controlling the moving axis to move to the execution start coordinate in response to the fifth predetermined operation.
Optionally, the editing interface further includes a determination identifier, and generates a G code processing file according to the G code information, including: receiving a sixth predetermined operation acting on the determined identity; storing the execution start coordinate in response to the sixth predetermined operation; and generating the G code processing file according to the G code type, the execution initial coordinate and the axis number of the target moving axis.
Optionally, the operation identifiers include a preview identifier, and the generating method further includes: receiving a seventh predetermined operation acting on the preview identifier; and responding to a seventh preset operation on a display interface, and displaying a code preview interface, wherein the code preview interface comprises a plurality of file display lines, and at least one file display line displays the G code type and the execution starting coordinate.
Optionally, the initial interface includes a file display area, the file display area includes a plurality of display lines, and the plurality of display lines include a target display line on which the G code original parameter information is displayed.
Optionally, before displaying the editing interface in response to a second predetermined operation acting in the operation identifier, determining G code information in response to an operation on the initial interface, including: receiving a first predetermined operation applied to one of the target display lines; responding to the first preset operation, displaying the target display line in a selected state, responding to a second preset operation acted in the operation identifier, and displaying an editing interface, wherein the editing interface comprises: and responding to a second preset operation acted in the operation identifier, displaying the editing interface, wherein the execution starting coordinate in the coordinate editing frame of the editing interface is the same as the execution starting coordinate corresponding to the target display line in the selected state.
Optionally, the operation identifiers further include a new identifier, and the method further includes: receiving an eighth preset operation acted on the new identifier; in response to the eighth predetermined operation, adding one row of the target display lines after the target display line of the last row.
Optionally, the plurality of operation identifiers further includes an insertion identifier, and the method further includes: in response to a ninth predetermined operation acting on the target display line, the target display line displaying a selected state; inserting a row of the target display line before the target display line in the selected state in response to a tenth predetermined operation acting on the insertion indicator.
Optionally, the plurality of operation identifiers further includes a deletion identifier, and the method further includes: in response to an eleventh predetermined operation acting on the target display line, the target display line displays a selected state; and in response to a twelfth predetermined operation acting on the deletion identifier, deleting the target display line in the selected state.
Optionally, the plurality of operation identifiers further includes a save identifier, and the method further includes: and receiving a thirteenth preset operation acted on the saving identification, and saving the content in the file display area in the initial interface.
Optionally, the plurality of operation identifiers further include a moving identifier and a stop identifier, and the method further includes: in response to a fourteenth predetermined operation acting on the target display line, the target display line is displayed in a selected state; in response to a thirteenth predetermined operation acting on the movement identifier, controlling the movement axis to move to the execution start coordinate corresponding to the target display line in the selected state, and executing the G code in the target display line in the selected state; stopping execution of the G-code in response to a fifteenth predetermined operation acting on the stop flag.
According to another aspect of the embodiments of the present invention, a device for generating a G code processing file is further provided, where the device includes a first display unit, a determination unit, and a generation unit, where the first display unit is configured to identify an original G code processing file, obtain original parameter information of a G code, and display an initial interface; the determining unit is used for responding to the operation on the initial interface and determining G code information, and the G code information at least comprises a G code type; the generating unit is used for generating a G code processing file according to the G code information.
According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program executes any one of the methods.
According to still another aspect of the embodiments of the present invention, there is further provided a processor, configured to execute a program, where the program executes any one of the methods.
The generation method of the G code processing file comprises the steps of firstly, identifying an original G code processing file, obtaining original parameter information of a G code and displaying an initial interface; then, in response to an operation on the initial interface, determining G code information; and finally, generating a G code processing file according to the G code information. According to the method, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw a graph through UG (user generated content), Solid Works and other CAD (computer-aided design) software, the operator can easily generate the G code processing file, and compared with the prior art, the method has the advantages that the requirements on the operator are reduced, and convenience and high efficiency are realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart illustrating a method for generating a G-code machining file according to an embodiment of the present application;
FIG. 2 shows a schematic diagram of an initial interface;
FIG. 3 shows a schematic diagram of an editing interface;
FIG. 4 illustrates a schematic diagram showing a code preview interface;
fig. 5 is a schematic structural diagram illustrating a G-code processing file generation apparatus according to an embodiment of the present application.
Wherein the figures include the following reference numerals:
10. editing the identification area; 11. editing the identifier; 12. building a new identifier; 13. inserting the mark; 14. deleting the identifier; 15. storing the identification; 16. moving the identification; 17. stopping the identification; 18. previewing the identifier; 20. a coordinate display area; 30. a file display area; 31. displaying the line; 40. a coordinate operation area; 41. a coordinate editing frame; 42. a first movement axis text label; 43. a speed display area; 44. speed identification; 45. a speed edit box; 50. a movement axis selection area; 51. moving the shaft selection frame; 52. a second movement axis text label; 60. collecting an identifier; 70. a moving axis region; 71. a movement axis adjustment mark; 72. first text information; 73. second text information; 80. positioning the mark; 81. canceling the identification; 82. determining an identifier; 90. the file displays the line.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.
As described in the background art, the generation of a G-code processed file in the prior art is highly demanding for an operator, and in order to solve the above problems, in an exemplary embodiment of the present application, a G-code processed file generation method, a G-code processed file generation apparatus, a computer-readable storage medium, and a processor are provided.
According to an embodiment of the application, a method for generating a G code processing file is provided. Fig. 1 is a flowchart of a method for generating a G-code machining file according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, identifying an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface;
step S102, responding to the operation on the initial interface, and determining G code information, wherein the G code information at least comprises a G code type;
step S103, generating a G code processing file according to the G code information.
In the method, firstly, an original G code processing file is identified, original parameter information of the G code is obtained, and an initial interface is displayed; then, responding to the operation on the initial interface, and determining G code information; and finally, generating a G code processing file according to the G code information. According to the method, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw a graph through UG (user generated content), Solid Works and other CAD (computer-aided design) software, the operator can easily generate the G code processing file, and compared with the prior art, the method has the advantages that the requirements on the operator are reduced, and convenience and high efficiency are realized.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
In an embodiment of the present application, as shown in fig. 2, the initial interface includes an edit identification area 10, the edit identification area 10 includes a plurality of operation identifications, and determining G code information in response to an operation on the initial interface includes: responding to a second preset operation acted on the operation identifier, displaying an editing interface, and obtaining the editing interface shown in FIG. 3; in response to a third predetermined operation applied to the editing interface, the G code information is determined, and the G code information includes an axis number of a target movement axis, an execution start coordinate, and the G code type, the movement axis is a movement axis of the processing apparatus, the execution start coordinate is a start coordinate of the movement axis for executing the G code, and the axis number of the target movement axis is an axis number of a movement axis corresponding to execution of the G code, such as an X axis, a Y axis, a Z axis, an a axis, a B axis, and a C axis shown in fig. 3. According to the method, the editing interface is displayed through the second preset operation, the G code information such as the shaft number of the target moving shaft, the execution starting coordinate, the G code type and the like is determined through the third preset operation, so that an operator can determine the G code information simply and conveniently, the subsequent operator can generate the G code processing file according to the determined G code information conveniently, and convenience is further provided for the operator to generate the G code processing file.
In order to further ensure that the operation steps of the operator are simple and further avoid the problem that the generation of the G code processing file in the prior art has a high requirement on the operator, according to another specific embodiment of the present application, as shown in fig. 2, a plurality of the operation identifiers include an editing identifier 11, and in response to a second predetermined operation acting on the operation identifier, an editing interface is displayed, so as to obtain the editing interface shown in fig. 3, including: and displaying the editing interface in response to the second predetermined operation acting on the editing indicator 11.
In another specific embodiment of the present application, in response to a second predetermined operation acting on the operation identifier, displaying an editing interface includes: analyzing the original parameter information of the G code in response to the second preset operation to obtain the shaft number of the target moving shaft, the execution initial coordinate of the moving shaft and the execution rate of the G code; as shown in fig. 3, the editing interface includes a coordinate operation area 40 and a movement axis selection area 50, wherein the coordinate operation area 40 includes a plurality of coordinate edit boxes 41 and first movement axis character marks 42, the coordinate edit boxes 41 display the execution start coordinates of the corresponding movement axes, such as coordinate values of 100mm, 200mm, 300mm, and 400mm, the first movement axis character marks 42 include X, Y, Z, a, B, and C axes, the first movement axis character marks 42 are located on one side of the coordinate edit boxes 41 in a one-to-one correspondence manner, the movement axis selection area 50 includes a plurality of movement axis check boxes 51 and a plurality of second movement axis character marks 52, and the second movement axis character marks 52 also include X, Y, and G codes, Y-axis, Z-axis, a-axis, B-axis, C-axis, etc., wherein the second moving axis character markers 52 are located on one side of the moving axis selection frame 51 in a one-to-one correspondence, the number of the moving axis corresponding to the moving axis selection frame 51 in the selection state is the number of the target moving axis, as shown in fig. 3, the moving axis selection frame 51 in the selection state in fig. 3 is the moving axis selection frame corresponding to the X-axis, Y-axis, Z-axis, and a-axis, respectively, and it is described that the number of the target moving axis is the X-axis, Y-axis, Z-axis, and a-axis, respectively.
According to another specific embodiment of the present application, the determining the G-code information in response to a third predetermined operation acting on the editing interface includes: receiving a third predetermined operation applied to at least one of the coordinate edit boxes in a case where a check state of the movement axis check box in the movement axis selection area coincides with a predetermined state; and updating the coordinates in the coordinate editing frame in response to the third preset operation so as to update the execution starting coordinates. Through each area displayed on the editing interface, the original parameter information of the G code can be further intuitively displayed, the checking state can be represented in a checking mode shown in a bronze drum graph, and the filling color of the moving axis checking frame 51 can be further changed, for example, the moving axis checking frame 51 of the X axis is in the checking state, the position information of the processing equipment on the X axis can be displayed, and similarly, when the Y axis or Z axis moving axis checking frame 51 is in the checking state, the position information of the processing equipment on the Y axis or the Z axis can be displayed, the position information of the processing equipment can be further more simply determined, and an operator can more simply and conveniently operate to select and display the position information of the processing equipment on different moving axes.
In an actual application process, as shown in fig. 2 and 3, the initial interface and the editing interface further have a coordinate display area 20 for displaying current coordinates of a plurality of movement axes of the processing device. In the scheme, the current position information of the processing equipment (such as a machine tool and a workpiece shown in the figure) can be intuitively displayed through the displayed initial interface and the editing interface, so that the requirement of the generation of the G code processing file on an operator is further reduced, and the operation of the operator is more convenient.
In a specific embodiment, as shown in fig. 3, the editing interface includes a speed display area 43, the speed display area 43 includes a speed indicator 44 and a speed edit box 45, the speed edit box 45 is used for displaying the execution rate of the G code, and the operator can adjust the execution rate of the G code by editing the value in the speed edit box 45.
In an actual application process, as shown in fig. 3, the editing interface further includes a moving axis area 70, the moving axis area 70 includes a plurality of moving axis adjustment marks 71, each moving axis adjustment mark 71 includes first text information 72 and second text information 73, the first text information 72 is an axis number of the moving axis, and the second text information 73 is a plus sign or a minus sign, where the plus sign indicates that an execution start coordinate of the moving axis is increased, and the minus sign indicates that the execution start coordinate of the moving axis is decreased, and the G code information is determined in response to a third predetermined operation applied to the editing interface, including: receiving the third predetermined operation acting on the moving axis adjustment mark; and updating the execution start coordinate of the moving axis in response to the third predetermined operation. Through adjusting the moving shaft adjusting mark, the execution initial coordinate of the moving shaft can be adjusted flexibly and simply, so that the requirement on operators is further ensured to be low, and convenience is further provided for the operators.
In order to further ensure that the operation manner of the operator is simple and easy, and further facilitate the operator to generate the G code processing file, in another embodiment of the present application, as shown in fig. 3, the editing interface further includes a collecting identifier 60, and after updating the execution start coordinate of the corresponding moving axis in response to the third predetermined operation, before generating the G code processing file according to the G code information, the method further includes: receiving a fourth preset operation acting on the acquisition identifier; and updating the updated execution start coordinate in the corresponding coordinate editing frame in response to the fourth predetermined operation. Through the fourth preset operation acting on the acquisition identifier, the execution starting coordinate can be updated to the corresponding coordinate editing frame more conveniently, and the generation of a subsequent G code processing file is facilitated.
According to another specific embodiment of the present application, as shown in fig. 3, the editing interface further includes a positioning identifier 80, and the method further includes: receiving a fifth predetermined operation acting on the positioning mark; and controlling the moving axis to move to the execution start coordinate in response to the fifth predetermined operation. The operator can conveniently and quickly control the moving shaft to move to the execution starting coordinate through the fifth preset operation acting on the positioning mark, so that the requirement of the generation of the G code processing file on the operator is further reduced, and the operator can operate more conveniently.
In an actual application process, as shown in fig. 3, the editing interface further includes a determination identifier 82, and generates a G code processing file according to the G code information, including: receiving a sixth predetermined operation acting on the determination flag; responding to the sixth preset operation, and storing the execution starting coordinate; and generating the G code processing file according to the G code type, the execution start coordinate and the axis number of the target moving axis. Through the sixth preset operation acted on the determined mark, the execution initial coordinate can be stored conveniently and quickly, and the G code processing file can be generated simply and conveniently according to the type of the G code, the execution initial coordinate and the shaft number of the target moving shaft.
In an actual application process, as shown in fig. 3, the editing interface further includes a cancellation identifier 81, and the method further includes: receiving a sixteenth predetermined operation acting on the cancel identifier; in response to the sixteenth predetermined operation described above, the currently edited G code is canceled.
According to yet another specific embodiment of the present application, as shown in fig. 2, the operation identifiers include a preview identifier 18, and the generating method further includes: receiving a seventh predetermined operation acting on the preview identifier; in response to a seventh predetermined operation on the display interface, displaying a code preview interface, as shown in fig. 4, where the code preview interface includes a plurality of file display lines 90, and at least one of the file display lines 90 displays the G code type and the execution start coordinate. By displaying the code preview interface, the type of the G code that has been generated and the execution start coordinate can be visually displayed.
Specifically, as shown in fig. 4, the code preview interface further includes a document name text identifier and a document name box, the document name box displays a document name, the document name shown in the figure is class.g, the code preview interface further includes a total document line number identifier and a total document line number box, the total document line number box displays a total document line number, the total document line number shown in the figure is 2, the code preview interface further includes a page number text identifier and a page number box, the page number shown in the page number box displays a page number, the page number shown in the figure is 1/1, which represents a first page, which is a common page, the code preview interface further includes a left direction selection identifier and a right direction selection identifier, a page turning operation can be performed, and the code preview interface can also display the current time.
According to another specific embodiment of the present application, as shown in fig. 2, the initial interface includes a file display area 30, the file display area 30 includes a plurality of display lines 31, and the plurality of display lines 31 includes a target display line on which the G code original parameter information is displayed. In the scheme, the original parameter information of the G code can be visually displayed through the displayed initial interface, so that an operator can conveniently generate a G code processing file according to the original parameter information of the G code, the requirements of the operator on the generation of the G code processing file are further reduced, and the operator can conveniently operate.
In a specific embodiment, as shown in fig. 2, the display line further includes a line number, such as 1 in the figure, etc. to represent the first line, the G code original parameter information includes a G code type, G00 in fig. 2 resolves to a point (fast positioning), G01 resolves to a straight line, G02 and G03 resolve to an arc, and a G04 command resolves to a delay time, etc., of course, there may be other corresponding relationships, and those skilled in the art may flexibly set the corresponding relationships according to actual situations. The user can intuitively know the type represented by the G code; the G code original parameter information further includes axis number information of the movement axis, and as shown in fig. 2, XYZA indicates the X movement axis, the Y movement axis, the Z movement axis, and the a movement axis.
In another embodiment of the present application, as shown in fig. 2, the initial interface further includes a filename text identifier and a filename box, the filename box displays a filename, a filename shown in the figure is class.g, the initial interface further includes a total file step number text identifier and a total file step number box, the total file step number box displays a total file step number, the total file step number in the figure is 1, the initial interface further includes a page number text identifier and a page number box, a page number is displayed in the page number box, the page number shown in the figure is 1/1, which indicates a first page and a common page, the initial interface further includes a left-direction selection identifier and a right-direction selection identifier, a page turning operation can be performed, and the initial interface can also display the current time.
In another specific embodiment of the present application, before displaying the editing interface in response to the second predetermined operation acting on the operation identifier, determining G code information in response to an operation on the initial interface includes: receiving a first predetermined operation applied to one of the target display lines; responding to the first preset operation, displaying the target display line in a selected state, responding to a second preset operation acted on the operation identifier, and displaying an editing interface, wherein the editing interface comprises: and displaying the editing interface in response to a second preset operation acted on the operation identifier, wherein the execution starting coordinate in the coordinate editing frame of the editing interface is the same as the execution starting coordinate corresponding to the target display line in the selected state. Therefore, the target display line can be conveniently selected and the G code information of the target display line can be edited, and the operation difficulty of an operator is further ensured to be low.
In an actual application process, as shown in fig. 2, the plurality of operation identifiers further includes a new identifier 12, and the method further includes: receiving an eighth predetermined operation acting on the new identifier; in response to the eighth predetermined operation, adding one line of the target display line after the target display line of the last line. Therefore, one row of the target display lines can be added behind the last row of the target display lines more simply and quickly, the operation is simpler, and the operation difficulty of operators is further ensured to be lower.
In order to further facilitate the operator to generate the G-code machining file, in a specific embodiment, as shown in fig. 2, a plurality of the operation identifiers further include an insertion identifier 13, and the method further includes: in response to a ninth predetermined operation acting on the target display line, the target display line displaying a selected state; inserting a line of said target display line in front of said target display line in the selected state in response to a tenth predetermined operation acting on said insertion indicator. Therefore, one row of the target display lines can be inserted in front of the selected target display line more simply and conveniently, and the operation is simple and easy to operate.
In order to further reduce the requirement of the G code processing file generation on the operator and facilitate the operation of the operator, according to another specific embodiment of the present application, as shown in fig. 2, a plurality of operation identifiers further include a deletion identifier 14, and the method further includes: in response to an eleventh predetermined operation acting on the target display line, the target display line displays a selected state; and deleting the target display line in the selected state in response to a twelfth predetermined operation applied to the deletion flag. By selecting the target display line and operating the twelfth predetermined operation described above, unnecessary target display lines can be deleted more quickly.
In an actual application process, as shown in fig. 2, the plurality of operation identifiers further includes a storage identifier 15, and the method further includes: and receiving a thirteenth preset operation acted on the saving mark, and saving the content in the file display area in the current initial interface. By storing the content in the file display area in the initial interface, the G code information can be conveniently and directly called in the next operation.
In a specific embodiment of the present application, as shown in fig. 2, the plurality of operation markers further includes a moving marker 16 and a stop marker 17, and the method further includes: in response to a fourteenth predetermined operation applied to the target display line, the target display line is displayed in a selected state; in response to a thirteenth predetermined operation acting on the moving indicator, controlling the moving axis to move to the execution start coordinate corresponding to the target display line in the selected state, and executing the G code in the target display line in the selected state; and stopping executing the G code in response to a fifteenth preset operation acting on the stop mark. The method may control the movement axis to move to the execution start coordinate corresponding to the target display line in the selected state by a thirteenth predetermined operation acting on the movement indicator, and execute the G code in the target display line in the selected state, and may stop executing the G code by a fifteenth predetermined operation acting on the stop indicator. The thirteenth and fifteenth predetermined operations are both simple and easy, and the masking further reduces the operator's requirements.
Of course, in an actual application process, in the method, after receiving the first predetermined operation, the display line acted by the first predetermined operation may not be in the selected state.
The embodiment of the present application further provides a device for generating a G-code processed file, and it should be noted that the device for generating a G-code processed file according to the embodiment of the present application may be used to execute the method for generating a G-code processed file according to the embodiment of the present application. The following describes a device for generating a G-code processed file according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a G-code processing file generation apparatus according to an embodiment of the present application. As shown in fig. 5, the apparatus includes:
the first display unit 100 is configured to identify an original G code processing file, obtain original parameter information of a G code, and display an initial interface;
a determining unit 200, configured to determine G code information in response to an operation on the initial interface, where the G code information at least includes a G code type;
a generating unit 300, configured to generate a G code processing file according to the G code information.
In the device, the original G code processing file is identified through the first display unit, original parameter information of the G code is obtained, and an initial interface is displayed; determining G code information in response to an operation on the initial interface by the determination unit; and generating a G code processing file by the generating unit according to the G code information. In the device, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw graphs through CAD software such as UG (user generated content), Solid Works and the like, the fact that the operator can easily generate the G code processing file is guaranteed, compared with the prior art, the scheme has the advantages that the requirements for the operator are reduced, and convenience and high efficiency are achieved.
In an embodiment of the present application, as shown in fig. 2, the initial interface includes an editing identifier area 10, the editing identifier area 10 includes a plurality of operation identifiers, and the determining unit includes a displaying subunit and a determining subunit, where the displaying subunit is configured to display the editing interface in response to a second predetermined operation applied to the operation identifiers, so as to obtain the editing interface shown in fig. 3; the determining subunit is configured to determine, in response to a third predetermined operation applied to the editing interface, the G code information, where the G code information includes a movement axis of a processing apparatus, an execution start coordinate, and the G code type, the movement axis is a movement axis of the processing apparatus, the execution start coordinate is a start coordinate of the movement axis for executing the G code, and the axis number of the target movement axis is an axis number of a movement axis corresponding to execution of the G code, such as an X axis, a Y axis, a Z axis, an a axis, a B axis, and a C axis shown in fig. 3. The device displays the editing interface through the second predetermined operation, determines the G code information such as the shaft number of the target moving shaft, the execution start coordinate, the G code type and the like through the third predetermined operation, ensures that an operator can determine the G code information simply and conveniently, facilitates subsequent operators to generate the G code processing file according to the determined G code information, and further provides convenience for the operator to generate the G code processing file.
In order to further ensure that the operation steps of the operator are simple and further avoid the problem that the generation of the G code processing file in the prior art has a high requirement on the operator, according to another specific embodiment of the present application, as shown in fig. 2, the plurality of operation identifiers include an editing identifier 11, and the display subunit includes a first display module, and the first display module is configured to display the editing interface in response to the second predetermined operation acting on the editing identifier 11.
In yet another specific embodiment of the present application, the display subunit includes an analyzing module and a second display module, where the analyzing module is configured to analyze the G code original parameter information in response to the second predetermined operation to obtain an axis number of the target moving axis, an execution start coordinate of the moving axis, and an execution rate of the G code; the second display module is configured to display the editing interface including the number of the target moving axis, the execution start coordinate of the moving axis, and the execution rate of the G code, as shown in fig. 3, where the editing interface includes a coordinate operation area 40 and a moving axis selection area 50, where the coordinate operation area 40 includes a plurality of coordinate editing boxes 41 and first moving axis character marks 42, the coordinate editing boxes 41 display the execution start coordinate of the corresponding moving axis, such as coordinate values of 100mm, 200mm, 300mm, and 400mm, the first moving axis character marks 42 include X, Y, Z, a, B, and C axes, the first moving axis character marks 42 are located on one side of the coordinate editing boxes 41 in a one-to-one correspondence manner, the moving axis selection area 50 includes a plurality of moving axis check boxes 51 and a plurality of second moving axis character marks 52, the second moving axis character mark 52 also includes an X axis, a Y axis, a Z axis, an a axis, a B axis, a C axis, etc., the second moving axis character mark 52 is located on one side of the moving axis check box 51 in a one-to-one correspondence, the number of the moving axis corresponding to the moving axis check box 51 in a check state is the number of the target moving axis, as shown in fig. 3, the moving axis check box 51 in a check state in fig. 3 is a moving axis check box corresponding to the X axis, the Y axis, the Z axis, and the a axis, respectively, which means that the number of the target moving axis is the X axis, the Y axis, the Z axis, and the a axis, respectively.
According to another specific embodiment of the present application, the determining subunit includes a first receiving module and a first updating module, wherein the first receiving module is configured to receive a third predetermined operation applied to at least one coordinate editing frame when the selected state of the moving axis selection frame in the moving axis selection area is consistent with a predetermined state; the first updating module is used for responding to the third preset operation and updating the coordinates in the coordinate editing frame so as to update the execution starting coordinates. Through each area displayed on the editing interface, the original parameter information of the G code can be further intuitively displayed, the checking state can be represented in a checking mode shown in a bronze drum graph, and the filling color of the moving axis checking frame 51 can be further changed, for example, the moving axis checking frame 51 of the X axis is in the checking state, the position information of the processing equipment on the X axis can be displayed, and similarly, when the Y axis or Z axis moving axis checking frame 51 is in the checking state, the position information of the processing equipment on the Y axis or the Z axis can be displayed, the position information of the processing equipment can be further more simply determined, and an operator can more simply and conveniently operate to select and display the position information of the processing equipment on different moving axes.
In an actual application process, as shown in fig. 2 and 3, the initial interface and the editing interface further have a coordinate display area 20 for displaying current coordinates of a plurality of movement axes of the processing device. In the scheme, the current position information of the processing equipment (such as a machine tool and a workpiece shown in the figure) can be intuitively displayed through the displayed initial interface and the editing interface, so that the requirement of the generation of the G code processing file on an operator is further reduced, and the operation of the operator is more convenient.
In a specific embodiment, as shown in fig. 3, the editing interface includes a speed display area 43, the speed display area 43 includes a speed indicator 44 and a speed edit box 45, the speed edit box 45 is used for displaying the execution rate of the G code, and the operator can adjust the execution rate of the G code by editing the value in the speed edit box 45.
In an actual application process, as shown in fig. 3, the editing interface further includes a moving axis area 70, the moving axis area 70 includes a plurality of moving axis adjustment marks 71, each moving axis adjustment mark 71 includes first text information 72 and second text information 73, each first text information 72 is an axis number of the moving axis, each second text information 73 is a plus sign or a minus sign, each plus sign represents an execution start coordinate of the moving axis to be increased, each minus sign represents an execution start coordinate of the moving axis to be decreased, each determining subunit includes a second receiving module and a second updating module, and each second receiving module is configured to receive the third predetermined operation acting on the moving axis adjustment mark; the second updating module is used for responding to the third preset operation and updating the execution initial coordinate of the moving axis. Through adjusting the moving shaft adjusting mark, the execution initial coordinate of the moving shaft can be adjusted flexibly and simply, so that the requirement on operators is further ensured to be low, and convenience is further provided for the operators.
In order to further ensure that the operation manner of the operator is simple and easy, and further facilitate the operator to generate the G code processing file, in another embodiment of the present application, as shown in fig. 3, the editing interface further includes a collecting identifier 60, the apparatus further includes a first receiving unit and a first updating unit, where the first receiving unit is configured to receive a fourth predetermined operation acting on the collecting identifier after updating the execution start coordinate of the corresponding moving axis in response to the third predetermined operation and before generating the G code processing file according to the G code information; the first updating unit is configured to update the updated execution start coordinate in the corresponding coordinate editing frame in response to the fourth predetermined operation. Through the fourth preset operation acting on the acquisition identifier, the execution starting coordinate can be updated to the corresponding coordinate editing frame more conveniently, and the generation of a subsequent G code processing file is facilitated.
According to another specific embodiment of the present application, as shown in fig. 3, the editing interface further includes a positioning mark 80, the apparatus further includes a second receiving unit and a first control unit, wherein the second receiving unit is configured to receive a fifth predetermined operation acting on the positioning mark; the first control unit is configured to control the moving axis to move to the execution start coordinate in response to the fifth predetermined operation. The operator can conveniently and quickly control the moving shaft to move to the execution starting coordinate through the fifth preset operation acting on the positioning mark, so that the requirement of the generation of the G code processing file on the operator is further reduced, and the operator can operate more conveniently.
In an actual application process, as shown in fig. 3, the editing interface further includes a determination identifier 82, and the generating unit includes a first receiving subunit, a storing subunit, and a generating subunit, where the first receiving subunit is configured to receive a sixth predetermined operation acting on the determination identifier; the storage subunit is configured to store the execution start coordinate in response to the sixth predetermined operation; the generating subunit is configured to generate the G code processing file according to the G code type, the execution start coordinate, and the axis number of the target movement axis. Through the sixth preset operation acted on the determined mark, the execution initial coordinate can be stored conveniently and quickly, and the G code processing file can be generated simply and conveniently according to the type of the G code, the execution initial coordinate and the shaft number of the target moving shaft.
In an actual application process, as shown in fig. 3, the editing interface further includes a cancel identifier 81, and the apparatus further includes a third receiving unit and a cancel unit, where the third receiving unit is configured to receive a sixteenth predetermined operation acting on the cancel identifier; the canceling unit is configured to cancel the currently edited G code in response to the sixteenth predetermined operation.
According to another specific embodiment of the present application, as shown in fig. 2, the plurality of operation markers include a preview marker 18, and the apparatus further includes a fourth receiving unit and a second display unit, wherein the fourth receiving unit is configured to receive a seventh predetermined operation acting on the preview marker; the second display unit is configured to display a code preview interface in response to a seventh predetermined operation on the display interface, as shown in fig. 4, where the code preview interface includes a plurality of file display lines 90, and at least one of the file display lines 90 displays the G code type and the execution start coordinate. By displaying the code preview interface, the type of the G code that has been generated and the execution start coordinate can be visually displayed.
Specifically, as shown in fig. 4, the code preview interface further includes a document name text identifier and a document name box, the document name box displays a document name, the document name shown in the figure is class.g, the code preview interface further includes a total document line number identifier and a total document line number box, the total document line number box displays a total document line number, the total document line number shown in the figure is 2, the code preview interface further includes a page number text identifier and a page number box, the page number shown in the page number box displays a page number, the page number shown in the figure is 1/1, which represents a first page, which is a common page, the code preview interface further includes a left direction selection identifier and a right direction selection identifier, a page turning operation can be performed, and the code preview interface can also display the current time.
According to another specific embodiment of the present application, as shown in fig. 2, the initial interface includes a file display area 30, the file display area 30 includes a plurality of display lines 31, and the plurality of display lines 31 includes a target display line on which the G code original parameter information is displayed. In the scheme, the original parameter information of the G code can be visually displayed through the displayed initial interface, so that an operator can conveniently generate a G code processing file according to the original parameter information of the G code, the requirements of the operator on the generation of the G code processing file are further reduced, and the operator can conveniently operate.
In a specific embodiment, as shown in fig. 2, the display line further includes a line number, such as 1 in the figure, etc. to represent the first line, the G code original parameter information includes a G code type, G00 in fig. 2 resolves to a point (fast positioning), G01 resolves to a straight line, G02 and G03 resolve to an arc, and a G04 command resolves to a delay time, etc., of course, there may be other corresponding relationships, and those skilled in the art may flexibly set the corresponding relationships according to actual situations. The user can intuitively know the type represented by the G code; the G code original parameter information further includes axis number information of the movement axis, and as shown in fig. 2, XYZA indicates the X movement axis, the Y movement axis, the Z movement axis, and the a movement axis.
In another embodiment of the present application, as shown in fig. 2, the initial interface further includes a filename text identifier and a filename box, the filename box displays a filename, a filename shown in the figure is class.g, the initial interface further includes a total file step number text identifier and a total file step number box, the total file step number box displays a total file step number, the total file step number in the figure is 1, the initial interface further includes a page number text identifier and a page number box, a page number is displayed in the page number box, the page number shown in the figure is 1/1, which indicates a first page and a common page, the initial interface further includes a left-direction selection identifier and a right-direction selection identifier, a page turning operation can be performed, and the initial interface can also display the current time.
In another specific embodiment of the present application, the determining unit includes a second receiving subunit and a selecting subunit, where the second receiving subunit is configured to receive a first predetermined operation applied to one of the target display lines before displaying an editing interface in response to a second predetermined operation applied to the operation identifier; the display subunit includes a third display module, where the third display module is configured to display the editing interface in response to a second predetermined operation applied to the operation identifier, and the execution start coordinate in the coordinate editing frame of the editing interface is the same as the execution start coordinate corresponding to the target display line in the selected state. Therefore, the target display line can be conveniently selected and the G code information of the target display line can be edited, and the operation difficulty of an operator is further ensured to be low.
In practical applications, as shown in fig. 2, the plurality of operation identifiers further includes a new identifier 12, and the apparatus further includes a fifth receiving unit and an adding unit, wherein the fifth receiving unit is configured to receive an eighth predetermined operation acting on the new identifier; the adding unit is configured to add one line of the target display line after the target display line of the last line in response to the eighth predetermined operation. Therefore, one row of the target display lines can be added behind the last row of the target display lines more simply and quickly, the operation is simpler, and the operation difficulty of operators is further ensured to be lower.
In order to further facilitate the generation of the G-code machining file by the operator, in a specific embodiment, as shown in fig. 2, the plurality of operation identifiers further include an insertion identifier 13, and the apparatus further includes a first selecting unit and an insertion unit, wherein the first selecting unit is configured to respond to a ninth predetermined operation acting on the target display line, and the target display line displays a selected state; the insertion unit is configured to insert a line of the target display line in front of the target display line in the selected state in response to a tenth predetermined operation acting on the insertion indicator. Therefore, one row of the target display lines can be inserted in front of the selected target display line more simply and conveniently, and the operation is simple and easy to operate.
In order to further reduce the requirement of the G code processing file for the operator, and to facilitate the operation of the operator, according to another specific embodiment of the present application, as shown in fig. 2, the operation identifiers further include a deletion identifier 14, and the apparatus further includes a second selecting unit and a deleting unit, where the second selecting unit is configured to respond to an eleventh predetermined operation acting on the target display line, and the target display line displays a selected state; the deleting unit is configured to delete the target display line in the selected state in response to a twelfth predetermined operation applied to the deletion flag. By selecting the target display line and operating the twelfth predetermined operation described above, unnecessary target display lines can be deleted more quickly.
In an actual application process, as shown in fig. 2, the operation identifiers further include a saving identifier 15, and the apparatus further includes a saving unit, where the saving unit is configured to receive a thirteenth predetermined operation acting on the saving identifier and save the content in the file display area in the current initial interface. By storing the content in the file display area in the initial interface, the G code information can be conveniently and directly called in the next operation.
In a specific embodiment of the present application, as shown in fig. 2, the plurality of operation indicators further include a moving indicator 16 and a stop indicator 17, and the apparatus further includes a third selecting unit, a second controlling unit and a stopping unit, wherein the third selecting unit is configured to respond to a fourteenth predetermined operation acting on the target display line, and the target display line is displayed in a selected state; the second control unit is used for responding to a thirteenth preset operation acted on the moving identifier, controlling the moving axis to move to the execution starting coordinate corresponding to the target display line in the selected state, and executing the G code in the target display line in the selected state; the stop unit is configured to stop executing the G code in response to a fifteenth predetermined operation acting on the stop flag. The apparatus may control the movement axis to move to the execution start coordinate corresponding to the target display line in the selected state by a thirteenth predetermined operation acting on the movement indicator, and execute the G code in the target display line in the selected state, and may stop executing the G code by a fifteenth predetermined operation acting on the stop indicator. The thirteenth and fifteenth predetermined operations are both simple and easy, and the masking further reduces the operator's requirements.
Of course, in an actual application process, after receiving the first predetermined operation, the display line acted by the first predetermined operation may not be in the selected state.
The G-code processing file generation device includes a processor and a memory, the first display unit, the determination unit, the generation unit, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the requirement of the generation of the G code processing file on an operator is reduced by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the above-described method for generating a G-code processing file.
The embodiment of the invention provides a processor, wherein the processor is used for running a program, and the program executes the generation method of the G code processing file when running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:
step S101, identifying an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface;
step S102, responding to the operation on the initial interface, and determining G code information, wherein the G code information at least comprises a G code type;
step S103, generating a G code processing file according to the G code information.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:
step S101, identifying an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface;
step S102, responding to the operation on the initial interface, and determining G code information, wherein the G code information at least comprises a G code type;
step S103, generating a G code processing file according to the G code information.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:
1) the method for generating the G code processing file comprises the steps of firstly, identifying an original G code processing file, obtaining original parameter information of a G code and displaying an initial interface; then, responding to the operation on the initial interface, and determining G code information; and finally, generating a G code processing file according to the G code information. According to the method, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw a graph through UG (user generated content), Solid Works and other CAD (computer-aided design) software, the operator can easily generate the G code processing file, and compared with the prior art, the method has the advantages that the requirements on the operator are reduced, and convenience and high efficiency are realized.
2) The device for generating the G code processing file identifies the original G code processing file through the first display unit, acquires original parameter information of the G code and displays an initial interface; determining G code information in response to an operation on the initial interface by the determination unit; and generating a G code processing file by the generating unit according to the G code information. In the device, the G code information including the G code type is determined by operating on the initial interface, the G code processing file can be directly generated subsequently, an operator does not need to draw graphs through CAD software such as UG (user generated content), Solid Works and the like, the fact that the operator can easily generate the G code processing file is guaranteed, compared with the prior art, the scheme has the advantages that the requirements for the operator are reduced, and convenience and high efficiency are achieved.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (20)

1. A method for generating a G code processing file is characterized by comprising the following steps:
recognizing an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface;
in response to an operation on the initial interface, determining G code information, wherein the G code information at least comprises a G code type;
and generating a G code processing file according to the G code information.
2. The generation method according to claim 1, wherein the initial interface includes an edit identification area including a plurality of operation identifications, and wherein determining G-code information in response to an operation on the initial interface includes:
responding to a second preset operation acted in the operation identifier, and displaying an editing interface;
and in response to a third preset operation acted on the editing interface, determining the G code information, wherein the G code information comprises an axis number of a target moving axis, an execution starting coordinate and the G code type, the moving axis is a moving axis of the processing equipment, the execution starting coordinate is a starting coordinate of the moving axis for executing the G code, and the axis number of the target moving axis is an axis number of a moving axis corresponding to the G code.
3. The generation method according to claim 2, wherein the plurality of operation identifiers include an editing identifier, and in response to a second predetermined operation acting on the operation identifier, displaying an editing interface includes: and responding to the second preset operation acted on the editing identification, and displaying the editing interface.
4. The generation method according to claim 3,
in response to a second predetermined operation acting in the operation identifier, displaying an editing interface, comprising:
analyzing the original parameter information of the G code in response to the second preset operation to obtain the axis number of the target moving axis, the execution initial coordinate of the moving axis and the execution rate of the G code;
the display includes the axle number of target removal axle the execution of the initial coordinate of removal axle and the execution rate of G code edit interface, edit interface includes coordinate operation area and removal axle selection region, wherein, coordinate operation area includes a plurality of coordinate edit boxes and first removal axle characters sign, the initial coordinate of execution that shows corresponding removal axle in the coordinate edit box, first removal axle characters sign one-to-one is located one side of coordinate edit box, removal axle selection region includes a plurality of removal axle check boxes and a plurality of second removal axle characters sign, second removal axle characters sign one-to-one is located one side of removal axle check boxes, is in the state of checking removal axle check boxes correspond the axle number of removal axle is the axle number of target removal axle.
5. The generation method according to claim 4, wherein determining the G-code information in response to a third predetermined operation acting on the editing interface includes:
receiving a third predetermined operation acting on at least one of the coordinate edit boxes in a case where a check state of the movement axis check box in the movement axis selection area coincides with a predetermined state;
updating the coordinates in the coordinate edit box in response to the third predetermined operation to update the execution start coordinates.
6. The generation method according to claim 3, wherein the editing interface further includes a movement axis area, the movement axis area includes a plurality of movement axis adjustment marks, the movement axis adjustment marks include first text information and second text information, the first text information is an axis number of the movement axis, the second text information is a plus sign or a minus sign, wherein the plus sign represents an increase in execution start coordinates of the movement axis, the minus sign represents a decrease in execution start coordinates of the movement axis, and the determining the G code information in response to a third predetermined operation acting on the editing interface includes:
receiving the third predetermined operation acting on the movement axis adjustment mark;
updating an execution start coordinate of the movement axis in response to the third predetermined operation.
7. The generation method according to claim 5, wherein the editing interface further includes a capture flag, and after updating the execution start coordinate of the corresponding movement axis in response to the third predetermined operation and before generating a G-code machining file according to the G-code information, the method further includes:
receiving a fourth predetermined operation acting on the acquisition identifier;
updating the updated execution start coordinate in the corresponding coordinate editing frame in response to the fourth predetermined operation.
8. The generation method according to any one of claims 4 to 7, characterized in that the editing interface further comprises a positioning identifier, the method further comprising:
receiving a fifth predetermined operation acting on the positioning identifier;
controlling the moving axis to move to the execution start coordinate in response to the fifth predetermined operation.
9. The generation method according to any one of claims 4 to 7, characterized in that the editing interface further comprises a determination identification,
generating a G code processing file according to the G code information, wherein the G code processing file comprises:
receiving a sixth predetermined operation acting on the determined identity;
storing the execution start coordinate in response to the sixth predetermined operation;
and generating the G code processing file according to the G code type, the execution initial coordinate and the axis number of the target moving axis.
10. The generation method according to any one of claims 2 to 7, wherein the plurality of operation identifiers include a preview identifier, and the generation method further includes:
receiving a seventh predetermined operation acting on the preview identifier;
and responding to a seventh preset operation on a display interface, and displaying a code preview interface, wherein the code preview interface comprises a plurality of file display lines, and at least one file display line displays the G code type and the execution starting coordinate.
11. The generation method according to any one of claims 2 to 7, wherein the initial interface includes a file display area, the file display area includes a plurality of display lines, and the plurality of display lines include a target display line on which the original parameter information of the G code is displayed.
12. The generation method according to claim 11,
before displaying an editing interface in response to a second predetermined operation acting in the operation identifier, determining G code information in response to an operation on the initial interface, including:
receiving a first predetermined operation applied to one of the target display lines;
in response to the first predetermined operation, the target display line is displayed in a selected state,
in response to a second predetermined operation acting in the operation identifier, displaying an editing interface, comprising:
and responding to a second preset operation acted in the operation identifier, displaying the editing interface, wherein the execution starting coordinate in the coordinate editing frame of the editing interface is the same as the execution starting coordinate corresponding to the target display line in the selected state.
13. The method of claim 11, wherein the plurality of operation identifiers further includes a new identifier, and wherein the method further comprises:
receiving an eighth preset operation acted on the new identifier;
in response to the eighth predetermined operation, adding one row of the target display lines after the target display line of the last row.
14. The method of generating as claimed in claim 11, wherein the plurality of operational identifiers further comprises an insertion identifier, the method further comprising:
in response to a ninth predetermined operation acting on the target display line, the target display line displaying a selected state;
inserting a row of the target display line before the target display line in the selected state in response to a tenth predetermined operation acting on the insertion indicator.
15. The method of generating as claimed in claim 11, wherein the plurality of operational identifiers further comprises a deletion identifier, the method further comprising:
in response to an eleventh predetermined operation acting on the target display line, the target display line displays a selected state;
and in response to a twelfth predetermined operation acting on the deletion identifier, deleting the target display line in the selected state.
16. The method of generating as claimed in claim 11, wherein the plurality of operational identifiers further comprises a save identifier, the method further comprising:
and receiving a thirteenth preset operation acted on the saving identification, and saving the content in the file display area in the initial interface.
17. The method of generating as claimed in claim 11, wherein the plurality of operation identifiers further comprises a moving identifier and a stopping identifier, the method further comprising:
in response to a fourteenth predetermined operation acting on the target display line, the target display line is displayed in a selected state;
in response to a thirteenth predetermined operation acting on the movement identifier, controlling the movement axis to move to the execution start coordinate corresponding to the target display line in the selected state, and executing the G code in the target display line in the selected state;
stopping execution of the G-code in response to a fifteenth predetermined operation acting on the stop flag.
18. An apparatus for generating a G-code processed file, comprising:
the first display unit is used for identifying an original G code processing file, acquiring original parameter information of a G code and displaying an initial interface;
a determining unit, configured to determine G code information in response to an operation on the initial interface, where the G code information includes at least a G code type;
and the generating unit is used for generating the G code processing file according to the G code information.
19. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 17.
20. A processor, configured to run a program, wherein the program when running performs the method of any one of claims 1 to 17.
CN202011630735.4A 2020-12-30 2020-12-30 G code processing file generation method and device and processor Active CN112859748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011630735.4A CN112859748B (en) 2020-12-30 2020-12-30 G code processing file generation method and device and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011630735.4A CN112859748B (en) 2020-12-30 2020-12-30 G code processing file generation method and device and processor

Publications (2)

Publication Number Publication Date
CN112859748A true CN112859748A (en) 2021-05-28
CN112859748B CN112859748B (en) 2022-05-17

Family

ID=75999848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011630735.4A Active CN112859748B (en) 2020-12-30 2020-12-30 G code processing file generation method and device and processor

Country Status (1)

Country Link
CN (1) CN112859748B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237487A (en) * 2021-11-26 2022-03-25 浙江长兴和良智能装备有限公司 Control method of pipe fitting machining equipment, interface generation method and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204253A1 (en) * 2008-02-07 2009-08-13 Francesco Bandini Method and Device for Composite Machining
CN104714477A (en) * 2015-03-13 2015-06-17 江俊逢 Machining file planning system and machining file generating method
CN104914786A (en) * 2015-05-22 2015-09-16 厦门钨业股份有限公司 UG NX secondary development based numerical control blade periphery grinding parameterization programming method
US20170371316A1 (en) * 2016-06-24 2017-12-28 Fanuc Corporation Machining program editing apparatus, method, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204253A1 (en) * 2008-02-07 2009-08-13 Francesco Bandini Method and Device for Composite Machining
CN104714477A (en) * 2015-03-13 2015-06-17 江俊逢 Machining file planning system and machining file generating method
CN104914786A (en) * 2015-05-22 2015-09-16 厦门钨业股份有限公司 UG NX secondary development based numerical control blade periphery grinding parameterization programming method
US20170371316A1 (en) * 2016-06-24 2017-12-28 Fanuc Corporation Machining program editing apparatus, method, and storage medium
CN107544437A (en) * 2016-06-24 2018-01-05 发那科株式会社 Procedure editing device, method and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237487A (en) * 2021-11-26 2022-03-25 浙江长兴和良智能装备有限公司 Control method of pipe fitting machining equipment, interface generation method and storage medium

Also Published As

Publication number Publication date
CN112859748B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
EP0640943B1 (en) Shape modeling apparatus and method
EP3451206B1 (en) Method, apparatus, and device for generating a visual model layout of a space
CN108108194B (en) User interface editing method and user interface editor
CN112859748B (en) G code processing file generation method and device and processor
CN106598926B (en) Operation revocation method and device
US20190303517A1 (en) Simulation device
US20170308060A1 (en) Numerical control device, nc machining device, and nc machining method
CN108255964B (en) Method for displaying process flow route
CN115438396A (en) Package design method and device
CN112307145A (en) Batch updating method, device, medium and equipment for historical map data
CN103259932B (en) Editing method and system of touch screen mobile terminal multimedia messages
CN110232258B (en) Method and system for checking reference change of CAD drawing under editable environment, computer readable storage medium and computer terminal
CN112036442A (en) Method and device for tracking and labeling objects in multi-frame 3D point cloud data and storage medium
EP2237145A2 (en) Image processing apparatus, image forming apparatus, image processing method and program
CN105607957B (en) A kind of data acquisition analysis system based on OPC DA
CN113836872A (en) Page diagram object editing method, device, equipment and readable medium
CN114564799A (en) Card wiring diagram generation method, system and storage medium
CN113534730A (en) Model-based PLC control code generation method, system, device and storage medium
CN113238746A (en) Hybrid programming control method, device, equipment and storage medium
CN111598655A (en) Virtual garment size updating method and device, computer equipment and storage medium
CN104679526A (en) Maya animation pose library
JP2000039909A (en) Numerical control information creating device
CN111225005A (en) Push content generation method and device, electronic equipment and computer storage medium
CN113297642B (en) Image processing method, data processing method, processing system and equipment
CN113000910B (en) Hub machining auxiliary method and device, storage medium, control device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant