Commit 6e99365f 张东亮

开放料盘最大厚度配置

1 个父辈 2eceb880
......@@ -245,11 +245,13 @@ namespace DeviceLibrary
{
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);
StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出");
StringMoveInfo.log($"料串已满可以送出,提升轴当前={Batch_Axis.GetAclPosition()},最小脉冲值={minPos1}");
}
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed);
break;
......@@ -331,6 +333,7 @@ namespace DeviceLibrary
var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM);
if (tpos < 0)
tpos = 0;
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
if (tpos < Config.Batch_P2 * 0.3 && !downCheck1)
{
StringMoveInfo.log($"料串下降到30%位置,重新上升");
......@@ -343,7 +346,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
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.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}cm");
......@@ -359,7 +362,7 @@ namespace DeviceLibrary
{
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出");
StringMoveInfo.log($"料串已满可以送出,提升轴当前位置={Batch_Axis.GetAclPosition()},最小脉冲值={tpos}");
}
break;
case MoveStep.StringReelPut_01:
......@@ -389,11 +392,11 @@ namespace DeviceLibrary
break;
case MoveStep.StringReelPut_05:
LastOutDownPosition = Batch_Axis.GetAclPosition();
int maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM;
if (tpos3 < 0)
tpos3 = 0;
int minPos= Config.Batch_P1 + Config.Batch_PoToMM * maxReelHeight;
int minPos = Config.Batch_P1 + Config.Batch_PoToMM * maxReelHeight;
if (tpos3 > minPos)//料盘最大高度
{
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04b);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!