ClearCore Library
Step and Direction Control

Overview

For applications that require motion control of a connected motor ClearCore provides a motion generation class called StepGenerator. StepGenerator is one of the parent classes of MotorDriver.
This allows all motor configuration functions and motion generation functions to be accessed by the same MotorDriver object.

The StepGenerator class is designed to facilitate features of a Teknic ClearPath motor, however generic stepper motor drives may be used as well. For simplicity's sake this document will assume a
ClearPath motor is being used when describing the features of the StepGenerator class.

Wiring and Initialization

Motion Parameters

The StepGenerator generates a move profile using pre-defined motion parameters set by the user. These parameters may be changed "on the fly"; newly commanded moves will immediately
interrupt any currently active move. An easy way to check the move's state, provided by StepGenerator, is by polling the StepGenerator::StepsComplete() function. This
will return a boolean value representing whether the StepGenerator is outputting steps. Note that depending on your mechanics the motor shaft may still be moving even if the value is false.

Position Reference

Velocity and Acceleration

Motion Commands

The StepGenerator class provides movement functions which can have various behaviors depending on the pre-defined motion parameters and the parameters passed into the functions.

Regardless of which move command is issued, they may both be stopped by calling the StepGenerator::MoveStopAbrupt() function.

Positional Move

Velocity Move