Public Member Functions
Motors Class Reference

A class to control motors from Faulhaber (via RS232 link). More...

#include <motorsControl.h>

List of all members.

Public Member Functions

 Motors ()
 ~Motors ()
void EnableLeft ()
void EnableRight ()
void DisableLeft ()
void DisableRight ()
void ResetLeft ()
void ResetRight ()
bool ReadBufferRight (char *Buffer, int NbMax, int TimeOut)
bool WaitLeftAnswer ()
bool WaitRightAnswer ()
void SetLeftSpeed (int Vit)
void SetRightSpeed (int Vit)
void SetLeftAbsolutePos (int Pos)
void SetRightAbsolutePos (int Pos)
void SetLeftRelativePos (int Pos)
void SetRightRelativePos (int Pos)
void SetLeftAcc (int Acc)
void SetRightAcc (int Acc)
void SetLeftDec (int Dec)
void SetRightDec (int Dec)
void SetLeftPeakCurrentLimit (int Current)
void SetRightPeakCurrentLimit (int Current)
void SetLeftContCurrentLimit (int Current)
void SetRightContCurrentLimit (int Current)
int GetLeftSpeed ()
int GetRightSpeed ()
int GetLeftPos ()
int GetRightPos ()
int GetLeftAcc ()
int GetRightAcc ()
int GetLeftDec ()
int GetRightDec ()
int GetLeftPeakCurrentLimit ()
int GetRightPeakCurrentLimit ()
int GetLeftContCurrentLimit ()
int GetRightContCurrentLimit ()

Detailed Description

A class to control motors from Faulhaber (via RS232 link).

motorsControl.h
Here is a link to the Header File Reference.
motorsControl.cpp
Here is a link to the C++ File Reference.

Definition at line 33 of file motorsControl.h.


Constructor & Destructor Documentation

Motors::Motors ( )

Constructor, initialize communication with motors

Definition at line 13 of file motorsControl.cpp.

Motors::~Motors ( )

Destructor, close communication with motors

Definition at line 33 of file motorsControl.cpp.


Member Function Documentation

void Motors::DisableLeft ( )

Disable left motor

Returns:
no return.

Definition at line 66 of file motorsControl.cpp.

void Motors::DisableRight ( )

Disable right motor

Returns:
no return.

Definition at line 75 of file motorsControl.cpp.

void Motors::EnableLeft ( )

Enable left motor

Returns:
no return.

Definition at line 46 of file motorsControl.cpp.

void Motors::EnableRight ( )

Enable right motor

Returns:
no return.

Definition at line 56 of file motorsControl.cpp.

int Motors::GetLeftAcc ( )

Get left acceleration (from 0 to 30000 r/sē)

Returns:
an int, the acceleration in r/sē.

Definition at line 444 of file motorsControl.cpp.

int Motors::GetLeftContCurrentLimit ( )

Get left continuous current limit (from 0 t 12000 mA)

Returns:
an int, the current limit.

Definition at line 600 of file motorsControl.cpp.

int Motors::GetLeftDec ( )

Get left deceleration (from 0 to 30000 r/sē)

Returns:
an int, the deceleration in r/sē.

Definition at line 496 of file motorsControl.cpp.

int Motors::GetLeftPeakCurrentLimit ( )

Get left peak current limit (from 0 to 12000 mA)

Returns:
an int, the current limit.

Definition at line 548 of file motorsControl.cpp.

int Motors::GetLeftPos ( )

Get left position (from -1.8*10^9 to +1.8*10^9)

Returns:
an int, the current position of the robot.

Definition at line 392 of file motorsControl.cpp.

int Motors::GetLeftSpeed ( )

Set left speed (from 0 to 32767 rpm)

Returns:
an int, the speed in rpm.

Definition at line 339 of file motorsControl.cpp.

int Motors::GetRightAcc ( )

Get right acceleration (from 0 to 30000 r/sē)

Returns:
an int, the acceleration in r/sē.

Definition at line 469 of file motorsControl.cpp.

int Motors::GetRightContCurrentLimit ( )

Get right continuous current limit (from 0 to 12000 mA)

Returns:
an int, the current limit.

Definition at line 625 of file motorsControl.cpp.

int Motors::GetRightDec ( )

Get right deceleration (from 0 to 30000 r/sē)

Returns:
an int, the deceleration in r/sē.

Definition at line 521 of file motorsControl.cpp.

int Motors::GetRightPeakCurrentLimit ( )

Get right peak current limit (from 0 to 12000 mA)

Returns:
an int, the current limit.

Definition at line 573 of file motorsControl.cpp.

int Motors::GetRightPos ( )

Get right position (from -1.8*10^9 to +1.8*10^9)

Returns:
an int, the current position of the robot.

Definition at line 417 of file motorsControl.cpp.

int Motors::GetRightSpeed ( )

Set right speed (from 0 to 32767 rpm)

Returns:
an int, the speed in rpm.

Definition at line 365 of file motorsControl.cpp.

void Motors::ResetLeft ( )

Reset left motor.

Returns:
no return.

Definition at line 86 of file motorsControl.cpp.

void Motors::ResetRight ( )

Reset right motor.

Returns:
no return.

Definition at line 95 of file motorsControl.cpp.

void Motors::SetLeftAbsolutePos ( int  Pos)

Set left absolute position (from -1.8*10^9 to +1.8*10^9)

Parameters:
PosDefines the position to use
Returns:
no return.

Definition at line 197 of file motorsControl.cpp.

void Motors::SetLeftAcc ( int  Acc)

Set left acceleration (from 0 to 30000 r/sē)

Parameters:
AccDefines the acceleration to use
Returns:
no return.

Definition at line 251 of file motorsControl.cpp.

void Motors::SetLeftContCurrentLimit ( int  Current)

Set left continuous current limit (from 0 to 12000 mA)

Parameters:
CurrentDefines the current limit to use
Returns:
no return.

Definition at line 314 of file motorsControl.cpp.

void Motors::SetLeftDec ( int  Dec)

Set left deceleration (from 0 to 30000 r/sē)

Parameters:
DecDefines the deceleration to use
Returns:
no return.

Definition at line 272 of file motorsControl.cpp.

void Motors::SetLeftPeakCurrentLimit ( int  Current)

Set left peak current limit (from 0 to 12000 mA)

Parameters:
CurrentDefines the current limit to use
Returns:
no return.

Definition at line 293 of file motorsControl.cpp.

void Motors::SetLeftRelativePos ( int  Pos)

Set left relative position (from -2.14*10^9 to +2.14*10^9)

Parameters:
PosDefines the position to use
Returns:
no return.

Definition at line 221 of file motorsControl.cpp.

void Motors::SetLeftSpeed ( int  Vit)

Set left speed (from 0 to 32727 rpm)

Parameters:
VitDefines the speed to use
Returns:
no return.

Definition at line 171 of file motorsControl.cpp.

void Motors::SetRightAbsolutePos ( int  Pos)

Set right absolute position (from -1.8*10^9 to +1.8*10^9)

Parameters:
PosDefines the position to use
Returns:
no return.

Definition at line 208 of file motorsControl.cpp.

void Motors::SetRightAcc ( int  Acc)

Set right acceleration (from 0 to 30000 r/sē)

Parameters:
AccDefines the acceleration to use
Returns:
no return.

Definition at line 261 of file motorsControl.cpp.

void Motors::SetRightContCurrentLimit ( int  Current)

Set right continuous current limit (from 0 to 12000 mA)

Parameters:
CurrentDefines the current limit to use
Returns:
no return.

Definition at line 324 of file motorsControl.cpp.

void Motors::SetRightDec ( int  Dec)

Set right deceleration (from 0 to 30000 r/sē)

Parameters:
DecDefines the deceleration to use
Returns:
no return.

Definition at line 282 of file motorsControl.cpp.

void Motors::SetRightPeakCurrentLimit ( int  Current)

Set right peak current limit (from 0 to 12000 mA)

Parameters:
CurrentDefines the current limit to use
Returns:
no return.

Definition at line 303 of file motorsControl.cpp.

void Motors::SetRightRelativePos ( int  Pos)

Set right relative position (from -2.14*10^9 to +2.14*10^9)

Parameters:
PosDefines the position to use
Returns:
no return.

Definition at line 233 of file motorsControl.cpp.

void Motors::SetRightSpeed ( int  Vit)

Set right speed (from 0 to 32727 rpm)

Parameters:
VitDefines the speed to use
Returns:
no return.

Definition at line 183 of file motorsControl.cpp.

bool Motors::WaitLeftAnswer ( )

Wait for left motor answer

Returns:
a boolean, 1 means the answer was good and 0 that answer was bad or reception failed.

Definition at line 113 of file motorsControl.cpp.

bool Motors::WaitRightAnswer ( )

Wait for right motor answer

Returns:
a boolean, 1 means the answer was good and 0 that answer was bad or reception failed.

Definition at line 152 of file motorsControl.cpp.


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