Configuring a Controller for a Servo System
|Caution A servo motor may move beyond a safe limit if it is not properly configured. This situation may occur if the encoder or motor is wired incorrectly or is poorly tuned. To help protect the system from damage, National Instruments recommends that you set the following error, or position error, to a value that will not allow damage to the system. You set the following error in the Trajectory Settings tab of the Trajectory Settings configuration item.|
- Power on all of the hardware in the motion control system, taking into consideration the order in which you must power on the devices.
- Launch MAX and verify the motion controller firmware is updated.
Tip This step is not applicable if you are using the NI SoftMotion Controller.
- Select a configuration.
- Expand Devices and Interfaces in the configuration tree.
- Expand NIMotion Devices, and then select the appropriate device.
- Click Default xxxx Settings to display the configuration options.
- Select the Servo button.
- Select the commutation type:
- For a brushed servo motor or brushless servo motor with drive commutation select Servo - External Commutation.
- For a brushless servo motor select Servo - Onboard Commutation.
Note The following steps assume you are using brushed servo motors. Refer to the NI-Motion User Manual for information about configuring brushless servo motor hardware.
- If you want to customize any of the other device settings, use the configuration tree items under each axis below Default xxxx Settings to view and configure items per axis, or for all axes.
- To configure all of your axes at once, select the top-level item for each configuration tree item below the Default xxxx Settings item, and configure the controller settings as appropriate. Click Save to save the customized settings to the MAX database.
- To configure the axes individually, expand the top-level item for each configuration tree item below the Default xxxx Settings item. Select the axis you want to configure, change its attributes, and click Save.
If you do not want to customize the device settings, initialize the controller.
Tip Refer to the motor or encoder documentation for the appropriate values to use.
- Axis Configuration—Use the Axis Configuration tab to control the basic nature of your axis or axes, such as the type of motor or feedback device.
- Motion I/O—Use the Motion I/O tab to configure various aspects of the I/O conducted during the move, such as limits, switches, and breakpoints.
- Trajectory Settings—Use the Trajectory Settings and Move Constraints tabs to set up various aspects of the move, such as operation mode, velocity, and following error.
- Find Reference Settings—Use the Find Reference Settings tab to set up home, index, forward, reverse, center, and sequence references for the move.
- Gearing Settings—Use the Gearing Settings tab if you are gearing an axis to another axis or an encoder.
- Control Loop Settings—Use the Control Loop Settings to set up PID loop parameters and filters.
- Compare & Capture Settings—Use the Compare & Capture Settings tab to set up high-speed captures and breakpoints.
- Digital I/O Settings—Use the Digital I/O Settings tab to set up port polarities and directions for the controller as it is connected to other devices.
- ADC Settings—Use the ADC Settings tab to configure the analog inputs on the controller.
- Encoder Settings—Use the Encoder Settings tab to configure the encoder settings for the system.
- PWM Settings—Use the PWM Settings tab to configure the Pulse Width Modulation (PWM) output settings for the motion controller.
- If you customized any of the controller settings, click Save on the MAX toolbar to save the changes to the MAX database on the local machine. If you want the changes to apply to all of the axes, click Save to All Axes on the MAX toolbar.
- Click Initialize on the MAX toolbar to send the saved controller settings to the device. Initializing the motion controller resets it to a known starting state so that it is ready for commands.
- Turn the motors by hand to check for holding torque. Motors that are "springy" and return to their original position exhibit holding torque, indicating that they are powered and responding to commands from the motion controller.
- Perform a single-axis test.
Tip Depending on the servo system, you may need to tune the system before making a move. For information about tuning a servo system, refer to Tuning Servo Motors.
- Double-click the Interactive item in the configuration tree.
- Expand the 1-D Interactive item.
- Enter 10000 in Target Position.
- Click Apply just below Target Position.
- Click Start on the toolbar. As the motor rotates, Position increases to 10,000.
- Click Kill on the toolbar to allow the motor to rotate freely.
- Turn the motor by hand. Position changes as you move the motor.