Commit e41de36c 刘韬
2 个父辈 3376dd04 6e99365f
...@@ -22,7 +22,7 @@ namespace DeviceLibrary ...@@ -22,7 +22,7 @@ namespace DeviceLibrary
string down; string down;
string saftylight; string saftylight;
string axisbreak; string axisbreak;
AxisBean axisBean; public AxisBean axisBean;
int upspeed; int upspeed;
int downspeed; int downspeed;
int StrokeLength = 270000; int StrokeLength = 270000;
......
...@@ -643,8 +643,8 @@ namespace DeviceLibrary ...@@ -643,8 +643,8 @@ namespace DeviceLibrary
// lastStringSafetyStatus = false; // lastStringSafetyStatus = false;
// StringDoor.Pause(); // StringDoor.Pause();
//} //}
ok = false; //ok = false;
DeviceSuddenStop(); StringDoorSuddenStop();
} }
//else if (!lastStringSafetyStatus) //else if (!lastStringSafetyStatus)
//{ //{
...@@ -711,7 +711,20 @@ namespace DeviceLibrary ...@@ -711,7 +711,20 @@ namespace DeviceLibrary
} }
} }
} }
void StringDoorSuddenStop()
{
//if (lastSafeCheckStatus)
{
AxisBean axis = StringDoor.axisBean;
AxisBean.StopMultiAxis(new List<AxisBean> { axis });
StringDoor.Pause();
if (runStatus == RunStatus.HomeReset)
{
ResetMoveInfo.NewMove(MoveStep.H01_HomeReset);
}
}
}
/// <summary> /// <summary>
/// 最后一次气压检测变为0的时间 /// 最后一次气压检测变为0的时间
/// </summary> /// </summary>
......
...@@ -245,11 +245,13 @@ namespace DeviceLibrary ...@@ -245,11 +245,13 @@ namespace DeviceLibrary
{ {
tpos2 = 0; tpos2 = 0;
} }
if (StringState == StringStateE.OutStore && tpos2 - Config.Batch_PoToMM * 60 < 0) int maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
int minPos1 = tpos2 - Config.Batch_PoToMM * maxReelHeight;
if (StringState == StringStateE.OutStore && minPos1 < 0)
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full; StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出"); StringMoveInfo.log($"料串已满可以送出,提升轴当前={Batch_Axis.GetAclPosition()},最小脉冲值={minPos1}");
} }
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed);
break; break;
...@@ -331,6 +333,7 @@ namespace DeviceLibrary ...@@ -331,6 +333,7 @@ namespace DeviceLibrary
var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM); var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM);
if (tpos < 0) if (tpos < 0)
tpos = 0; tpos = 0;
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
if (tpos < Config.Batch_P2 * 0.3 && !downCheck1) if (tpos < Config.Batch_P2 * 0.3 && !downCheck1)
{ {
StringMoveInfo.log($"料串下降到30%位置,重新上升"); StringMoveInfo.log($"料串下降到30%位置,重新上升");
...@@ -343,7 +346,7 @@ namespace DeviceLibrary ...@@ -343,7 +346,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01); StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
downCheck2 = true; downCheck2 = true;
} }
else if (tpos > Config.Batch_P1+ Config.Batch_PoToMM * 60) else if (tpos > Config.Batch_P1 + Config.Batch_PoToMM * maxReelHeight)
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut); StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut);
StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}cm"); StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}cm");
...@@ -359,7 +362,7 @@ namespace DeviceLibrary ...@@ -359,7 +362,7 @@ namespace DeviceLibrary
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full; StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出"); StringMoveInfo.log($"料串已满可以送出,提升轴当前位置={Batch_Axis.GetAclPosition()},最小脉冲值={tpos}");
} }
break; break;
case MoveStep.StringReelPut_01: case MoveStep.StringReelPut_01:
...@@ -389,10 +392,12 @@ namespace DeviceLibrary ...@@ -389,10 +392,12 @@ namespace DeviceLibrary
break; break;
case MoveStep.StringReelPut_05: case MoveStep.StringReelPut_05:
LastOutDownPosition = Batch_Axis.GetAclPosition(); LastOutDownPosition = Batch_Axis.GetAclPosition();
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM; var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM;
if (tpos3 < 0) if (tpos3 < 0)
tpos3 = 0; tpos3 = 0;
if (tpos3 > Config.Batch_P1+Config.Batch_PoToMM * 60) int minPos = Config.Batch_P1 + Config.Batch_PoToMM * maxReelHeight;
if (tpos3 > minPos)//料盘最大高度
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04b); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04b);
} }
...@@ -401,7 +406,7 @@ namespace DeviceLibrary ...@@ -401,7 +406,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full; StringState = StringStateE.Full;
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
StringMoveInfo.log($"料串已满可以送出"); StringMoveInfo.log($"料串已满可以送出,提升轴当前={tpos3},最小脉冲值={minPos}");
} }
break; break;
case MoveStep.StringOut_01: case MoveStep.StringOut_01:
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!