|
|
|
@ -250,11 +250,7 @@ void Manual_Up_State_Do(void) |
|
|
|
if (!Pin2) |
|
|
|
{ |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
KinfePosition = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
KinfePosition = 1000; //只要不是在步进模式下移动了主轴,且未在限位就恢复为未标定状态
|
|
|
|
KinfePosition = GV.LS_FrontEnd_Motor.Real_Position; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -275,10 +271,6 @@ void Manual_Down_State_Do(void) |
|
|
|
{ |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
KinfePosition = 1000; //只要不是在步进模式下移动了主轴,且未在限位就恢复为未标定状态
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 定义前端升降电机速度,单位0.1mm/s
|
|
|
|
@ -300,11 +292,7 @@ void Manual_Low_Speed_Up_State_Do(void) |
|
|
|
if (!Pin2) |
|
|
|
{ |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
KinfePosition = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
KinfePosition = 1000; //只要不是在步进模式下移动了主轴,且未在限位就恢复为未标定状态
|
|
|
|
KinfePosition = GV.LS_FrontEnd_Motor.Real_Position; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -325,13 +313,9 @@ void Manual_low_speed_Down_State_Do(void) |
|
|
|
{ |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
KinfePosition = 1000; //只要不是在步进模式下移动了主轴,且未在限位就恢复为未标定状态
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#define STEP_LEN_COUNT 18000 // 位置环每18000个count对应1mm
|
|
|
|
#define STEP_LEN_COUNT 20000 // 位置环每20000个count对应1mm
|
|
|
|
|
|
|
|
void Manual_step_Up_State_Do(void) |
|
|
|
{ |
|
|
|
@ -340,7 +324,6 @@ void Manual_step_Up_State_Do(void) |
|
|
|
int32_t SliderSpeed_PPS = SliderSpeed_mmps_2_pps(leisai_low_speed); |
|
|
|
GV.LS_FrontEnd_Motor.Target_Position = GV.LS_FrontEnd_Motor.Real_Position - (GV.PV.step_len * STEP_LEN_COUNT); |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = SliderSpeed_PPS; |
|
|
|
KinfePosition -= GV.PV.step_len; |
|
|
|
StrongSingleShotFlag = 1; |
|
|
|
} |
|
|
|
|
|
|
|
@ -354,7 +337,7 @@ void Manual_step_Up_State_Do(void) |
|
|
|
if (!Pin2) |
|
|
|
{ |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = 0; |
|
|
|
KinfePosition = 0; |
|
|
|
KinfePosition = GV.LS_FrontEnd_Motor.Real_Position; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -365,7 +348,6 @@ void Manual_step_Down_State_Do(void) |
|
|
|
int32_t SliderSpeed_PPS = SliderSpeed_mmps_2_pps(leisai_low_speed); |
|
|
|
GV.LS_FrontEnd_Motor.Target_Position = GV.LS_FrontEnd_Motor.Real_Position + (GV.PV.step_len * STEP_LEN_COUNT); |
|
|
|
GV.LS_FrontEnd_Motor.Target_Velcity = SliderSpeed_PPS; |
|
|
|
KinfePosition += GV.PV.step_len; |
|
|
|
StrongSingleShotFlag = 1; |
|
|
|
} |
|
|
|
|
|
|
|
|