Share this

Development of a Position Servo Synchronization System Based on Industrial Control Computer

2026-04-06 07:41:06 · · #1
Abstract: To address the synchronous control requirements in CNC technology, a position servo synchronous control system based on a PC industrial computer was designed, and the design method and key technologies of its control software were described. Keywords: industrial computer; position control; resident memory; current drift Currently, precision, automation, intelligence and flexibility are the development directions of CNC technology. Multi-axis linkage CNC technology, one of its key technologies, has increasingly attracted widespread attention and extensive research from scholars both domestically and internationally. However, how to more conveniently achieve high-precision, high-efficiency, and high-flexibility multi-axis linkage is still a topic that needs further exploration. Currently, most multi-axis linkage systems adopt a master-slave structure, where the master unit manages the system and generates instructions, while the control of each axis is completed by individual slave control units [1, 2]. A control system based on a PC industrial computer integrates management and control, utilizing two function boards, PCL833 and PCL728, to simultaneously achieve flexible control of synchronous transmission between two servo motors, thus meeting the multi-axis linkage requirements of CNC machine tools. 1 System Overall Structure A simplified diagram of the overall system structure is shown in Figure 1. The control loop of this system is divided into two parts: digital and analog. The digital part consists of one PC industrial control computer and two hardware function interface boards. The PC industrial control computer mainly performs position control and adjustment calculations for the two motors; hardware function board 1 is a counter, which realizes the detection, frequency multiplication, phase identification and counting functions of the feedback pulses of the two servo motors; hardware function board 2 is a D/A board, which realizes the control of the two servo motors. 2 Hardware Interface Circuit The PCL833 is a 24-bit reversible counter produced by Advantech [3]. It is a counter interface board designed for position and speed control. It can count quadrature input and digital input and has the following features: (1) Three 24-bit reversible counters; (2) Maximum pulse input frequency 2.4MHz; (3) Counting mode is pulse/direction counting and forward and reverse counting; (4) Three frequency multiplication modes: *1, *2, *4; (5) It has interrupt control for 9 different interrupt sources; (6) The maximum opto-isolation can reach 2500V; (7) Four-level digital filtering; (8) Programmable interrupt time; (9) Suitable for IBM PC/AT and compatible machines (ISA bus). The three 24-bit reversible counters can be used individually or in cascade. The maximum counter mode can be 48 bits. It can be set to incremental and absolute modes according to requirements. It has overflow interrupt and overflow counting functions. In this system, in order to ensure that the counter reading is accurate and does not lose steps, a 24-bit counting method is adopted, and the counter is required to perform absolute cyclic counting. Interface board 1 occupies 16 consecutive mapped addresses of the computer. According to the allocation of the PC computer's mapped addresses, 16 consecutive mapped addresses from 0X200 to 0X215 are set for the counter. PCL728 is a 12-bit D/A converter produced by Advantech [4]. This converter is a 12-bit dual-channel D/A output card designed for harsh working conditions. Each channel is completely opto-isolated and independent of the system ground. It can be set to output in the following ranges: 0~5V, 0~10V, ±5V, ±10V, 4~20mA, 0~20mA. According to the control requirements of the servo motor, it is set to bipolar ±10V output. The D/A output occupies 4 mapped addresses, namely 0x2c0, 0x2c1, 0x2c2 and 0x2c3, which are 4 consecutive addresses. The servo motor and its drive system are products from Yaskawa Electric Corporation of Japan, model BMH0955N11A1L. The photoelectric encoder is included with the servo motor, with a speed of 3072 pulses/revolution. 3. PC Real-Time Control Algorithm Software Design and Implementation This system implements synchronous tracking control of two servo motors. The two motors are defined as the master motor and the slave motor, respectively, and the industrial control computer simultaneously controls both servo motors. An 8253 zero counter in the industrial control computer is used to implement timed interrupts, and an interrupt service routine is installed in the 0x1cH interrupt phasor controlled by the 8253 zero counter. The default setting of the 8253 zero counter is to generate 18.2 interrupts per second, i.e., the interval between each interrupt is 55ms. Thus, the preset value of the counter can be obtained according to the formulas interrupt_high = sample_time × 1193180% 256000 and interrupt_low = sample_time × 1193180/256000. By modifying this preset value, different interrupt times can be obtained. The entire system software consists of two modules: the position locking module and the control module. When the system adopts a mixed analog-digital structure, even without input, various interferences will cause current "zero drift" in the analog circuit, which will affect the control effect. The position locking module is designed to solve the above problems. The interrupt service routine of this module and the interrupt service routine of the control module occupy the same interrupt phasor. Using TSR (Terminate and Resident), that is, long-term memory technology [5], it is kept in memory. When the main control module is not running, the locking module is automatically activated by the timer interrupt and adopts the zero-input negative feedback control strategy to lock the zero position of the servo motor. When there is a task, the main control module is run. At this time, the entry address of the interrupt service routine of this module will replace the entry address of the interrupt service routine of the locking module and obtain the control right of the servo motor. After the task is completed, the main control module is exited and the position locking module will regain its control right, so that the servo motor is always in the closed loop and effectively ensures the working performance of the system. In the actual design, the locking module adopts mixed programming of C language and assembly language, and the control scheme adopts simple zero-input proportional control. The flowchart of this module is shown in Figure 2. The proportional coefficient Kp = 0.4, and the interrupt sampling time is the same as that of the main control module, both being 4ms. The entire program occupies only 560 bits, having almost no impact on the operation of the main control module or other modules, but it significantly improves the position drift of the servo motors, keeping the position deviation within ±1 pulse. The flowchart of the main program of the control module is shown in Figure 3(a). The flowchart of the interrupt service subroutine is shown in Figure 3(b). The main program completes the functions of register and timer initialization, defining control variables, displaying input and output, data storage, and printing; the interrupt service subroutine mainly completes the control of the two servo motors. In terms of control strategy, the main motor adopts simple PI control, while the driven motor adopts a composite control consisting of fuzzy-PID and feedforward differential control, using a mixture of C and assembly language programming. The composite control fully utilizes the advantages of fuzzy control and traditional PID control, adopting a control mode that combines fuzzy control and PID control. By querying the fuzzy control table, based on the different states of the system and the different requirements for different moments in the control process, the proportional Kp, integral Kd, derivative K3 coefficients and feedforward derivative coefficient K1 are obtained, taking into account the dynamic and static performance indicators of the control system, and achieving the expected purpose. The key points of software design are as follows: (1) Resident function. The long-term memory resident function keep() keeps the program in memory and can be activated by hotkey or other means. The number of bytes required by the program is in parentheses. For example, the position locking module in this software requires 560 bits, so it can be written as keep(560). (2) In the design of the counter sampling subroutine and the D/A output subroutine, in order to shorten the time for running the counter and outputting D/A data and improve the calculation efficiency, structures and common bodies are used, as shown below: (3) Overflow judgment subroutine. In order to ensure the accuracy of the counter, the counter is required to perform absolute cyclic counting, which will inevitably produce an overflow phenomenon. Therefore, after each sampling, it is necessary to judge whether the counter overflows. Because the counter uses a 24-bit counting method and is read in three parts, reading all 24 bits before judgment would inevitably increase the interrupt program's execution time. In practical applications, the high eight bits are used for judgment. Since the encoder used is 4096 pulses/revolution, the servo motor's maximum speed is 600 r/min, and the sampling time is 4ms, the absolute value of the difference between the two samples of the highest bit cannot exceed 255; otherwise, it will overflow. If the difference between the current high-order bit value and the previous sample value is 255, it indicates counter underflow; if the difference is -255, it also indicates counter underflow. The main motor uses constant speed control, and when the driven motor performs position tracking, a comparison of the tracking characteristic curves of conventional PID control and composite control is shown in Figure 4. The figure shows that compared with conventional PID control, composite control has advantages such as faster response speed. This indicates that this control strategy can not only be used for servo motor position synchronization control but also has the above-mentioned advantages. 4. Conclusion The position synchronization control system based on an industrial control computer has advantages such as high system reliability, simple structure, and flexible programming. It can utilize both advanced software and assembly language, improving programming and debugging speed and program readability. While controlling the servo motor, it allows for direct observation, analysis, and printing of control progress, inputs, and outputs. References [1] Xu Chunquan, Hu Hongguo, Yang Ruqing. Series synchronous control of multiple servo motors [J]. Electrical Automation, 2001, (4). [2] Pan Xiaobin, Li Guoping, Yu Yueping. Flexible control of synchronous transmission between servo motors [J]. Mechanical and Electrical Engineering, 1999, (5). [3] PCL833 3-axis Quadrature Encoder and Counter Card User's Manual [Z]. Advance Co. Ltd., 1998. [4] PCL728 D/A Conveter Card User's Manual [Z]. Advance Co. Ltd., 1998. [5] IBM PC XT/AT Series Microcomputer Advanced Programmer's Guide [M]. Beijing: Hope Computer Technology Company of Chinese Academy of Sciences, 1987.
Read next

CATDOLL 136CM Miho (Customer Photos)

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22