I. Motion Controller
With the continuous development of integrated circuit technology, microelectronics technology, and computer technology, motion controllers have evolved from those based on microcontrollers, microprocessors, and dedicated chips to open motion controllers based on PC platforms with coprocessor architectures using digital signal processors (DSPs) and complex programmable logic devices (CPLDs) as core processors. This approach organically combines the information processing capabilities and open nature of PCs with the strong motion trajectory control capabilities of motion controllers, resulting in strong information processing capabilities, high openness, accurate motion trajectory control, and good versatility. This model operates on a unified human-machine interface platform, allowing for appropriate adjustments to DSP algorithms and CPLD configurations to implement different hardware functional modules, and facilitating easy connection to various types of drivers. Therefore, PC-based next-generation motion controllers have become the mainstream and development direction of control systems.
II. How a motion controller controls a motor – Taking a Fuji servo motor as an example
Initialize parameters: Before wiring, initialize the parameters. On the control card: Select the control mode, clear the PID parameters, and ensure the enable signal is off by default when the control card is powered on. Save this state to ensure the control card is in this state when powered on again. On the Fuji servo motor: Set the control mode, enable external control, encoder signal output gear ratio, and the ratio between the control signal and the motor speed. Generally, it is recommended to use a control voltage of 9V corresponding to the maximum design speed of the Fuji servo motor.
Wiring: Power off the control card and connect the signal cables between the control card and the Fuji servo motor. The following cables are mandatory: the analog output cable of the control card, the enable signal cable, and the encoder signal cable output from the Fuji servo motor. After verifying that the wiring is correct, power on the servo motor and the control card. At this point, the motor should not move and can be easily rotated with external force. If this is not the case, check the enable signal settings and wiring. Rotate the motor with external force to check if the control card can correctly detect changes in motor position. Otherwise, check the encoder signal wiring and settings.
Test direction: For a closed-loop control system, if the direction of the feedback signal is incorrect, the consequences will be disastrous. Enable the Fuji servo motor via the control card. The servo should rotate at a low speed; this is the so-called zero drift. Control cards usually have instructions and parameters to suppress zero drift. Use these instructions or parameters to see if the servo motor's speed and direction can be controlled by them. If not, check the analog wiring and control mode parameter settings. Confirm that a positive value causes the servo motor to rotate forward and the encoder count to increase; a negative value causes the motor to rotate backward and the encoder count to decrease. If the motor is under load and has limited travel, do not use this method. Do not apply excessive voltage during testing; it is recommended to keep it below 1V. If the directions are inconsistent, modify the parameters on the control card or the Fuji servo motor to make them consistent.
Suppressing zero drift: In closed-loop servo control, the presence of zero drift can affect the control effect. It is best to suppress it. Carefully adjust the zero drift suppression parameters using the control card or Fuji servo, and use the motor speed close to zero. Since zero drift itself has a certain degree of randomness, it is not necessary to require the servo motor speed to be absolutely zero.
Establish closed-loop servo control: Re-enable the Fuji servo motor enable signal through the control card, and input a small proportional gain on the control card. As for how small is considered small, you can only rely on your intuition. If you are really unsure, input the minimum value that the control card can allow. Turn on the enable signals of the control card and the servo motor. At this point, the phone should be able to roughly perform actions according to the motion commands.
Adjusting closed-loop parameters: Fine-tuning the control parameters to ensure that the Fuji servo motor moves according to the control card's instructions is a necessary task, and this part relies more on experience, so it can only be omitted.