Commit 0da9290e 张东亮
2 个父辈 7794e5e5 ad492ae2
......@@ -13,6 +13,7 @@ namespace OnlineStore.DeviceLibrary
{
public abstract class DeviceBase
{
public DateTime LastAlarmTime = DateTime.Now;
public RunStatus runStatus = RunStatus.Wait;
public string WarnMsg = "";
......
......@@ -42,6 +42,10 @@ namespace OnlineStore.DeviceLibrary
{
LastAlarmTime = DateTime.Now;
}
if (alarmType.Equals(AlarmType.None).Equals(false))
{
LastAlarmTime = DateTime.Now;
}
if (this.alarmType.Equals(alarmType))
{
return;
......
......@@ -513,7 +513,6 @@ namespace OnlineStore.DeviceLibrary
#endregion
public DateTime LastAlarmTime = DateTime.Now;
public override void Alarm(AlarmType alarmType)
{
if (alarmType.Equals(AlarmType.None).Equals(false))
......
......@@ -24,10 +24,10 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if (!Robot.CanStartWork())
{
return false;
}
//if (!Robot.CanStartWork())
//{
// return false;
//}
if (AgvClient.GetAction(Config.AgvName) == ClientAction.NeedLeave || AgvClient.GetAction(Config.AgvName) == ClientAction.MayLeave)
{
//WorkLog("料串入料 :等待AGV来取空料串1");
......
......@@ -467,12 +467,24 @@ namespace OnlineStore.XLRStore
lblStatus.Text = StoreBean.GetRunStr() + canScanCode;
string warnMsg = "";
if (StoreManager.XLRStore.runStatus > RunStatus.Wait)
{
string time = StoreManager.XLRStore.alarmType.Equals(AlarmType.None) ? "" : StoreManager.XLRStore.LastAlarmTime.ToLongTimeString();
warnMsg = StoreManager.XLRStore.WarnMsg.Equals("") ? "" : (time + StoreManager.XLRStore.WarnMsg + "\r\n");
List<DeviceBase> deviceBases = new List<DeviceBase>() { StoreManager.XLRStore, StoreManager.XLRStore.inputEquip, StoreManager.XLRStore.boxEquip };
//if (StoreManager.XLRStore.runStatus > RunStatus.Wait)
//{
// string time = StoreManager.XLRStore.alarmType.Equals(AlarmType.None) ? "" : StoreManager.XLRStore.LastAlarmTime.ToLongTimeString();
// warnMsg = StoreManager.XLRStore.WarnMsg.Equals("") ? "" : (time + StoreManager.XLRStore.WarnMsg + "\r\n");
//}
foreach(DeviceBase device in deviceBases)
{
if (device.runStatus > RunStatus.Wait)
{
if (!device.WarnMsg.Equals(""))
{
string time = device.alarmType.Equals(AlarmType.None) ? "" : device.LastAlarmTime.ToLongTimeString();
warnMsg += device.WarnMsg.Equals("") ? "" : (time + device.WarnMsg + "\r\n");
}
}
}
lblWarnMsg.Text = warnMsg;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!