#ifndef TURNTAABLE_H #define TURNTAABLE_H #ifdef __cplusplus extern "C" { #endif #define LIMIT_SPEED_INDEX 0x7017//CSP的速度 #define LOC_REF_INDEX 0x7016//CSP的位置 #define RUM_MODE 0x7005//mode模式 #define OPERATION_MODE 0 // 运控模式 #define POSITION_MODE_PP 1 // 位置模式 (PP - Profile Position) #define VELOCITY_MODE 2 // 速度模式 #define CURRENT_MODE 3 // 电流模式 #define POSITION_MODE_CSP 5 // 位置模式 (CSP - Cyclic Synchronous Position) // canoe协议输出 typedef struct _StrSdoOutput { //-----发送数据0x601---------------------------------------------- uint16_t index; //索引,类似寄存器地址 uint16_t object_index; // 从索引 为0x0000 uint32_t data; // 数据 } StrRS04Output; typedef union _UnSdoOutput { StrSdoOutput bit_data; // 使用定义的结构体变量名 uint8_t arr[sizeof(StrSdoOutput)]; // 通过结构体类型确定大小 } UnRS04Output; #ifdef __cplusplus } #endif #endif // TURNTAABLE_H