Switches all axes of a robot from position to velocity control mode.
Move.StartVelocityCntrl (mode, adc_mask, speeds_array, profile_1)
Prerequisites
Parameters
mode
A required numeric expression that evaluates to the mode of velocity control to be executed. Currently, this parameter is unused and should be set to 0 for compatibility with future software releases.
adc_mask
A required numeric expression that evaluates to a bit mask that specifies the single axis whose speed is to be directly controlled by the first ADC input channel. This value should be zero if no axis is to be ADC controlled. A scaled ADC reading of +1.0 or –1.0 will drive the corresponding axis at its full 100% speed.
speeds_array
A required array of Doubles that contains a speed specification for each axis of the robot. The first array element (0) corresponds to the target speed for the robot’s first axis. One value must be provided for each axis of the robot. Each array element is interpreted in units of mm/sec (linear axes) or deg/sec (rotary axes). These values are limited by the maximum permitted joint speeds, "100% joint speeds" (DataID 2700) * "Max %speed allowed" (DataID 2704).
profile_1
A required Profile Object or an expression that evaluates to a Profile Object value. This value defines the acceleration, deceleration and acceleration/deceleration ramp times to be use to change the speed of each axes. In certain cases, it may not be possible to honor the ramp times without over-shooting the target velocity, but the acceleration and deceleration limits are adhered to. For example, this can occur if an axis is accelerating to a high velocity and suddenly a new, lower velocity target is specified.
Remarks
This method switches all of the axes of a robot from the standard position controlled mode to velocity controlled mode. When in velocity controlled mode, each axis accepts a target speed as its command rather than a position. The target speeds can be set by this method or can be updated at any time using the Move.SetSpeeds method. Once each axis has accelerated, it will continue to rotate at its target speed until the speed is explicitly changed, velocity control mode is terminated or an error occurs.
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.)
If an axis is specified in the adc_mask, that axis' target speed is the sum of the appropriate value in the speeds_array plus the value defined by the ADC input.
When this method is executed, it first waits for any in-process position controlled motions to be completed. It then transitions all axes into velocity control mode and sets the initial target speeds to the values specified in the speeds_array. The speed targets can subsequently be changed by executing a Move.SetSpeeds method or by a change in the ADC signal.
As a convenience in debugging applications, the velocity control target speed is affected by the current setting of the "System Test Speed". This is the speed value that can be set via the web Operator Control Panel or the "System wide test speed in %" (DataID 601) database parameter. In addition, software and hardware limit stop checking is still performed during this mode of operation. If an axis is to be rotated continuously, motors can be configured for continuous turn capability assuming that this capability is supported by the robot's kinematic module.
The robot will remain in velocity control mode until one of the following occurs:
Examples
Dim speeds(12) As Double ' All Double speeds will be 0
Dim pf1 As New Profile ' Use default accel/decel
Dim ii As Integer
Robot.Attached = 1 ' Get control of robot #1
Move.StartVelocityCntrl(0, 0, speeds, pf1) ' Set to velocity control mode
For ii = 36 To 360 Step 36
speeds(0) = ii ' New speed value
Move.SetSpeeds(speeds) ' Ramp axis 1 speed
Controller.Sleeptick(30) ' Wait a little while
Next ii
Move.StopSpecialModes ' Terminate velocity mode
Robot.Attached = 0 ' Release control of robot
See Also
Move Class | Move.SetSpeeds | Move.StopSpecialModes| Move.StartTorqueCntrl