The numerical control milling that is based on AutoCAD platform emulates the development of module

  • Time:
  • Click:293
Summary: Be aimed at XK714 milling system, and ObjectARX of tool of AutoCAD2 second development, introduced simulative of computer of process of milling of a kind of numerical control to implement a method, use object-oriented programming method, technology of dynamic to cutting tool contrail imitate undertook an analysis, in numerical control on the foundation of automatic process designing, introduced numerical control milling to emulate the implementation method of module in detail, realized visible graph the imitate of milling of seesaw pattern numerical control.

Keyword: Milling imitate; CNC Machining; Object-oriented programming; The application of CNC Milling of cutting tool contrail is wider and wider, the whole process of CNC Machining is through NC machine program comes pilot.

No matter be manual process designing or earning of automatic process designing,the program that reach is met the mistake with constant presence, traditional method is used try cut a law to come procedure of test and verify is correct, try with wooden model, wax-pattern or plastic pattern namely cut examine in order to undertake.

And fall in computer environment, using method of numerical control imitate to undertake the validity of numerical control program examines is a kind of new method.

Through machining the imitate of the process to the spare parts, can check the validity of numerical control code, whether is there interference appearance between the cutting tool in still can examining treatment process and workpiece, machine tool and clamping apparatus.

Treatment process imitate can compare bona fide report to give actual cutting to machine a process.

The process is machined with NC of imitate of visible graph means on computer screen, the mistake in fish course tries to revise, can save a large number of charge and time.

So, use the simulation of cutting tool contrail of NC graph, can improve process designing efficiency.

The NCCODE numerical control that this imitate system develops for oneself is automatic the one part of process designing system, in the actual application of XK714 CNC Milling, proved its effectiveness and validity.

1 development platform and tool this system moves on the PC, the Windows 98 that chooses current popularity or Windows XP serve as the development of software and the operating system that run.

It is platform with Auto-CAD 2000, use the current software that faces Microsoft company to develop the development tool ObjectARX of platform Visual C + + , this tool supports visible process designing and object-oriented technology, it is the Windows application process that is based on MFC development.

The structure of system of imitate of milling of 2 numerical control and system of imitate of treatment of procedure of flow numerical control are a main component in CAD/ CAM compositive system, in the CCODE of CAD/ CAM compositive system of development, generate CNC Machining code directly according to the graphical substance of spare parts outline above all, undertake through this imitate system imitate examines next.

Imitate has 2 dimension animation to show imitate and simulation of three-dimensional and hypostatic geometry.

This system uses 2 dimension animation to show simulation, its structure is shown 1 times like the graph, if the graph is shown 2 times,develop technological process.

Characteristic of this kind of simulative is planar, like the workpiece blueprint of 2 dimension view, go to the lavatory simplier, because 2 dimension animation shows easier travel, application is accordingly wide.

In beg calculate planar knife orbit, when optimizing contrail of cutting tool motion, compare effective; Decompose to a few three-dimensional imitate will solve for 2 dimension imitate also is significant.

Of data of imitate of contrail of 3 cutting tool get reach implementation to be pursued by outline of spare parts of the description in AutoCAD2 dimension graph to come true form, imitate of hypostatic cutting tool contrail must get the information of cutting tool contrail, information of cutting tool contrail is gotten by the graphical substance that spare parts outline describes in AutoCAD graph database.

In NCCODE numerical control in system of automatic process designing, join the graphical substance of spare parts outline into multistage line (also can not close) .

Multistage the line is the special graphical entity in AutoCAD, it is by a series of end to end comprise with circular arc point-blank, in graphical database with acme (be linked together namely dot) the form of seed body saves information.

The important information that concerns with the position, appearance has two: It is apical (Vertex) coordinate is numeric, maintain presence in 10 group code; 2 it is apical protruding is spent (Bulge) , maintain presence in 42 group code.

Multistage the start that the start of the line is cutting tool namely, the terminal coordinate that in machining a process, needs all but by multistage each apical data fixes the line, according to these data can generate CNC Machining code.

Same, according to these data can contrail of simulation cutting tool.

3.

The data of 1 linear part in view of linear line segment it is multistage group becomes a part, but in entity multistage inside the line, seed body is not line segment, however apical, and multistage the linear acme of the line saved mark of sharp starting point only, terminal coordinate protects existence the next in acme.

It is OK to use ObjectARX function very know conveniently multistage each apical coordinate is worth the line and protruding spends a worth, got the geometrical information such as the sharp starting point on spare parts contour line, terminal coordinate so.

The agreement in AutoCAD: Protruding is spent for 0 it is linear acme.

Specific means is as follows: I (F Bulge = = 0) / / judge Ads Name E0 of   of   of { of whether linear   , e1; AcdbGetAdsName (E0, vertexObjId) ; Struct Resbuf *ed, *cb; / / catenary expresses definition result buffer AcdbEntNex of   of pressing with a finger (T E0, e1) ; I (F (Ed = AcdbEntGe (T E1) ! = NULL) Fo of   of   of     { (R Cb = Ed; Cb! = NULL; Cb = Cb ->Rbnext)     I (F Cb ->Restype = = 10) P of   of   of     { [2 Y] = 2* (Cb ->Resval.

Rpoin [T Y] - P [T Y] )     P [2 Y] = Cb ->Resval.

Rpoin [T X] - P [T X] / / the Numb + + of data information   of linear the 2nd acme; AcutRelRb of }     (Ed) ; } of }     3.

The data of part of 2 circular arc is multistage the start mark that the circular arc acme of the line saved circular arc only, terminal coordinate protects existence the next in acme.

It is OK to use ObjectARX function very know conveniently multistage each apical coordinate is worth the line and protruding spends a worth, the geometrical information such as the starting point that gained the circular arc on spare parts contour line so, terminal, radius, the centre of a circle.

The agreement in AutoCAD: Protruding is spent do not be the 0 acme that are circular arc, protruding is spent to expressing anticlockwise circular arc, protruding is spent express clockwise arc to lose.

Specific means is as follows: AcedOsnap (Ptm, "Center" , ptcen) ; / / the coordinate   Ads Name E011 that obtains the centre of a circle, e111; AcdbGetAdsName (E011, vertexObjId) ; Struct Resbuf *ed, *cb; / / catenary expresses definition result buffer Ads Point Pst1 of   of pressing with a finger, pst10, opst1, ptcen1, ptm1; Ads Real Rads1, length1; Ads Point-se (T Cb ->Resval.

Rpoint, pst1) ; / / the AcdbEntNex of end points   that obtains PST dot to be circular arc (T E011, e111) ; I (F (Ed = AcdbEntGe (T E111) ! = NULL) Fo of   of   of     { (R Cb = Ed; Cb! = NULL; Cb = Cb ->Rbnext)     I (F Cb ->Restype = = 10) Ads Point-se of   of   of     { (T Cb ->Resval.

Rpoint, pst10) ; Opst1 [X] = (Pst1 [X] + Pst10 [X] ) / 2; Opst1 [Y] = (Pst1 [Y] + Pst10 [Y] ) / 2; Opst1 [Z] = (Pst1 [Z] + Pst10 [Z] ) / 2; Rads1 = AcutAngle (Pst1, pst10) ; Length1 = AcutDistance (Pst1, pst10) ; AcutPola (R Opst1, rads1 - 3.

1415926 / 2, bulge*length1 (/ 2) , ptm1) ; AcedOsnap (Ptm1, "Center" , ptcen1) ; / / the coordinate   } that obtains the centre of a circle 3.

Simulative of contrail of 3 cutting tool implements the method that introduces above the basis, obtain data of cutting tool contrail, next according to ARX function AcedCommand (RTSTR, "INSERT " RTSTR, cutting tool pursues piece renown, RTPOINT, p1, RTREAL, scale, RTSTR, "" , RTREAL, ) , if be linear, insert between 2 o'clock a certain number of the graph that is a circle with cutting tool radius piece, more or less is numerary concerned with feed speed, amount is more, criterion cutting rate is rapidder, conversely, criterion cutting rate is slow; If be circular arc, be in this circular arc paragraph on insert cutting tool graph piece, but should distinguish suitable circle and go against a circle, in order to distinguish cutting direction.

4 example with milling simulative an example explains, after CNC Machining code should be generated below NCCODE interface, press " imitate " pushbutton, input correct imitate parameter, click " affirmatory " pushbutton, play if the graph shows a dialog box 3 times,go out, after clicking imitate next, imitate effect is shown 4 times like the graph.

5 conclusion use computer figure alternant interface, use technology of 2 dimension imitate and object-oriented programming method, with the development tool ARX with VC + + and AutoCAD powerful function, undertake handling to describing the graphical substance of cutting tool contrail, get place to require data, undertake imitate to the cutting tool contrail of milling system, code of correctly numerical control of test and verify, and the operation is simple, convenient, improved the work efficiency of numerical control machine tool.

In the application on XK714 CNC Milling, obtained favorable result, in the meantime, this system still can be used in the student's education.

CNC Milling