ned3pro_stepper_reg.hpp
Go to the documentation of this file.
1 /*
2 ned3pro_stepper_reg.hpp
3 Copyright (C) 2024 Niryo
4 All rights reserved.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http:// www.gnu.org/licenses/>.
15 */
16 
17 #ifndef NED3PRO_STEPPER_REG_HPP
18 #define NED3PRO_STEPPER_REG_HPP
19 
20 #include <memory>
21 #include "common/model/hardware_type_enum.hpp"
22 #include "common/model/i_model_number_validator.hpp"
23 
24 namespace ttl_driver
25 {
39 {
40  static constexpr common::model::EHardwareType motor_type = common::model::EHardwareType::STEPPER;
41 
42  static constexpr float PROTOCOL_VERSION = 2.0;
43 
44  static constexpr int MODEL_NUMBER = 2100; // Primary/standard model number (joints)
45  static constexpr int MODEL_NUMBER_CONVEYOR = 2104; // Conveyor variant (different gear ratio)
46 
47  static constexpr int VOLTAGE_CONVERSION = 1000;
48 
49  static std::unique_ptr<common::model::IModelNumberValidator> createModelNumberValidator()
50  {
51  return std::make_unique<common::model::SetModelNumberValidator>(
52  std::initializer_list<uint16_t>{ MODEL_NUMBER, MODEL_NUMBER_CONVEYOR });
53  }
54 
55  // EEPROM
56 
57  static constexpr uint16_t ADDR_MODEL_NUMBER = 0;
58  using TYPE_MODEL_NUMBER = uint16_t;
59 
60  static constexpr uint16_t ADDR_ID = 7;
61  using TYPE_ID = uint8_t;
62 
63  static constexpr uint16_t ADDR_BAUDRATE = 8;
64  using TYPE_BAUDRATE = uint8_t;
65 
66  static constexpr uint16_t ADDR_OPERATING_MODE = 11;
67  using TYPE_OPERATING_MODE = uint8_t;
68 
69  static constexpr uint16_t ADDR_FIRMWARE_VERSION = 59;
70  using TYPE_FIRMWARE_VERSION = uint32_t;
71 
72  // RAM
73 
74  static constexpr uint16_t ADDR_TORQUE_ENABLE = 64;
75  using TYPE_TORQUE_ENABLE = uint8_t;
76 
77  static constexpr uint16_t ADDR_HW_ERROR_STATUS = 70;
78  using TYPE_HW_ERROR_STATUS = uint8_t;
79 
80  static constexpr float VELOCITY_UNIT = 0.001;
81  static constexpr uint16_t ADDR_GOAL_VELOCITY = 104;
82  using TYPE_GOAL_VELOCITY = uint32_t;
83 
84  // unit = 214.577 RPM2
85  static constexpr uint16_t ADDR_PROFILE_ACCELERATION = 108;
86  using TYPE_PROFILE_ACCELERATION = uint32_t;
87 
88  // unit = 0.001 RPM
89  static constexpr uint16_t ADDR_PROFILE_VELOCITY = 112;
90  using TYPE_PROFILE_VELOCITY = uint32_t;
91 
92  // unit = 0.001 deg
93  static constexpr uint16_t ADDR_GOAL_POSITION = 116;
94  using TYPE_GOAL_POSITION = uint32_t;
95 
96  // not used
97  static constexpr uint16_t ADDR_MOVING_STATUS = 123;
98  using TYPE_MOVING_STATUS = uint8_t;
99 
100  // unit = 0.001 RPM
101  static constexpr uint16_t ADDR_PRESENT_VELOCITY = 128;
102  using TYPE_PRESENT_VELOCITY = uint32_t;
103 
104  // unit = 0.001 deg
105  static constexpr uint16_t ADDR_PRESENT_POSITION = 132;
106  using TYPE_PRESENT_POSITION = uint32_t;
107 
108  // unit = 1mV
109  static constexpr uint16_t ADDR_PRESENT_VOLTAGE = 144;
110  using TYPE_PRESENT_VOLTAGE = uint16_t;
111 
112  static constexpr uint16_t ADDR_PRESENT_TEMPERATURE = 146;
113  using TYPE_PRESENT_TEMPERATURE = uint8_t;
114 
115  static constexpr uint16_t ADDR_CONTROL = 1536;
116  using TYPE_CONTROL = uint32_t;
117 
118  static constexpr uint16_t ADDR_STATUS = 1540;
119  using TYPE_STATUS = uint32_t;
120 
121  static constexpr uint16_t ADDR_ENC_ANGLE = 1544;
122  using TYPE_ENC_ANGLE = uint32_t;
123 
124  // Firmware status
125 
126  static constexpr uint16_t ADDR_FIRMWARE_RUNNING = 8192;
127  using TYPE_FIRMWARE_RUNNING = uint8_t;
128 
129  static constexpr uint16_t ADDR_ENTER_BOOTLOADER = 8193;
130  using TYPE_ENTER_BOOTLOADER = uint32_t;
131 
132  static constexpr uint16_t ADDR_OTA_BEGIN = 8197;
133  using TYPE_OTA_BEGIN = uint8_t;
134 
135  static constexpr uint16_t ADDR_OTA_WRITE = 8198;
136  using TYPE_OTA_WRITE = uint8_t[520];
137 
138  static constexpr uint16_t ADDR_OTA_END = 8718;
139  using TYPE_OTA_END = uint32_t;
140 
141  static constexpr uint16_t ADDR_OTA_ERASE = 8722;
142  using TYPE_OTA_ERASE = uint32_t;
143 };
144 } // namespace ttl_driver
145 
146 #endif // NED3PRO_STEPPER_REG_HPP
ttl_driver::Ned3ProStepperReg::TYPE_TORQUE_ENABLE
uint8_t TYPE_TORQUE_ENABLE
Definition: ned3pro_stepper_reg.hpp:75
ttl_driver::Ned3ProStepperReg::TYPE_ENC_ANGLE
uint32_t TYPE_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:122
ttl_driver::Ned3ProStepperReg::PROTOCOL_VERSION
static constexpr float PROTOCOL_VERSION
Definition: ned3pro_stepper_reg.hpp:42
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_VELOCITY
static constexpr uint16_t ADDR_PRESENT_VELOCITY
Definition: ned3pro_stepper_reg.hpp:101
ttl_driver::Ned3ProStepperReg::ADDR_ENTER_BOOTLOADER
static constexpr uint16_t ADDR_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:129
ttl_driver::Ned3ProStepperReg::ADDR_STATUS
static constexpr uint16_t ADDR_STATUS
Definition: ned3pro_stepper_reg.hpp:118
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VOLTAGE
uint16_t TYPE_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:110
ttl_driver::Ned3ProStepperReg::ADDR_ENC_ANGLE
static constexpr uint16_t ADDR_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:121
ttl_driver::Ned3ProStepperReg::ADDR_HW_ERROR_STATUS
static constexpr uint16_t ADDR_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:77
ttl_driver::Ned3ProStepperReg
Register definitions for Ned3Pro Stepper motor family.
Definition: ned3pro_stepper_reg.hpp:38
ttl_driver::Ned3ProStepperReg::ADDR_TORQUE_ENABLE
static constexpr uint16_t ADDR_TORQUE_ENABLE
Definition: ned3pro_stepper_reg.hpp:74
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_VELOCITY
uint32_t TYPE_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:90
ttl_driver::Ned3ProStepperReg::ADDR_OPERATING_MODE
static constexpr uint16_t ADDR_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:66
ttl_driver::Ned3ProStepperReg::VOLTAGE_CONVERSION
static constexpr int VOLTAGE_CONVERSION
Definition: ned3pro_stepper_reg.hpp:47
ttl_driver::Ned3ProStepperReg::ADDR_OTA_ERASE
static constexpr uint16_t ADDR_OTA_ERASE
Definition: ned3pro_stepper_reg.hpp:141
ttl_driver::Ned3ProStepperReg::TYPE_HW_ERROR_STATUS
uint8_t TYPE_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:78
ttl_driver::Ned3ProStepperReg::TYPE_FIRMWARE_VERSION
uint32_t TYPE_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:70
ttl_driver::Ned3ProStepperReg::TYPE_STATUS
uint32_t TYPE_STATUS
Definition: ned3pro_stepper_reg.hpp:119
ttl_driver::Ned3ProStepperReg::ADDR_MODEL_NUMBER
static constexpr uint16_t ADDR_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:57
ttl_driver::Ned3ProStepperReg::TYPE_OTA_BEGIN
uint8_t TYPE_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:133
ttl_driver::Ned3ProStepperReg::motor_type
static constexpr common::model::EHardwareType motor_type
Definition: ned3pro_stepper_reg.hpp:40
ttl_driver::Ned3ProStepperReg::TYPE_OTA_ERASE
uint32_t TYPE_OTA_ERASE
Definition: ned3pro_stepper_reg.hpp:142
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_TEMPERATURE
static constexpr uint16_t ADDR_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:112
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_POSITION
static constexpr uint16_t ADDR_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:105
ttl_driver::Ned3ProStepperReg::MODEL_NUMBER
static constexpr int MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:44
ttl_driver::Ned3ProStepperReg::ADDR_CONTROL
static constexpr uint16_t ADDR_CONTROL
Definition: ned3pro_stepper_reg.hpp:115
ttl_driver::Ned3ProStepperReg::MODEL_NUMBER_CONVEYOR
static constexpr int MODEL_NUMBER_CONVEYOR
Definition: ned3pro_stepper_reg.hpp:45
ttl_driver::Ned3ProStepperReg::TYPE_FIRMWARE_RUNNING
uint8_t TYPE_FIRMWARE_RUNNING
Definition: ned3pro_stepper_reg.hpp:127
ttl_driver::Ned3ProStepperReg::TYPE_ID
uint8_t TYPE_ID
Definition: ned3pro_stepper_reg.hpp:61
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_ACCELERATION
uint32_t TYPE_PROFILE_ACCELERATION
Definition: ned3pro_stepper_reg.hpp:86
ttl_driver::Ned3ProStepperReg::TYPE_OTA_WRITE
uint8_t[520] TYPE_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:136
ttl_driver::Ned3ProStepperReg::TYPE_OPERATING_MODE
uint8_t TYPE_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:67
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_RUNNING
static constexpr uint16_t ADDR_FIRMWARE_RUNNING
Definition: ned3pro_stepper_reg.hpp:126
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_VERSION
static constexpr uint16_t ADDR_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:69
ttl_driver
Definition: abstract_dxl_driver.hpp:30
ttl_driver::Ned3ProStepperReg::ADDR_PROFILE_ACCELERATION
static constexpr uint16_t ADDR_PROFILE_ACCELERATION
Definition: ned3pro_stepper_reg.hpp:85
ttl_driver::Ned3ProStepperReg::ADDR_PROFILE_VELOCITY
static constexpr uint16_t ADDR_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:89
ttl_driver::Ned3ProStepperReg::TYPE_MODEL_NUMBER
uint16_t TYPE_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:58
ttl_driver::Ned3ProStepperReg::ADDR_OTA_BEGIN
static constexpr uint16_t ADDR_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:132
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_TEMPERATURE
uint8_t TYPE_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:113
ttl_driver::Ned3ProStepperReg::ADDR_ID
static constexpr uint16_t ADDR_ID
Definition: ned3pro_stepper_reg.hpp:60
ttl_driver::Ned3ProStepperReg::TYPE_CONTROL
uint32_t TYPE_CONTROL
Definition: ned3pro_stepper_reg.hpp:116
ttl_driver::Ned3ProStepperReg::ADDR_OTA_WRITE
static constexpr uint16_t ADDR_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:135
ttl_driver::Ned3ProStepperReg::VELOCITY_UNIT
static constexpr float VELOCITY_UNIT
Definition: ned3pro_stepper_reg.hpp:80
ttl_driver::Ned3ProStepperReg::ADDR_BAUDRATE
static constexpr uint16_t ADDR_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:63
ttl_driver::Ned3ProStepperReg::TYPE_MOVING_STATUS
uint8_t TYPE_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:98
ttl_driver::Ned3ProStepperReg::TYPE_BAUDRATE
uint8_t TYPE_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:64
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_POSITION
static constexpr uint16_t ADDR_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:93
ttl_driver::Ned3ProStepperReg::TYPE_OTA_END
uint32_t TYPE_OTA_END
Definition: ned3pro_stepper_reg.hpp:139
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_VELOCITY
uint32_t TYPE_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:82
ttl_driver::Ned3ProStepperReg::ADDR_OTA_END
static constexpr uint16_t ADDR_OTA_END
Definition: ned3pro_stepper_reg.hpp:138
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_VOLTAGE
static constexpr uint16_t ADDR_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:109
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_VELOCITY
static constexpr uint16_t ADDR_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:81
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_POSITION
uint32_t TYPE_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:94
ttl_driver::Ned3ProStepperReg::TYPE_ENTER_BOOTLOADER
uint32_t TYPE_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:130
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_POSITION
uint32_t TYPE_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:106
ttl_driver::Ned3ProStepperReg::ADDR_MOVING_STATUS
static constexpr uint16_t ADDR_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:97
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VELOCITY
uint32_t TYPE_PRESENT_VELOCITY
Definition: ned3pro_stepper_reg.hpp:102
ttl_driver::Ned3ProStepperReg::createModelNumberValidator
static std::unique_ptr< common::model::IModelNumberValidator > createModelNumberValidator()
Definition: ned3pro_stepper_reg.hpp:49


ttl_driver
Author(s): Clement Cocquempot
autogenerated on Fri Mar 6 2026 15:24:15