Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_IHM01A1 by
StepperMotor Class Reference
An abstract class for StepperMotor components. More...
#include <StepperMotor_class.h>
Inherits Component.
Inherited by 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
enum direction_t |
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:
-
The acceleration in pps^2.
Implemented in L6474.
virtual unsigned int GetDeceleration | ( | void | ) | [pure virtual] |
Getting the deceleration in pps^2.
- Parameters:
-
None.
- Return values:
-
The deceleration in pps^2.
Implemented in L6474.
virtual direction_t GetDirection | ( | void | ) | [pure virtual] |
Getting the direction of rotation.
- Parameters:
-
None.
- Return values:
-
The direction of rotation.
Implemented in L6474.
virtual signed int GetMark | ( | void | ) | [pure virtual] |
Getting the marked position.
- Parameters:
-
None.
- Return values:
-
The marked position.
Implemented in L6474.
virtual unsigned int GetMaxSpeed | ( | void | ) | [pure virtual] |
Getting the maximum speed in pps.
- Parameters:
-
None.
- Return values:
-
The maximum speed in pps.
Implemented in L6474.
virtual unsigned int GetMinSpeed | ( | void | ) | [pure virtual] |
Getting the minimum speed in pps.
- Parameters:
-
None.
- Return values:
-
The minimum speed in pps.
Implemented in L6474.
virtual float GetParameter | ( | unsigned int | parameter ) | [pure virtual] |
Getting a parameter.
- Parameters:
-
parameter The parameter's identifier (or its register address).
- Return values:
-
The parameter's value.
Implemented in L6474.
virtual signed int GetPosition | ( | void | ) | [pure virtual] |
virtual unsigned int GetSpeed | ( | void | ) | [pure virtual] |
Getting the current speed in pps.
- Parameters:
-
None.
- Return values:
-
The current speed in pps.
Implemented in L6474.
virtual unsigned int GetStatus | ( | void | ) | [pure virtual] |
virtual void GoHome | ( | void | ) | [pure virtual] |
virtual void GoMark | ( | void | ) | [pure virtual] |
virtual void GoTo | ( | signed int | position ) | [pure virtual] |
Going to a specified position.
- Parameters:
-
position The desired position.
- Return values:
-
None.
Implemented in L6474.
virtual void HardHiZ | ( | void | ) | [pure virtual] |
Disabling the power bridge immediately.
- Parameters:
-
None.
- Return values:
-
None.
Implemented in L6474.
virtual void HardStop | ( | void | ) | [pure virtual] |
Stopping the motor through an immediate infinite deceleration.
- Parameters:
-
None.
- Return values:
-
None.
Implemented in L6474.
virtual int Init | ( | void * | init ) | [pure virtual, inherited] |
Initializing the component.
- Parameters:
-
[in] init pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in 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:
-
direction The direction of rotation. steps The desired number of steps.
- Return values:
-
None.
Implemented in L6474.
virtual int ReadID | ( | uint8_t * | id ) | [pure virtual, inherited] |
Getting the ID of the component.
- Parameters:
-
[out] id pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implemented in L6474.
virtual void Run | ( | direction_t | direction ) | [pure virtual] |
Running the motor towards a specified direction.
- Parameters:
-
direction The direction of rotation.
- Return values:
-
None.
Implemented in L6474.
virtual void SetAcceleration | ( | unsigned int | acceleration ) | [pure virtual] |
Setting the acceleration in pps^2.
- Parameters:
-
acceleration The acceleration in pps^2.
- Return values:
-
None.
Implemented in L6474.
virtual void SetDeceleration | ( | unsigned int | deceleration ) | [pure virtual] |
Setting the deceleration in pps^2.
- Parameters:
-
deceleration The deceleration in pps^2.
- Return values:
-
None.
Implemented in L6474.
virtual void SetHome | ( | void | ) | [pure virtual] |
Setting the current position to be the home position.
- Parameters:
-
None.
- Return values:
-
None.
Implemented in L6474.
virtual void SetMark | ( | void | ) | [pure virtual] |
Setting the current position to be the marked position.
- Parameters:
-
None.
- Return values:
-
None.
Implemented in L6474.
virtual void SetMaxSpeed | ( | unsigned int | speed ) | [pure virtual] |
Setting the maximum speed in pps.
- Parameters:
-
speed The maximum speed in pps.
- Return values:
-
None.
Implemented in L6474.
virtual void SetMinSpeed | ( | unsigned int | speed ) | [pure virtual] |
Setting the minimum speed in pps.
- Parameters:
-
speed The minimum speed in pps.
- Return values:
-
None.
Implemented in L6474.
virtual void SetParameter | ( | unsigned int | parameter, |
float | value | ||
) | [pure virtual] |
Setting a parameter.
- Parameters:
-
parameter The parameter's identifier (or its register address). value The parameter's value.
- Return values:
-
None.
Implemented in 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.
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.
virtual void WaitWhileActive | ( | void | ) | [pure virtual] |
Generated on Tue Jul 12 2022 20:40:40 by
