Class AxisControl
Defined in File CoreMotionApi.h
Class Documentation
-
class AxisControl
This class contains axis control functions.
Public Functions
-
inline AxisControl(CoreMotion *f)
-
bool IsDeviceValid()
-
WMX3APIFUNC SetServoOn(int axis, int newStatus)
Turn a servo drive in the servo network on or off.
Turn a servo drive in the servo network on or off.
This function will return ErrorCode::None after sending a signal to the servo to turn on or off. Even after this function returns no error, the servo may take a few cycles to turn on or off, or may fail to turn on or off. The Servo On status (obtained with GetStatus) should be checked to verify that the axis servo has turned on or off before continuing with operations that require the servo to be on or off.
Remark
- Parameters:
axis – [in] The axis of the servo drive to turn on or off.
newStatus – [in] 1: Turn on the servo, 0: Turn off the servo
-
WMX3APIFUNC SetServoOn(AxisSelection *pAxisSelection, int newStatus)
Turn multiple servo drives in the servo network on or off.
Turn multiple servo drives in the servo network on or off.
This function is a variation of the SetServoOn function that operates on multiple axes at the same time.
Remark
- Parameters:
pAxisSelection – [in] A pointer to an AxisSelection class that specifies which axes to turn on or off.
newStatus – [in] 1: Turn on the servo, 0: Turn off the servo
-
WMX3APIFUNC ClearAmpAlarm(int axis)
Clear the servo drive amp alarm on the specified axis.
Clear the servo drive amp alarm on the specified axis.
This function will return ErrorCode::None after sending a signal to the servo to clear the amp alarm. Even after this function returns no error, the servo may take a few cycles to clear the amp alarm, or may fail to clear the amp alarm. The Amp Alarm status (obtained with GetStatus) can be checked to verify whether the amp alarm has been cleared.
Remark
- Parameters:
axis – [in] The axis to clear the amp alarm.
-
WMX3APIFUNC ClearAmpAlarm(AxisSelection *pAxisSelection)
Clear the servo drive amp alarms on multiple axes.
Clear the servo drive amp alarms on multiple axes.
This function is a variation of the ClearAmpAlarm function that operates on multiple axes at the same time.
Remark
- Parameters:
pAxisSelection – [in] A pointer to an AxisSelection class that specifies which axes to clear the amp alarm.
-
WMX3APIFUNC ClearAxisAlarm(int axis)
Clear any axis alarms on the specified axis.
Clear any axis alarms on the specified axis.
This function clears the axis alarms for the specified axis. Axis alarms are software-based alarms generated by WMX3 such as following error. These alarms are not generated by the hardware.
Remark
To clear hardware-generated amp alarms, use the ClearAmpAlarm function.
- Parameters:
axis – [in] The axis to clear the axis alarm.
-
WMX3APIFUNC ClearAxisAlarm(AxisSelection *pAxisSelection)
Clear any axis alarms on multiple axes.
Clear any axis alarms on multiple axes.
This function is a variation of the ClearAxisAlarm function that operates on multiple axes at the same time.
Remark
- Parameters:
pAxisSelection – [in] A pointer to an AxisSelection class that specifies which axes to clear the axis alarm.
-
WMX3APIFUNC SetAxisCommandMode(int axis, AxisCommandMode::T mode)
Set the command mode of the axis.
Set the command mode of the axis.
The AxisCommandMode of an axis determines how the axis is commanded. An axis operating in Position mode will be controlled by position, an axis operating in Velocity mode will be controlled by velocity, and an axis operating in Torque mode will be controlled by torque. Most motion commands can only be executed by an axis in a particular mode.
Remark
The axis command mode can only be changed while the axis is in the Idle operation state or when the engine is not communicating with the axes (the engine is not in Communicating state). Calling this function while the axis is not in Idle operation state will cause the NotIdleState error to be returned.
See also
- Parameters:
axis – [in] The axis to set the command mode.
mode – [in] The command mode to set the axis to.
-
WMX3APIFUNC SetAxisCommandMode(AxisSelection *pAxisSelection, AxisCommandMode::T mode)
Set the command mode of multiple axes.
Set the command mode of multiple axes.
This function is a variation of the SetAxisCommandMode function that operates on multiple axes at the same time.
Remark
This function will change the command mode of the specified axes in sequence, starting from the smallest axis number. If the command mode of an axis cannot be changed (for example, because the axis is not in Idle operation state), this function will return an error and abort changing the command mode of subsequent axes, but the command modes of earlier axes will remain changed.
See also
- Parameters:
pAxisSelection – [in] A pointer to an AxisSelection class that specifies which axes to set the command mode.
mode – [in] The command mode to set the axis to.
-
WMX3APIFUNC GetAxisCommandMode(int axis, AxisCommandMode::T *pMode)
Get the command mode of the axis.
Get the command mode of the axis.
This function obtains that current AxisCommandMode of an axis. This value is identical to the Axis Command Mode status obtained with the GetStatus function.
Remark
See also
- Parameters:
axis – [in] The axis to get the command mode.
pMode – [out] A pointer to a AxisCommandMode variable that will contain the command mode of the axis.
-
WMX3APIFUNC GetPosCommand(int axis, double *pPosition)
Get the current cycle position command of the axis.
Get the current cycle position command of the axis.
This function obtains the current cycle position command of an axis. This value is identical to the Pos Cmd status obtained with the GetStatus function.
Remark
- Parameters:
axis – [in] The axis to get the position command.
pPosition – [out] A pointer that will contain the position command.
-
WMX3APIFUNC GetPosFeedback(int axis, double *pPosition)
Get the current cycle position feedback of the axis.
Get the current cycle position feedback of the axis.
This function obtains the current cycle position feedback of an axis. This value is identical to the Actual Pos status obtained with the GetStatus function.
Remark
- Parameters:
axis – [in] The axis to get the position feedback.
pPosition – [out] A pointer that will contain the position feedback.
-
WMX3APIFUNC GetVelCommand(int axis, double *pVelocity)
Get the current cycle velocity command of the axis.
Get the current cycle velocity command of the axis.
This function obtains the current cycle velocity command of an axis. This value is identical to the Velocity Cmd status obtained with the GetStatus function.
Remark
- Parameters:
axis – [in] The axis to get the velocity command.
pVelocity – [out] A pointer that will contain the velocity command.
-
WMX3APIFUNC GetVelFeedback(int axis, double *pVelocity)
Get the current cycle velocity feedback of the axis.
Get the current cycle velocity feedback of the axis.
This function obtains the current cycle velocity feedback of an axis. This value is identical to the Actual Velocity status obtained with the GetStatus function.
Remark
- Parameters:
axis – [in] The axis to get the velocity feedback.
pVelocity – [out] A pointer that will contain the velocity feedback.
Public Members
-
CoreMotion *cmApi
-
inline AxisControl(CoreMotion *f)