ClearCore Library
Loading...
Searching...
No Matches
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.
 
bool MotorModeSet (MotorPair motorPair, Connector::ConnectorModes newMode)
 Sets the operational mode for the specified MotorDriver connectors.
 

Member Enumeration Documentation

◆ MotorClockRates

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)

◆ MotorPair

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

◆ MotorInputClocking()

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
bool MotorInputClocking(MotorClockRates newRate)
Sets the output step rate for the motor step generators.
@ CLOCK_RATE_HIGH
Definition MotorManager.h:63
MotorManager & MotorMgr
Motor connector manager.
Parameters
[in]newRateStep rate to be set
Returns
Success
Examples
ClearCoreCommandProtocol.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, DualAxisSynchronized.cpp, MovePositionAbsolute.cpp, MovePositionRelative.cpp, MoveVelocity.cpp, SerialCommExamples/ClearCoreCommandProtocol/ClearCoreCommandProtocol.cpp, StepAndDirection.cpp, StepAndDirectionExamplesNonClearPath/StepAndDirectionNonClearPath/StepAndDirection.cpp, and UserSeeksHome.cpp.

◆ MotorModeSet()

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
@ CPM_MODE_STEP_AND_DIR
Definition Connector.h:126
bool MotorModeSet(MotorPair motorPair, Connector::ConnectorModes newMode)
Sets the operational mode for the specified MotorDriver connectors.
@ MOTOR_M2M3
Definition MotorManager.h:77
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
Abs16PositionsHomeToHardStop.cpp, Abs2PositionsHomeToSwitch.cpp, Abs4PositionsHomeToHardStop.cpp, ClearCoreCommandProtocol.cpp, 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, DualAxisSynchronized.cpp, EncoderInputExamples/FollowEncoder/FollowEncoder.cpp, FollowDigitalPosition.cpp, FollowDigitalTorque.cpp, FollowDigitalVelocity.cpp, FollowDigitalVelocityWithVariableTorque.cpp, FollowEncoder.cpp, ManualVelocity.cpp, Move2IncrementsHomeToSwitch.cpp, Move4IncrementsHomeToHardStop.cpp, MovePositionAbsolute.cpp, MovePositionRelative.cpp, MoveVelocity.cpp, PulseBurstPositioning.cpp, RampUpDownToSelectedVelocity.cpp, SerialCommExamples/ClearCoreCommandProtocol/ClearCoreCommandProtocol.cpp, StepAndDirection.cpp, StepAndDirectionExamplesNonClearPath/StepAndDirectionNonClearPath/StepAndDirection.cpp, and UserSeeksHome.cpp.

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