Personal fork of the library for direct control instead of library control

Dependencies:   X_NUCLEO_COMMON

Dependents:   Thesis_Rotating_Platform

Fork of X_NUCLEO_IHM01A1 by Arkadi Rafalovich

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 L6474, and L6474.

Public Types

enum  direction_t
 

Rotation modes.

More...

Public Member Functions

virtual unsigned int GetStatus (void)=0
 Getting the status.
virtual float GetParameter (unsigned int parameter)=0
 Getting a parameter.
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 SetParameter (unsigned int parameter, float value)=0
 Setting a parameter.
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 void SetMaxSpeed (unsigned int speed)=0
 Setting the maximum speed in pps.
virtual void SetMinSpeed (unsigned int speed)=0
 Setting the minimum speed in pps.
virtual void SetAcceleration (unsigned int acceleration)=0
 Setting the acceleration in pps^2.
virtual void SetDeceleration (unsigned int deceleration)=0
 Setting the deceleration in pps^2.
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.


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 L6474, and L6474.

virtual unsigned int GetDeceleration ( void   ) [pure virtual]

Getting the deceleration in pps^2.

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

Implemented in L6474, and L6474.

virtual direction_t GetDirection ( void   ) [pure virtual]

Getting the direction of rotation.

Parameters:
None.
Return values:
Thedirection of rotation.

Implemented in L6474, and L6474.

virtual signed int GetMark ( void   ) [pure virtual]

Getting the marked position.

Parameters:
None.
Return values:
Themarked position.

Implemented in L6474, and L6474.

virtual unsigned int GetMaxSpeed ( void   ) [pure virtual]

Getting the maximum speed in pps.

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

Implemented in L6474, and L6474.

virtual unsigned int GetMinSpeed ( void   ) [pure virtual]

Getting the minimum speed in pps.

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

Implemented in L6474, and L6474.

virtual float GetParameter ( unsigned int  parameter ) [pure virtual]

Getting a parameter.

Parameters:
parameterThe parameter's identifier (or its register address).
Return values:
Theparameter's value.

Implemented in L6474, and L6474.

virtual signed int GetPosition ( void   ) [pure virtual]

Getting the position.

Parameters:
None.
Return values:
Theposition.

Implemented in L6474, and L6474.

virtual unsigned int GetSpeed ( void   ) [pure virtual]

Getting the current speed in pps.

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

Implemented in L6474, and L6474.

virtual unsigned int GetStatus ( void   ) [pure virtual]

Getting the status.

Parameters:
None.
Return values:
Thestatus.

Implemented in L6474, and L6474.

virtual void GoHome ( void   ) [pure virtual]

Going to the home position.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

virtual void GoMark ( void   ) [pure virtual]

Going to the marked position.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

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

Going to a specified position.

Parameters:
positionThe desired position.
Return values:
None.

Implemented in L6474, and L6474.

virtual void HardHiZ ( void   ) [pure virtual]

Disabling the power bridge immediately.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

virtual void HardStop ( void   ) [pure virtual]

Stopping the motor through an immediate infinite deceleration.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

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 L6474, and L6474.

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 L6474, and L6474.

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 L6474, and L6474.

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 L6474, and L6474.

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

Setting the acceleration in pps^2.

Parameters:
accelerationThe acceleration in pps^2.
Return values:
None.

Implemented in L6474, and L6474.

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

Setting the deceleration in pps^2.

Parameters:
decelerationThe deceleration in pps^2.
Return values:
None.

Implemented in L6474, and L6474.

virtual void SetHome ( void   ) [pure virtual]

Setting the current position to be the home position.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

virtual void SetMark ( void   ) [pure virtual]

Setting the current position to be the marked position.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

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

Setting the maximum speed in pps.

Parameters:
speedThe maximum speed in pps.
Return values:
None.

Implemented in L6474, and L6474.

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

Setting the minimum speed in pps.

Parameters:
speedThe minimum speed in pps.
Return values:
None.

Implemented in L6474, and L6474.

virtual void SetParameter ( unsigned int  parameter,
float  value 
) [pure virtual]

Setting a parameter.

Parameters:
parameterThe parameter's identifier (or its register address).
valueThe parameter's value.
Return values:
None.

Implemented in L6474, and L6474.

virtual void SoftHiZ ( void   ) [pure virtual]

Disabling the power bridge after performing a deceleration to zero.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

virtual void SoftStop ( void   ) [pure virtual]

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

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.

virtual void WaitWhileActive ( void   ) [pure virtual]

Waiting while the motor is active.

Parameters:
None.
Return values:
None.

Implemented in L6474, and L6474.