How does the CNC system of laser marking machine work?

Laser marking machine is mainly used to engrave characters and graphics on the surface of metal and non-metal solid materials, and has been widely used in many industries. For example, the factory’s trademark is printed on the piston ring; Number the plastic connector of the program-controlled telephone; Mark the model and factory logo on the integrated circuit. There is no laser marking machine, and steel seal or printing is usually used for marking. This method is easy to damage the workpiece and vulnerable to counterfeiting by illegal manufacturers. The laser marking machine is not only beautiful, but also has strong anti-counterfeiting property. At present, the imported laser marking machine has advanced and complete functions, but its price is expensive; There are also similar products in China. Although the price is low (one fifth of that of imported products), they have a single function and unsatisfactory reliability.
Control principle of numerical control system of laser marking machine
The laser marking machine is composed of four parts: laser power supply, laser, two coordinate worktables and numerical control system. The CNC system controls the workbench to move accordingly according to the program input by the user and the marking process parameters. When walking to a certain character or pattern point, a laser marking machine command will be issued. After receiving the command, the laser will emit pulsed laser, and the laser beam will be focused on the surface of the workpiece through the optical mirror group. Under the action of high-power laser, the surface of the object is melted or evaporated to form traces. The combination of these dot matrices is the word or pattern to be engraved. The schematic diagram is shown in Fig. 1. According to the movement mode of the workbench, laser marking machines can be divided into three categories:

  1. Scanning marking;
  2. Stroke order marking;
  3. Path optimized marking.
    How does the CNC system of laser marking machine work?
    Fig. 1 Schematic diagram of laser marking machine
    Software and hardware design of the system
    The controller of the numerical control system of the laser marking machine is 8031 single chip microcomputer. The hardware block diagram is shown in Fig. 2.
    How does the CNC system of laser marking machine work?
    Fig. 2 hardware composition of CNC system
    The system software includes user icon editing, user-defined pattern library generation, marking calculation and control, icon program management, workpiece counting, program verification, etc., as shown in Fig. 3. This paper does not elaborate on how to write system software with single chip microcomputer language, but mainly discusses the implementation methods of the first three functions.
    How does the CNC system of laser marking machine work?
    Figure 3 system software
    (1) Icon program editing
    Because the system is controlled by a single chip microcomputer and displayed by a digital tube, the icon program is formatted and prompted. An icon program is composed of several fields, and each field is composed of all the marking information of the character (or pattern). For example, to mark “1998”, the characters 1, 9, 9 and 8 constitute the fields of the program. A field includes six information elements: (1) character identifier, (2) character type, (3) x coordinate, (4) y coordinate, (5) dot spacing, and (6) number of retypes. Using this structure and editing the icon program according to the prompt method, it is easy to input, modify and make mistakes.
    (2) Custom pattern
    When users need to mark special characters or patterns, because the internal word library cannot provide them, they use the custom pattern method to generate their own pattern library. Each custom pattern includes three parts of information: (1) character type, (2) character identifier, (3) dot matrix code. The input of dot matrix code is carried out in the order of pattern dot matrix from left to right and from top to bottom, one byte dot matrix is input at a time. When the pattern is large, it can be defined in blocks.
    (3) Marking control
    According to the chart program, the characters are transferred into the character dot matrix according to the character identifier and character type, and the character bitmap is formed. After path optimization, the bitmap is converted into the designated position of the workbench and the marking signal is output to complete one-point marking. Among them, path optimization is the key problem to be solved in marking control.
    As we all know, path optimization is a worldwide problem, and there is no optimal solution at present. The nearest neighbor algorithm is the most widely used method. It is simple to program, easy to understand, and has high reliability. It can obtain good results. Because the approximate accuracy of the algorithm is a ≤ 1 / 2 (Inn + 1), and the computational complexity of the algorithm is 0 (NxN), this method may sometimes be poor, fail to achieve the optimization purpose, and have high computational complexity when there are many data points. Based on the nearest neighbor algorithm and according to the point array diagram, the author evolves it into the algorithm in this paper. The steps of the algorithm are as follows:
    ① Find the first point (I, J) in the bitmap, and convert it into displacement. At the same time, set the store to zero in the dot matrix.
    ② . find the next marking point (I ‘, J’) in order at the adjacent points (I + I, J), (I-I, J), (I, j + J), (I + I, j + J), (I-I, J, j + J), (I-I, j-j), (I + I, j-j) of (I, J) (the values of I and j are 1, 2, 3…, which are controlled by the boundary of the point array map). Convert (I ‘, J’) into displacement, and set the store to zero in the dot matrix bitmap.
    ③ . judge whether there are still 1 bits in the dot matrix position map. If there are still 1 bits, take (I ‘, J’) as the new starting point and return to step ②. Otherwise, the optimization is completed. In step ②, since the pattern dot matrix is arranged in the order of bytes from left to right and from top to bottom, the algorithm can find the nearest point fastest without traversing all the points. Therefore, the optimization speed is greatly improved, which is especially important in the real-time control of marking in this paper.