电机驱动软件学习笔记——定义

//系统运行状态定义
#define  UP         1
#define  DOWN       2
#define  STOP       0
#define  NORMAL     0x10
#define  RESET      0x11
#define  ERROR      0x12

//电机控制命令定义
#define  CmdNull    0x00                //无任何命令
#define  CmdUp      0x20                //向上运动命令
#define  CmdDown    0x21                //向下运动命令
#define  CmdStop    0x22
#define  CmdSave    0x23                //存储命令
#define  CmdToPreseting  0x24           //运动到预设的位置命令
#define  CmdHealthModeOn  0x25          //开启健康模式
#define  CmdHealthModeOFF  0x26         //关闭健康模式

//系统错误定义
#define  Err_TimeEnd           0x0001   //运行时间到(连续运行2分钟)
#define  Err_Overheating       0x0002   //电机过热
#define  Err_M1Overcurrent     0x0003   //电机1过流
#define  Err_M2Overcurrent     0x0004   //电机2过流
#define  Err_M1Position        0x0005   //电机1位置故障
#define  Err_M2Position        0x0006   //电机2位置故障
#define  Err_M1OneHall         0x0007   //电机1单个HALL故障
#define  Err_M2OneHall         0x0008   //电机2单个HALL故障
#define  Err_M1TwoHall         0x0014   //电机1两个HALL全故障
#define  Err_M2TwoHall         0x0015   //电机2两个HALL全故障
#define  Err_M1AllWire         0x0016   //电机1HALL线和电源线全部故障
#define  Err_M2AllWire         0x0017   //电机2HALL线和电源线全部故障  
#define  Err_LSM6DSL           0x001E   //三轴传感器故障
#define  Err_Unbalance         0x0009   //桌面不平衡
#define  Err_RESET             0xffff   //复位状态时错误代码
#define  Err_Fall              0xfffe   //结构下滑
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值