BHMotor Class Reference

This class is designed to controll each motor. More...

#include <bhmotor.h>

Inheritance diagram for BHMotor:

Inheritance graph
[legend]
Collaboration diagram for BHMotor:

Collaboration graph
[legend]

Public Member Functions

 BHMotor (int speed)
 Constructor with speed setting.
 BHMotor ()
 Constructor for BHMotor object.
virtual ~BHMotor ()
 Destructotr.
Speed commands
These commands can be used to get and set the speed for a motor. They don't get and set the real but the desired speed.

int getGain () const
 Returns the Gain value for the motor.
int getSpeed () const
 Returns the (desired) speed for the Motor.
void setGain (const short gain)
 Sets the gain value for the motor.
void setSpeed (const int speed) throw (BHMotorException)
 Method sets the speed for the next movement of the finger.
Position commands
These commands can be used to get and set the position for a motor . They don't get and set the real but the desired position.

int getPos () const
 Returns the (desired) positon of the finger.
void setPos (const unsigned int pos) throw (BHMotorException)
 Sets the (desired) position of the finger.

Data Fields

BHPIDControllerCtr

Protected Attributes

unsigned int DPos
short Gain
unsigned short MaxPos
int MaxSpeed
unsigned short MinPos
int MinSpeed
int Speed

Detailed Description

This class is designed to controll each motor.

Author:
Tim Baier This class contains the informations of the motor parameters position, speed and gain.


Constructor & Destructor Documentation

BHMotor::BHMotor (  )  [inline]

Constructor for BHMotor object.

BHMotor::BHMotor ( int  speed  ) 

Constructor with speed setting.

Constroucts a BHMotor Object with the given speed.

Parameters:
speed Speed for finger

BHMotor::~BHMotor (  )  [inline, virtual]

Destructotr.


Member Function Documentation

int BHMotor::getGain (  )  const [inline]

Returns the Gain value for the motor.

Returns:
Gain (Gain) value of motor

int BHMotor::getPos (  )  const [inline]

Returns the (desired) positon of the finger.

Returns:
Absolute positon of the finger. UNIT : Motor counts.

int BHMotor::getSpeed (  )  const [inline]

Returns the (desired) speed for the Motor.

Returns:
Speed of (desired) finger

void BHMotor::setGain ( const short  gain  )  [inline]

Sets the gain value for the motor.

The speed value is multiplied with gain and PropVelCoeff to determine the effective speed. The gain value is only use with the gain movement commands in BHandForce::moveG(const Motors motors, const int position[4]) .

Parameters:
gain Gain value for motor.

void BHMotor::setPos ( const unsigned int  pos  )  throw (BHMotorException) [inline]

Sets the (desired) position of the finger.

Parameters:
pos Position of the finger.

Reimplemented in BHFinger.

void BHMotor::setSpeed ( const int  speed  )  throw (BHMotorException) [inline]

Method sets the speed for the next movement of the finger.

Parameters:
speed Speed of finger


Field Documentation

BHPIDController* BHMotor::Ctr

controller to adjust position

Reimplemented in BHSpread.

unsigned int BHMotor::DPos [protected]

Desired position of finger.

See also:
int getPos() const

setPos(const unsigned int pos)

short BHMotor::Gain [protected]

Gain of finger.

See also:
setGain(const short gain)

getGain()

unsigned short BHMotor::MaxPos [protected]

Maximal allowed speed for motor

int BHMotor::MaxSpeed [protected]

Maximal allowed speed for motor

unsigned short BHMotor::MinPos [protected]

Minmal allowed position for motor

int BHMotor::MinSpeed [protected]

Minmal allowed speed for motor

int BHMotor::Speed [protected]

Speed of finger.

See also:
setSpeed(const int speed)

getSpeed()


The documentation for this class was generated from the following file:

tams Tim Baier bhandlib v0.25
Generated Wed Aug 16 14:59:57 2006 by doxygen 1.4.7