| Precise motion control is indispensable to automatic spraying machine.The traditional spraying machine motion control system is mostly designed with single-chip computer or motion control chip,which has the shortcomings of slow processing speed,poor real-time performance and inadequate precision.In this paper,a motion control system based on FPGA and ARM is designed for the five-axis automatic spraying machine of small production line.It can realize the high performance control of spraying equipment,effectively solve the problems of low precision and efficiency of spraying of production workpiece,and has expansibility.The system is mainly composed of FPGA motion controller,human-computer interaction module and bus module,the bus module is to realize the communication between ARM and FPGA.The design of motion controller based on FPGA includes input information analysis module,speed control module,linear and circular interpolation module and rotation axis control module.In the design,trapezoidal acceleration and deceleration algorithm is used to control the motor speed,and digital integration method is used to realize linear and arc interpolation modes.The five axes of spraying machine include three straight axes which control the movement of spraying gun and two rotating axes which control the rotation of fixture and spraying gun.Users can input the coordinate information of the required trajectory by keys,and ARM as the main processor receives the data on the display screen and sends it to the FPGA.After interpolating and outputting the direction and displacement pulses of three axes,the output pulse is connected to the motor driver to drive the stepping motor,and then drives the spray gun to walk out of the predetermined track.For the two rotating axes,the output pulse driving fixture and the spray gun rotate to the designated position.Through functional testing of the system,the correctness of the design is verified,and the original design goals and requirements are achieved. |