Construction method of numerical-control code compiler

A technology of NC code and construction method, which is applied in the field of code compilation, can solve problems such as large memory, NC code rules are not exactly the same, parts reimbursement, etc., to achieve rapid application, reduce calculation workload, and avoid the effect of parts reimbursement

Inactive Publication Date: 2015-01-14
GUANGZHOU INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this processing method requires a large memory
[0004] In the existing CNC system, the processing program needs to be recompiled every time it is executed, which increases the computational workload of the CNC system when it is running; when the code program is large, it requires a large memory, which affects the overall performance of the CNC system; it will only be found when the program i

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Construction method of numerical-control code compiler
  • Construction method of numerical-control code compiler
  • Construction method of numerical-control code compiler

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The construction method of the numerical control code compiler of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0020] The invention discloses a method for constructing a numerical control code compiler, comprising the following steps:

[0021] First, define the intermediate language format of NC instructions according to the actual NC system requirements.

[0022] The intermediate code is an internal representation of the source program, or intermediate language. The function of the intermediate code is to make the structure of the compiled program more logically clear, especially to make the optimization of the target code easier to implement. The intermediate code is an intermediate language program. The complexity of the intermediate language is between the source program language and between machine languages. There are many forms of intermediate language, the common ones are revers...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a construction method of a numerical-control code compiler. The construction method comprises the following steps that an intermediate language format of a numerical-control instruction is defined; a lexical rule and a grammatical rule corresponding to the numerical-control instruction are formulated according to the G code format and the M code format; a framework program of the numerical-control code compiler is compiled, G codes and M codes are compiled, an intermediate language is generated, and the intermediate language is saved in a target file. According to the construction method of the numerical-control code compiler, the intermediate language and an ANTLR language recognition tool are adopted, the numerical-control code can be used repeatedly after being compiled at a time, and the computational effort consumed when a program runs is reduced; compiling is finished before actual execution of the program, errors in the code can be found in advance, and part reimbursement caused by the situation that the errors are found during execution of the program is avoided; the lexical rule file and the grammatical rule file are defined, a grammatical analysis algorithm and a lexical analysis algorithm can be automatically generated, and compiling by a developer is not needed; recompilation can be conducted for different code rules as long as rule files are modified.

Description

technical field [0001] The invention relates to a code compiling method, in particular to a compiler construction method. Background technique [0002] At present, CNC machine tools complete the processing of parts by executing CNC codes, and users use G codes and M codes to control the movement of the machine tool and perform auxiliary operations. The NC kernel program cannot directly read the NC code to process the parts. The part processing program must be preprocessed and decoded into corresponding processing instructions by the preprocessing program module, so that the NC system can process the parts. This part is usually called NC code compiler. As one of the core modules of the CNC system, the CNC code compiler needs to process a large amount of data, and its operating efficiency directly affects the stability of the entire system. [0003] There are two commonly used data preprocessing methods: interpretation method and compilation method. The interpretation metho...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G05B19/4093
CPCG05B19/4093
Inventor 孙克争周雪峰陈贤帅
Owner GUANGZHOU INST OF ADVANCED TECH CHINESE ACAD OF SCI
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products