Commit ca04aead 几米阳光

1

1 个父辈 321f205e
...@@ -308,20 +308,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -308,20 +308,7 @@ namespace OnlineStore.AutoInOutStore
if (AutomaticBaiting.DoorStatus.Equals(2)) if (AutomaticBaiting.DoorStatus.Equals(2))
{ {
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())
{
AutomaticBaiting.IsNeedStartInout = true;
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
}
else
{ {
MessageBox.Show("请先关闭批量上下料门"); MessageBox.Show("请先关闭批量上下料门");
} return;
}
AutomaticBaiting.IsNeedStartInout = true;
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset();
} }
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,12 +97,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,12 +97,17 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isInSuddenDown.Equals(false)) if (isInSuddenDown.Equals(false))
{ {
isInSuddenDown = true; LogUtil.error(LOGGER, StoreName + "收到急停信号,等待200后再次判断");
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停"); Thread.Sleep(200);
WarnMsg = StoreName + "收到急停信号,报警急停"; if (KND.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
isInSuddenDown = true;
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停");
WarnMsg = StoreName + "收到急停信号,报警急停";
//报警时会关闭所有轴 //报警时会关闭所有轴
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!