General steps for connecting the motion control card to the servo motor:
1. Initialize parameters
Initialize parameters before wiring.
On the control card: select the control mode; Clear PID parameters to zero; Make the enable signal turn off by default when the control card is powered on. Save this state and ensure that it is in this state when the controller card is powered on again.
On the servo motor: set the control mode; Settings enable external control; Gear ratio of encoder signal output; Set the proportional relationship between the control signal and the motor speed. In general, it is recommended that the maximum design speed in the servo operation corresponds to the control voltage of 9V. For example, Panasonic is set 1V voltage corresponding to the speed, the factory value is 500, if you are only ready to let the motor under 1000 RPM, then, set this parameter to 111.
2. Wiring
Power off the control card and connect the signal line between the control card and the servo. The following lines must be connected: analog output line of the control card, enable signal line, encoder signal line of servo output. Power on the motor and control card (and PC) after checking that there is no error in wiring. At this time the motor should not move, and can be easily rotated with external force, if not, check the enable signal setting and wiring. Turn the motor with an external force to check whether the control card can correctly detect the change in the position of the motor, otherwise check the wiring and setting of the encoder signal.
3. Test directions
For a closed-loop control system, if the direction of the feedback signal is not correct, the result will be disastrous. Turn on the enable signal of the servo via the control card. This is where the servo is supposed to turn at a lower speed, which is the legendary "zero drift". Generally, the control card will have instructions or parameters to inhibit zero drift. Use this instruction or parameter to see if the motor speed and direction can be controlled by this instruction (parameter). If not, check the analog connection and control mode parameter Settings. Confirm to give a positive number, motor positive rotation, encoder count increase; Given a negative number, the motor rotates backwards and the encoder count decreases. Do not use this method if the motor has a load and limited travel. Test do not give excessive voltage, recommended below 1V. If the direction is not consistent, you can modify the parameters on the control card or motor to make them consistent.
4, inhibit zero drift
In the closed-loop control process, the existence of zero drift will affect the control effect to some extent, so it is better to restrain it. Use the control card or servo to suppress the zero drift parameters, carefully adjust, so that the motor speed tends to zero. Because the zero drift itself also has a certain degree of randomness, so it is not necessary to require the motor speed to be absolutely zero.
5. Establish closed-loop control
Once again, the servo enable signal is released through the control card, and a small proportional gain is entered into the control card. As to how small is, it is only a matter of feeling. If you are really worried, enter the minimum value that the control card can allow. Turn on the enable signal of the control card and the servo. At this time, the motor should have been able to make a rough motion according to the motion instructions.
6. Adjust closed-loop parameters
Fine-tune the control parameters to ensure that the motor moves according to the instructions of the control card, which is a necessary work, and this part of the work, more experience, can only be omitted here.