ClearCore Library
List of all members | Public Types | Public Member Functions
ClearCore::MotorManager Class Reference

Detailed Description

ClearCore motor-connector manager.

This class manages shared settings for the MotorDriver connectors.

For more detailed information on the ClearCore Motor Control and Motion Generation systems, check out the Motor Control System and Step and Direction Control informational pages.

ClearCore motor-connector manager. More...

#include <MotorManager.h>

Public Types

enum  MotorClockRates { CLOCK_RATE_LOW, CLOCK_RATE_NORMAL, CLOCK_RATE_HIGH }
 
enum  MotorPair { MOTOR_M0M1 = 0, MOTOR_M2M3 = 1, NUM_MOTOR_PAIRS = 2, MOTOR_ALL = NUM_MOTOR_PAIRS }
 

Public Member Functions

bool MotorInputClocking (MotorClockRates newRate)
 Sets the output step rate for the motor step generators. More...
 
bool MotorModeSet (MotorPair motorPair, Connector::ConnectorModes newMode)
 Sets the operational mode for the specified MotorDriver connectors. More...
 

Member Enumeration Documentation

Output step rates to be sent to motors.

Enumerator
CLOCK_RATE_LOW 

Select the slow speed step input rate (100 kHz, 5uS pulse width)

CLOCK_RATE_NORMAL 

Select the medium speed step input rate (500 kHz, 1uS pulse width)

CLOCK_RATE_HIGH 

Select the fast speed step input rate (2 MHz, 250nS pulse width)

Indicates a pair of MotorDriver Connectors.

Enumerator
MOTOR_M0M1 

MotorDriver Connectors M-0 and M-1.

MOTOR_M2M3 

MotorDriver Connectors M-2 and M-3.

NUM_MOTOR_PAIRS 

The total number of pairs of MotorDriver Connectors.

MOTOR_ALL 

All MotorDriver Connectors.

Member Function Documentation

bool ClearCore::MotorManager::MotorInputClocking ( MotorClockRates  newRate)

Sets the output step rate for the motor step generators.

Sets the step rate for the MotorDriver connectors as a group. They cannot be individually set.

Note
Setting a HIGH clock rate when using a ClearPath motor may cause errors. NORMAL clock rate is recommended for ClearPath motors.
// Set all MotorDrivers' input clock rate to the high rate
Parameters
[in]newRateStep rate to be set
Returns
Success
Examples:
ClearPathModeExamples/ClearPath-SD_Series/DualAxisSynchronized/DualAxisSynchronized.cpp, ClearPathModeExamples/ClearPath-SD_Series/MovePositionAbsolute/MovePositionAbsolute.cpp, ClearPathModeExamples/ClearPath-SD_Series/MovePositionRelative/MovePositionRelative.cpp, ClearPathModeExamples/ClearPath-SD_Series/MoveVelocity/MoveVelocity.cpp, ClearPathModeExamples/ClearPath-SD_Series/UserSeeksHome/UserSeeksHome.cpp, SerialCommExamples/ClearCoreCommandProtocol/ClearCoreCommandProtocol.cpp, and StepAndDirectionExamplesNonClearPath/StepAndDirectionNonClearPath/StepAndDirection.cpp.
bool ClearCore::MotorManager::MotorModeSet ( MotorPair  motorPair,
Connector::ConnectorModes  newMode 
)

Sets the operational mode for the specified MotorDriver connectors.

Sets the mode for the specified MotorDriver connectors in tandem. They cannot be individually set.

// Set M-2 and M-3's mode to step and direction
Parameters
[in]motorPairConnectors to be set to specified mode.
[in]newModeConnector modes to be set. The valid modes for the MotorDriver connectors are:
Returns
Success
Examples:
ClearPathModeExamples/ClearPath-MC_Series/Abs16PositionsHomeToHardStop/Abs16PositionsHomeToHardStop.cpp, ClearPathModeExamples/ClearPath-MC_Series/Abs2PositionsHomeToSwitch/Abs2PositionsHomeToSwitch.cpp, ClearPathModeExamples/ClearPath-MC_Series/Abs4PositionsHomeToHardStop/Abs4PositionsHomeToHardStop.cpp, ClearPathModeExamples/ClearPath-MC_Series/FollowDigitalPosition/FollowDigitalPosition.cpp, ClearPathModeExamples/ClearPath-MC_Series/FollowDigitalTorque/FollowDigitalTorque.cpp, ClearPathModeExamples/ClearPath-MC_Series/FollowDigitalVelocity/FollowDigitalVelocity.cpp, ClearPathModeExamples/ClearPath-MC_Series/FollowDigitalVelocityWithVariableTorque/FollowDigitalVelocityWithVariableTorque.cpp, ClearPathModeExamples/ClearPath-MC_Series/ManualVelocity/ManualVelocity.cpp, ClearPathModeExamples/ClearPath-MC_Series/Move2IncrementsHomeToSwitch/Move2IncrementsHomeToSwitch.cpp, ClearPathModeExamples/ClearPath-MC_Series/Move4IncrementsHomeToHardStop/Move4IncrementsHomeToHardStop.cpp, ClearPathModeExamples/ClearPath-MC_Series/PulseBurstPositioning/PulseBurstPositioning.cpp, ClearPathModeExamples/ClearPath-MC_Series/RampUpDownToSelectedVelocity/RampUpDownToSelectedVelocity.cpp, ClearPathModeExamples/ClearPath-SD_Series/DualAxisSynchronized/DualAxisSynchronized.cpp, ClearPathModeExamples/ClearPath-SD_Series/MovePositionAbsolute/MovePositionAbsolute.cpp, ClearPathModeExamples/ClearPath-SD_Series/MovePositionRelative/MovePositionRelative.cpp, ClearPathModeExamples/ClearPath-SD_Series/MoveVelocity/MoveVelocity.cpp, ClearPathModeExamples/ClearPath-SD_Series/UserSeeksHome/UserSeeksHome.cpp, EncoderInputExamples/FollowEncoder/FollowEncoder.cpp, SerialCommExamples/ClearCoreCommandProtocol/ClearCoreCommandProtocol.cpp, and StepAndDirectionExamplesNonClearPath/StepAndDirectionNonClearPath/StepAndDirection.cpp.

The documentation for this class was generated from the following file: