Develop software of simulation of numerical control lathe with VB

  • Time:
  • Click:113
  • source:AMANCIO CNC Machining
Numerical control machine tool is the brunt equipment of contemporary and mechanical industry, numerical control lathe is the numerical control machine tool with equipment the largest amount, occupy about 42% . Of numerical control lathe grooming is the key that school profession skill grooms. But numerical control lathe especially price of lathe of high-powered numerical control is high, a large number of the school is faint buying, reason is being bought a few on lathe of high-powered numerical control, after the corresponding simulation software that mount author develops, after letting a student practice qualification on simulation software, go up again lathe operation, what this mode suits the school very much is large-scale groom. This software is returned but turning of bona fide imitate machines orbit, examine the craft line with CNC Machining firm order is reasonable, whether can appear cutting tool and workpiece barge against, cut too wait for a problem. Treatment of lathe of software of the 1 development that use VB is treatment of typical two coordinate linkage, with plane the graph can express to be clear about. This simulation software is in Windows95/98 Chinese edition moves below the operating system, programming language chooses VB5 Chinese edition, it is a kind of object-oriented visible programming language. The result with the clavier that the working process of numerical control lathe can regard handlers as to go up to numerical control lathe, switch corresponding generation after undertaking operating. VB was offerred numerous accuse (object) , can wait with the clavier that goes up at expressing numerical control lathe, switch, if use CommondButton to accuse express pushbutton, its function accuses in this the process designing in corresponding incident process can come true. Object-oriented make each incident course relatively independent, the structure is clear, facilitating process designing and revise. The process designing of simulation software, should make the student is before the computer operation and the sensory appearance that handle on numerical control lathe are consistent. 2 software interface and actual and complete consistent student are before numerical control lathe, substantially of its work space can divide for 3 parts: Share of ① lathe machinery, include 3 ungual chuck, workpiece, tool carrier, tailstock, lathe bed to wait; ② operates face plate, all sorts of indication screen, clavier, switch, knob waits; Library of ③ cutting tool, include all sorts of lathe tool, broach, boring cutter to wait. Accordingly, simulation software designed 3 Form to accuse (interface) , form1 accuses: Share of indication lathe machinery, indication outfit places knife of workpiece, outfit to machine a process to knife, cutting; Form2 accuses: The operation face plate of lathe of indication numerical control; Form3 accuses: Show can lay chosen cutting tool. Agree completely the actual distribution that each Form controls a layout that go up and numerical control lathe to go up, position, color. The clamping apparatus with the most commonly used lathe is 3 ungual chuck and tailstock tip, workpiece is tubal material or great ability commonly. Press " mechanical cartography " regulation, accuse with a certain number of Shape, Line in Form1 will state workpiece, card is ungual, top. The user inputs work measure, the Shape that the change shows work accuses attribute of Visible attribute and Width, Height, work is shown in Form1. In the process designing in process of incident of corresponding clavier, mouse, with change of clavier, mouse each Shape, Line accuses positional attribute, mobile workpiece and card claw, top, give out to hint accordingly, complete the process that hold clip namely. Many PictureBox container is installed in Form3, accuse with a certain number of Line in every container " scale " a kind of cutting tool. Identical to the appearance such as broach, dimension becomes the cutting tool of series, the cutting tool dimension that can input according to the user, the Line in accordingly change container controls software positional attribute, show different specifications. 3 settings parameter, identify input instruction and tool carrier of lathe of numerical control of indication treatment effect to have 12 industry, can choose some work arbitrarily. A certain number of Line were installed to accuse in Form1. Doubleclick either PictureBox container right now, the Line in Form1 accuses a meeting to be in current project scale gives corresponding cutting tool, be versed in here " outfit knife " . If should be versed in already had cutting tool, software can remind whether to change cutting tool. The user still can operate the installation place that will change cutting tool to go up in tool carrier through clavier, mouse. Every labour in Form1 go up of installation " cutting tool " Line accuses amount, each Line accuses positional property value will stock variable. Be versed in when this be chosen to be current project when, show the place on its holds cutting tool figure namely. Some labour is doubleclicked on Form1, if should be versed in without the knife, should be versed in the value all is an all variable 0. In CNC Machining, still need to input cutting tool compensating parameter (include parameter of radius of circular arc of X and cost of Z direction compensation, point of a knife, point of a knife to wait) . Lathe of numerical control of complete function sex deploys pair of Dao Yi commonly, accuse with a certain number of Shape in software express. Pass incident of clavier, mouse, line of change cutting tool accuses with accuse to Dao Yi Shape the position, according to positional property value, affirmatory cutting tool compensates a value. The method with similar reoccupy, accuse according to cutting tool Line accuse with workpiece Shape positional attribute is worth certain work coordinate is the relation that fastens with machine tool coordinate. Corresponding numerical value saves corresponding in Form2 Label to accuse in. In numerical control system, have the finite statement such as G, M, F, S, T only, the pattern is not mixed also. CNC Machining program and computer program are similar, by a certain number of block composition, every block is average with " ; " end. Simulation software installed an as small as what agree actually keyboard in Form2, charge an order that accepts an input with TextBox. Software regards every block of the input a string, VB provided rich string function, wait like Val, Instr, can very collect the information that contains among them conveniently, grant to carry out. For example: O0001; G00X60Z5S400T0101; G01U-10W20F0.

1; ... program with " O " begin, "0001 " show program sign, "; " after " G00X60Z5S400T0101; " regard a string as, usable Instr function detects piece " G " the existence of the instruction, reoccupy Val detects piece ever since number " 0 " , get specific " G00 " instruction. According to this, detect piece " X " , " 60 " reach other. The CNC Machining program of all inputs all protects existence hard disk with file form in. Numerical control lathe can machine only linear with circular arc (include to arrange a circle, go against a circle) , the others curve can be approached by linear, circular arc and become. The formation of linear, circular arc the process uses method of numerical control interpolation. Simulation software cannot the feedback that the numerical control lathe of half closed circuit moves actually controls imitate, choose pointwise to compare a law to form orbit, calculation is simple, process designing is convenient. Software passes the string computation of as above, for interpolation computation offers parameter of orbit property, geometry (start, terminal, the centre of a circle) , the data such as rotate speed, feed, still have the compensation of the relation of workpiece coordinate department and department of machine tool coordinate, cutting tool. In simulation software, workpiece (Shape accuses) fill with marked yellow. When executive cutting dictates, cutting tool presses interpolation calculative contrail to move on screen, blade of cutting tool cutting is in from workpiece course, carry a scenery on the back to enclothe with screen. On visual effect, workpiece material is excised. What machine because of numerical control lathe is circumgyrate, the place of classics of cutting blade place the workpiece part about semmetry of main shaft axes, also want to be enclothed with screen setting color, show workpiece stuff by the effect of cutting. The settlement of a few problems in 4 software place of numerical control lathe uses system of FANUC numerical control in, still have the compound treatment statement such as G70, G90, it is sharp movement (G00, G01) , circular arc moves (G02, G03) combination. According to athletic contrail property and cutting effect, g00, G01, G02, G03, G32 was built when simulation software process designing (whorl cutting) machine a subprogram 5 times in all. Some instruction appears in block, call corresponding subprogram or subprogram combination, be like " G00; " , call G00 subprogram, basis " X60Z5S400T0101 " , form corresponding contrail. In be being operated actually, some cases appear almost impossibly, be like not the circumstance that clamp machines. Imitate must consider these cases when software process designing, for this, in a lot of operations in simulation software the result is saved with condition variable form, if block ungual top clamp, this condition variable is " true " , it is the premise of follow-up treatment. The resolution of numerical control lathe already was amounted to commonly 0.

001mm, so small length cannot show on computer screen. When Form accuses a process designing in coordinate department, it is an unit with 30Twip/mm, and the coordinate of the machine tool is worth with 0.

001mm shows for the unit. Real position value and indication coordinate value have certain error, but do not affect visual result. The unit process of cargo bandling of the numerical control lathe that simulation software offers and actual unit process of cargo bandling agree completely. Simulation software accepts FANUV-0TC machine program and demonstrate to machine orbit, as identical as practical effect. All sorts of functions of numerical control lathe, if simple sentence is carried out, time-out, urgent stop to wait, simulation software all can come true. To certain function, if adjust control of servo parameter, feedback to wait,involve a machine tool " hardware " , withhold its to operate only, cannot undertake the imitate of the effect. CNC Milling CNC Machining