Sets new target speeds for all axes of a robot in velocity control mode.
Move.SetSpeeds (speed_array, profile_1)
Prerequisites
- High power to the robot must be enabled.
- The robot must be homed.
- The robot must be Attached by the thread.
- The robot must be in velocity control mode.
Parameters
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
An optional 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. If this parameter is not specified, the Profile specified by the last executed Move.SetSpeeds or Move.StartVelocityCntrl method will be utilized.
Remarks
After a robot has been placed into velocity control mode, this method can be used to modify the target speed levels for each axis. This method can be executed at any time and as many times as desired. It simply posts the desired target speeds to the trajectory generator. The next time that the trajectory generator executes, the specified speeds will be taken as the new target values. If this method is executed multiple times before the trajectory generator executes again, only the last values posted will have an effect.
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.StartVelocityCntrl | Move.StopSpecialModes