| Big size cutting machine and other industrial production need to implementcooperative control motor group。The traditional motor control system mostly usescontroller and motor drive one-to-one impulsive control mode, the control circuit ofthis mode is complex, poor anti-interfere ability, easy to lose pulse or importinterference pulse, low reliability.This article in view of the large size cutting mechanical and electrical machinessynchronous control need,designed a motor group synchronous control system basedon CAN bus. The motors control system use STM32 as motion controller which is lowpower consumption, high processing speed, applies four step motors as control object,the motor control modules realize communication through a CAN bus. The hardwarecircuit of the motors control system consists of main controller circuit, bus networkCAN interface circuit, motor drive circuit and RS485 circuit communicated with PC.A set of CAN bus application layer communication agreements which aresuitable for the system have been designed. we choose to use CAN2.0 B protocolstandards frame format suitable for the system , have established the 11 identifierdistribution rule and standardized management of communication network ,haveresearched configuration of the packet receiver filter and error correctionerror-detection method during CAN communication.This paper has completed software design and debug of the system ,the mainfunction program, motor driver program, and receive and dispatch message programand so on.It uses time segmentation algorithm, realizes straight line and circularinterpolation through the mirror image programming method .For the convenience of experiment, choosing two motor for test objects, testingthe system by multi-motor control. The main controller sends instructions to thecontroller of the two nodes motor, all of the two motors can receive control signal, butif don’t use CAN bus application layer communication agreements compiled in thispaper, the synchronization error of two nodes motor is in about 370 us , which is arelatively large. When using CAN bus application layer communication agreements,the delta-T of executive command between the two nodes motor is in about 20 us. Itshows that the design of CAN bus application layer communication agreements in thispaper can ensure the synchronicity of the system and the stability of thecommunication. |