Main Page | Class Hierarchy | Class List | Class Members

BlueSense::StepperDevice Class Reference

Inheritance diagram for BlueSense::StepperDevice:

BlueSense::Device List of all members.

Public Member Functions

 StepperDevice (Master master, ushort deviceId)
void requestSetSpeed (char speed)
void requestSetStepCount (char speed, short stepCount)
void requestGetState ()
short getCurrentStepCount ()
char getPendingSpeed ()
bool getRequestSetSpeedDone ()
char getCurrentSpeed ()
uint getTimeOutUs ()
void requestSetConfiguration (ushort current, bool autostop, bool halfStep, bool waveDrive, bool fastDecay)
void setTimeOutUs (uint timeOutUs)

Detailed Description

Interface to the Stepperstepper devic.


Constructor & Destructor Documentation

BlueSense::StepperDevice::StepperDevice Master  master,
ushort  deviceId
[inline]
 

Creates a 'software' stepper device proxy with a given id. The device will inacessible until a physical device with the same id is detected.

Parameters:
master 
deviceId 


Member Function Documentation

char BlueSense::StepperDevice::getCurrentSpeed  )  [inline]
 

Returns the current set speed of a specific stepper.

Returns:
the speed off the stepper. Note that speed is a value between -128 and 127. -128 to -1 represent a speed left, 0 stand still and 1 to 127 a speed right, the actual physical speed depends on the specifications of the connected stepper.

short BlueSense::StepperDevice::getCurrentStepCount  )  [inline]
 

Returns the current step count (updated after a requestGetState) (v2 module firmware only)

Returns:
the current step count (-1 if set to continuous speed)

char BlueSense::StepperDevice::getPendingSpeed  )  [inline]
 

returns the set speed which is currently underway to the device Note that speed is a value between -128 and 127. -128 to -1 represent a speed left, 0 stand still and 1 to 127 a speed right, the actual physical speed depends on the specifications of the connected stepper.

bool BlueSense::StepperDevice::getRequestSetSpeedDone  )  [inline]
 

Checks if the speed set request is finished

Returns:
true if request finished, false if request still busy

uint BlueSense::StepperDevice::getTimeOutUs  )  [inline]
 

Returns the current set time out delay. The time out delay is used to check if a request was acknowledged in the set time. If an answer to a request is not received within the set time, the request is resent.

Returns:
the time out value in microseconds.

void BlueSense::StepperDevice::requestGetState  )  [inline]
 

Sends a request to retrieve the current speed and step count (v2 module firmware only)

void BlueSense::StepperDevice::requestSetConfiguration ushort  current,
bool  autostop,
bool  halfStep,
bool  waveDrive,
bool  fastDecay
[inline]
 

Sends a request to change the configuration of the module

Parameters:
curent The current in mA which drives the stepper motor. Warning: a wrong value can damage your motor!
autostop true --> the motor is switched off when the limit switch is activated
halfStep true --> use halfsteps in stead of full steps
waveDrive true --> enables wave drive (less noise)
fastDecay true --> uses fast decay mode or normal decay mode

void BlueSense::StepperDevice::requestSetSpeed char  speed  )  [inline]
 

Requests the stepper device to set its steppermotor to a new speed

Parameters:
speed Note that speed is a value between -128 and 127. -128 to -1 represent a speed left, 0 stand still and 1 to 127 a speed right, the actual physical speed depends on the specifications of the connected stepper.

void BlueSense::StepperDevice::requestSetStepCount char  speed,
short  stepCount
[inline]
 

Request the stepper device to advance position (v2 module firmare only)

Parameters:
speed an uint8_t representing the new speed of the motor.
stepCount the number of steps to execute. -1 will cause the motor to advance steps continuously Note that the speed is a value between -128 and 127. -128 to -1 represent a speed left, 0 stand still and 1 to 127 a speed right, the actual physical speed depends on the specifications of the connected motor. In most steppermotors there are 200 steps (1.8 degree per step) in one rotation.

void BlueSense::StepperDevice::setTimeOutUs uint  timeOutUs  )  [inline]
 

Sets the time out value which is used to check if a request was acknowledged in the set time. If an answer to a request is not received within the set time, the request is resent.

Parameters:
timeOutUs the value in microseconds which is the maximum duraion between a request and its answer.


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 17:51:58 2008 for BlueSense.NET/Mono by  doxygen 1.4.4