Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
cia402_drive.h File Reference
#include <chrono>
#include <expected>
#include <nlohmann/json_fwd.hpp>
#include <optional>
#include <string>
#include <string_view>
#include "node/cia402.h"
#include "node/profile_device.h"
Include dependency graph for cia402_drive.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mm::node::Cia402Status
 A snapshot of a CiA402 drive's control state — the values a control UI needs to show at a glance: the decoded state machine state, the raw status/control words, the active operation mode (display object 0x6061), and the setpoint currently commanded for that mode. Read in one shot by Cia402Drive::readStatus. More...
 
struct  mm::node::PositionRangeLimit
 Position range limit (0x607B) — the range position values wrap around in. More...
 
struct  mm::node::SoftwarePositionLimit
 Software position limit (0x607D) — the absolute end stops enforced in software. More...
 
struct  mm::node::GearRatio
 Gear ratio (0x6091) — motor revolutions per driving shaft revolutions. More...
 
struct  mm::node::FeedConstant
 Feed constant (0x6092) — feed (position units) per driving shaft revolutions. More...
 
struct  mm::node::HomingSpeeds
 Homing speeds (0x6099) — the two velocities of a homing run. More...
 
struct  mm::node::DigitalOutputs
 Digital outputs (0x60FE) — commanded output levels gated by an enable mask. More...
 
class  mm::node::Cia402Drive
 Borrowed view of a CiA402 drive — the device control state machine, operation modes, and the standard cyclic setpoints, expressed over a Device's parameter access. More...
 

Namespaces

namespace  mm
 
namespace  mm::node
 

Enumerations

enum class  mm::node::Cia402Command { mm::node::kEnable , mm::node::kDisable , mm::node::kQuickStop , mm::node::kFaultReset }
 High-level state-machine actions a client can command (the named transitions a UI exposes as buttons). Distinct from cia402::Command (raw controlword bit patterns). More...
 
enum class  mm::node::Cia402TargetKind { mm::node::kPosition , mm::node::kVelocity , mm::node::kTorque }
 Which cyclic setpoint a target write addresses. Exactly one is active at a time — the one matching the drive's operation mode (position for PP/CSP, velocity for PV/CSV, torque for PT/CST) — so a target write names its kind rather than setting all three. More...
 

Functions

void mm::node::to_json (nlohmann::json &j, const Cia402Status &s)
 Serialises a Cia402Status. Emits state/modeName as human-readable strings alongside the numeric statusword, controlword, and modeOfOperation.
 
std::optional< Cia402Commandmm::node::parseCia402Command (std::string_view token)
 Parses a command token ("enable" / "disable" / "quickStop" / "faultReset").
 
std::optional< Cia402TargetKindmm::node::parseCia402TargetKind (std::string_view token)
 Parses a target-kind token ("position" / "velocity" / "torque").
 
std::expected< Cia402Drive, std::string > mm::node::createCia402Drive (Device &device)
 Validates that device implements the CiA402 profile, then binds a view to it.