|
|
@ -360,7 +360,7 @@ const uint32_t up_limit = 6200; |
|
|
const uint8_t down_limit = 0; |
|
|
const uint8_t down_limit = 0; |
|
|
|
|
|
|
|
|
uint8_t Pin2 = -1; //上限位,为0表示限位触发
|
|
|
uint8_t Pin2 = -1; //上限位,为0表示限位触发
|
|
|
uint8_t Pin3 = -1; //下限位,为0表示限位触发
|
|
|
uint8_t Test1 = 0; |
|
|
|
|
|
|
|
|
int32_t KinfePosition = 1000; // 初始化为一个不合理的大值,等于1000时显示为未标定
|
|
|
int32_t KinfePosition = 1000; // 初始化为一个不合理的大值,等于1000时显示为未标定
|
|
|
int StrongSingleShotFlag = 0; |
|
|
int StrongSingleShotFlag = 0; |
|
|
@ -371,11 +371,6 @@ extern uint8_t Mode_Init;// 初始化时第一次升刀的流程 |
|
|
|
|
|
|
|
|
static void LimitDownPosition(void) |
|
|
static void LimitDownPosition(void) |
|
|
{ |
|
|
{ |
|
|
if (!Pin3) |
|
|
|
|
|
{ |
|
|
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (GV.LS_FrontEnd_Motor.Real_Position - KinfePosition >= SAFE_MOTOR_COUNT) |
|
|
if (GV.LS_FrontEnd_Motor.Real_Position - KinfePosition >= SAFE_MOTOR_COUNT) |
|
|
{ |
|
|
{ |
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; // 电机脉冲数急停
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; // 电机脉冲数急停
|
|
|
|