Luca Istorico / X_NUCLEO_IHM02A1

Dependencies:   X_NUCLEO_COMMON

Fork of X_NUCLEO_IHM02A1 by ST

Embed: (wiki syntax)

« Back to documentation index

StepperMotor Class Reference

StepperMotor Class Reference

An abstract class for StepperMotor components. More...

#include <StepperMotor_class.h>

Inherits Component.

Inherited by L6470.

Public Types

enum  direction_t
 

Rotation modes.

More...
enum  step_mode_t
 

Step modes.

More...

Public Member Functions

virtual unsigned int GetStatus (void)=0
 Getting the status.
virtual signed int GetPosition (void)=0
 Getting the position.
virtual signed int GetMark (void)=0
 Getting the marked position.
virtual unsigned int GetSpeed (void)=0
 Getting the current speed in pps.
virtual unsigned int GetMaxSpeed (void)=0
 Getting the maximum speed in pps.
virtual unsigned int GetMinSpeed (void)=0
 Getting the minimum speed in pps.
virtual unsigned int GetAcceleration (void)=0
 Getting the acceleration in pps^2.
virtual unsigned int GetDeceleration (void)=0
 Getting the deceleration in pps^2.
virtual direction_t GetDirection (void)=0
 Getting the direction of rotation.
virtual void SetHome (void)=0
 Setting the current position to be the home position.
virtual void SetMark (void)=0
 Setting the current position to be the marked position.
virtual bool SetMaxSpeed (unsigned int speed)=0
 Setting the maximum speed in pps.
virtual bool SetMinSpeed (unsigned int speed)=0
 Setting the minimum speed in pps.
virtual bool SetAcceleration (unsigned int acceleration)=0
 Setting the acceleration in pps^2.
virtual bool SetDeceleration (unsigned int deceleration)=0
 Setting the deceleration in pps^2.
virtual bool SetStepMode (step_mode_t step_mode)=0
 Setting the Step Mode.
virtual void GoTo (signed int position)=0
 Going to a specified position.
virtual void GoHome (void)=0
 Going to the home position.
virtual void GoMark (void)=0
 Going to the marked position.
virtual void Run (direction_t direction)=0
 Running the motor towards a specified direction.
virtual void Move (direction_t direction, unsigned int steps)=0
 Moving the motor towards a specified direction for a certain number of steps.
virtual void SoftStop (void)=0
 Stopping the motor through an immediate deceleration up to zero speed.
virtual void HardStop (void)=0
 Stopping the motor through an immediate infinite deceleration.
virtual void SoftHiZ (void)=0
 Disabling the power bridge after performing a deceleration to zero.
virtual void HardHiZ (void)=0
 Disabling the power bridge immediately.
virtual void WaitWhileActive (void)=0
 Waiting while the motor is active.
virtual int Init (void *init)=0
 Initializing the component.
virtual int ReadID (uint8_t *id)=0
 Getting the ID of the component.

Detailed Description

An abstract class for StepperMotor components.

Definition at line 55 of file StepperMotor_class.h.


Member Enumeration Documentation

Rotation modes.

Definition at line 61 of file StepperMotor_class.h.

Step modes.

Definition at line 70 of file StepperMotor_class.h.


Member Function Documentation

virtual unsigned int GetAcceleration ( void   ) [pure virtual]

Getting the acceleration in pps^2.

Parameters:
None.
Return values:
Theacceleration in pps^2.

Implemented in L6470.

virtual unsigned int GetDeceleration ( void   ) [pure virtual]

Getting the deceleration in pps^2.

Parameters:
None.
Return values:
Thedeceleration in pps^2.

Implemented in L6470.

virtual direction_t GetDirection ( void   ) [pure virtual]

Getting the direction of rotation.

Parameters:
None.
Return values:
Thedirection of rotation.

Implemented in L6470.

virtual signed int GetMark ( void   ) [pure virtual]

Getting the marked position.

Parameters:
None.
Return values:
Themarked position.

Implemented in L6470.

virtual unsigned int GetMaxSpeed ( void   ) [pure virtual]

Getting the maximum speed in pps.

Parameters:
None.
Return values:
Themaximum speed in pps.

Implemented in L6470.

virtual unsigned int GetMinSpeed ( void   ) [pure virtual]

Getting the minimum speed in pps.

Parameters:
None.
Return values:
Theminimum speed in pps.

Implemented in L6470.

virtual signed int GetPosition ( void   ) [pure virtual]

Getting the position.

Parameters:
None.
Return values:
Theposition.

Implemented in L6470.

virtual unsigned int GetSpeed ( void   ) [pure virtual]

Getting the current speed in pps.

Parameters:
None.
Return values:
Thecurrent speed in pps.

Implemented in L6470.

virtual unsigned int GetStatus ( void   ) [pure virtual]

Getting the status.

Parameters:
None.
Return values:
Thestatus.

Implemented in L6470.

virtual void GoHome ( void   ) [pure virtual]

Going to the home position.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void GoMark ( void   ) [pure virtual]

Going to the marked position.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void GoTo ( signed int  position ) [pure virtual]

Going to a specified position.

Parameters:
positionThe desired position.
Return values:
None.

Implemented in L6470.

virtual void HardHiZ ( void   ) [pure virtual]

Disabling the power bridge immediately.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void HardStop ( void   ) [pure virtual]

Stopping the motor through an immediate infinite deceleration.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual int Init ( void *  init ) [pure virtual, inherited]

Initializing the component.

Parameters:
[in]initpointer to device specific initalization structure.
Return values:
0in case of success, an error code otherwise.

Implemented in L6470.

virtual void Move ( direction_t  direction,
unsigned int  steps 
) [pure virtual]

Moving the motor towards a specified direction for a certain number of steps.

Parameters:
directionThe direction of rotation.
stepsThe desired number of steps.
Return values:
None.

Implemented in L6470.

virtual int ReadID ( uint8_t *  id ) [pure virtual, inherited]

Getting the ID of the component.

Parameters:
[out]idpointer to an allocated variable to store the ID into.
Return values:
0in case of success, an error code otherwise.

Implemented in L6470.

virtual void Run ( direction_t  direction ) [pure virtual]

Running the motor towards a specified direction.

Parameters:
directionThe direction of rotation.
Return values:
None.

Implemented in L6470.

virtual bool SetAcceleration ( unsigned int  acceleration ) [pure virtual]

Setting the acceleration in pps^2.

Parameters:
accelerationThe acceleration in pps^2.
Return values:
truein case of success, "false" otherwise.

Implemented in L6470.

virtual bool SetDeceleration ( unsigned int  deceleration ) [pure virtual]

Setting the deceleration in pps^2.

Parameters:
decelerationThe deceleration in pps^2.
Return values:
truein case of success, "false" otherwise.

Implemented in L6470.

virtual void SetHome ( void   ) [pure virtual]

Setting the current position to be the home position.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void SetMark ( void   ) [pure virtual]

Setting the current position to be the marked position.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual bool SetMaxSpeed ( unsigned int  speed ) [pure virtual]

Setting the maximum speed in pps.

Parameters:
speedThe maximum speed in pps.
Return values:
truein case of success, "false" otherwise.

Implemented in L6470.

virtual bool SetMinSpeed ( unsigned int  speed ) [pure virtual]

Setting the minimum speed in pps.

Parameters:
speedThe minimum speed in pps.
Return values:
truein case of success, "false" otherwise.

Implemented in L6470.

virtual bool SetStepMode ( step_mode_t  step_mode ) [pure virtual]

Setting the Step Mode.

Parameters:
step_modeThe Step Mode.
Return values:
truein case of success, "false" otherwise.

Implemented in L6470.

virtual void SoftHiZ ( void   ) [pure virtual]

Disabling the power bridge after performing a deceleration to zero.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void SoftStop ( void   ) [pure virtual]

Stopping the motor through an immediate deceleration up to zero speed.

Parameters:
None.
Return values:
None.

Implemented in L6470.

virtual void WaitWhileActive ( void   ) [pure virtual]

Waiting while the motor is active.

Parameters:
None.
Return values:
None.

Implemented in L6470.