Commit 8528c294 张东亮

存储机构回原前检查是行走机构是否在安全位置,不在弹框

1 个父辈 1c941b95
...@@ -11,6 +11,7 @@ using System.Security.Policy; ...@@ -11,6 +11,7 @@ using System.Security.Policy;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
...@@ -270,6 +271,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -270,6 +271,11 @@ namespace OnlineStore.DeviceLibrary
CloseAllAxis(); CloseAllAxis();
return false; return false;
} }
if (MoveAxis.GetAclPosition() < Config.MoveAxis_SafePos)
{
MessageBox.Show($"行走机构当前位置[{MoveAxis.GetAclPosition()}]小于安全位置[{Config.MoveAxis_SafePos}],无法回原,请先手动将行走机构移动到安全位置!");
return false;
}
if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.HIGH) && if (IOValue(IO_Type.LeftDoor_Limit).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.RightDoor_Limit).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.HIGH)) IOValue(IO_Type.BackDoor_Limit).Equals(IO_VALUE.HIGH))
...@@ -295,7 +301,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -295,7 +301,8 @@ namespace OnlineStore.DeviceLibrary
return true; return true;
} }
public bool paresetReset = false; public bool paresetReset = false;
public void SafeReset() { public void SafeReset()
{
if (MoveInfo.MoveStep == StepEnum.Wait) if (MoveInfo.MoveStep == StepEnum.Wait)
{ {
LogInfo("料仓没有动作 开始重置"); LogInfo("料仓没有动作 开始重置");
...@@ -346,6 +353,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -346,6 +353,7 @@ namespace OnlineStore.DeviceLibrary
System.Windows.Forms.MessageBox.Show("检测到拉取机构上的拉钩检测信号亮,不允许复位!", "警告"); System.Windows.Forms.MessageBox.Show("检测到拉取机构上的拉钩检测信号亮,不允许复位!", "警告");
return; 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))
...@@ -767,7 +775,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -767,7 +775,8 @@ namespace OnlineStore.DeviceLibrary
int SigLastTime = 7;//5秒 int SigLastTime = 7;//5秒
protected override void OnTimerProcess() protected override void OnTimerProcess()
{ {
if (ExecuteOutListProcess()) { if (ExecuteOutListProcess())
{
LogInfo("优先出库执行"); LogInfo("优先出库执行");
return; return;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!