CANopen device documentation
PCW-25
|
|
Project File |
pcw.xdd |
File Version |
5 |
Created |
2025/4/10 18:04:22 |
Created By |
|
Modified |
2025/6/16 11:11:29 |
Modified By |
|
This file was automatically generated by CANopenEditor v4.2.3-0-gc1071ab+c1071ab3197f9bbf718123ec5bbabf449b2f7bab
|
|
Vendor Name |
hexfellow |
Vendor ID |
0x00686578 |
Product Name |
PCW-25 |
Product ID |
0x19776370 |
Granularity |
8 |
RPDO count |
0 |
TPDO count |
0 |
LSS Slave |
False |
LSS Master |
False |
NG Slave |
False |
NG Master |
False |
Supported Baud rates
- [ ] 10 kBit/s
- [ ] 20 kBit/s
- [ ] 50 kBit/s
- [ ] 125 kBit/s
- [ ] 250 kBit/s
- [ ] 500 kBit/s
- [ ] 800 kBit/s
- [x] 1000 kBit/s
- [ ] auto
PDO Mapping
Communication Specific Parameters
Manufacturer Specific Parameters
0x3000 - Write Sink
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
rw |
r |
no |
0 |
Unused entry
0x3001 - Timeout
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED32 |
rw |
no |
no |
500 |
表示超时保护的时长。默认值为500,单位为毫秒(ms)。
Indicates the duration of the timeout protection. The default value is 500, measured in milliseconds (ms).
0x3100 - Motor1 Motor Error Code
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
ro |
t |
no |
0 |
Every bit means some error:
fn u8_to_errors(error_code: u8) -> Vec<i32> {
let mut ret = vec![];
if error_code & 0b1 != 0 {
ret.push(MotorError::MeCommunicationError as i32);
}
if error_code & 0b10 != 0 {
ret.push(MotorError::MeOverVoltage as i32);
}
if error_code & 0b100 != 0 {
ret.push(MotorError::MeUnderVoltage as i32);
}
if error_code & 0b1000 != 0 {
ret.push(MotorError::MeOverCurrent as i32);
}
if error_code & 0b10000 != 0 {
ret.push(MotorError::MeDriverOverTemperature as i32);
}
if error_code & 0b100000 != 0 {
ret.push(MotorError::MeMotorOverTemperature as i32);
}
if error_code & 0b1000000 != 0 {
ret.push(MotorError::MeGeneralError as i32);
}
ret
}
0x3101 - Motor1 Motion Info Output Axis Position
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
t |
no |
0x02 |
0x01 |
Output Axis Encoder Resolution |
UNSIGNED32 |
ro |
t |
no |
0 |
0x02 |
Output Axis Position |
INTEGER32 |
ro |
t |
no |
0 |
Motor Output Shaft Position Parameters
-
Sub-index 0x01
- Description: Encoder resolution
- Unit: Pulse/Revolution (P/Rev)
- Function: Defines total encoder pulses per revolution
-
Sub-index 0x02
- Description: Current position value
- Unit: Encoder pulses (Pulse)
- Calculation:
Current revolution = Sub-index 0x02 value / Sub-index 0x01 value
电机输出轴位置参数说明
-
子索引 0x01
- 描述:编码器分辨率
- 单位:脉冲数/转(Pulse/Revolution)
- 功能:定义每转对应的编码器脉冲总数
-
子索引 0x02
- 描述:当前位置值
- 单位:编码器脉冲数(Pulse)
- 计算说明:
当前位置圈数 = 子索引 0x02 值 / 子索引 0x01 值
0x3103 - Motor1 Motion Info Output Axis Speed
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x03 |
0x01 |
Output Axis Speed |
INTEGER16 |
ro |
t |
no |
0 |
0x02 |
Output Axis Speed Min |
REAL32 |
ro |
t |
no |
0 |
0x03 |
Output Axis Speed Max |
REAL32 |
ro |
t |
no |
0 |
Provides information about the output shaft speed:
- Sub-index 0x01: Actual data with a value range of -32767 to 32767 (Note: Not
i16::MIN
(-32768)).
- Sub-index 0x02: Floating-point speed value in rad/s when Sub-index 0x01 is -32767.
- Sub-index 0x03: Floating-point speed value in rad/s when Sub-index 0x01 is 32767.
Rust code is provided below for converting between i16
and float
data types.
提供关于输出轴转速的信息:
- 子索引 0x01:实际数据,取值范围为 -32767 ~ 32767(注意:不是
i16::MIN
(-32768))。
- 子索引 0x02:当子索引 0x01 为 -32767 时,以 rad/s 为单位的浮点格式转速值。
- 子索引 0x03:当子索引 0x01 为 32767 时,以 rad/s 为单位的浮点格式转速值。
下方附有 Rust 代码,用于实现 i16
与 float
的相互转换。
fn float_to_i16(x: f32, x_min: f32, x_max: f32) -> i16 {
let x = x.clamp(x_min, x_max);
let scale = 65534.0f32; // 32767 * 2
let span = x_max - x_min;
(((x - x_min) as f32 * scale / span) - 32767.0f32) as i16
}
fn i16_to_float(x: i16, x_min: f32, x_max: f32) -> f32 {
let x = if x == -32768 { -32767 } else { x };
let scale = 65534.0f32; // 32767 * 2
let span = x_max - x_min;
x_min + (x as f32 + 32767.0f32) * span / scale
}
0x3105 - Motor1 Motion Info Output Axis Torque
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x03 |
0x01 |
Output Axis Torque |
INTEGER16 |
ro |
t |
no |
0 |
0x02 |
Output Axis Torque Min |
REAL32 |
ro |
t |
no |
0 |
0x03 |
Output Axis Torque Max |
REAL32 |
ro |
t |
no |
0 |
Provide information about the output shaft torque.
- Sub-index 0x01: Actual data with a value range of -32767 to 32767 (Note: Not
i16::MIN
(-32768)).
- Sub-index 0x02: Floating-point torque value in N·m when Sub-index 0x01 is -32767.
- Sub-index 0x03: Floating-point torque value in N·m when Sub-index 0x01 is 32767.
Special Cases:
- If Sub-index 0x02 or 0x03 is IEEE 754 NaN (note: NaN values are not unique; in C++, use
std::isnan
, and Python has its own check functions), it means Sub-index 0x01 cannot provide torque information in metric units and instead represents a percentage mapping.
- When Sub-index 0x01 = -32767, it indicates the maximum negative torque.
- When Sub-index 0x01 = 32767, it indicates the maximum positive torque.
Below is the Rust code for converting between i16
and float
.
提供关于输出轴力矩的信息。
- 子索引 0x01:实际数据,取值范围为 -32767 ~ 32767(注意:不是
i16::MIN
(-32768))。
- 子索引 0x02:当子索引 0x01 为 -32767 时,以 N·m 为单位的浮点格式力矩值。
- 子索引 0x03:当子索引 0x01 为 32767 时,以 N·m 为单位的浮点格式力矩值。
特殊情况说明:
- 如果子索引 0x02 或 0x03 的值为 IEEE 754 NaN(注意:NaN 值不唯一;C++ 可用
std::isnan
,Python 也有相应判断函数),则表示子索引 0x01 无法提供公制单位的力矩信息,仅支持百分比映射。
- 当子索引 0x01 = -32767 时,表示负向最大力矩。
- 当子索引 0x01 = 32767 时,表示正向最大力矩。
下方附有 Rust 代码,用于实现 i16
与 float
的相互转换。
fn float_to_i16(x: f32, x_min: f32, x_max: f32) -> i16 {
let x = x.clamp(x_min, x_max);
let scale = 65534.0f32; // 32767 * 2
let span = x_max - x_min;
(((x - x_min) as f32 * scale / span) - 32767.0f32) as i16
}
fn i16_to_float(x: i16, x_min: f32, x_max: f32) -> f32 {
let x = if x == -32768 { -32767 } else { x };
let scale = 65534.0f32; // 32767 * 2
let span = x_max - x_min;
x_min + (x as f32 + 32767.0f32) * span / scale
}
0x3106 - Motor1 Motor Temp
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x02 |
0x01 |
Temp |
UNSIGNED8 |
ro |
t |
no |
0 |
0x02 |
Zero Point |
INTEGER16 |
ro |
t |
no |
0 |
Provide motor temperature information:
- Sub-index 0x02: Zero-point reference value in °C (Celsius).
- Sub-index 0x01: Temperature offset value relative to the zero point.
Example:
If Sub-index 0x02 = -20 and Sub-index 0x01 = 50, the actual temperature is 30°C (-20 + 50 = 30).
提供电机温度信息:
- 子索引 0x02:零点基准值,单位为 ℃(摄氏度)。
- 子索引 0x01:基于零点的温度偏移值。
示例:
当 子索引 0x02 = -20 且 子索引 0x01 = 50 时,实际温度值为 30℃(-20 + 50 = 30)。
0x3107 - Motor1 Driver Temp
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x02 |
0x01 |
Temp |
UNSIGNED8 |
ro |
t |
no |
0 |
0x02 |
Zero Point |
INTEGER16 |
ro |
t |
no |
0 |
Provide driver temperature information:
- Sub-index 0x02: Zero-point reference value in °C (Celsius).
- Sub-index 0x01: Temperature offset value relative to the zero point.
Example:
If Sub-index 0x02 = -20 and Sub-index 0x01 = 50, the actual temperature is 30°C (-20 + 50 = 30).
提供驱动器温度信息:
- 子索引 0x02:零点基准值,单位为 ℃(摄氏度)。
- 子索引 0x01:基于零点的温度偏移值。
示例:
当 子索引 0x02 = -20 且 子索引 0x01 = 50 时,实际温度值为 30℃(-20 + 50 = 30)。
0x3110 - Motor2 Motor Error Code
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
ro |
t |
no |
0 |
0x3111 - Motor2 Motion Info Output Axis Position
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
t |
no |
0x02 |
0x01 |
Output Axis Encoder Resolution |
UNSIGNED32 |
ro |
t |
no |
0 |
0x02 |
Output Axis Position |
INTEGER32 |
ro |
t |
no |
0 |
0x3113 - Motor2 Motion Info Output Axis Speed
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x03 |
0x01 |
Output Axis Speed |
UNSIGNED16 |
ro |
t |
no |
0 |
0x02 |
Output Axis Speed Min |
REAL32 |
ro |
t |
no |
0 |
0x03 |
Output Axis Speed Max |
REAL32 |
ro |
t |
no |
0 |
0x3115 - Motor2 Motion Info Output Axis Torque
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x03 |
0x01 |
Output Axis Torque |
UNSIGNED16 |
ro |
t |
no |
0 |
0x02 |
Output Axis Torque Min |
REAL32 |
ro |
t |
no |
0 |
0x03 |
Output Axis Torque Max |
REAL32 |
ro |
t |
no |
0 |
0x3116 - Motor2 Motor Temp
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x02 |
0x01 |
Temp |
UNSIGNED8 |
ro |
t |
no |
0 |
0x02 |
Zero Point |
INTEGER16 |
ro |
t |
no |
0 |
0x3117 - Motor2 Driver Temp
Object Type |
Count Label |
Storage Group |
RECORD |
|
RAM |
Sub |
Name |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
0x00 |
Highest sub-index supported |
UNSIGNED8 |
ro |
no |
no |
0x02 |
0x01 |
Temp |
UNSIGNED8 |
ro |
t |
no |
0 |
0x02 |
Zero Point |
INTEGER16 |
ro |
t |
no |
0 |
0x3200 - Motor1 Motor Control Mode
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
rw |
tr |
no |
0 |
The target control mode of the motor:
- 00 Lock (will apply mechanical brake, if any)
- 01 Position
- 02 Speed
- 03 Torque
- 04 MIT
电机的目标控制模式:
- 00 锁定模式(若配备机械制动器,将触发制动)
- 01 位置模式
- 02 速度模式
- 03 力矩模式
- 04 MIT位置模式
0x3201 - Motor1 Position Control Target Position
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
INTEGER32 |
rw |
tr |
no |
0 |
Motor Target Position Parameter (Position Mode Only)
- Sub-index 0x00
- Description: Motor target position setting
- Unit: Encoder pulses (Pulse)
- Valid condition: Effective only in position control mode
- Data type: 32-bit integer (INT32)
- Note: This parameter sets the target position for the motor
电机目标位置参数(位置模式专用)
- 子索引 0x00
- 描述:电机目标位置设定值
- 单位:编码器脉冲数(Pulse)
- 有效条件:仅在位置控制模式下生效
- 数据类型:32位整型(INT32)
- 备注:该参数用于设定电机需要到达的目标位置
0x3203 - Motor1 Speed Control Target Speed
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED16 |
rw |
tr |
no |
0 |
Motor Output Shaft Target Speed Parameter (Speed Mode Only)
- Sub-index 0x00
- Description: Target speed setting for motor output shaft
- Data type: 16-bit integer (INT16) mapped to floating-point
- Mapping rule: Consistent with the definition in Object Dictionary 0x3103
- Value range: Defined by Object Dictionary 0x3103 (refer to 0x3103 specifications)
- Valid condition: Effective only in speed control mode
- Notes:
- Requires fixed conversion formula to transform INT16 raw value to actual speed value
- Refer to Object Dictionary 0x3103 technical specifications for conversion details
电机输出轴目标转速参数(速度模式专用)
- 子索引 0x00
- 描述:电机输出轴目标转速设定值
- 数据类型:16位整型(INT16)映射至浮点数
- 映射规则:与对象字典 0x3103 定义的映射规则一致
- 数值范围:由对象字典 0x3103 定义(请参考 0x3103 详细说明)
- 有效条件:仅在速度控制模式下生效
- 注意事项:
- 需通过固定转换公式将 INT16 原始值转为实际转速值
- 具体转换方法参见对象字典 0x3103 技术规范
0x3205 - Motor1 Torque Control Target Torque
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED16 |
rw |
tr |
no |
0 |
Motor Output Shaft Target Torque Parameter (Torque Mode Only)
- Sub-index 0x00
- Description: Target torque setting for motor output shaft
- Data type: 16-bit integer (INT16) mapped to floating-point
- Mapping rule: Consistent with the definition in Object Dictionary 0x3105
- Value range: Defined by Object Dictionary 0x3105 (refer to 0x3105 specifications)
- Valid condition: Effective only in torque control mode
- Notes:
- Requires fixed conversion formula to transform INT16 raw value to actual torque value
- Refer to Object Dictionary 0x3105 technical specifications for conversion details
电机输出轴目标力矩参数(力矩模式专用)
- 子索引 0x00
- 描述:电机输出轴目标力矩设定值
- 数据类型:16位整型(INT16)映射至浮点数
- 映射规则:与对象字典 0x3105 定义的映射规则一致
- 数值范围:由对象字典 0x3105 定义(请参考 0x3105 详细说明)
- 有效条件:仅在力矩控制模式下生效
- 注意事项:
- 需通过固定转换公式将 INT16 原始值转为实际力矩值
- 具体转换方法参见对象字典 0x3105 技术规范
0x3210 - Motor2 Motor Control Mode
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
rw |
tr |
no |
0 |
0x3211 - Motor2 Position Control Target Position
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
INTEGER32 |
rw |
tr |
no |
0 |
0x3213 - Motor2 Speed Control Target Speed
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED16 |
rw |
tr |
no |
0 |
0x3215 - Motor2 Torque Control Target Torque
Object Type |
Count Label |
Storage Group |
VAR |
|
RAM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED16 |
rw |
tr |
no |
0 |
0x3A00 - COB-ID used for motor control
Object Type |
Count Label |
Storage Group |
VAR |
|
PERSIST_COMM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED32 |
ro |
no |
no |
0x181 |
指定用于电机控制的CAN ID。默认为0x181。暂时为只读。
Specifies the CAN ID used for motor control. The default is 0x181. Currently read-only.
0x3A01 - PCW Number Count
Object Type |
Count Label |
Storage Group |
VAR |
|
PERSIST_COMM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED8 |
rw |
no |
no |
1 |
指定同一个控制ID将会控制多少个舵轮模组。默认值为1。有效范围为0到4。
Specifies how many steering wheel modules a single control ID will manage. The default value is 1. Valid range is 0 to 4.
0x3A02 - Current Device Index
Object Type |
Count Label |
Storage Group |
VAR |
|
PERSIST_COMM |
Data Type |
SDO |
PDO |
SRDO |
Default Value |
UNSIGNED32 |
rw |
no |
no |
0 |
当前设备是第几个设备。默认为0,值必须小于索引3A01的值。
Indicates the device number of the current device. The default is 0, and the value must be less than the value at index 3A01.