Font Size: a A A

Research And Implementation Of Automatic Programming Of CNC Machining Based On AutoCAD

Posted on:2013-05-08Degree:MasterType:Thesis
Country:ChinaCandidate:W L ZhangFull Text:PDF
GTID:2231330371493998Subject:Mechanical and electrical engineering
Abstract/Summary:PDF Full Text Request
The paper takes2D drawing of shaft parts for example to research featurerecognition,automatic programming,compilation process of NC code,algorithm ofinterpolation and so on.(1) A method of entity-breaking based on pitch point is presented firstly. Inducingthe method the of minimum anti-clockwise angle for searching the outline.Encoding forthe type and feature of the entities which constitute the outline.On basis of thecoding,extracting the main feature and reconstructing,integrating the assistantfeature.According to the front parameter settings and the type of its right end,the code ofpreparing and rapid positioning of end is generated automatically.According to theintegrated outline,generating the code of machining outline in order.Extracting the righttilt chamfer,notch and other assistant feature and feature of thread to generatescorresponding NC code.At last,generates stop code to complete automaticprogramming.(2) The rules for compiling NC code is made,including lexical analysis,syntaxanalysis and semantic analysis.Firstly,getting an order from NC code.According tocorresponding rules,transforming the order into a long-double middle code of lexicalanalysis.Simultaneously,completing the lexical analysis in terms of composition rules ofthe order.And then,according to the middle code of lexical analysis and the compositionrules of parse tree,making use of the top-down method,to complete the derivation ofsyntax analysis of the first category order-word.Generating the flags of all of theorder-word’s state.Comparing the state of all of order-word between the initial and thelast to complete the logical XOR operation in terms of each bit.Whether there isnon-zero value or not in the result to complete the syntax analysis of the secondcategory order-word.At last,according to the defined data structure and tool-path ofCNC machining,generating the middle code of semantic analysis automatically,whichincludes the state of machining and data of coordinate and get ready for the simulation of2D tool-path.(3) The module of linear and circular interpolation is developed based onMasm32.Compiling the module and generating the object file,whose extension is obj.Inthe main programme,all kinds of assistant function of interpolation is developed to callthe interpolation module to realize the dynamic simulation.Also,the math definition ofNURBS and algorithm of calculating coordinate of interpolation is introduced in thepaper.Making use of tiny straight line segment to realizing the fitting of NURBS.(4) A system of automatic programming is developed.Taking a typical shaft part forexample to introduce the process of its operation.Getting the machining state of G codeand coordinate data from the middle code of semantic analysis in turn.Setting the typeof interpolation to realize the dynamic simulation of2D tool-path.The result indicatesthat the system can realize the automatic programming and the compilation of NC codeaccurately and easily and display the2D tool-path visually.
Keywords/Search Tags:AutoCAD, feature recognition, automatic programming, NCcode, compilation, interpolation, dynamic simulation
PDF Full Text Request
Related items