Development of CNC milling machine simulation device in VB state

NC programming simulation interface This interface mainly includes two parts: program display, programming area and keyboard area. The user can conveniently use the mouse to click on the keyboard area characters for NC programming. Tool motion simulation bitmap transmission method. In this mode, the movement of the tool is carried out in four steps: firstly copy the DC of the tool directly to the target DC, then copy the background image to the image DC, and then logically calculate the tool DC and the background DC to generate a composite graphic. Finally, the tool DC and the pixels in the background DC are logically ORed. Continuously processed according to the above method, re-displaying the original image at the original image position, and the color is XORed with the original color in the buffer when writing the frame buffer, and the result before the previous drawing is restored on the graphic display effect, so that The display of the tool is continuous and smooth throughout the simulation.

Polygon fill method. This method can generate a tool motion animation effect with strong realism. The redrawing module of the filling module and the tool is used to process the simulation of the tool motion process. The tool display process is divided into two steps: various transformations are performed during the tool display process to generate a realistic motion tool image. The steps are alternated to achieve an animated display of the cutting motion of the tool.

The tool path simulation tool trajectory simulation is divided into several steps: First, the tool position data of the NC machining program is read. According to the processing requirements, the NC code or the bitmap to be processed is processed, and the machining information is converted into the position coordinates corresponding to the workpiece model. Secondly, the collision detection of the tool is performed, and the distance between the tool and the workpiece is calculated in real time. Offset and the definition of the edge surface of the workpiece. Once the tool is detected in contact with the workpiece, it begins to leave a track at the contact point; when the tool lift action is detected (ie, the distance between the tool and the workpiece is greater than zero) or the machining exceeds the workpiece boundary, the tool track display is stopped. It is necessary to note in machining that the tool path should be different during drilling and milling. Therefore, at the time of design, a drill bit judgment variable is implanted. When the variable is true, it indicates that the tool currently being processed is a drill bit. At this point, a 2mm tool radius trajectory is left on the workpiece; when the variable is negative, a 5mm tool radius trajectory is left for the milling cutter.

The system test example takes the processing of the iconic icon of the North China Institute of Water Resources and Hydropower as an example. Before processing, first set the coordinate values ​​of the workpiece coordinate system: X is 50, Y is 38, Z is 93. Select the workpiece number as the No. 1 flat workpiece; then write the CNC machining program (the NC program is omitted), and finally process simulation. The final processing results are as shown. The effect of the processing example The system has been applied to the practice of actual production and processing and teaching practice. It has been proved by practice that the system can reduce the risk of actual operation, shorten the design cycle of NC programming, and effectively save investment, which has certain practical value.

(Finish)

Cnc Machining Parts

Forged Flange Mounting Rings,Custom Made Steel Ring,Flange Ring

Precision Engineering Co., Ltd. , http://www.njdiecasting.com

This entry was posted in on