5#include <nlohmann/json_fwd.hpp>
138 std::expected<cia402::State, std::string>
state()
const;
141 std::expected<uint16_t, std::string>
statusword()
const;
144 std::expected<uint16_t, std::string>
controlword()
const;
154 std::expected<cia402::OperationMode, std::string>
operationMode()
const;
194 int8_t mode, std::chrono::milliseconds
timeout = std::chrono::milliseconds(200));
197 std::expected<Cia402Status, std::string>
readStatus()
const;
205 std::expected<void, std::string>
shutdown();
208 std::expected<void, std::string>
switchOn();
217 std::expected<void, std::string>
quickStop();
225 std::expected<void, std::string>
faultReset();
265 bool allowQuickStopOverride =
false);
276 std::expected<void, std::string>
enable(
277 std::chrono::milliseconds
timeout = std::chrono::milliseconds(2000));
280 std::expected<void, std::string>
disable();
297 std::expected<int16_t, std::string>
targetTorque()
const;
329 std::expected<uint16_t, std::string>
errorCode()
const;
392 std::expected<uint16_t, std::string>
maxTorque()
const;
395 std::expected<void, std::string>
setMaxTorque(uint16_t perMille);
398 std::expected<uint16_t, std::string>
maxCurrent()
const;
401 std::expected<void, std::string>
setMaxCurrent(uint16_t perMille);
404 std::expected<int16_t, std::string>
torqueDemand()
const;
428 std::expected<int32_t, std::string>
homeOffset()
const;
431 std::expected<void, std::string>
setHomeOffset(int32_t value);
440 std::expected<uint8_t, std::string>
polarity()
const;
443 std::expected<void, std::string>
setPolarity(uint8_t value);
482 std::expected<uint32_t, std::string>
torqueSlope()
const;
494 std::expected<GearRatio, std::string>
gearRatio()
const;
501 std::expected<FeedConstant, std::string>
feedConstant()
const;
508 std::expected<int8_t, std::string>
homingMethod()
const;
514 std::expected<HomingSpeeds, std::string>
homingSpeeds()
const;
538 std::expected<int16_t, std::string>
torqueOffset()
const;
583 std::expected<DigitalOutputs, std::string>
digitalOutputs()
const;
597 std::expected<void, std::string> applyCommand(uint16_t command);
Pure CiA402 (CANopen drive profile, ETG.6010) vocabulary — object indices, control/status word bit la...
Borrowed view of a CiA402 drive — the device control state machine, operation modes,...
Definition cia402_drive.h:132
std::expected< void, std::string > quickStop()
Quick stop: → QuickStopActive.
Definition cia402_drive.cc:280
std::expected< void, std::string > setMotorRatedCurrent(uint32_t milliamps)
Writes the motor rated current (0x6075, UNSIGNED32, mA).
Definition cia402_drive.cc:638
std::expected< int32_t, std::string > touchProbe1NegativeEdge() const
Reads the position latched at touch probe 1's falling edge (0x60BB, INTEGER32).
Definition cia402_drive.cc:907
std::expected< int8_t, std::string > operationModeValue() const
Reads the requested operation mode (0x6060) as its raw value.
Definition cia402_drive.cc:177
std::expected< int8_t, std::string > homingMethod() const
Reads the homing method (0x6098, INTEGER8).
Definition cia402_drive.cc:828
std::expected< PositionRangeLimit, std::string > positionRangeLimit() const
Reads the position range limit (0x607B) — both sub-entries.
Definition cia402_drive.cc:654
std::expected< int32_t, std::string > velocityOffset() const
Reads the velocity offset (0x60B1, INTEGER32) — CSP/CSV velocity feed-forward.
Definition cia402_drive.cc:875
std::expected< uint32_t, std::string > digitalInputs() const
Reads the digital inputs (0x60FD, UNSIGNED32) — input bit field.
Definition cia402_drive.cc:939
std::expected< int32_t, std::string > homeOffset() const
Reads the home offset (0x607C, INTEGER32).
Definition cia402_drive.cc:678
std::expected< void, std::string > setMotionProfileType(int16_t value)
Writes the motion profile type (0x6086, INTEGER16).
Definition cia402_drive.cc:762
std::expected< void, std::string > setVelocityThresholdTime(uint16_t value)
Writes the velocity threshold time (0x6070, UNSIGNED16, ms).
Definition cia402_drive.cc:610
std::expected< void, std::string > setPositionWindow(uint32_t value)
Writes the position window (0x6067, UNSIGNED32).
Definition cia402_drive.cc:566
std::expected< void, std::string > enableOperation()
Enable operation: SwitchedOn → OperationEnabled.
Definition cia402_drive.cc:272
std::expected< void, std::string > faultReset()
Fault reset: asserts the rising edge of controlword bit 7 to clear a latched fault.
Definition cia402_drive.cc:284
std::expected< void, std::string > setFollowingErrorTimeout(uint16_t value)
Writes the following error time out (0x6066, UNSIGNED16, ms).
Definition cia402_drive.cc:558
std::expected< void, std::string > setProfileDeceleration(uint32_t value)
Writes the profile deceleration (0x6084, UNSIGNED32).
Definition cia402_drive.cc:746
std::expected< uint32_t, std::string > profileDeceleration() const
Reads the profile deceleration (0x6084, UNSIGNED32).
Definition cia402_drive.cc:742
std::expected< void, std::string > setTorqueSlope(uint32_t value)
Writes the torque slope (0x6087, UNSIGNED32).
Definition cia402_drive.cc:770
std::expected< void, std::string > disable()
Brings the drive to SwitchOnDisabled (disable voltage). Single transition.
Definition cia402_drive.cc:323
std::expected< void, std::string > setVelocityWindowTime(uint16_t value)
Writes the velocity window time (0x606E, UNSIGNED16, ms).
Definition cia402_drive.cc:594
std::expected< uint32_t, std::string > dcLinkCircuitVoltage() const
Reads the DC link circuit voltage (0x6079, UNSIGNED32, mV).
Definition cia402_drive.cc:650
std::expected< uint16_t, std::string > followingErrorTimeout() const
Reads the following error time out (0x6066, UNSIGNED16, ms).
Definition cia402_drive.cc:554
std::expected< uint32_t, std::string > motorRatedTorque() const
Reads the motor rated torque (0x6076, UNSIGNED32, mNm).
Definition cia402_drive.cc:642
std::expected< void, std::string > shutdown()
Shutdown: → ReadyToSwitchOn.
Definition cia402_drive.cc:264
std::expected< uint16_t, std::string > touchProbeFunction() const
Reads the touch probe function (0x60B8, UNSIGNED16) — arm/config bits.
Definition cia402_drive.cc:891
std::expected< uint32_t, std::string > touchProbeTimeStamp1NegativeValue() const
Reads the time stamp of touch probe 1's falling edge (0x60D2, UNSIGNED32).
Definition cia402_drive.cc:915
std::expected< void, std::string > setQuickStopDeceleration(uint32_t value)
Writes the quick stop deceleration (0x6085, UNSIGNED32).
Definition cia402_drive.cc:754
std::expected< void, std::string > setVelocityOffset(int32_t value)
Writes the velocity offset (0x60B1, INTEGER32).
Definition cia402_drive.cc:879
std::expected< uint16_t, std::string > velocityWindow() const
Reads the velocity window (0x606D, UNSIGNED16) — the target-reached tolerance.
Definition cia402_drive.cc:582
std::expected< DigitalOutputs, std::string > digitalOutputs() const
Reads the digital outputs (0x60FE) — both sub-entries.
Definition cia402_drive.cc:943
std::expected< uint32_t, std::string > siUnitVelocity() const
Reads the SI unit velocity (0x60A9, UNSIGNED32) — the unit code of velocity objects.
Definition cia402_drive.cc:867
std::expected< int32_t, std::string > setTargetToActual(Cia402TargetKind kind)
Copies the actual value of kind into its target: 0x6064 into 0x607A, 0x606C into 0x60FF,...
Definition cia402_drive.cc:458
std::expected< GearRatio, std::string > gearRatio() const
Reads the gear ratio (0x6091) — both sub-entries.
Definition cia402_drive.cc:782
Cia402Drive(Device &device)
Binds an (unchecked) CiA402 view to device. Prefer createCia402Drive.
Definition cia402_drive.h:135
std::expected< void, std::string > disableVoltage()
Disable voltage: → SwitchOnDisabled.
Definition cia402_drive.cc:276
std::expected< void, std::string > setTorqueProfileType(int16_t value)
Writes the torque profile type (0x6088, INTEGER16).
Definition cia402_drive.cc:778
std::expected< void, std::string > setVelocityWindow(uint16_t value)
Writes the velocity window (0x606D, UNSIGNED16).
Definition cia402_drive.cc:586
std::expected< uint32_t, std::string > followingErrorWindow() const
Reads the following error window (0x6065, UNSIGNED32).
Definition cia402_drive.cc:546
std::expected< void, std::string > setMaxCurrent(uint16_t perMille)
Writes max current (0x6073, UNSIGNED16, per-mille of rated).
Definition cia402_drive.cc:626
std::expected< cia402::OperationMode, std::string > operationMode() const
Reads the active operation mode (display object 0x6061).
Definition cia402_drive.cc:165
std::expected< int16_t, std::string > torqueOffset() const
Reads the torque offset (0x60B2, INTEGER16) — torque feed-forward.
Definition cia402_drive.cc:883
std::expected< int32_t, std::string > followingErrorActualValue() const
Reads the following error actual value (0x60F4, INTEGER32).
Definition cia402_drive.cc:927
std::expected< void, std::string > setDigitalOutputs(const DigitalOutputs &outputs)
Writes the digital outputs (0x60FE) — levels first (inert while masked off), then the enable mask,...
Definition cia402_drive.cc:959
std::expected< int8_t, std::string > operationModeValueDisplay() const
Reads the active operation mode (0x6061) as its raw value — the display counterpart of operationModeV...
Definition cia402_drive.cc:181
std::expected< int16_t, std::string > motionProfileType() const
Reads the motion profile type (0x6086, INTEGER16).
Definition cia402_drive.cc:758
std::expected< void, std::string > setFeedConstant(const FeedConstant &constant)
Writes the feed constant (0x6092) — feed then shaft revolutions; aborts on first failure.
Definition cia402_drive.cc:821
std::expected< void, std::string > setSiUnitVelocity(uint32_t value)
Writes the SI unit velocity (0x60A9, UNSIGNED32).
Definition cia402_drive.cc:871
std::expected< uint32_t, std::string > supportedDriveModes() const
Reads the supported drive modes (0x6502, UNSIGNED32) — the capability bit field. Constant,...
Definition cia402_drive.cc:968
std::expected< void, std::string > setSoftwarePositionLimit(const SoftwarePositionLimit &limit)
Writes the software position limit (0x607D) — min then max; aborts on first failure.
Definition cia402_drive.cc:702
std::expected< void, std::string > transitionToState(cia402::State target, std::chrono::milliseconds timeout=std::chrono::milliseconds(2000), bool allowQuickStopOverride=false)
Drives the state machine to target, walking every intermediate transition.
Definition cia402_drive.cc:325
std::expected< int32_t, std::string > targetPosition() const
Reads the last-commanded target position (0x607A, INTEGER32).
Definition cia402_drive.cc:494
std::expected< uint16_t, std::string > positioningOptionCode() const
Reads the positioning option code (0x60F2, UNSIGNED16) — PP behaviour options.
Definition cia402_drive.cc:919
std::expected< void, std::string > setMaxMotorSpeed(uint32_t value)
Writes the max motor speed (0x6080, UNSIGNED32).
Definition cia402_drive.cc:722
std::expected< void, std::string > setProfileVelocity(uint32_t value)
Writes the profile velocity (0x6081, UNSIGNED32).
Definition cia402_drive.cc:730
std::expected< uint16_t, std::string > touchProbeStatus() const
Reads the touch probe status (0x60B9, UNSIGNED16) — latch status bits.
Definition cia402_drive.cc:899
std::expected< void, std::string > setMaxTorque(uint16_t perMille)
Writes max torque (0x6072, UNSIGNED16, per-mille of rated).
Definition cia402_drive.cc:618
std::expected< void, std::string > setHomingSpeeds(const HomingSpeeds &speeds)
Writes the homing speeds (0x6099) — switch then zero search; aborts on first failure.
Definition cia402_drive.cc:852
std::expected< void, std::string > setFollowingErrorWindow(uint32_t value)
Writes the following error window (0x6065, UNSIGNED32).
Definition cia402_drive.cc:550
std::expected< uint32_t, std::string > profileVelocity() const
Reads the profile velocity (0x6081, UNSIGNED32) — PP cruise velocity.
Definition cia402_drive.cc:726
std::expected< void, std::string > setTargetVelocity(int32_t value)
Writes target velocity (0x60FF, INTEGER32) — CSV / PV.
Definition cia402_drive.cc:506
std::expected< uint8_t, std::string > polarity() const
Reads the polarity (0x607E, UNSIGNED8) — position/velocity inversion bits.
Definition cia402_drive.cc:710
std::expected< void, std::string > setHomeOffset(int32_t value)
Writes the home offset (0x607C, INTEGER32).
Definition cia402_drive.cc:682
std::expected< uint32_t, std::string > positionWindow() const
Reads the position window (0x6067, UNSIGNED32) — the target-reached tolerance.
Definition cia402_drive.cc:562
std::expected< void, std::string > enable(std::chrono::milliseconds timeout=std::chrono::milliseconds(2000))
Drives the state machine to OperationEnabled.
Definition cia402_drive.cc:451
std::expected< void, std::string > setHomingMethod(int8_t method)
Writes the homing method (0x6098, INTEGER8).
Definition cia402_drive.cc:832
std::expected< uint16_t, std::string > errorCode() const
Reads the error code (0x603F, UNSIGNED16) — the code of the last drive fault.
Definition cia402_drive.cc:530
std::expected< uint16_t, std::string > positionWindowTime() const
Reads the position window time (0x6068, UNSIGNED16, ms).
Definition cia402_drive.cc:570
std::expected< int32_t, std::string > positionDemandInternalValue() const
Reads the position demand internal value (0x60FC, INTEGER32).
Definition cia402_drive.cc:935
std::expected< int16_t, std::string > torqueActualValue() const
Reads actual torque (0x6077, INTEGER16, per-mille of rated).
Definition cia402_drive.cc:526
std::expected< uint16_t, std::string > velocityThresholdTime() const
Reads the velocity threshold time (0x6070, UNSIGNED16, ms).
Definition cia402_drive.cc:606
std::expected< void, std::string > switchOn()
Switch on: ReadyToSwitchOn → SwitchedOn (also disables operation from enabled).
Definition cia402_drive.cc:268
std::expected< int32_t, std::string > touchProbe1PositiveEdge() const
Reads the position latched at touch probe 1's rising edge (0x60BA, INTEGER32).
Definition cia402_drive.cc:903
std::expected< uint32_t, std::string > profileAcceleration() const
Reads the profile acceleration (0x6083, UNSIGNED32).
Definition cia402_drive.cc:734
std::expected< int32_t, std::string > positionActualValue() const
Reads actual position (0x6064, INTEGER32).
Definition cia402_drive.cc:518
std::expected< uint32_t, std::string > homingAcceleration() const
Reads the homing acceleration (0x609A, UNSIGNED32).
Definition cia402_drive.cc:859
std::expected< uint16_t, std::string > maxTorque() const
Reads max torque (0x6072, UNSIGNED16, per-mille of rated).
Definition cia402_drive.cc:614
std::expected< void, std::string > setTargetTorque(int16_t perMille)
Writes target torque (0x6071, INTEGER16, per-mille of rated) — CST / PT.
Definition cia402_drive.cc:514
std::expected< uint16_t, std::string > velocityWindowTime() const
Reads the velocity window time (0x606E, UNSIGNED16, ms).
Definition cia402_drive.cc:590
std::expected< void, std::string > setTargetPosition(int32_t counts)
Writes target position (0x607A, INTEGER32) — CSP / PP.
Definition cia402_drive.cc:498
std::expected< void, std::string > applyOperationMode(int8_t mode, std::chrono::milliseconds timeout=std::chrono::milliseconds(200))
Writes mode to 0x6060 and waits until the drive reports it active in 0x6061.
Definition cia402_drive.cc:189
std::expected< int16_t, std::string > quickStopOptionCode() const
Reads the quick stop option code (0x605A, INTEGER16).
Definition cia402_drive.cc:534
std::expected< void, std::string > setTouchProbeFunction(uint16_t value)
Writes the touch probe function (0x60B8, UNSIGNED16).
Definition cia402_drive.cc:895
std::expected< uint32_t, std::string > quickStopDeceleration() const
Reads the quick stop deceleration (0x6085, UNSIGNED32).
Definition cia402_drive.cc:750
std::expected< void, std::string > setPositionRangeLimit(const PositionRangeLimit &limit)
Writes the position range limit (0x607B) — min then max; aborts on first failure.
Definition cia402_drive.cc:670
std::expected< uint32_t, std::string > touchProbeTimeStamp1PositiveValue() const
Reads the time stamp of touch probe 1's rising edge (0x60D1, UNSIGNED32).
Definition cia402_drive.cc:911
std::expected< void, std::string > setHomingAcceleration(uint32_t value)
Writes the homing acceleration (0x609A, UNSIGNED32).
Definition cia402_drive.cc:863
std::expected< cia402::State, std::string > state() const
Reads and decodes the current state machine state (statusword 0x6041).
Definition cia402_drive.cc:161
std::expected< uint16_t, std::string > statusword() const
Reads the raw statusword (0x6041).
Definition cia402_drive.cc:149
std::expected< HomingSpeeds, std::string > homingSpeeds() const
Reads the homing speeds (0x6099) — both sub-entries.
Definition cia402_drive.cc:836
std::expected< void, std::string > setOperationMode(cia402::OperationMode mode)
Requests an operation mode (0x6060). The drive reflects it in 0x6061 once accepted.
Definition cia402_drive.cc:173
std::expected< void, std::string > setVelocityThreshold(uint16_t value)
Writes the velocity threshold (0x606F, UNSIGNED16).
Definition cia402_drive.cc:602
std::expected< void, std::string > setPositioningOptionCode(uint16_t value)
Writes the positioning option code (0x60F2, UNSIGNED16).
Definition cia402_drive.cc:923
std::expected< uint32_t, std::string > maxMotorSpeed() const
Reads the max motor speed (0x6080, UNSIGNED32).
Definition cia402_drive.cc:718
std::expected< uint32_t, std::string > motorRatedCurrent() const
Reads the motor rated current (0x6075, UNSIGNED32, mA).
Definition cia402_drive.cc:634
std::expected< SoftwarePositionLimit, std::string > softwarePositionLimit() const
Reads the software position limit (0x607D) — both sub-entries.
Definition cia402_drive.cc:686
std::expected< int16_t, std::string > torqueDemand() const
Reads the torque demand (0x6074, INTEGER16) — control loop output.
Definition cia402_drive.cc:630
std::expected< int16_t, std::string > torqueProfileType() const
Reads the torque profile type (0x6088, INTEGER16).
Definition cia402_drive.cc:774
std::expected< uint16_t, std::string > controlword() const
Reads the last-commanded controlword (0x6040).
Definition cia402_drive.cc:153
std::expected< uint16_t, std::string > velocityThreshold() const
Reads the velocity threshold (0x606F, UNSIGNED16) — the standstill threshold.
Definition cia402_drive.cc:598
std::expected< uint16_t, std::string > maxCurrent() const
Reads max current (0x6073, UNSIGNED16, per-mille of rated).
Definition cia402_drive.cc:622
std::expected< void, std::string > setTorqueOffset(int16_t value)
Writes the torque offset (0x60B2, INTEGER16).
Definition cia402_drive.cc:887
std::expected< void, std::string > setPolarity(uint8_t value)
Writes the polarity (0x607E, UNSIGNED8).
Definition cia402_drive.cc:714
std::expected< void, std::string > setGearRatio(const GearRatio &ratio)
Writes the gear ratio (0x6091) — motor then shaft revolutions; aborts on first failure.
Definition cia402_drive.cc:798
std::expected< void, std::string > setPositionWindowTime(uint16_t value)
Writes the position window time (0x6068, UNSIGNED16, ms).
Definition cia402_drive.cc:574
std::expected< Cia402Status, std::string > readStatus() const
Reads state, statusword, controlword, and the active mode in one shot.
Definition cia402_drive.cc:218
std::expected< FeedConstant, std::string > feedConstant() const
Reads the feed constant (0x6092) — both sub-entries.
Definition cia402_drive.cc:805
std::expected< int32_t, std::string > targetVelocity() const
Reads the last-commanded target velocity (0x60FF, INTEGER32).
Definition cia402_drive.cc:502
std::expected< int32_t, std::string > positionDemandValue() const
Reads the position demand value (0x6062, INTEGER32) — trajectory generator output.
Definition cia402_drive.cc:542
std::expected< void, std::string > setControlword(uint16_t value)
Writes the controlword (0x6040) verbatim.
Definition cia402_drive.cc:157
std::expected< int32_t, std::string > controlEffort() const
Reads the control effort (0x60FA, INTEGER32) — position loop output.
Definition cia402_drive.cc:931
std::expected< void, std::string > setOperationModeValue(int8_t mode)
Writes a raw operation-mode value to 0x6060 — the counterpart of operationModeValue.
Definition cia402_drive.cc:185
std::expected< uint32_t, std::string > torqueSlope() const
Reads the torque slope (0x6087, UNSIGNED32) — PT torque ramp rate.
Definition cia402_drive.cc:766
std::expected< int32_t, std::string > velocityActualValue() const
Reads actual velocity (0x606C, INTEGER32).
Definition cia402_drive.cc:522
std::expected< int16_t, std::string > targetTorque() const
Reads the last-commanded target torque (0x6071, INTEGER16, per-mille of rated).
Definition cia402_drive.cc:510
std::expected< void, std::string > setProfileAcceleration(uint32_t value)
Writes the profile acceleration (0x6083, UNSIGNED32).
Definition cia402_drive.cc:738
std::expected< int32_t, std::string > velocityDemandValue() const
Reads the velocity demand value (0x606B, INTEGER32) — ramp generator output.
Definition cia402_drive.cc:578
std::expected< void, std::string > setQuickStopOptionCode(int16_t value)
Writes the quick stop option code (0x605A, INTEGER16) — the quick-stop reaction.
Definition cia402_drive.cc:538
std::expected< void, std::string > setMotorRatedTorque(uint32_t millinewtonMetres)
Writes the motor rated torque (0x6076, UNSIGNED32, mNm).
Definition cia402_drive.cc:646
Represents a single node on the fieldbus.
Definition device.h:120
Root of the drive-profile view hierarchy — a concrete, instantiable, borrowed view over a Device that...
Definition profile_device.h:151
Device & device()
The underlying generic device this view operates on.
Definition profile_device.h:157
OperationMode
CiA402 operation modes (object 0x6060 / 0x6061 values).
Definition cia402.h:98
State
States of the CiA402 device control state machine (decoded from the statusword).
Definition cia402.h:139
Definition bus_health_source.h:7
std::string_view toString(Cia402TargetKind kind)
The token parseCia402TargetKind reads, for a JSON answer.
Definition cia402_drive.cc:59
std::expected< Cia402Drive, std::string > createCia402Drive(Device &device)
Validates that device implements the CiA402 profile, then binds a view to it.
Definition cia402_drive.cc:972
std::optional< Cia402TargetKind > parseCia402TargetKind(std::string_view token)
Parses a target-kind token ("position" / "velocity" / "torque").
Definition cia402_drive.cc:46
Cia402Command
High-level state-machine actions a client can command (the named transitions a UI exposes as buttons)...
Definition cia402_drive.h:84
std::optional< Cia402Command > parseCia402Command(std::string_view token)
Parses a command token ("enable" / "disable" / "quickStop" / "faultReset").
Definition cia402_drive.cc:30
void to_json(nlohmann::json &j, const Cia402Status &s)
Serialises a Cia402Status. Emits state/modeName as human-readable strings alongside the numeric statu...
Definition cia402_drive.cc:13
std::optional< Cia402TargetKind > targetKindForMode(cia402::OperationMode mode)
The target kind an operation mode acts on: position for PP/CSP, velocity for PV/CSV,...
Definition cia402_drive.cc:71
Cia402TargetKind
Which cyclic setpoint a target write addresses. Exactly one is active at a time — the one matching th...
Definition cia402_drive.h:93
std::chrono::milliseconds timeout
Definition somanet_procedures.cc:464
A snapshot of a CiA402 drive's control state — the values a control UI needs to show at a glance: the...
Definition cia402_drive.h:19
cia402::State state
Decoded from the statusword (0x6041).
Definition cia402_drive.h:20
std::optional< int32_t > actualPosition
Definition cia402_drive.h:32
std::optional< std::string > errorDescription
Definition cia402_drive.h:39
std::optional< int32_t > targetVelocity
Definition cia402_drive.h:30
uint16_t controlword
Last-commanded controlword (0x6040).
Definition cia402_drive.h:22
std::optional< int32_t > actualVelocity
Definition cia402_drive.h:33
uint16_t statusword
Raw statusword (0x6041).
Definition cia402_drive.h:21
cia402::OperationMode modeOfOperationDisplay
Definition cia402_drive.h:23
std::optional< int32_t > targetTorque
Definition cia402_drive.h:31
std::optional< int32_t > targetPosition
Definition cia402_drive.h:29
std::optional< int32_t > actualTorque
Definition cia402_drive.h:34
Digital outputs (0x60FE) — commanded output levels gated by an enable mask.
Definition cia402_drive.h:77
uint32_t bitMask
0x60FE:02 — 1 = the corresponding output bit is driven.
Definition cia402_drive.h:79
uint32_t physicalOutputs
0x60FE:01 — commanded output bit levels.
Definition cia402_drive.h:78
Feed constant (0x6092) — feed (position units) per driving shaft revolutions.
Definition cia402_drive.h:65
uint32_t shaftRevolutions
0x6092:02 — denominator.
Definition cia402_drive.h:67
uint32_t feed
0x6092:01 — numerator.
Definition cia402_drive.h:66
Gear ratio (0x6091) — motor revolutions per driving shaft revolutions.
Definition cia402_drive.h:59
uint32_t shaftRevolutions
0x6091:02 — denominator.
Definition cia402_drive.h:61
uint32_t motorRevolutions
0x6091:01 — numerator.
Definition cia402_drive.h:60
Homing speeds (0x6099) — the two velocities of a homing run.
Definition cia402_drive.h:71
uint32_t switchSearch
0x6099:01 — speed during search for the reference switch.
Definition cia402_drive.h:72
uint32_t zeroSearch
0x6099:02 — speed during search for the zero position.
Definition cia402_drive.h:73
Position range limit (0x607B) — the range position values wrap around in.
Definition cia402_drive.h:47
int32_t max
0x607B:02 — max position range limit.
Definition cia402_drive.h:49
int32_t min
0x607B:01 — min position range limit.
Definition cia402_drive.h:48
Software position limit (0x607D) — the absolute end stops enforced in software.
Definition cia402_drive.h:53
int32_t min
0x607D:01 — min position limit.
Definition cia402_drive.h:54
int32_t max
0x607D:02 — max position limit.
Definition cia402_drive.h:55
What setCia402TargetToActual wrote: the kind it resolved and the value it copied.
Definition cia402_drive.h:108
int32_t value
Definition cia402_drive.h:110
Cia402TargetKind kind
Definition cia402_drive.h:109