Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
mm::node::Cia402Status Struct Reference

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...

#include <cia402_drive.h>

Collaboration diagram for mm::node::Cia402Status:
[legend]

Public Attributes

cia402::State state {}
 Decoded from the statusword (0x6041).
 
uint16_t statusword = 0
 Raw statusword (0x6041).
 
uint16_t controlword = 0
 Last-commanded controlword (0x6040).
 
cia402::OperationMode modeOfOperationDisplay {}
 
std::optional< int32_t > targetPosition
 
std::optional< int32_t > targetVelocity
 
std::optional< int32_t > targetTorque
 
std::optional< int32_t > actualPosition
 
std::optional< int32_t > actualVelocity
 
std::optional< int32_t > actualTorque
 
std::optional< std::string > errorDescription
 

Detailed Description

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.

Member Data Documentation

◆ actualPosition

std::optional<int32_t> mm::node::Cia402Status::actualPosition

◆ actualTorque

std::optional<int32_t> mm::node::Cia402Status::actualTorque

◆ actualVelocity

std::optional<int32_t> mm::node::Cia402Status::actualVelocity

◆ controlword

uint16_t mm::node::Cia402Status::controlword = 0

Last-commanded controlword (0x6040).

◆ errorDescription

std::optional<std::string> mm::node::Cia402Status::errorDescription

The drive's own description of its last fault, when the drive has an object for one. SOMANET keeps a short text in 0x203F:01, empty while there is no fault. nullopt means the drive has no such object, or the read failed; an empty string means the drive reports no fault. CiA402 names no such object, so readStatus leaves it empty and the control layer fills it.

◆ modeOfOperationDisplay

cia402::OperationMode mm::node::Cia402Status::modeOfOperationDisplay {}

Active operation mode (0x6061).

◆ state

cia402::State mm::node::Cia402Status::state {}

Decoded from the statusword (0x6041).

◆ statusword

uint16_t mm::node::Cia402Status::statusword = 0

Raw statusword (0x6041).

◆ targetPosition

std::optional<int32_t> mm::node::Cia402Status::targetPosition

The three targets and the three actual values, one pair per quantity: position 0x607A and 0x6064, velocity 0x60FF and 0x606C, torque 0x6071 and 0x6077 (INTEGER16 widened to int32). Every one is read, whatever the active mode; a reader picks the pair of the mode it is in. Each comes from the process image while the device exchanges, else over SDO. nullopt means the drive has no such object, or the read failed.

◆ targetTorque

std::optional<int32_t> mm::node::Cia402Status::targetTorque

◆ targetVelocity

std::optional<int32_t> mm::node::Cia402Status::targetVelocity

The documentation for this struct was generated from the following file: