Class ClosedLoop¶
Defined in File CoreMotionApi.h
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class ClosedLoop¶
This class contains closed-loop command functions.
Public Functions
-
inline ClosedLoop(CoreMotion *f)¶
-
bool IsDeviceValid()¶
-
WMX3APIFUNC StartController(Command *pCommand, PidGain *pPidGain = NULL)¶
Start a closed-loop controller command.
Start a closed-loop controller command.
This function starts the closed-loop controller of the specified axis with the specified setpoint.
Remark
See also
- Parameters:
pCommand – [in] A pointer to an object of the Command class that contains the parameters of the closed-loop command.
pPidGain – [in] An optional pointer to an object of the PidGain class. If not specified, the controller gains set by ClosedLoopParam will be used. If specified, the controller gains set by ClosedLoopParam will be changed to the specified gains.
-
WMX3APIFUNC StartController(unsigned int numCommands, Command *pCommand, PidGain *pPidGain = NULL)¶
Start closed-loop controller commands for multiple axes.
Start closed-loop controller commands for multiple axes.
This function executes the StartController function for multiple axes.
Remark
- Parameters:
numCommands – [in] The number of closed-loop commands. Each command controls a single axis.
pCommand – [in] A pointer to an array of objects of the Command class that contain the parameters of the closed-loop commands. The number of objects in the array must be equal to numCommands.
pPidGain – [in] An optional pointer to an array of objects of the PidGain class. If not specified, the controller gains set by ClosedLoopParam will be used. If specified, the controller gains set by ClosedLoopParam will be changed to the specified gains. The number of objects in the array must be equal to numCommands.
-
WMX3APIFUNC StartController(SineCommand *pSineCommand)¶
Start a closed-loop controller sine command.
Start a closed-loop controller sine command.
This function starts the closed-loop controller of the specified axis, generating sinusoidal signal to setpoint with the specified frequency, amplitude, and controller output offset.
Remark
See also
- Parameters:
pSineCommand – [in] A pointer to an object of the SineCommand class that contains the parameters of the closed-loop sine command.
-
WMX3APIFUNC StartController(unsigned int numCommands, SineCommand *pSineCommand)¶
Start closed-loop controller sine commands for multiple axes.
Start closed-loop controller sine commands for multiple axes.
This function executes the StartController function for multiple axes.
Remark
- Parameters:
numCommands – [in] The number of closed-loop sine commands. Each command controls a single axis.
pSineCommand – [in] A pointer to an array of objects of the SineCommand class that contains the parameters of the closed-loop sine command. The number of objects in the array must be equal to numCommands.
-
WMX3APIFUNC StopController(int axis)¶
Stop the closed-loop controller for an axis.
Stop the closed-loop controller for an axis.
This function stops the closed-loop controller of the specified axis. If the axis is in Position mode or Velocity mode, the axis will decelerate to a stop using the quick stop deceleration specified with Quick Stop Dec. If the axis is in Torque mode, it will stop as if StopTrq is called.
Remark
- Parameters:
axis – [in] The axis to stop.
-
WMX3APIFUNC StopController(AxisSelection *pAxisSelection)¶
Stop the closed-loop controller for multiple axes.
Stop the closed-loop controller for multiple axes.
This function is an overloaded function of StopController API function that stops the closed-loop controller for multiple axes.
Remark
If any of the commanded axes are in an invalid state, this function will return an error; however, the remaining axes will still be stopped. An axis is considered to be in an invalid state if its servo is off, if it is not in the ClosedLoop state, or if it is receiving or has received a new motion command to be started in the next communication cycle.
- Parameters:
pAxisSelection – [in] A pointer to an AxisSelection class that specifies the axes to stop.
-
WMX3APIFUNC SetPositionContactPoint(VelocityCommand *pVelocityCommand)¶
Set a position contact point which is used as controlOutputOffset for a CSP-mode closed-loop controller.
Set a position contact point which is used as controlOutputOffset for a CSP-mode closed-loop controller.
This function starts finding a position contact point for a CSP-mode closed-loop controller. When the position contact point is found, it will be stored to controlOutputOffset.
Remark
- Parameters:
pVelocityCommand – [in] A pointer to an object of the VelocityCommand class that contains the parameters for setting the position contact point.
-
WMX3APIFUNC SetPositionContactPoint(unsigned int numCommands, VelocityCommand *pVelocityCommand)¶
Set a position contact point for multiple axes.
Set a position contact point for multiple axes.
This function executes the SetPositionContactPoint function for multiple axes.
Remark
- Parameters:
numCommands – [in] The number of velocity commands. Each command controls a single axis.
pVelocityCommand – [in] A pointer to an object of the VelocityCommand class that contains the parameters for setting the position contact point.
Public Members
-
CoreMotion *cmApi¶
-
class Command¶
This class contains data for a closed-loop command.
-
class PidGain¶
This class contains PID gain data for closed-loop control.
Public Functions
-
PidGain()¶
-
PidGain()¶
-
class SineCommand¶
This class contains data for a closed-loop sinusoidal command.
-
inline ClosedLoop(CoreMotion *f)¶