Vortex Driver
API reference
Loading...
Searching...
No Matches
VortexProtocol.hpp
Go to the documentation of this file.
1
10#pragma once
11
12#include <cstdint>
13
14namespace hf::vortex {
15
17inline constexpr std::uint16_t kIdxErrorRegister = 0x1001U;
19inline constexpr std::uint16_t kIdxPredefError = 0x1003U;
21inline constexpr std::uint16_t kIdxErrorBehavior = 0x1029U;
22
24inline constexpr std::uint16_t kIdxControlword = 0x6040U;
26inline constexpr std::uint16_t kIdxStatusword = 0x6041U;
28inline constexpr std::uint16_t kIdxModesOfOperation = 0x6060U;
30inline constexpr std::uint16_t kIdxModesDisplay = 0x6061U;
32inline constexpr std::uint16_t kIdxPosActual = 0x6064U;
34inline constexpr std::uint16_t kIdxVelActual = 0x606CU;
35
40inline constexpr std::uint16_t kIdxVendorBase = 0x2000U;
42inline constexpr std::uint16_t kIdxVendorDeviceId = 0x2000U;
43inline constexpr std::uint8_t kSubVendorDeviceId = 0x01U;
44
46enum class NmtCommand : std::uint8_t {
47 Start = 0x01U,
48 Stop = 0x02U,
49 PreOperational = 0x80U,
50 ResetNode = 0x81U,
51 ResetCommunication = 0x82U,
52};
53
54} // namespace hf::vortex
Definition VortexCanFrame.hpp:12
NmtCommand
NMT command bytes (CANopen CiA 301)
Definition VortexProtocol.hpp:46
constexpr std::uint16_t kIdxStatusword
CiA 402 — Statusword (0x6041)
Definition VortexProtocol.hpp:26
constexpr std::uint16_t kIdxVendorBase
Proposed HardFOC vendor range 0x2000–0x2FFF, inside the CiA 301 manufacturer-specific area (0x2000–0x...
Definition VortexProtocol.hpp:40
constexpr std::uint16_t kIdxModesOfOperation
CiA 402 — Modes of operation (0x6060)
Definition VortexProtocol.hpp:28
constexpr std::uint16_t kIdxModesDisplay
CiA 402 — Modes of operation display (0x6061)
Definition VortexProtocol.hpp:30
constexpr std::uint16_t kIdxPosActual
CiA 402 — Position actual value (0x6064)
Definition VortexProtocol.hpp:32
constexpr std::uint16_t kIdxPredefError
CiA 301 — Pre-defined error field (0x1003) sub 0 = number of errors.
Definition VortexProtocol.hpp:19
constexpr std::uint8_t kSubVendorDeviceId
Definition VortexProtocol.hpp:43
constexpr std::uint16_t kIdxErrorRegister
CiA 301 — Error register (0x1001) subindex 0.
Definition VortexProtocol.hpp:17
constexpr std::uint16_t kIdxVelActual
CiA 402 — Velocity actual value (0x606C)
Definition VortexProtocol.hpp:34
constexpr std::uint16_t kIdxVendorDeviceId
Example: 0x2000:01 — u32 build id / device magic (placeholder)
Definition VortexProtocol.hpp:42
constexpr std::uint16_t kIdxErrorBehavior
CiA 301 — Error behavior (0x1029); sub 1 = communication error.
Definition VortexProtocol.hpp:21
constexpr std::uint16_t kIdxControlword
CiA 402 — Controlword (0x6040) — used for drive state machine.
Definition VortexProtocol.hpp:24