|
Motion Master 6.0.0-alpha.50
Next-generation motion control software
|
Enumerations | |
| enum | Object : uint16_t { kControlword = 0x6040 , kStatusword = 0x6041 , kModeOfOperation = 0x6060 , kModeOfOperationDisplay = 0x6061 , kTargetPosition = 0x607A , kTargetVelocity = 0x60FF , kTargetTorque = 0x6071 , kPositionActualValue = 0x6064 , kVelocityActualValue = 0x606C , kTorqueActualValue = 0x6077 } |
| Standard CiA402 object dictionary indices used by the drive profile. More... | |
| enum class | OperationMode : int8_t { kNoMode = 0 , kProfilePosition = 1 , kProfileVelocity = 3 , kProfileTorque = 4 , kHoming = 6 , kCyclicSyncPosition = 8 , kCyclicSyncVelocity = 9 , kCyclicSyncTorque = 10 } |
| CiA402 operation modes (object 0x6060 / 0x6061 values). More... | |
| enum class | State : uint8_t { kNotReadyToSwitchOn , kSwitchOnDisabled , kReadyToSwitchOn , kSwitchedOn , kOperationEnabled , kQuickStopActive , kFaultReactionActive , kFault } |
| States of the CiA402 device control state machine (decoded from the statusword). More... | |
| enum | Command : uint16_t { kCmdShutdown = 0x0006 , kCmdSwitchOn = 0x0007 , kCmdEnableOperation = 0x000F , kCmdDisableVoltage = 0x0000 , kCmdQuickStop = 0x0002 , kCmdFaultReset = 0x0080 } |
Canonical controlword command-bit patterns (the value of the bits in kCommandMask). More... | |
Functions | |
| constexpr State | decodeState (uint16_t statusword) |
| Decodes the CiA402 state machine state from a statusword (0x6041) value. | |
| constexpr bool | isFaulted (uint16_t statusword) |
| Whether the statusword's fault bit (bit 3) is set, gated to the faulted states. | |
| constexpr std::string_view | toString (State state) |
Human-readable name of a state (for logging / JSON). Never returns nullptr. | |
| constexpr std::string_view | toString (OperationMode mode) |
Human-readable name of an operation mode (for logging / JSON). Never nullptr. | |
Variables | |
| constexpr uint16_t | kCommandMask = 0x008F |
| Controlword (0x6040) command-bit mask — the state-machine bits a transition touches. | |
| enum mm::node::cia402::Command : uint16_t |
Canonical controlword command-bit patterns (the value of the bits in kCommandMask).
| enum mm::node::cia402::Object : uint16_t |
Standard CiA402 object dictionary indices used by the drive profile.
Subindex is always 0 for these (they are simple objects), so callers pass 0.
|
strong |
CiA402 operation modes (object 0x6060 / 0x6061 values).
|
strong |
States of the CiA402 device control state machine (decoded from the statusword).
|
constexpr |
Decodes the CiA402 state machine state from a statusword (0x6041) value.
Pure function of the statusword's defined bits; uses the ETG.6010 mask/match table. An unrecognised pattern maps to State::kNotReadyToSwitchOn (the "no clear state" bucket).
|
constexpr |
Whether the statusword's fault bit (bit 3) is set, gated to the faulted states.
|
constexpr |
Human-readable name of an operation mode (for logging / JSON). Never nullptr.
|
constexpr |
Human-readable name of a state (for logging / JSON). Never returns nullptr.
|
constexpr |
Controlword (0x6040) command-bit mask — the state-machine bits a transition touches.
Bits 0 (switch on), 1 (enable voltage), 2 (quick stop), 3 (enable operation), 7 (fault reset). All other bits — mode-specific 4..6, halt 8, and manufacturer 9.. — are preserved across a transition by a read-modify-write masked with this value.