Commit 577c5b6f LN

打开防护门后自动更新菜单为暂停

1 个父辈 a5c33d50
...@@ -5,7 +5,6 @@ using System; ...@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
namespace DeviceLibrary namespace DeviceLibrary
{ {
public partial class MainMachine : IRobot public partial class MainMachine : IRobot
...@@ -474,8 +473,10 @@ namespace DeviceLibrary ...@@ -474,8 +473,10 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
UserPause = true; UserPause = true;
RobotManage.UpdateUserPause(UserPause);
} }
Msg.add("左侧NG料门没有关闭" + (ok ? ignorestring : ""), MsgLevel.alarm); Msg.add("左侧NG料门没有关闭" + (ok ? ignorestring : "")+ ",系统暂停", MsgLevel.alarm);
} }
if (IOValue(IO_Type.Right_NGDoor_Close_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.Right_NGDoor_Close_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -484,8 +485,9 @@ namespace DeviceLibrary ...@@ -484,8 +485,9 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
UserPause = true; UserPause = true;
RobotManage.UpdateUserPause(UserPause);
} }
Msg.add("右侧NG料门没有关闭" + (ok ? ignorestring : ""), MsgLevel.alarm); Msg.add("右侧NG料门没有关闭" + (ok ? ignorestring : "") + ",系统暂停", MsgLevel.alarm);
} }
if (!lastSafeCheckStatus && ok) if (!lastSafeCheckStatus && ok)
...@@ -749,7 +751,7 @@ namespace DeviceLibrary ...@@ -749,7 +751,7 @@ namespace DeviceLibrary
ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(pName); ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(pName);
if (position == null) if (position == null)
{ {
LogUtil.error(Name + " " + tray.ToStr() + " 找到匹配料架,但未找到库位号:" + pName + ",查找库位号:" + targetPosName); LogUtil.debug(Name + " " + tray.ToStr() + " 找到匹配料架,但未找到库位号:" + pName + ",查找库位号:" + targetPosName);
//判断库位号是否存在 //判断库位号是否存在
position = CSVPositionReader<ACStorePosition>.GetPositon(targetPosName); position = CSVPositionReader<ACStorePosition>.GetPositon(targetPosName);
...@@ -771,7 +773,7 @@ namespace DeviceLibrary ...@@ -771,7 +773,7 @@ namespace DeviceLibrary
} }
else else
{ {
LogUtil.info(Name + " " + tray.ToStr() + " 使用料架:" + targetPosName + ",更改料架为忙碌状态,开始放料 失败"); LogUtil.info(Name + " " + tray.ToStr() + " 使用料架:" + targetPosName + ",更改料架为忙碌状态,开始放料 失败 ,请检查料架状态");
} }
break; break;
} }
......
...@@ -178,6 +178,10 @@ namespace DeviceLibrary ...@@ -178,6 +178,10 @@ namespace DeviceLibrary
else else
LogUtil.info("用户取消暂停:"+ msg); LogUtil.info("用户取消暂停:"+ msg);
} }
public static void UpdateUserPause(bool userpause)
{
UserPauseSet?.Invoke(null, userpause);
}
public static void IgnoreSafecheck(bool s) public static void IgnoreSafecheck(bool s)
{ {
mainMachine.IgnoreSafecheck = s; mainMachine.IgnoreSafecheck = s;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!