Share this

Application of ADT-MC020 in a Fully Closed-Loop Laser Marking System

2026-04-06 06:37:25 · · #1
This paper introduces a dual closed-loop control system based on an ADT-MC020 embedded CNC controller, communicating with a PC via a serial port, and using a linear encoder as feedback. The causes of precise positioning errors and their solutions are analyzed. This system has been applied to laser marking and precision feeding devices for vernier calipers. 1 Introduction With the development of computer and electronic technologies, embedded control systems, as the brain of the equipment industry, are rapidly being applied to various sectors. Due to their small size, high cost-effectiveness, strong specificity, and good anti-interference capabilities, embedded control systems have rapidly entered various fields of the CNC industry. Vernier calipers are precision measuring instruments, so manufacturers have very high requirements for the scale marking of the calipers themselves. Modern production must consider production efficiency, which is related to factors such as ease of operation and production speed. This paper designs a dual closed-loop control system using a PC as the host computer to issue control commands, and an ADT-MC020 embedded CNC controller as the slave computer to control a servo motor and a linear encoder, meeting the above requirements. 2. Working Principle First, the data file to be processed is edited on the host computer (PC, hereinafter referred to as the host computer). Then, instructions are sent to the slave computer (MC020 embedded controller, hereinafter referred to as the slave computer) through the serial port of the host computer. After receiving the correct instructions, the slave computer starts to send motion instructions to the servo actuator. When the servo reaches its position, the slave computer notifies the host computer to continue sending the next command, and so on in a cycle. The workflow diagram is shown in Figure 1. 3. Design of Vernier Caliper Laser Marking System 3.1 Host Computer System The host computer control system is control software developed by VC. On the host computer, according to the user's requirements, the system can generate the required graphics after some simple settings. For example, the interval between caliper scales, the length of the laser-marked scale lines, whether it is metric or imperial, or both. The generated graphics can be previewed by the customer to see if they meet the requirements. After selecting either cyclic marking or single marking, pressing the start button sends a return-to-origin command via serial port. Upon receiving this command, the lower-level computer immediately executes the return-to-origin task. Once back at the origin, it sends a signal to the upper-level computer, which then controls the galvanometer and laser generator to mark the 0-degree mark (the length of the mark is specified in the generated graph). After marking the 0-degree mark, the upper-level computer immediately sends a command to move to the next mark. The lower-level computer then performs a series of adjustments to ensure accuracy before repeating the above actions. The overall system control flow diagram is shown in Figure 2. 3.2 Serial Communication ① Serial Communication Protocol A communication protocol refers to the format for exchanging data that both communicating parties adhere to. The communication protocol we have developed only needs to consider the rules for information transmission in the line. The serial communication protocol used in this paper is shown in Table 1. This enables communication between the upper and lower-level computers. [IMG=Figure 1 Schematic Diagram]/uploadpic/THESIS/2007/11/2007111415073618006C.jpg[/IMG] Figure 1 Schematic Diagram [IMG=Figure 2 Control Flow Structure Diagram]/uploadpic/THESIS/2007/11/20071114151045569655.jpg[/IMG] Figure 2 Control Flow Structure Diagram [IMG=Table 1 Communication Protocol Frame Format]/uploadpic/THESIS/2007/11/2007111415130848205V.jpg[/IMG] Table 1 Communication Protocol Frame Format [IMG=Figure 3 Serial Communication Flowchart]/uploadpic/THESIS/2007/11/2007111415162274292H.jpg[/IMG] Figure 3 Serial Communication Flowchart ② The program flowchart for serial communication is shown in Figure 3. In this system, the host computer can issue instructions to the slave computer at any time upon receiving a button signal or a return signal from the slave computer. The host computer receives instructions from the slave computer by polling to see if the slave computer has sent it new information. The slave computer MC020 uses serial port interrupts for both receiving and sending information. When it receives new information or needs to send new information to the host computer, it will enter the serial port interrupt service subroutine. This uses interrupt handling to handle asynchronous events, synchronizing it with the host computer's information receiving and sending without affecting other tasks. 3.3 Slave Computer System The slave computer is the controller and guarantor of accuracy in this system, and it is related to whether the final marking of the vernier caliper is qualified. As shown in Figure 2, after receiving the position command from the host computer, the lower-level computer verifies and processes it before sending it to the servo driver. The servo is set to position control mode. The servo motor itself has a photoelectric encoder, which provides feedback on whether the position moved by the servo motor is equal to the given value from the lower-level computer, performing negative feedback adjustment. This constitutes position loop 1. However, position loop 1 only reflects the position moved by the servo, that is, the number of revolutions of the servo motor. If there are errors in the lead screw, guide rail, etc., it cannot be reflected, that is, it cannot reflect the final position of the target. Therefore, position loop 1 is only a semi-closed loop. In addition, the grating ruler detects the final position of the target and feeds this position back to the lower-level computer MC020 controller. The MC020 then compares it with the given position value from the host computer and performs negative feedback adjustment again, thus forming position loop 2. Finally, the target reaches the position given by the host computer, thereby completing precise positioning. The flowchart of the double-loop precise positioning with vernier caliper marking is shown in Figure 4. 4. Causes and Solutions for Position Errors 4.1 Origin Error In motion control, many machines now use mechanical or photoelectric origin switches. Mechanical switches have a limited elastic deformation range, and over time, the elastic coefficient of the spring and mechanical wear will change, leading to positional deviations. Photoelectric switches have a limited sensing range, from the left edge to the right edge. Each time the motor returns to the origin at a certain speed, its inertia prevents it from stopping precisely at the sensing edge of the switch. Based on these reasons, we can first allow the motor to return to the origin switch's sensing range at a higher speed, then move away from the origin at a lower speed. The lower-level controller monitors this in real time, stopping the motor immediately when it leaves the origin switch. Then, the motor moves towards the origin switch at a very low speed, with the lower-level controller monitoring in real time, stopping the motor immediately when it touches the origin switch. This method allows the motor to return to zero at high speed, improving efficiency, while minimizing the error during each return. For the entire system, the starting point for each marking is consistent. 4.2 Errors Arising from Pulse Matching Between the Controller and Servo Driver The lower-level controller sends the position value to the register of the servo driver in the execution unit according to the number of pulses. However, the servo motor moves at different speeds, and the time taken to complete all the pulses varies. If the actual position value detected by the grating ruler is read before the servo motor has truly stopped, and this deviation is then sent to the servo, the servo will drop beyond the command setpoint. [IMG=Figure 4 Flowchart of Dual Position Loop Positioning Program]/uploadpic/THESIS/2007/11/2007111415210743191B.jpg[/IMG] Figure 4 Flowchart of Dual Position Loop Positioning Program Furthermore, since the servo has not truly stopped, the detected value may be an intermediate value, which may be within the accuracy requirement. This causes the controller to jump out of the accuracy adjustment, but the servo motor is still moving. When it finally stops, the position will inevitably deviate. Based on the above reasons, two methods can be used to solve this problem. First, the positioning completion signal output from the servo driver can be sent to the lower-level controller, letting the lower-level controller know that the servo has truly reached its position. However, it should be noted that many servo drivers do not wait until all pulses have been sent before outputting this signal, but rather output this signal when a certain number of pulses have been reached. Therefore, the number of pulses for positioning completion in the servo driver must be adjusted to an appropriate value. Second, after sending the calibration pulse to the motor, extend the delay period appropriately, then check the actual position of the grating ruler, and then perform calibration. Since the vernier caliper marking itself requires high precision, if the motor moves a few extra pulses, its deviation will increase by several μm, which is unacceptable. Therefore, the deviation adjustment must be carefully controlled. 4.3 Installation of the Grating Ruler and Reading Error Caused by Ambient Temperature The accuracy of this system relies on the grating ruler as the final guarantee, so the accuracy of the grating ruler itself is crucial. First, the installation of the grating ruler must ensure that the glass engraving lines inside the grating ruler are parallel to the running guide rail, and the running track of the motion slide connected to the reading slider of the grating ruler must also be parallel to the glass engraving lines inside the grating ruler. The quality of the guide rails and lead screws supporting the slide table must also be guaranteed. Another aspect is the impact of ambient temperature on the final measurement. Temperature changes cause thermal expansion and contraction of the glass engraving lines inside the grating ruler, leading to reading deviations. Therefore, a certain temperature is necessary. 5 Conclusion With the continuous development of the national manufacturing industry, the requirements for the country's equipment industry are becoming increasingly higher, especially in systems with high requirements for rapid positioning and precision, where higher demands are placed on positioning accuracy. This design scheme has been successfully applied in laser marking of vernier calipers. (Proceedings of the 2nd Servo and Motion Control Forum, Proceedings of the 3rd Servo and Motion Control Forum)
Read next

CATDOLL 128CM Katya (TPE Body with Soft Silicone Head)

Height: 128cm Weight: 19kg Shoulder Width: 30cm Bust/Waist/Hip: 57/52/63cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22