Commit 93047e7c 张东亮

入库同时取料压紧轴不对,自动重置时不检查缓存口

1 个父辈 88993a4a
...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 重置(夹料装置状态不变) /// 重置(夹料装置状态不变)
/// </summary> /// </summary>
public abstract bool Reset(); public abstract bool Reset(bool checkSafe=true);
/// <summary> /// <summary>
/// 停止所有运动 /// 停止所有运动
......
...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
} }
public override bool Reset() public override bool Reset(bool checkSafe = true)
{ {
bool isNeedAllReset = false; bool isNeedAllReset = false;
if (isInSuddenDown || isNoAirpressure_Check) if (isInSuddenDown || isNoAirpressure_Check)
......
...@@ -54,7 +54,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -54,7 +54,7 @@ namespace OnlineStore.DeviceLibrary
{ {
StoreManager.XLRStore.boxEquip.paresetReset = false; StoreManager.XLRStore.boxEquip.paresetReset = false;
boxBean.LogInfo($"上料机构复位时请求料仓复位"); boxBean.LogInfo($"上料机构复位时请求料仓复位");
boxBean.Reset(); boxBean.Reset(false);
CurrInOutCount = 0; CurrInOutCount = 0;
} }
} }
...@@ -64,11 +64,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,11 +64,11 @@ namespace OnlineStore.DeviceLibrary
CurrInOutCount = 0; CurrInOutCount = 0;
if (storeMoveType == MoveType.InStore) if (storeMoveType == MoveType.InStore)
{ {
boxBean.Reset(); boxBean.Reset(false);
} }
if (storeMoveType == MoveType.OutStore) if (storeMoveType == MoveType.OutStore)
{ {
boxBean.Reset(); boxBean.Reset(false);
} }
StoreManager.XLRStore.boxEquip.paresetReset = false; StoreManager.XLRStore.boxEquip.paresetReset = false;
} }
......
...@@ -308,7 +308,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -308,7 +308,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep == StepEnum.Wait) if (MoveInfo.MoveStep == StepEnum.Wait)
{ {
LogInfo("料仓没有动作 开始重置"); LogInfo("料仓没有动作 开始重置");
Reset(); Reset(false);
} }
else else
{ {
...@@ -316,7 +316,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -316,7 +316,7 @@ namespace OnlineStore.DeviceLibrary
paresetReset = true; paresetReset = true;
} }
} }
public override bool Reset() public override bool Reset(bool checkSafe = true)
{ {
StopMove(); StopMove();
bool rtn = false; bool rtn = false;
...@@ -333,7 +333,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -333,7 +333,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo("开始重置: "); LogInfo("开始重置: ");
AutoInout.ClearCount(); AutoInout.ClearCount();
StartReset(); StartReset(checkSafe);
mainTimer.Enabled = true; mainTimer.Enabled = true;
return true; return true;
} }
...@@ -397,22 +397,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -397,22 +397,28 @@ namespace OnlineStore.DeviceLibrary
msg = sb.ToString(); msg = sb.ToString();
return !string.IsNullOrEmpty(msg); return !string.IsNullOrEmpty(msg);
} }
private void StartReset() private void StartReset(bool checkSafe=true)
{ {
if (HasDrawerInHook()) if (HasDrawerInHook())
{ {
System.Windows.Forms.MessageBox.Show("检测到拉取机构上的拉钩检测信号亮,不允许复位!", "警告"); System.Windows.Forms.MessageBox.Show("检测到拉取机构上的拉钩检测信号亮,不允许复位!", "警告");
LogInfo($"复位 {MoveInfo.SLog} :检测到拉取机构上的拉钩检测信号亮,不允许复位");
return; return;
} }
if (isFixOrBufferHasReel(out string msg1)) if (checkSafe)
{ {
System.Windows.Forms.MessageBox.Show($"不允许启动/复位{msg1}", "警告", if (isFixOrBufferHasReel(out string msg1))
System.Windows.Forms.MessageBoxButtons.OK); {
SetBoxStatus(DeviceStatus.None, RunStatus.Wait); System.Windows.Forms.MessageBox.Show($"不允许启动/复位{msg1}", "警告",
MoveInfo.NewMove(MoveType.None); System.Windows.Forms.MessageBoxButtons.OK);
LogInfo($"复位 {MoveInfo.SLog} :{msg1}"); SetBoxStatus(DeviceStatus.None, RunStatus.Wait);
return; MoveInfo.NewMove(MoveType.None);
LogInfo($"复位 {MoveInfo.SLog} :{msg1}");
return;
}
} }
if (!CanReset()) if (!CanReset())
if (System.Windows.Forms.MessageBox.Show("检测到可能的撞机风险,请确认进出轴上是否有抽屉!若无抽屉在进出轴上,可继续复位,是否继续?", "警告", if (System.Windows.Forms.MessageBox.Show("检测到可能的撞机风险,请确认进出轴上是否有抽屉!若无抽屉在进出轴上,可继续复位,是否继续?", "警告",
System.Windows.Forms.MessageBoxButtons.YesNo).Equals(System.Windows.Forms.DialogResult.No)) System.Windows.Forms.MessageBoxButtons.YesNo).Equals(System.Windows.Forms.DialogResult.No))
...@@ -431,6 +437,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -431,6 +437,8 @@ namespace OnlineStore.DeviceLibrary
LogInfo($"复位 {MoveInfo.SLog} :因信号异常,{msg}"); LogInfo($"复位 {MoveInfo.SLog} :因信号异常,{msg}");
return; return;
} }
SetWarnMsg(""); SetWarnMsg("");
alarmType = AlarmType.None; alarmType = AlarmType.None;
isInSuddenDown = false; isInSuddenDown = false;
......
...@@ -98,9 +98,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,9 +98,10 @@ namespace OnlineStore.DeviceLibrary
BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(MoveInfo.MoveParam.PosInfo.PosId); BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(MoveInfo.MoveParam.PosInfo.PosId);
if (position != null) if (position != null)
{ {
diff = position.BagHigh - MoveInfo.MoveParam.PosInfo.PlateH; var pH = MoveInfo.MoveParam.PosInfo.PlateTotalH == 0 ? MoveInfo.MoveParam.PosInfo.PlateH : MoveInfo.MoveParam.PosInfo.PlateTotalH;
diff = position.BagHigh - pH;
if (diff < 0) diff = 0; if (diff < 0) diff = 0;
LogInfo($"{MoveInfo.MoveParam.PosInfo.PosId}库位高度:{position.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfo.PlateH},差值:{diff},系数:{comAxis_offset}," + LogInfo($"{MoveInfo.MoveParam.PosInfo.PosId}库位高度:{position.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfo.PlateH},实际高度:{MoveInfo.MoveParam.PosInfo.PlateTotalH},差值:{diff},系数:{comAxis_offset}," +
$"实际值:{MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset}={MoveInfo.MoveParam.MoveP.ComAxis_AB_P3}加{diff * comAxis_offset}"); $"实际值:{MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset}={MoveInfo.MoveParam.MoveP.ComAxis_AB_P3}加{diff * comAxis_offset}");
} }
int target = MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset; int target = MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset;
...@@ -114,10 +115,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,10 +115,11 @@ namespace OnlineStore.DeviceLibrary
BoxPosition position1 = CSVPositionReader<BoxPosition>.GetPositon(MoveInfo.MoveParam.PosInfoBack.PosId); BoxPosition position1 = CSVPositionReader<BoxPosition>.GetPositon(MoveInfo.MoveParam.PosInfoBack.PosId);
if (position1 != null) if (position1 != null)
{ {
diff = position1.BagHigh - MoveInfo.MoveParam.PosInfoBack.PlateH; var pH = MoveInfo.MoveParam.PosInfo.PlateTotalH == 0 ? MoveInfo.MoveParam.PosInfo.PlateH : MoveInfo.MoveParam.PosInfo.PlateTotalH;
diff = position.BagHigh - pH;
if (diff < 0) diff = 0; if (diff < 0) diff = 0;
LogInfo($"{MoveInfo.MoveParam.PosInfoBack.PosId}库位高度:{position1.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfoBack.PlateH},差值:{diff}," + LogInfo($"{MoveInfo.MoveParam.PosInfo.PosId}库位高度:{position.BagHigh},料盘高度:{MoveInfo.MoveParam.PosInfo.PlateH},实际高度:{MoveInfo.MoveParam.PosInfo.PlateTotalH},差值:{diff},系数:{comAxis_offset}," +
$"实际值:{movep.ComAxis_AB_P3 + diff * comAxis_offset}={movep.ComAxis_AB_P3}加{diff * comAxis_offset}"); $"实际值:{MoveInfo.MoveParam.MoveP.ComAxis_AB_P3 + diff * comAxis_offset}={MoveInfo.MoveParam.MoveP.ComAxis_AB_P3}加{diff * comAxis_offset}");
} }
target = movep.ComAxis_AB_P3 + diff * comAxis_offset; target = movep.ComAxis_AB_P3 + diff * comAxis_offset;
if (isdebugSpeed) if (isdebugSpeed)
......
...@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary
StoreManager.XLRStore.boxEquip.SafeReset(); StoreManager.XLRStore.boxEquip.SafeReset();
} }
} }
public override bool Reset() public override bool Reset(bool checkSafe = true)
{ {
SetAllTimer(false); SetAllTimer(false);
StopMove(); StopMove();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!