First Time Mechanism Integration

The following check lists define the steps necessary to configure and tune a controller to operate a mechanism for the first time.  These steps are presented in the order in which the operations should be executed for a typical mechanism. At the conclusion of these steps, a typical robot system will be functional.  If your system includes special features, such as dual-loop encoders or split-axis control, you should also refer to the next section that has check lists for setting up special features.

After you complete these setup lists, you may wish to review the "Optional Fine Tuning" check lists.  The fine tuning setup is not required for the proper operation of the system.  These are additional setup procedures that can enhance the performance and operation of your system.

 

               

Before proceeding with this procedure, please ensure that the following steps have already been performed:

  • The robot has been properly mounted, all required safety interlocks have been installed and tested, and power has been connected.

  • All motors and encoders have been properly connected to the controller per the instructions provided in the "Guidance Controller, Hardware Introduction and Reference Manual".

  • An E-stop button has been connected and is readily available to disable motor power in the event of a problem.

In the following tables, if your system has multiple robots or multiple axes/motors per robot, the described procedures should be repeated for each robot or axis or motor as appropriate.

The first step is to define the number of robots in the system, their kinematic model types, and the number of axes for each robot.  These parameters must be set for all system configurations.  

However, if your system has multiple controllers connected in a servo network, you should execute the steps defined in the Servo Network Setup section of the Special Feature Setup section before proceeding to Setup 2A.

Setup 2A: Number of robots and axes
Function Action / DataID's See Also
Number of robots and their kinematic types Set the number of robots by defining the Kinematic Module for each robot.  The kinematic module defines the robot's geometry, its allowable number of axes and other key parameters.  For each robot, set its kinematic ID in the "Robot types" (116) array.  If you change this array, save to flash and restart.

(Web) ... > Controller > System ID

Number of axes Set the "Number of axes" (2000) for each robot.  For kinematic modules like the XYZTheta, set the "Axis mask" (2003) to specify which axes are being configured, e.g. if only X&Z set to "5".

(Web) ... > Joint/Cartesian control > Basic parameters

Robot name Set the "Robot name" (2002).

"

As a setup simplification, there are several standard servo parameter configurations that are built into the system.  If the "Servo board configuration code" (10008) is a positive number, the values of DataID's 10020 to 10048 are forced to specific values each time the system is restarted.

Setup 2B: Basic servo configuration
Function Action / DataID's See Also
Basic servo configuration Select a basic "Servo board configuration code" (10008) to specify the general way in which the servos should be configured.  Normally, select the default (0) for up to for 4 motors with incremental encoders, driven by built-in amps, single servo loop.

(Web) ... > Servo parameters > Servo module

Restart If you've made any changes since the last restart, save to flash and restart.  

The next table is specifically for configuring DC brushless motors with incremental encoders that are driven by the amplifiers provided with the Guidance Controllers.  At the conclusion of these operations, the system's current loop will be properly set for the motor.

Setup 2C: Current loop, DC brushless motor with incremental encoder
Function Action / DataID's See Also
Encoder resolution Set the "Encoder counts for resolution calc" (10203) and the "Encoder revs for resolution calc" (10204).  For rotary encoders, (DataID 10203)/(DataID 10204) specifies the encoder counts per motor revolution.  For linear encoders, this value specifies the encoder counts per motor pole-pairs.  Normally DataID 10204 is set to 1.

(Web) ... > Servo parameters > Encoder

Zero index detection Rotate the motor and examine the "Motor position at index" (12220) value. If the encoder zero index is not being captured, try different settings of bits 0:2 of the "Incremental encoder hardware configuration" (10220).

"

Motor current ratings From the motor specification sheet, for your motor bus voltage, set the "RMS rated motor current, A(rms)" (10611) in RMS amps.  This is sometimes referred to as the "Nominal motor current" or the "Continuous motor current".  Also, set the "AUTO mode motor PEAK(non-RMS)/(RMS rated) current, %" (10613) as a percentage of the Rated motor current.  This is often referred to as the "Peak single phase motor current".  For example, if the peak single phase current is 3 times the rated RMS current, DataID 10613 should be set to 300%.

(Web) ... > Servo parameters > Amplifier

Motor commutation From the motor specification sheet, set the "# of pole-pairs per motor revolution" (10651).  Then divide the encoder counts per motor revolution by DataID 10651 and save the result in "Commutation counts per electrical cycle" (10652).

(Web) ... > Servo parameters > Current loop

Current loop Tune the current loop by setting the "Current loop proportional gain, Kp" (10656) and the "Current loop damping gain, Kv" (10657).  This should normally be performed with the motor aligned on one of its poles and with the motor not moving.

(Web) ... > Hardware Tuning > Current Loop Tuning

Commutation sign Move the motor in open loop torque mode (explained elsewhere) and invert the "Commutation Sign" (10650) if the motor feels lumpy (i.e. it is skipping poles).

(Web) ... > Servo variables > Debug motor panel

For incremental encoders, each time the system is restarted, the correspondence between encoder counts and the motor poles must be reestablished in order for the motor to be properly commutated.  The controller has several means for establishing this relationship.  The most traditional brute force method is to "Twang" the motor.  This is primarily controlled via the "Twang reference torque %" (10735). In the following table, a new, simple-to-use, elegant "Binary Reference Search" method is described that quickly executes for most motors while minimizing motor movement.

Setup 2D: Commutation reference finding
Function Action / DataID's See Also
Reference finding method Select the "Binary Reference Search" method by setting the "Commutation reference setup config" (10700) to "5".

(Web) ... > Servo parameters > Commutation process

Effort Level

Initially, utilize the default "Search ref operation effort" (10778) to select the typical set of parameters that work for unloaded or slightly gravity loaded axes.

"

Search score

After you have commutated the motor (explained elsewhere), check the "Search ref score" (DataID 12769) to view how well the search method worked.  A score of 25 to 100 indicates a normal successful operation.  If the score is below 25 or the execution time is excessive, the "Search ref operation effort" (10778) should be increased.  However, any score above 0 indicates that the search was successful.

(Web) ... > Servo variables > Commutation process

The following table describes the position loop tuning parameters that are required for a typical mechanism.  Additional parameters are described in the "Special Features Setup" that can assist in achieving good closed loop position control in unusual situations.

Setup 2E: Position control loop
Function Action / DataID's See Also
Encoder sign The "Encoder sign" (10202) can be arbitrarily set to +1 or -1.  However, to avoid confusion, it is highly recommended that this be set such that the encoder counts up as the axis (as defined by the kinematic model) moves in a positive direction. Once set, this value affects other parameters such as the "Torque sign" and the homing methods.

(Web) ... > Servo variables > Debug motor panel

Torque sign This parameter controls the sign of the servo position loop output. With the PID loop gains set very low (e.g. Kp=2, Ki=0, Kd=20), turn on the servos and observe the motor.  If the motor begins to run away or power is automatically disabled, invert the "Torque sign" (10609).

"

PID loop Tune the PID servo loop by setting the "Proportional gain, Kp" (10331), the "Integral gain, Ki" (10332), and the "Derivative gain, Kd" (10333).

(Web) ... > Hardware Tuning > Position Loop Tuning. 

Feed forward To improve the servo performance by adding feedforward compensation, set the "Acceleration feedforward gain" (10336) and the "Velocity feedforward gain" (10337).

"

Up to this point, all of the control has been at the level of motors and encoders.  This next table enables operating the mechanism at the much more convenient level of "Joint" or "Cartesian" control.  Joint control permits axes to be moved in degrees and millimeters instead of encoder counts.  Cartesian control makes use of the kinematic robot model to enable the robot to be moved in XYZ coordinates even if the mechanism has a complex geometry.

Prior to performing these steps, please review the kinematic model for your robot to familiarize yourself with the positive direction of travel for each axis and the other kinematic parameters.  If the positive direction of travel is not set correctly, your kinematic model will not produce the correct Cartesian motions.

Setup 2F: Joint and Cartesian control
Function Action / DataID's See Also
Joint to motor scale factors Set the "Joint to motor scale factors" (2300) that convert degrees and millimeters to encoder counts.  Adjust the sign for each factor such that a positive change in the joint position corresponds to the kinematic model specification. If the "Encoder sign" (10202) is set properly, these values will normally be positive. See the Motor Scale Factors and Coupling Compensation section for more information.

(Web) ... > Joint/Cartesian control > Joint/motor factors

Kinematic dimensions For robots that have link lengths, offsets and other important kinematic dimensions, set the "Kinematic dimensional constants (16050).

(Web) ... > Calibration parameters > Misc

Standard high speed and accel

Set the "100% joint speeds in (deg or mm)/sec" (2700) and the "100% joint accels in (deg or mm)/sec^2" (2702).  These parameters specify the rates used when a program commands a standard 100% (high) speed joint interpolated motion.

(Web) ... > Joint/Cartesian control > Dynamic parameters

Standard Cartesian high speed and accel Set the "100% Cartesian speeds in (deg or mm)/sec" (2701) and the "100% Cartesian accels in (deg or mm)/sec^2" (2703).  These parameters specify the rates used when a program commands a standard 100% (high) speed Cartesian interpolated motion.  The first value in each of these arrays is always the XYZ speed and acceleration.  See the kinematic model documentation for the interpretation of the other values.

"

This final list specifies the range of travel for each axis and the technique (i.e. the homing method) for establishing the zero point of each axes when the controller is restarted.  Unlike stepper motors and some other controllers, it is expected that the controller should never have to be homed except immediately after the controller has been powered up.   Please see the Motor Homing Sequences section for a thorough description of the available homing methods and the parameters associated with homing.

 

Setup 2G: Joint zero position and limit stops
Function Action / DataID's See Also
Dedicated limit and home switch inputs

If you intend to use the dedicated single ended input signals on the encoder connector to input limit and home switch signals, set the "Dedicated DIN's selection" (10108) to "3".  Also set bits 1, 2, and 3 of the "Axis configuration word" (10104) as needed to specify the polarity of each of these signals.

(Web) ... > Servo parameters > Axis

General DIN limit and home switch inputs

-- OR -- If you intend to use general purpose digital input signals to input limit and home switch signals, ensure the "Dedicated DIN's selection" (10108) is not set to "3", and set the "Home switch DIN signal" (10105), "Positive overtravel DIN signal" (10106), and "Negative overtravel DIN signal" (10107).

"

Hardstop detection

-- OR -- If you intend to use hardstop detection for your homing method, set the "Hardstop envelope limit, mcnt" (10122), "Hardstop pos steady tolerance, mcnt" (10123) and the "Hardstop back out distance, mcnt" (10124).  These parameters must be set to ensure that the hardstop for an axis can be reliably detected.

"

Order of homing axes Set the "Homing sequence" (2802) to indicate if the axes are to be homed sequentially (0), simultaneously (1) or serially (2) according to the order specified by the "Homing order" (2810).  If the "Homing order" is used, the first axis is indicated as "1".

(Web) ... > Joint/Cartesian control > Homing/jogging

Homing method

Define the "Homing method" (2803) to be used by specifying the method numbers described in Homing methods.

NOTE: The homing directions refer to changes in the encoder counts, which may be reversed from the direction of "Joint" travel.

"

Homing speed and acceleration Set the "Homing speed 1, ecnts/sec" (2804) and "Motor homing accel, ecnts/sec^2" (2807), which are both in terms of encoder counts.

"

Homing verification and baseline Execute the homing sequence to verify that the process can successfully locate the required markers.  Since the "Calibration home offset" has not yet been set, the zero position will not be correct.  However, executing the homing sequence generates a reference position value that will be used below.

(Web) Control Panels > Virtual Pendant

Joint stop limits Set the "Joint max hard stop limit" (16075), "Joint min hard stop limit" (16076), "joint max soft stop limit" (16077) and the "Joint min soft stop limit" (16078).

(Web) ... > Calibration parameters > Stop Limits

Zero position offset

Given the results of executing the homing sequence, adjust the "Calibration home offset, mcnt" (16120) to correct the axis position for any offset relative to the desired zero position and the limit stops.

(Web) ... > Calibration parameters > Servo Settings

This completes the first time software configuration for a typical mechanism.  See the next section for special setup procedures and the subsequent section for methods for further optimizing and fine tuning your system.