|
Motion Master 6.0.0-alpha.50
Next-generation motion control software
|
Borrowed view of a SOMANET drive — a CiA402 drive plus Synapticon-specific object-dictionary access (encoder/motor configuration, commutation offset, etc.). More...
#include <somanet_drive.h>
Public Member Functions | |
| SomanetDrive (Device &device) | |
Binds an (unchecked) SOMANET view to device. Prefer createSomanetDrive. | |
Public Member Functions inherited from mm::node::Cia402Drive | |
| Cia402Drive (Device &device) | |
Binds an (unchecked) CiA402 view to device. Prefer createCia402Drive. | |
| std::expected< cia402::State, std::string > | state () const |
| Reads and decodes the current state machine state (statusword 0x6041). | |
| std::expected< uint16_t, std::string > | statusword () const |
| Reads the raw statusword (0x6041). | |
| std::expected< uint16_t, std::string > | controlword () const |
| Reads the last-commanded controlword (0x6040). | |
| std::expected< void, std::string > | setControlword (uint16_t value) |
| Writes the controlword (0x6040) verbatim. | |
| std::expected< cia402::OperationMode, std::string > | operationMode () const |
| Reads the active operation mode (display object 0x6061). | |
| std::expected< void, std::string > | setOperationMode (cia402::OperationMode mode) |
| Requests an operation mode (0x6060). The drive reflects it in 0x6061 once accepted. | |
| std::expected< void, std::string > | shutdown () |
| Shutdown: → ReadyToSwitchOn. | |
| std::expected< void, std::string > | switchOn () |
| Switch on: ReadyToSwitchOn → SwitchedOn (also disables operation from enabled). | |
| std::expected< void, std::string > | enableOperation () |
| Enable operation: SwitchedOn → OperationEnabled. | |
| std::expected< void, std::string > | disableVoltage () |
| Disable voltage: → SwitchOnDisabled. | |
| std::expected< void, std::string > | quickStop () |
| Quick stop: → QuickStopActive. | |
| std::expected< void, std::string > | faultReset () |
| Fault reset: pulses bit 7 (set then clear) to clear a latched fault. | |
| std::expected< void, std::string > | enable (std::chrono::milliseconds timeout=std::chrono::milliseconds(2000)) |
| Drives the state machine to OperationEnabled, walking every intermediate transition. | |
| std::expected< void, std::string > | disable () |
| Brings the drive to SwitchOnDisabled (disable voltage). Single transition. | |
| std::expected< void, std::string > | setTargetPosition (int32_t counts) |
| Writes target position (0x607A, INTEGER32) — CSP / PP. | |
| std::expected< void, std::string > | setTargetVelocity (int32_t value) |
| Writes target velocity (0x60FF, INTEGER32) — CSV / PV. | |
| std::expected< void, std::string > | setTargetTorque (int16_t perMille) |
| Writes target torque (0x6071, INTEGER16, per-mille of rated) — CST / PT. | |
| std::expected< int32_t, std::string > | positionActualValue () const |
| Reads actual position (0x6064, INTEGER32). | |
| std::expected< int32_t, std::string > | velocityActualValue () const |
| Reads actual velocity (0x606C, INTEGER32). | |
Public Member Functions inherited from mm::node::ProfileDevice | |
| ProfileDevice (Device &device) | |
Binds the view to device. The reference must outlive this view. | |
| Device & | device () |
| The underlying generic device this view operates on. | |
| const Device & | device () const |
Additional Inherited Members | |
Protected Attributes inherited from mm::node::ProfileDevice | |
| Device & | device_ |
| The borrowed device — the only data member permitted in the whole view chain. | |
Borrowed view of a SOMANET drive — a CiA402 drive plus Synapticon-specific object-dictionary access (encoder/motor configuration, commutation offset, etc.).
SOMANET drives implement CiA402 in full, so this is-a Cia402Drive and inherits the whole state machine and setpoint surface; it adds only the vendor-specific objects in the manufacturer range. Like every profile view it is a thin, stateless borrow over a Device (see ProfileDevice) — construct it for one operation and drop it.
Construct via createSomanetDrive, which checks the vendor ID before binding.
Multi-cycle procedures do not live here. Commutation-offset detection, auto-tuning, and the like are CyclicTask implementations that take a DeviceManager& and re-resolve their Device every cycle (a long-lived view would dangle across a bus rescan). The handler that owns the scheduler constructs and schedules such a task; this view's job is the synchronous, single-shot SOMANET object access that frames those procedures (reading/writing config, checking preconditions).
|
inlineexplicit |
Binds an (unchecked) SOMANET view to device. Prefer createSomanetDrive.