BHMotorExt Class Reference

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

#include <bhmotorext.h>

Inheritance diagram for BHMotorExt:

Inheritance graph
[legend]
Collaboration diagram for BHMotorExt:

Collaboration graph
[legend]

Public Member Functions

 BHMotorExt (MotorFeedback *mf, int speed)
 Constructor with speed setting.
 BHMotorExt (MotorFeedback *mf)
 Constructor for BHMotorExt object.
 BHMotorExt ()
 Default constructor. DO NOT USE IT !
int getAbsPos () const
 Returns Motors absolute position.
int getDeltaPos () const
 Returns Motors delta position.
int getFeedbackVel () const
 Returns Motors feedback velocity.
int getStrain () const
 Returns Motors Strain value.
int posError () const
void resetDeltaPos ()
 Sets the DeltaPos value to zero.

Protected Attributes

MotorFeedbackFeedBack

Detailed Description

This class is designed to controll each motor with feeback controll.

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


Constructor & Destructor Documentation

BHMotorExt::BHMotorExt (  )  [inline]

Default constructor. DO NOT USE IT !

Only provided for inheriatance reasons.

BHMotorExt::BHMotorExt ( MotorFeedback mf  )  [inline]

Constructor for BHMotorExt object.

Parameters:
mf MotorFeedback pointer, for force and position computation in rt mode

BHMotorExt::BHMotorExt ( MotorFeedback mf,
int  speed 
) [inline]

Constructor with speed setting.

Constroucts an object with the given speed.

Parameters:
mf MotorFeedback pointer, for force and position computation in rt mode
speed Speed for finger


Member Function Documentation

int BHMotorExt::getAbsPos (  )  const [inline]

Returns Motors absolute position.

Returns the loopFeedbackAbsPos value from the FeedBack.
To get the value of the desired position use BHMotor::getPos() const
WARNING If the bit for receiving this block in rtMode you get false values!

Returns:
Motors absolute Positon. Unit: MOTOR COUNTS

int BHMotorExt::getDeltaPos (  )  const [inline]

Returns Motors delta position.

Returns the loopFeedbackDeltaPos value from the FeedBack.
WARNING If the bit for receiving this block in rtMode you get false values!

Returns:
Motors Delta position. Unit: MOTOR COUNTS

int BHMotorExt::getFeedbackVel (  )  const [inline]

Returns Motors feedback velocity.

Returns the loopFeedbackVel value from the FeedBack.
WARNING: If the bit for receiving this block in rtMode you get false values!
WARNING: The range of this value is from -127 to 127. If the real speed of a motor is higher than 127, you will receive negative value although you are moving with positiv speed. This happens if the speed you send multipled by gain and PropVelCoeff is greater than 127 (what happens very fast!).

Returns:
Motors Delta position. Unit: MOTOR COUNTS

int BHMotorExt::getStrain (  )  const [inline]

Returns Motors Strain value.

Returns the loopFeedbackStrain value from the FeedBack.
WARNING If the bit for receiving this block in rtMode you get false values!

Returns:
Motors strain vlaue.

int BHMotorExt::posError (  )  const [inline]

Computes the position error of the finger.

I.E returned value is DPos - FeedBack.loopFeedbackAbsPos. FeedBack will not be updated by this function.

Returns:
Position error. Unit :MOTOR COUNTS

void BHMotorExt::resetDeltaPos (  )  [inline]

Sets the DeltaPos value to zero.


Field Documentation

MotorFeedback* BHMotorExt::FeedBack [protected]

Pointer to feedback information


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

tams Tim Baier bhandlib v0.25
Generated Wed Aug 16 15:00:06 2006 by doxygen 1.4.7