Class PMAxisMotion
Defined in File PMMotionApi.h
Nested Relationships
Nested Types
Class Documentation
-
class PMAxisMotion
This class contains PP mode position command functions for PM motion.
Public Functions
-
bool IsDeviceValid()
-
WMX3APIFUNC StartPos(int axis, long target, bool immediately = true)
Start an absolute position PP mode motion command.
Start an absolute position PP mode motion command.
This function moves the specified axis to the specified absolute position.
Remark
The velocity profile must be first set with the SetVelProfile function.
- Parameters:
axis – [in] The axis to command.
target – [in] The target position.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(int axis, long target, bool immediately = true)
Start a relative position PP mode motion command.
Start a relative position PP mode motion command.
This function moves the specified axis to the specified relative position.
Remark
The velocity profile must be first set with the SetVelProfile function.
- Parameters:
axis – [in] The axis to command.
target – [in] The target position.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartPos(int axis, long target, long maxTrqLimit, bool immediately = true)
Start an absolute position PP mode motion command.
Start an absolute position PP mode motion command.
This function is an overloaded function of StartPos that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
The velocity profile must be first set with the SetVelProfile function.
- Parameters:
axis – [in] The axis to command.
target – [in] The target position.
maxTrqLimit – [in] The maximum torque limit to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(int axis, long target, long maxTrqLimit, bool immediately = true)
Start a relative position PP mode motion command.
Start a relative position PP mode motion command.
This function is an overloaded function of StartMov that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
The velocity profile must be first set with the SetVelProfile function.
- Parameters:
axis – [in] The axis to command.
target – [in] The target position.
maxTrqLimit – [in] The maximum torque limit to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartPos(PosCommand *pPosCommand, bool immediately = true)
Start an absolute position PP mode motion command.
Start an absolute position PP mode motion command.
This function moves the specified axis to the specified absolute position using a motion profile that is calculated by the specified parameters.
Remark
- Parameters:
pPosCommand – [in] A pointer to an object of the PosCommand class that contains the parameters of the motion command.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(PosCommand *pPosCommand, bool immediately = true)
Start a relative position PP mode motion command.
Start a relative position PP mode motion command.
This function moves the specified axis to the specified relative position using a motion profile that is calculated by the specified parameters.
Remark
For EtherCAT
When using EtherCAT, the relative position may be considered to be relative to the current command position or to the current target position. Which it is will depend on the servo drive and the value set for object 0x60F2. Refer to the documentation of the servo drive for more information.
- Parameters:
pPosCommand – [in] A pointer to an object of the PosCommand class that contains the parameters of the motion.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartPos(PosCommand *pPosCommand, long maxTrqLimit, bool immediately = true)
Start an absolute position PP mode motion command.
Start an absolute position PP mode motion command.
This function is an overloaded function of StartPos that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
- Parameters:
pPosCommand – [in] A pointer to an object of the PosCommand class that contains the parameters of the motion command.
maxTrqLimit – [in] The maximum torque limit to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(PosCommand *pPosCommand, long maxTrqLimit, bool immediately = true)
Start a relative position PP mode motion command.
Start a relative position PP mode motion command.
This function is an overloaded function of StartMov that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
- Parameters:
pPosCommand – [in] A pointer to an object of the PosCommand class that contains the parameters of the motion command.
maxTrqLimit – [in] The maximum torque limit to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartPos(unsigned int numCommands, PosCommand *pPosCommand, bool immediately = true)
Start absolute position PP mode motion commands for multiple axes.
Start absolute position PP mode motion commands for multiple axes.
This function executes the StartPos function for multiple axes.
Remark
- Parameters:
numCommands – [in] The number of position commands. Each command controls a single axis.
pPosCommand – [in] A pointer to an array of objects of the PosCommand class that contain the parameters of the motion commands. The number of objects in the array must be equal to numCommands.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(unsigned int numCommands, PosCommand *pPosCommand, bool immediately = true)
Start relative position PP mode motion commands for multiple axes.
Start relative position PP mode motion commands for multiple axes.
This function executes the StartMov function for multiple axes.
Remark
- Parameters:
numCommands – [in] The number of position commands. Each command controls a single axis.
pPosCommand – [in] A pointer to an array of objects of the PosCommand class that contain the parameters of the motion commands. The number of objects in the array must be equal to numCommands.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartPos(unsigned int numCommands, PosCommand *pPosCommand, long *maxTrqLimits, bool immediately = true)
Start absolute position PP mode motion commands for multiple axes.
Start absolute position PP mode motion commands for multiple axes.
This function is an overloaded function of StartPos that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
- Parameters:
numCommands – [in] The number of position commands. Each command controls a single axis.
pPosCommand – [in] A pointer to an array of objects of the PosCommand class that contain the parameters of the motion commands. The number of objects in the array must be equal to numCommands.
maxTrqLimits – [in] The maximum torque limits to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC StartMov(unsigned int numCommands, PosCommand *pPosCommand, long *maxTrqLimits, bool immediately = true)
Start relative position PP mode motion commands for multiple axes.
Start relative position PP mode motion commands for multiple axes.
This function is an overloaded function of StartMov that also sets the max torque limit. After the position command is stopped or overridden, the max torque limit will remain at the specified value until modified by another function.
Remark
- Parameters:
numCommands – [in] The number of position commands. Each command controls a single axis.
pPosCommand – [in] A pointer to an array of objects of the PosCommand class that contain the parameters of the motion commands. The number of objects in the array must be equal to numCommands.
maxTrqLimits – [in] The maximum torque limits to apply, in units of 0.1%.
immediately – [in] An optional parameter that determines whether the position command should be executed immediately. If this parameter is not specified or this parameter is set to TRUE, the position command will be executed immediately. If the axis is executing another position command when this function is called, it will be overridden. If this parameter is set to FALSE, the position command will be executed after any currently executing position command finishes.
-
WMX3APIFUNC Stop(int axis)
Stop the motion of an axis executing a PP mode position command.
Stop the motion of an axis executing a PP mode position command.
This function stops the motion of an axis that is executing a PP mode position command.
Remark
For EtherCAT
This function sends a halt signal to the servo. PP, HM, PV, and TQ mode motion will be halted.
- Parameters:
axis – [in] The axis to stop.
-
WMX3APIFUNC Stop(AxisSelection *pAxisSelection)
Stop the motion of multiple axes executing PP mode position commands.
Stop the motion of multiple axes executing PP mode position commands.
This function executes the Stop function for multiple axes.
If any of the commanded axes are in an invalid state, this function will return an error and none of the commanded axes will be stopped. An axis is in an invalid state if the axis servo is not on, the axis is offline, or if the axis does not support PP mode.
- Parameters:
pAxisSelection – [in] A pointer to a AxisSelection class object that specifies the axes to stop.
-
WMX3APIFUNC Pause(int axis)
Pause the execution of a PP mode position command.
Pause the execution of a PP mode position command.
This function pauses the execution of a PP mode position command for one axis. The axis will decelerate to rest.
Remark
To resume the axis, call the Resume function.
- Parameters:
axis – [in] The axis to pause.
-
WMX3APIFUNC Pause(AxisSelection *pAxisSelection)
Pause the execution of PP mode position commands for multiple axes.
Pause the execution of PP mode position commands for multiple axes.
This function executes Pause for multiple axes.
Remark
- Parameters:
pAxisSelection – [in] A pointer to a AxisSelection class object that specifies the axes to pause.
-
WMX3APIFUNC Resume(int axis)
Resume the execution of a paused PP mode position command.
Resume the execution of a paused PP mode position command.
This function resumes the execution of a PP mode position command that was paused by the Pause function.
Remark
- Parameters:
axis – [in] The axis to resume.
-
WMX3APIFUNC Resume(AxisSelection *pAxisSelection)
Resume the execution of paused PP mode position commands for multiple axes.
Resume the execution of paused PP mode position commands for multiple axes.
This function executes Resume for multiple axes.
Remark
- Parameters:
pAxisSelection – [in] A pointer to a AxisSelection class object that specifies the axes to resume.
-
class PosCommand
This class contains data for a position command.
Public Members
-
int axis
The axis of the motion command.
-
long target
The target position of the motion command.
-
long vel
The speed of motion command, in units of pulses per second.
-
long acc
The acceleration of motion command, in units of pulses per second^2.
-
long dec
The deceleration of motion command, in units of pulses per second^2.
-
int axis
-
bool IsDeviceValid()