Method: Phidgets::BLDCMotor#getTargetVelocity

Defined in:
ext/phidgets/phidgets_bldc_motor.c

#getTargetVelocityObject 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.



113
114
115
# File 'ext/phidgets/phidgets_bldc_motor.c', line 113

VALUE ph_bldc_motor_get_target_velocity(VALUE self) {
  return ph_get_double(get_ph_handle(self), (phidget_get_double_func)PhidgetBLDCMotor_getTargetVelocity);
}