A program instruction (Move.StartVelocityCntrl) is provided for placing a robot into joint velocity control mode. Joint velocity control mode is an alternative to position control mode. When velocity control mode is initiated, all of the axes of a robot are switched to accept a speed command rather than a position command. As with position control mode, velocity control mode is compatible with torque control mode. That is, when in velocity control mode, one or more motors can be in torque control mode. (Note: Motors must be placed into torque control mode when the robot is in position control mode. After motors are placed into torque control, the position-controlled joints can then be switched to velocity control mode.)
When in joint velocity control mode, the set point for each joint is a speed specification, not a position specification. A program instruction (Move.SetSpeeds) is provided for specifying the target speed and s-curve acceleration for each axis. The target speed and acceleration of each axis can be changed as often as desired and new values are taken into consideration during the next Trajectory Generator cycle. Each cycle, the Trajectory Generator determines if there is a difference between the current set point and target speeds. If so, the set points are altered subject to the s-curve acceleration constraints. Once the acceleration is completed, each axis will continue to move at the target speed until the speed is changed, velocity control mode is terminated or an error occurs.
As a special feature of this mode, one joint can have the real-time value of an analog input continuously sampled, automatically scaled and added to the program instruction speed command. The analog input value is interpreted as a percentage of the 100% speed value for the selected joint. The analog input value can be automatically smoothed by the hardware and can be limited to ensure that its value is always within a specified range. Reading an analog input value allows the speed of a single joint to track an external command in a manner analogous to the function provided by an analog velocity input amplifier.
When the system is first booted, all joints are placed into position control mode. This allows the motors to be commutated and homed utilizing the standard techniques. Also, each time that high power is enabled, all of the joints are placed into position control mode. After the system has been commutated/homed and high power is enabled, a program can attach the robot and an instruction can be issued to place all of the joints into velocity control mode.
If velocity control mode is utilized to spin one or more rotary joints continuously, these joints should have “Encoder Rollover Compensation” enabled. This feature is described in a later section.
When a command to initiate velocity control mode is issued, the system waits for any position controlled motion in progress to be completed before switching to velocity control mode. However, if the system is in velocity control mode, and a position controlled motion command is executed, an error will be generated.
The system remains in velocity control mode until one of the following occurs:
When a command to terminate velocity mode is issued, the system places all joints into position control mode and automatically executes a controlled position deceleration to bring each joint to a stop.