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 
56  // EEPROM
57 
58  static constexpr uint16_t ADDR_MODEL_NUMBER = 0;
59  using TYPE_MODEL_NUMBER = uint16_t;
60 
61  static constexpr uint16_t ADDR_ID = 7;
62  using TYPE_ID = uint8_t;
63 
64  static constexpr uint16_t ADDR_BAUDRATE = 8;
65  using TYPE_BAUDRATE = uint8_t;
66 
67  static constexpr uint16_t ADDR_OPERATING_MODE = 11;
68  using TYPE_OPERATING_MODE = uint8_t;
69 
70  static constexpr uint16_t ADDR_FIRMWARE_VERSION = 59;
71  using TYPE_FIRMWARE_VERSION = uint32_t;
72 
73  // RAM
74 
75  static constexpr uint16_t ADDR_TORQUE_ENABLE = 64;
76  using TYPE_TORQUE_ENABLE = uint8_t;
77 
78  static constexpr uint16_t ADDR_HW_ERROR_STATUS = 70;
79  using TYPE_HW_ERROR_STATUS = uint8_t;
80 
81  static constexpr float VELOCITY_UNIT = 0.001;
82  static constexpr uint16_t ADDR_GOAL_VELOCITY = 104;
83  using TYPE_GOAL_VELOCITY = uint32_t;
84 
85  // unit = 214.577 RPM2
86  static constexpr uint16_t ADDR_PROFILE_ACCELERATION = 108;
87  using TYPE_PROFILE_ACCELERATION = uint32_t;
88 
89  // unit = 0.001 RPM
90  static constexpr uint16_t ADDR_PROFILE_VELOCITY = 112;
91  using TYPE_PROFILE_VELOCITY = uint32_t;
92 
93  // unit = 0.001 deg
94  static constexpr uint16_t ADDR_GOAL_POSITION = 116;
95  using TYPE_GOAL_POSITION = uint32_t;
96 
97  // not used
98  static constexpr uint16_t ADDR_MOVING_STATUS = 123;
99  using TYPE_MOVING_STATUS = uint8_t;
100 
101  // unit = 0.001 RPM
102  static constexpr uint16_t ADDR_PRESENT_VELOCITY = 128;
103  using TYPE_PRESENT_VELOCITY = uint32_t;
104 
105  // unit = 0.001 deg
106  static constexpr uint16_t ADDR_PRESENT_POSITION = 132;
107  using TYPE_PRESENT_POSITION = uint32_t;
108 
109  // unit = 1mV
110  static constexpr uint16_t ADDR_PRESENT_VOLTAGE = 144;
111  using TYPE_PRESENT_VOLTAGE = uint16_t;
112 
113  static constexpr uint16_t ADDR_PRESENT_TEMPERATURE = 146;
114  using TYPE_PRESENT_TEMPERATURE = uint8_t;
115 
116  static constexpr uint16_t ADDR_CONTROL = 1536;
117  using TYPE_CONTROL = uint32_t;
118 
119  static constexpr uint16_t ADDR_STATUS = 1540;
120  using TYPE_STATUS = uint32_t;
121 
122  static constexpr uint16_t ADDR_ENC_ANGLE = 1544;
123  using TYPE_ENC_ANGLE = uint32_t;
124 
125  // Firmware status
126 
127  static constexpr uint16_t ADDR_FIRMWARE_RUNNING = 8192;
128  using TYPE_FIRMWARE_RUNNING = uint8_t;
129 
130  static constexpr uint16_t ADDR_ENTER_BOOTLOADER = 8193;
131  using TYPE_ENTER_BOOTLOADER = uint32_t;
132 
133  static constexpr uint16_t ADDR_OTA_BEGIN = 8197;
134  using TYPE_OTA_BEGIN = uint8_t;
135 
136  static constexpr uint16_t ADDR_OTA_WRITE = 8198;
137  using TYPE_OTA_WRITE = uint8_t[520];
138 
139  static constexpr uint16_t ADDR_OTA_END = 8718;
140  using TYPE_OTA_END = uint32_t;
141 
142  static constexpr uint16_t ADDR_OTA_ERASE = 8722;
143  using TYPE_OTA_ERASE = uint32_t;
144  };
145 } // ttl_driver
146 
147 #endif // NED3PRO_STEPPER_REG_HPP
ttl_driver::Ned3ProStepperReg::TYPE_TORQUE_ENABLE
uint8_t TYPE_TORQUE_ENABLE
Definition: ned3pro_stepper_reg.hpp:76
ttl_driver::Ned3ProStepperReg::TYPE_ENC_ANGLE
uint32_t TYPE_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:123
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:102
ttl_driver::Ned3ProStepperReg::ADDR_ENTER_BOOTLOADER
static constexpr uint16_t ADDR_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:130
ttl_driver::Ned3ProStepperReg::ADDR_STATUS
static constexpr uint16_t ADDR_STATUS
Definition: ned3pro_stepper_reg.hpp:119
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VOLTAGE
uint16_t TYPE_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:111
ttl_driver::Ned3ProStepperReg::ADDR_ENC_ANGLE
static constexpr uint16_t ADDR_ENC_ANGLE
Definition: ned3pro_stepper_reg.hpp:122
ttl_driver::Ned3ProStepperReg::ADDR_HW_ERROR_STATUS
static constexpr uint16_t ADDR_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:78
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:75
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_VELOCITY
uint32_t TYPE_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:91
ttl_driver::Ned3ProStepperReg::ADDR_OPERATING_MODE
static constexpr uint16_t ADDR_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:67
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:142
ttl_driver::Ned3ProStepperReg::TYPE_HW_ERROR_STATUS
uint8_t TYPE_HW_ERROR_STATUS
Definition: ned3pro_stepper_reg.hpp:79
ttl_driver::Ned3ProStepperReg::TYPE_FIRMWARE_VERSION
uint32_t TYPE_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:71
ttl_driver::Ned3ProStepperReg::TYPE_STATUS
uint32_t TYPE_STATUS
Definition: ned3pro_stepper_reg.hpp:120
ttl_driver::Ned3ProStepperReg::ADDR_MODEL_NUMBER
static constexpr uint16_t ADDR_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:58
ttl_driver::Ned3ProStepperReg::TYPE_OTA_BEGIN
uint8_t TYPE_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:134
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:143
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_TEMPERATURE
static constexpr uint16_t ADDR_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:113
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_POSITION
static constexpr uint16_t ADDR_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:106
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:116
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:128
ttl_driver::Ned3ProStepperReg::TYPE_ID
uint8_t TYPE_ID
Definition: ned3pro_stepper_reg.hpp:62
ttl_driver::Ned3ProStepperReg::TYPE_PROFILE_ACCELERATION
uint32_t TYPE_PROFILE_ACCELERATION
Definition: ned3pro_stepper_reg.hpp:87
ttl_driver::Ned3ProStepperReg::TYPE_OTA_WRITE
uint8_t[520] TYPE_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:137
ttl_driver::Ned3ProStepperReg::TYPE_OPERATING_MODE
uint8_t TYPE_OPERATING_MODE
Definition: ned3pro_stepper_reg.hpp:68
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_RUNNING
static constexpr uint16_t ADDR_FIRMWARE_RUNNING
Definition: ned3pro_stepper_reg.hpp:127
ttl_driver::Ned3ProStepperReg::ADDR_FIRMWARE_VERSION
static constexpr uint16_t ADDR_FIRMWARE_VERSION
Definition: ned3pro_stepper_reg.hpp:70
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:86
ttl_driver::Ned3ProStepperReg::ADDR_PROFILE_VELOCITY
static constexpr uint16_t ADDR_PROFILE_VELOCITY
Definition: ned3pro_stepper_reg.hpp:90
ttl_driver::Ned3ProStepperReg::TYPE_MODEL_NUMBER
uint16_t TYPE_MODEL_NUMBER
Definition: ned3pro_stepper_reg.hpp:59
ttl_driver::Ned3ProStepperReg::ADDR_OTA_BEGIN
static constexpr uint16_t ADDR_OTA_BEGIN
Definition: ned3pro_stepper_reg.hpp:133
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_TEMPERATURE
uint8_t TYPE_PRESENT_TEMPERATURE
Definition: ned3pro_stepper_reg.hpp:114
ttl_driver::Ned3ProStepperReg::ADDR_ID
static constexpr uint16_t ADDR_ID
Definition: ned3pro_stepper_reg.hpp:61
ttl_driver::Ned3ProStepperReg::TYPE_CONTROL
uint32_t TYPE_CONTROL
Definition: ned3pro_stepper_reg.hpp:117
ttl_driver::Ned3ProStepperReg::ADDR_OTA_WRITE
static constexpr uint16_t ADDR_OTA_WRITE
Definition: ned3pro_stepper_reg.hpp:136
ttl_driver::Ned3ProStepperReg::VELOCITY_UNIT
static constexpr float VELOCITY_UNIT
Definition: ned3pro_stepper_reg.hpp:81
ttl_driver::Ned3ProStepperReg::ADDR_BAUDRATE
static constexpr uint16_t ADDR_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:64
ttl_driver::Ned3ProStepperReg::TYPE_MOVING_STATUS
uint8_t TYPE_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:99
ttl_driver::Ned3ProStepperReg::TYPE_BAUDRATE
uint8_t TYPE_BAUDRATE
Definition: ned3pro_stepper_reg.hpp:65
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_POSITION
static constexpr uint16_t ADDR_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:94
ttl_driver::Ned3ProStepperReg::TYPE_OTA_END
uint32_t TYPE_OTA_END
Definition: ned3pro_stepper_reg.hpp:140
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_VELOCITY
uint32_t TYPE_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:83
ttl_driver::Ned3ProStepperReg::ADDR_OTA_END
static constexpr uint16_t ADDR_OTA_END
Definition: ned3pro_stepper_reg.hpp:139
ttl_driver::Ned3ProStepperReg::ADDR_PRESENT_VOLTAGE
static constexpr uint16_t ADDR_PRESENT_VOLTAGE
Definition: ned3pro_stepper_reg.hpp:110
ttl_driver::Ned3ProStepperReg::ADDR_GOAL_VELOCITY
static constexpr uint16_t ADDR_GOAL_VELOCITY
Definition: ned3pro_stepper_reg.hpp:82
ttl_driver::Ned3ProStepperReg::TYPE_GOAL_POSITION
uint32_t TYPE_GOAL_POSITION
Definition: ned3pro_stepper_reg.hpp:95
ttl_driver::Ned3ProStepperReg::TYPE_ENTER_BOOTLOADER
uint32_t TYPE_ENTER_BOOTLOADER
Definition: ned3pro_stepper_reg.hpp:131
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_POSITION
uint32_t TYPE_PRESENT_POSITION
Definition: ned3pro_stepper_reg.hpp:107
ttl_driver::Ned3ProStepperReg::ADDR_MOVING_STATUS
static constexpr uint16_t ADDR_MOVING_STATUS
Definition: ned3pro_stepper_reg.hpp:98
ttl_driver::Ned3ProStepperReg::TYPE_PRESENT_VELOCITY
uint32_t TYPE_PRESENT_VELOCITY
Definition: ned3pro_stepper_reg.hpp:103
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 Tue Jan 13 2026 12:43:08