Commit ca04aead 几米阳光

1

1 个父辈 321f205e
...@@ -309,19 +309,6 @@ namespace OnlineStore.AutoInOutStore ...@@ -309,19 +309,6 @@ namespace OnlineStore.AutoInOutStore
{ {
lblDoorStatus.Text = "仓门状态:关闭"; lblDoorStatus.Text = "仓门状态:关闭";
UpdateFormDoorStats(false); UpdateFormDoorStats(false);
//if (store.StoreMove.MoveType.Equals(StoreMoveType.None) && AutomaticBaiting.StoreMove.MoveType.Equals(StoreMoveType.None))
//{
// if (AutomaticBaiting.BatchOutStoreCount > 0)
// {
// btnGetOutTray.Enabled = true;
// btnBatchInStore.Enabled = false;
// }
// else
// {
// btnGetOutTray.Enabled = false;
// btnBatchInStore.Enabled = true;
// }
//}
} }
else else
{ {
...@@ -1577,37 +1564,36 @@ namespace OnlineStore.AutoInOutStore ...@@ -1577,37 +1564,36 @@ namespace OnlineStore.AutoInOutStore
} }
private void btnBatchInStore_Click(object sender, EventArgs e) private void btnBatchInStore_Click(object sender, EventArgs e)
{ {
if (!AutomaticBaiting.DoorStatus.Equals(1)) if (AutomaticBaiting.DoorStatus.Equals(1))
{ {
MessageBox.Show("请先关闭批量上下料门");
return; return;
} }
if (AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{ {
MessageBox.Show("请先关闭批量上下料门");
return;
}
AutomaticBaiting.IsNeedStartInout = true; AutomaticBaiting.IsNeedStartInout = true;
AutomaticBaiting.BatchDoorClose(false); AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset(); AutomaticBaiting.Reset();
} }
else
{
MessageBox.Show("请先关闭批量上下料门");
}
}
private void btnStartBatchInStore_Click(object sender, EventArgs e) private void btnStartBatchInStore_Click(object sender, EventArgs e)
{ {
if (!AutomaticBaiting.DoorStatus.Equals(1)) if (AutomaticBaiting.DoorStatus.Equals(1))
{ {
MessageBox.Show("请先关闭批量上下料门");
return; return;
} }
if (AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
}
else
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭批量上下料门");
return;
} }
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
} }
private void btnGetOutTray_Click(object sender, EventArgs e) private void btnGetOutTray_Click(object sender, EventArgs e)
{ {
...@@ -1630,20 +1616,19 @@ namespace OnlineStore.AutoInOutStore ...@@ -1630,20 +1616,19 @@ namespace OnlineStore.AutoInOutStore
private void btnBatchOutEnd_Click(object sender, EventArgs e) private void btnBatchOutEnd_Click(object sender, EventArgs e)
{ {
if (!AutomaticBaiting.DoorStatus.Equals(1)) if ( AutomaticBaiting.DoorStatus.Equals(1))
{ {
MessageBox.Show("请先关闭批量上下料门");
return; return;
} }
if (AutomaticBaiting.DoorIsClose()) if (!AutomaticBaiting.DoorIsClose())
{
AutomaticBaiting.BatchDoorClose(false);
bool result = AutomaticBaiting.Reset();
}
else
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭批量上下料门");
return;
} }
AutomaticBaiting.BatchDoorClose(false);
bool result = AutomaticBaiting.Reset();
} }
private void btnTempInit_Click(object sender, EventArgs e) private void btnTempInit_Click(object sender, EventArgs e)
......
...@@ -97,6 +97,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,6 +97,10 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isInSuddenDown.Equals(false)) if (isInSuddenDown.Equals(false))
{ {
LogUtil.error(LOGGER, StoreName + "收到急停信号,等待200后再次判断");
Thread.Sleep(200);
if (KND.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
isInSuddenDown = true; isInSuddenDown = true;
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停"); LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停");
WarnMsg = StoreName + "收到急停信号,报警急停"; WarnMsg = StoreName + "收到急停信号,报警急停";
...@@ -105,6 +109,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -105,6 +109,7 @@ namespace OnlineStore.DeviceLibrary
Alarm(StoreAlarmType.SuddenStop, "1", WarnMsg, StoreMoveType.None); Alarm(StoreAlarmType.SuddenStop, "1", WarnMsg, StoreMoveType.None);
} }
} }
}
else else
{ {
//光栅处理 //光栅处理
......
...@@ -108,6 +108,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -108,6 +108,10 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool Reset() public static bool Reset()
{ {
if (!StoreMove.MoveType.Equals(StoreMoveType.None))
{
StopMove();
}
string msg = CanStart(); string msg = CanStart();
if (!String.IsNullOrEmpty(msg)) if (!String.IsNullOrEmpty(msg))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!