Method: Phidgets::DCMotor#getTargetVelocity

Defined in:
ext/phidgets/phidgets_dc_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.



126
127
128
# File 'ext/phidgets/phidgets_dc_motor.c', line 126

VALUE ph_dc_motor_get_target_velocity(VALUE self) {
  return ph_get_double(get_ph_handle(self), (phidget_get_double_func)PhidgetDCMotor_getTargetVelocity);
}