Method: Phidgets::BLDCMotor#setTargetVelocity
- Defined in:
- ext/phidgets/phidgets_bldc_motor.c
#setTargetVelocity(velocity) ⇒ Object Also known as: target_velocity=
The average voltage across the motor is based on the TargetVelocity value. At a constant load, increasing the target velocity will increase the speed of the motor. TargetVelocity is bounded by -1×MaxVelocity and MaxVelocity, where a sign change (±) is indicitave of a direction change. Setting TargetVelocity to MinVelocity will stop the motor. See TargetBrakingStrength for more information on stopping the motor. The units of TargetVelocity and Acceleration refer to ‘duty cycle’. This is because the controller must rapidly switch the power on/off (i.e. change the duty cycle) in order to manipulate the voltage across the motor.
117 118 119 120 |
# File 'ext/phidgets/phidgets_bldc_motor.c', line 117 VALUE ph_bldc_motor_set_target_velocity(VALUE self, VALUE target_velocity) { ph_raise(PhidgetBLDCMotor_setTargetVelocity((PhidgetBLDCMotorHandle)get_ph_handle(self), NUM2DBL(target_velocity))); return Qnil; } |