Commit d1886a64 张东亮

添加消息上报

1 个父辈 3be7d8f6
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="deviceLibrary\Msg.cs" />
<Compile Include="manager\agvClient\AgvClient.cs" /> <Compile Include="manager\agvClient\AgvClient.cs" />
<Compile Include="manager\agvClient\DoorInfo.cs" /> <Compile Include="manager\agvClient\DoorInfo.cs" />
<Compile Include="manager\BufferDataManager.cs" /> <Compile Include="manager\BufferDataManager.cs" />
......
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary.deviceLibrary
{
public class Msg
{
public static List<Msg> msg = new List<Msg>();
public string msgtxt;
public MsgLevel msgLevel;
public ErrInfo errInfo;
public DateTime datetime;
public static List<Msg> get()
{
if (_setlogones)
{
_setlogones = false;
foreach (var m in msg)
LogUtil.info(m.msgtxt);
}
List<Msg> mm = new List<Msg>(msg);
return mm;
}
public static void add(string m, MsgLevel ml, ErrInfo errInfo = ErrInfo.Empty)
{
lock (msg)
{
var fm = msg.Find((x) => x.msgtxt == m);
if (fm == null)
msg.Add(new Msg { msgtxt = m, msgLevel = ml, datetime = DateTime.Now, errInfo = errInfo });
}
}
static bool _setlogones = false;
internal static void setlogones()
{
_setlogones = true;
}
public static void clear()
{
msg.Clear();
}
}
public enum MsgLevel
{
warning,
info,
alarm,
critical,
}
public enum ErrInfo
{
Empty,
X09_BoxNotDetect,
ResetBtn,
RunBtn,
SuddenStop,
X09_Clear
}
}
using log4net; using log4net;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -251,6 +252,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -251,6 +252,10 @@ namespace OnlineStore.DeviceLibrary
} }
} }
WarnMsg = msg; WarnMsg = msg;
if(!string.IsNullOrEmpty(WarnMsg))
{
Msg.add(WarnMsg, MsgLevel.alarm);
}
} }
public string GetRunStr( ) public string GetRunStr( )
{ {
......
 
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -264,7 +265,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -264,7 +265,7 @@ namespace OnlineStore.DeviceLibrary
if (alarmIo.Equals(1)) if (alarmIo.Equals(1))
{ {
WarnMsg = Name + " " + axisInfo.AxisName + "报警"; WarnMsg = Name + " " + axisInfo.AxisName + "报警";
Msg.add(WarnMsg, MsgLevel.alarm);
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
if (NeedAlarm) if (NeedAlarm)
...@@ -327,7 +328,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -327,7 +328,7 @@ namespace OnlineStore.DeviceLibrary
{ {
isOk = false; isOk = false;
WarnMsg = Name + msg; WarnMsg = Name + msg;
Msg.add(WarnMsg, MsgLevel.alarm);
Alarm(AlarmType.AxisMoveError); Alarm(AlarmType.AxisMoveError);
LogUtil.error(WarnMsg, moveInfo.ErrorLogType, moveInfo.logSeconds()); LogUtil.error(WarnMsg, moveInfo.ErrorLogType, moveInfo.logSeconds());
break; break;
...@@ -351,7 +352,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -351,7 +352,7 @@ namespace OnlineStore.DeviceLibrary
if (span.TotalSeconds > timeOutSeconds && alarmType <= AlarmType.IoSingleTimeOut) if (span.TotalSeconds > timeOutSeconds && alarmType <= AlarmType.IoSingleTimeOut)
{ {
ConfigIO io = baseConfig.getWaitIO(wait.IoType); ConfigIO io = baseConfig.getWaitIO(wait.IoType);
WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒"; WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 ";
LogUtil.error(WarnMsg, moveInfo.ErrorLogType, moveInfo.logSeconds()); LogUtil.error(WarnMsg, moveInfo.ErrorLogType, moveInfo.logSeconds());
if (NoAlarm()) if (NoAlarm())
...@@ -790,7 +791,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -790,7 +791,7 @@ namespace OnlineStore.DeviceLibrary
} }
protected void MoveTimeOut(DeviceMoveInfo move, string msg) protected void MoveTimeOut(DeviceMoveInfo move, string msg)
{ {
WarnMsg = move.Name + "[" + move.MoveStep + "] " + msg + " [" + FormUtil.GetSpanStr(move.StepSpan()) + "]"; WarnMsg = move.Name + "[" + move.MoveStep + "] " + msg + "超时";
int logId = DeviceID * 10000 + (int)move.MoveStep; int logId = DeviceID * 10000 + (int)move.MoveStep;
LogUtil.error(WarnMsg, logId); LogUtil.error(WarnMsg, logId);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
......
...@@ -253,7 +253,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -253,7 +253,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (span.TotalSeconds > 120) else if (span.TotalSeconds > 120)
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "][" + msg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "][" + msg + "]已等待超过2分钟";
LogUtil.error(WarnMsg, MoveInfo.ErrorLogType); LogUtil.error(WarnMsg, MoveInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
...@@ -472,7 +472,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -472,7 +472,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds) else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds)
{ {
WarnMsg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "][" + NotOkMsg + "]超时";
LogUtil.error(WarnMsg, checkWaitInfo.ErrorLogType); LogUtil.error(WarnMsg, checkWaitInfo.ErrorLogType);
Alarm(AlarmType.IoSingleTimeOut); Alarm(AlarmType.IoSingleTimeOut);
} }
......
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -962,24 +963,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -962,24 +963,44 @@ namespace OnlineStore.DeviceLibrary
} }
protected override void BaseTimerProcess() protected override void BaseTimerProcess()
{ {
if (isInSuddenDown || isNoAirpressure_Check) try
{
return;
}
SecurityAccessProcess();
if (runStatus.Equals(RunStatus.Runing))
{
ExecuteOutListProcess();
}
if (isInitPosDebugInfo)
{ {
PosDebugProcess(); if (isInSuddenDown || isNoAirpressure_Check)
{
return;
}
SecurityAccessProcess();
if (runStatus.Equals(RunStatus.Runing))
{
ExecuteOutListProcess();
}
if (isInitPosDebugInfo)
{
PosDebugProcess();
}
BusyMoveProcess();
IOTimeOutProcess();
if (NoErrorAlarm())
{
CheckAxisAlarm();
}
var input = StoreManager.XLRStore?.inputEquip;
if (input != null)
{
if (!string.IsNullOrEmpty(input.InstoreNgMsg))
Msg.add(input.InstoreNgMsg, MsgLevel.warning);
if (!string.IsNullOrEmpty(input.WarnMsg))
{
Msg.add(input.WarnMsg, MsgLevel.warning);
}
}
} }
BusyMoveProcess(); catch (Exception ex) { LogUtil.error("boxequip BaseTimerProcess", ex); }
IOTimeOutProcess(); finally
if (NoErrorAlarm())
{ {
CheckAxisAlarm(); ProcessMsg(Msg.get());
Msg.clear();
} }
} }
protected override void IOTimeOutProcess() protected override void IOTimeOutProcess()
......
using Asa; using Asa;
using log4net.Util; using log4net.Util;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -35,6 +36,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,6 +36,7 @@ namespace OnlineStore.DeviceLibrary
private bool isInProcess = false; private bool isInProcess = false;
private DateTime lastConTime = DateTime.Now; private DateTime lastConTime = DateTime.Now;
object serverLoc = new object(); object serverLoc = new object();
public string uploadMsg = "";
public void server_connect_timer_Tick(object sender, EventArgs e) public void server_connect_timer_Tick(object sender, EventArgs e)
{ {
if (isInProcess) if (isInProcess)
...@@ -102,12 +104,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,12 +104,12 @@ namespace OnlineStore.DeviceLibrary
{ {
if (operation.seq == resultOperation.seq) if (operation.seq == resultOperation.seq)
{ {
LogUtil.info($"SendStoreState success,posid:{posid}, storeStatus:{storeStatus}"); LogUtil.info($"SendStoreState success,posid:{posid},barcode:{barcode}, storeStatus:{storeStatus}");
return true; return true;
} }
else else
{ {
LogUtil.info($"SendStoreState error,posid:{posid}, storeStatus:{storeStatus}"); LogUtil.info($"SendStoreState error,posid:{posid},barcode:{barcode}, storeStatus:{storeStatus}");
Thread.Sleep(2000); Thread.Sleep(2000);
} }
} }
...@@ -125,6 +127,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -125,6 +127,34 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
public void ProcessMsg(List<Msg> msg)
{
uploadMsg = string.Join(",", msg.Select(x =>
{
//if (x.msgLevel == MsgLevel.warning || x.msgLevel == MsgLevel.alarm)
{
return GetMsgPrefix(x.msgLevel) + x.msgtxt;
}
return null;
}
).Where(x => !string.IsNullOrEmpty(x)));
}
string GetMsgPrefix(MsgLevel msgLevel)
{
switch (msgLevel)
{
case MsgLevel.info:
return "I=";
case MsgLevel.warning:
return "W=";
case MsgLevel.alarm:
return "A=";
case MsgLevel.critical:
return "C=";
}
return "";
}
/// <summary> /// <summary>
/// 获取整个料仓的状态 /// 获取整个料仓的状态
/// </summary> /// </summary>
...@@ -137,30 +167,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,30 +167,18 @@ namespace OnlineStore.DeviceLibrary
lineOperation.cid = CID; lineOperation.cid = CID;
lineOperation.seq = ConfigAppSettings.nextSeq(); lineOperation.seq = ConfigAppSettings.nextSeq();
lineOperation.status = 1; lineOperation.status = 1;
var input = StoreManager.XLRStore?.inputEquip;
if (input != null && !string.IsNullOrEmpty(input.InstoreNgMsg))
{
WarnMsg = input.InstoreNgMsg;
}
else if (WarnMsg != "")
{
lineOperation.status = (int)DeviceStatus.Warning;
lineOperation.msg = $"W={WarnMsg}";
}
lineOperation.status = (int)DeviceStatus.StoreOnline; lineOperation.status = (int)DeviceStatus.StoreOnline;
BoxStatus boxStatus = new BoxStatus(); BoxStatus boxStatus = new BoxStatus();
lineOperation.msg = uploadMsg;
boxStatus.boxId = 1; boxStatus.boxId = 1;
boxStatus.msg = uploadMsg;
boxStatus.msg = $"W={WarnMsg}"; ; //if (WarnMsg.Equals(""))
lineOperation.msg = $"W={WarnMsg}"; ; //{
// boxStatus.msg = CodeMsg;
if (WarnMsg.Equals("")) // lineOperation.msg = CodeMsg;
{ //}
boxStatus.msg = CodeMsg; //CodeMsg = "";
lineOperation.msg = CodeMsg;
}
CodeMsg = "";
//WarnMsg = ""; //WarnMsg = "";
//状态 //状态
boxStatus.status = (int)deviceStatus; boxStatus.status = (int)deviceStatus;
...@@ -396,7 +414,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,7 +414,7 @@ namespace OnlineStore.DeviceLibrary
if (position == null) if (position == null)
{ {
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因 //出入库没有找到服务器发送的库位,需要打印日志方便查询原因
WarnMsg = Name + "未找到库位:【" + inoutParam.PosInfo.ToStr() + "】"; Msg.add(Name + "未找到库位:【" + inoutParam.PosInfo.ToStr() + "】", MsgLevel.warning);
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
continue; continue;
} }
......
using CodeLibrary; using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -271,7 +272,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -271,7 +272,10 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SI_05_GetReel: case StepEnum.SI_05_GetReel:
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
WarnMsg= $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -335,6 +339,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -335,6 +339,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -348,6 +353,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -348,6 +353,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -391,6 +397,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -391,6 +397,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -404,6 +411,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,6 +411,9 @@ namespace OnlineStore.DeviceLibrary
ComAxis_To_P2(); ComAxis_To_P2();
break; break;
case StepEnum.SI_14_ReleaseCompress: case StepEnum.SI_14_ReleaseCompress:
if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.InStoreEnd))
return;
Msg.add($"入库完成:【{MoveInfo.MoveParam.PosInfo.PosId}】【{MoveInfo.MoveParam.PosInfo.barcode}】【{DeviceStatus.InStoreEnd}】", MsgLevel.info);
MoveInfo.NextMoveStep(StepEnum.SI_15_UpDownBack); MoveInfo.NextMoveStep(StepEnum.SI_15_UpDownBack);
LogInfo($"入库 {MoveInfo.SLog}:叉子从库位返回,[{MoveInfo.MoveParam.PosInfo.ToStr()}]入库完成,移栽升降轴到抽屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:叉子从库位返回,[{MoveInfo.MoveParam.PosInfo.ToStr()}]入库完成,移栽升降轴到抽屉上方过度点P6/P12[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
//入库完成 //入库完成
......
using CodeLibrary; using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -175,6 +176,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -175,6 +176,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg,MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -244,6 +246,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -244,6 +246,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -255,6 +258,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -255,6 +258,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckReel(true)) if (!CheckReel(true))
{ {
WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查"; WarnMsg = $"未检测到{MoveInfo.MoveParam.PosInfo.GetPosSide()}面料叉上的料盘,请检查";
Msg.add(WarnMsg,MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -304,6 +308,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -304,6 +308,7 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SO_18_PutReel: case StepEnum.SO_18_PutReel:
if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreBoxEnd)) if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreBoxEnd))
return; return;
Msg.add($"出库完成:【{MoveInfo.MoveParam.PosInfo.PosId}】【{MoveInfo.MoveParam.PosInfo.barcode}】【{DeviceStatus.OutStoreBoxEnd}】",MsgLevel.info);
MoveInfo.NextMoveStep(StepEnum.SO_19_InOutBackFromBuff); MoveInfo.NextMoveStep(StepEnum.SO_19_InOutBackFromBuff);
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}]出库完成[耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒],移栽X轴到待机点P1,行走机构到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}]出库完成[耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒],移栽X轴到待机点P1,行走机构到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
XAxis_To_P1(); XAxis_To_P1();
......
using CodeLibrary; using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -34,6 +35,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -34,6 +35,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckBothReel(true)) if (!CheckBothReel(true))
{ {
WarnMsg = $"两面料叉上存在未检测到料盘,请检查"; WarnMsg = $"两面料叉上存在未检测到料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
...@@ -93,6 +95,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,6 +95,7 @@ namespace OnlineStore.DeviceLibrary
if (!CheckBothReel(false)) if (!CheckBothReel(false))
{ {
WarnMsg = $"两面料叉上还能检测到料盘,请检查"; WarnMsg = $"两面料叉上还能检测到料盘,请检查";
Msg.add(WarnMsg, MsgLevel.critical);
return; return;
} }
ignoreCurFork = false; ignoreCurFork = false;
......
...@@ -959,7 +959,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -959,7 +959,7 @@ namespace OnlineStore.DeviceLibrary
this.lastPosId = lastPosId; this.lastPosId = lastPosId;
this.lastBarcode = lastBarcode; this.lastBarcode = lastBarcode;
} }
LogInfo($"设置状态:deviceStatus【{deviceStatus}】,runStatus=【{runStatus}】,lastPosId=【{lastPosId}】lastBarcode=【{lastBarcode}】");
this.deviceStatus = deviceStatus; this.deviceStatus = deviceStatus;
this.runStatus = runStatus; this.runStatus = runStatus;
} }
......
using Asa; using Asa;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary.deviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -1163,6 +1164,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1163,6 +1164,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreEnd)) if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreEnd))
return; return;
Msg.add($"出库完成:【{MoveInfo.MoveParam.PosInfo.PosId}】【{MoveInfo.MoveParam.PosInfo.barcode}】【{DeviceStatus.OutStoreEnd}】", MsgLevel.info);
if (shelf.Equals(1)) if (shelf.Equals(1))
{ {
...@@ -1283,6 +1285,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1283,6 +1285,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreEnd)) if (!StoreManager.XLRStore.boxEquip.SendStoreState(MoveInfo.MoveParam.PosInfo.PosId, MoveInfo.MoveParam.PosInfo.barcode, DeviceStatus.OutStoreEnd))
return; return;
Msg.add($"出库完成:紧急料【{MoveInfo.MoveParam.PosInfo.PosId}】【{MoveInfo.MoveParam.PosInfo.barcode}】【{DeviceStatus.OutStoreEnd}】", MsgLevel.info);
MoveInfo.NextMoveStep(StepEnum.I039_UpdownToP18); MoveInfo.NextMoveStep(StepEnum.I039_UpdownToP18);
MoveLog($" 出料->紧急箱 {MoveInfo.SLog}: 升降轴到P18(紧急料区放料高点){Config.Updown_P18_NGH}"); MoveLog($" 出料->紧急箱 {MoveInfo.SLog}: 升降轴到P18(紧急料区放料高点){Config.Updown_P18_NGH}");
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P18_NGH, Config.Updown_P18_Speed); UpdownAxis.AbsMove(MoveInfo, Config.Updown_P18_NGH, Config.Updown_P18_Speed);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!