Motion controllers typically control servo motors using two command methods: digital pulses and analog signals. The digital pulse method is similar to stepper motor control; the motion controller sends "pulse/direction" or "CW/CCW" type pulse command signals to the servo driver. The servo driver operates in position control mode, and the position closed loop is completed by the servo driver. Most Japanese and domestic servo products use this method. Its advantages are simple system debugging and less susceptibility to interference, but its disadvantage is a slightly slower servo system response.
In this analog signal mode, the motion control system sends an analog voltage command of +/-10V to the servo driver, while simultaneously receiving position feedback signals from position detection elements such as motor encoders or linear encoders. The servo driver operates in speed control mode, and the position closed loop is completed by the motion controller. Most servo products in Europe and America adopt this operating mode. Its advantage is fast servo response, but its disadvantages are sensitivity to field interference and slightly more complex debugging.
General debugging steps for motion controllers that control servo motors with analog signals:
1. Initialize parameters
Initialize the parameters before wiring.
On the controller: Select the control mode; clear the PID parameters; ensure the enable signal is off by default when the controller is powered on; save this state to ensure the controller is in this state when it is powered on again.
On the servo drive: Set the control mode; enable external control; set the gear ratio of the encoder signal output; set the ratio between the control signal and the motor speed. Generally, it is recommended that the maximum design speed of the servo operation correspond to a control voltage of 9V. For example, the speed command gain parameter Pr50 of the Panasonic MINASA4 series servo drive is used to set the motor speed corresponding to a 1V command voltage (factory value is 500). If you only intend for the motor to operate below 1000 RPM, then set this parameter to 111.
2. Wiring
Power off the controller and connect the signal lines between the controller and the servo. The following connections are required: the controller's analog output line, the enable signal line, and the servo's encoder signal line. After verifying that the wiring is correct, power on the motor and controller. The motor should not move at this point and can be easily rotated with external force. If not, check the enable signal settings and wiring. Rotate the motor with external force to check if the controller can correctly detect changes in motor position; otherwise, check the encoder signal wiring and settings.
3. Try the direction
For a closed-loop control system, if the feedback signal is in the wrong direction, the consequences will be disastrous. Enable the servo motor via the controller. At this time, the servo motor should rotate at a low speed; this is called "zero drift." Most controllers have instructions or parameters to suppress zero drift. Use this instruction or parameter to see if the motor speed and direction can be controlled by it. If not, check the analog wiring and control mode parameter settings. Confirm that a positive value results in the motor rotating forward and the encoder count increasing; a negative value results in the motor rotating backward and the encoder count decreasing. Do not use this method if the motor is under load and has limited travel. Do not apply excessive voltage during testing; below 1V is recommended. If the directions are inconsistent, modify the parameters on the controller or motor to make them consistent.
4. Suppress zero drift
In closed-loop control, zero drift can negatively impact control performance, and it's best to suppress it. Carefully adjust the parameters for suppressing zero drift on the controller or servo motor to bring the motor speed close to zero. Since zero drift itself has a degree of randomness, it's not necessary to require the motor speed to be absolutely zero.
5. Establish closed-loop control
Re-enable the servo enable signal via the controller, and input a small proportional gain on the controller. As for what constitutes "small," this is largely subjective; if you're unsure, input the minimum value the controller allows. Then, enable the controller and servo. At this point, the motor should be able to roughly perform movements according to the motion commands.
6. Adjust closed-loop parameters
Fine-tuning the control parameters to ensure the motor moves according to the controller's instructions is a necessary task, and this part relies heavily on experience, so we will skip it here.