Command Mode
The Axis Command Mode of the axis is a parameter that determines how the axis is controlled.
The available options are Position (CSP, or Cyclic Synchronous Position), Velocity (CSV, or Cyclic Synchronous Velocity), and Torque (CST, or Cyclic Synchronous Torque). The command mode determines whether the axis receives a position command, velocity command, or torque command every communication cycle.
This parameter is set using one of the following functions.
When the engine is started, all axes are set to Position command mode by default.
The command mode of an axis normally cannot be changed unless the axis is in Idle operation state. Several functions are available for changing the command mode dynamically without stopping the axis. See the table later in this section for additional information.
Each motion command requires the axis to be in the correct command mode for that motion command. If the axis is not in the correct command mode, the NotPosMode, NotVelocityMode, or NotTrqMode error is returned. A few functions such as OverrideVel can operate on axes in both Position or Velocity command modes. These functions return the NotPosOrVelocityMode if the axis is in neither of these modes.
In addition to the axis being in the correct command mode for the motion command, the axis must be configured to be able to receive cyclic commands of the chosen command mode. All axes that are running on the simulator platform are able to receive position, velocity, and torque commands. For other platforms, it may be necessary to add the appropriate command to the PDO. See the Required Objects section of the platform in use inside this manual.
The following table summarizes the required command modes to execute the motion commands in each class.
Module |
Class |
Req. Mode |
Remarks |
|---|---|---|---|
ApiBuffer |
- |
Motion commands from other classes that are called from the API buffer require the same command mode as when called directly. |
|
Compensation |
- |
||
CoreMotion |
- |
No motion commmands are defined in this class. |
|
- |
No motion commmands are defined in this class. |
||
- |
|||
A few functions, such as OverrideVel, support axes in Velocity command mode executing velocity commands. |
|||
- |
|||
- |
|||
- |
|||
AdvancedMotion |
- |
||
- |
|||
- |
|||
CyclicBuffer |
- |
||
Event |
- |
Motion command events that are defined in other modules require the same command mode as the API function that the event replicates. |
|
Io |
- |
No motion commmands are defined in this class. |
|
Log |
- |
Certain log data may not be obtainable from axes in certain command modes. |
|
UserMemory |
- |
No motion commmands are defined in this class. |
Dynamically Changing the Command Mode
Normally, the axis command mode can only be changed while the axis is Idle. To change the command mode of an axis while the axis is moving, one of the following functions must be called. When the specified condition is satisfied, the axis will change to the new command mode and immediately begin executing the new motion command without stopping.
The specifications for dynamically changing the command mode without stopping the axis are determined by the servo. Depending on the servo, dynamic command mode changes may not be supported, or may require certain servo parameters to be set. See the documentation for the servo in use for additional information.
The following table lists the functions for dynamically changing the command mode. There are four overloaded functions of each function listed below.
Module |
Class |
Old Mode |
New Mode |
Function |
|---|---|---|---|---|
CoreMotion |
||||
PMMotion Axis Command Modes
In addition to the above command modes, the PMMotion module contains functions that command an axis in PP (Profile Position), HM (Homing), PV (Profile Velocity), or TQ (Profile Torque) command modes. The axis is automatically commanded using one of these command modes when the appropriate function in the PMMotion module is called, and the current command mode can be checked by calling the PMMotion::GetStatus function and reading the value of the PMMotionAxisStatus::operationMode status.
The following table summarizes the command modes used by the PMMotion module.
Module |
Class |
Cmd. Mode |
Remarks |
|---|---|---|---|
PMMotion |
- |
No motion commmands are defined in this class. |
|
- |
|||
- |
|||
- |
|||
- |