|
StepperII
Dual Axis Stepper Controller
|
Public Member Functions | |
| void | init (uint8_t *s, CMotor *pMotor, CStepTimer *pStepTimer, const char axis, char consoleStatus=0) |
| Initialze the axis. | |
| void | setSprIndex (int x) |
| Set axis microstepping. | |
| void | setDirection (char) |
| Set motor direction before move, include CProfile::reverse setting. | |
| void | brakeOn (void) |
| Activate motor brake. | |
| void | brakeOff (void) |
| De-activate motor brake. | |
| int | readPosition (void) |
| Return position in units based on CProfile::units. | |
| void | writePosition (int x) |
| Set axis position to x. | |
| void | step (int x) |
| Relative move, x is in signed degrees or steps. | |
| void | stepTo (int position) |
| Absolute move, position is in signed degrees or steps. | |
| void | doPulse (void) |
| void | stepMotor (void) |
| Move motor one step. | |
| void | on (char direction) |
| Turn on motor in given direction. | |
| void | autoHome (void) |
| Look for home. | |
| void | setHomeOffset (int offset) |
| void | changeSpeed (void) |
| Change speed if in continuous mode. | |
| void | timerCompareA (void) |
| Executed on counter 1A top. | |
| void | timerOverflow (void) |
| Process timer overflow event. | |
| int | indexToSteps (char index) |
| Convert 0,1,2... to 200,400,800... | |
| char | stepsToIndex (int steps) |
| Convert 200,400,800... to 0,1,2... | |
| int | stepsToMove (int x) |
| Calculate number of steps to move to target. | |
| int | toSteps (int x) |
| Convert input x to steps. | |
| int | toUnits (int x) |
| Convert input x to units, based on CProfile::units. | |
Public Attributes | |
| CProfile | profile |
| Axis configuration. | |
| CRunProfile | runProfile |
| Axis run-time (motion) parameters. | |
| CStepPeriod | avrStep |
| Axis motion pulse width calculator. | |
| CMotor * | pMotor |
| Axis motor control object. | |
| CStepTimer * | pStepTimer |
| Axis motion pulse timer. | |
| int CStepper::indexToSteps | ( | char | index | ) |
Convert 0,1,2... to 200,400,800...
Convert index (0 through 4) to microsteps (200 through 3200). If index is not valid, return 3200 (slowest) steps
| [in] | index | 0, 1, 2, 3, or 4 |
| char CStepper::stepsToIndex | ( | int | steps | ) |
Convert 200,400,800... to 0,1,2...
Convert microsteps (200 through 3200) to index (0 through 4). If index is not valid, return 4 (slowest) index
| [in] | steps | 200, 400, 800, 1600, or 3200 (steps per motor rev) |
| void CStepper::timerCompareA | ( | void | ) |
Executed on counter 1A top.
| int CStepper::toSteps | ( | int | x | ) |
Convert input x to steps.
Convert degrees or steps to steps.
| [in] | x | number of steps in degrees or steps |
| int CStepper::toUnits | ( | int | x | ) |
Convert input x to units, based on CProfile::units.
Convert steps to degrees if CProfile::units is 0.
| [in] | x | steps |
1.7.3