ClearCore Library
Motor Control System

Overview

For applications that require the operation of a motor, ClearCore offers a suite of options to control up to four motors simultaneously. The MotorManager class handles the configuration of the
physical motor connectors (M-0 through M-3) on the ClearCore board. In code, these motor connectors are represented and controlled by instances of the MotorDriver class (ConnectorM0 through
ConnectorM3).

The MotorDriver class is designed to facilitate and fully exercise all the 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 MotorDriver class.

Wiring and Initialization

Motor Manager

The MotorManager class controls the configuration of the actual motor connectors, not the MotorDriver objects associated with the connectors. The manager has APIs for setting the controller mode of
the connectors as well as the clock rate of the connectors.

Motor Input Clocking

Connector Modes

Motor Driver

The MotorDriver class contains interfaces for controlling and communicating with a motor attached to a ClearCore motor connector. There are APIs provided to manipulate all the input lines of a
ClearPath as well as functions to interact with HLFB. The MotorDriver class also contains functions for motion generation by inheriting from the StepGenerator class. More information on the
MotorDriver's motion generation features may be found on the Step and Direction Control page.

Motor Inputs

HLFB

A key feature of ClearPath is the High-Level Feedback (HLFB) that can be output by the ClearPath to report on various motor statuses. For more information on HLFB you may reference the ClearPath
manual for your motor. The manuals may be found here and here for DC- and AC-input ClearPaths, respectively.