Commit e14fa838 LN

托盘纠正问题修改。

1 个父辈 5b068608
...@@ -345,47 +345,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -345,47 +345,55 @@ namespace OnlineStore.DeviceLibrary
{ {
if (LineManager.useTrayCheck.Contains(DeviceID)) if (LineManager.useTrayCheck.Contains(DeviceID))
{ {
bool isfull = TrayManager.GetTrayInfo(currTrayNum).IsFull; TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
if (Config.SidesWayNum <= 0) bool isfull = tray.IsFull;
if (tray!=null&& tray.InoutPar.Corrected)
{
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】托盘已纠正,不再验证料盘检测信号");
}
else
{ {
if (CylinderIsOk(IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up)) if (Config.SidesWayNum <= 0)
{
if (CylinderIsOk(IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up))
{
if ((!isfull) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH))
{
ConfigIO io = Config.getWaitIO(IO_Type.ReelCheck);
if (io != null)
{
LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.ReelCheck));
}
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮", 2);
TrayMoveOk();
return;
}
}
}
else if (CylinderIsOk(IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH))
{ {
if ((!isfull) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH)) if ((!isfull) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH))
{ {
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮", 2);
TrayMoveOk();
return;
}
else if (isfull && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.LOW))
{
ConfigIO io = Config.getWaitIO(IO_Type.ReelCheck); ConfigIO io = Config.getWaitIO(IO_Type.ReelCheck);
if (io != null) if (io != null)
{ {
LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.ReelCheck)); LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.ReelCheck));
} }
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开"); LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮",2); TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮", 1);
TrayMoveOk(); TrayMoveOk();
return; return;
} }
} }
} }
else if (CylinderIsOk(IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH))
{
if ((!isfull) && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.HIGH))
{
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 入库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮",2);
TrayMoveOk();
return;
}
else if (isfull && IOValue(IO_Type.ReelCheck).Equals(IO_VALUE.LOW))
{
ConfigIO io = Config.getWaitIO(IO_Type.ReelCheck);
if (io != null)
{
LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.ReelCheck));
}
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + " 需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘,暂时放托盘离开");
TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮",1);
TrayMoveOk();
return;
}
}
} }
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要入料,移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + SecondMoveInfo.SLog + "*************** 托盘号【" + currTrayNum + "】 ,需要入料,移栽料盘");
......
...@@ -378,21 +378,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -378,21 +378,28 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_02_TopUP)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_02_TopUP))
{ {
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
bool needCheck = (tray == null || (!tray.InoutPar.Corrected));
if (!needCheck)
{
LogInfo("入库 [" + posId + "]" + MoveInfo.SLog + ": 托盘【 " + currTrayNum + "】托盘已纠正,不再验证料盘检测信号");
}
//判断料盘检测信号是否正确 //判断料盘检测信号是否正确
if (CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) && if (needCheck&&
CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) &&
LineManager.useTrayCheck.Contains(DeviceID) && LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW)) IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
{ {
ConfigIO io = Config.getWaitIO(IO_Type.TrayCheck); ConfigIO io = Config.getWaitIO(IO_Type.TrayCheck);
if (io != null) if (io != null)
{ {
LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.TrayCheck)); LogInfo("当前托盘上的料盘检测信号[" + io.ConfigStr + "]的值:" + IOValue(IO_Type.TrayCheck));
} }
LogUtil.error(Name + "入库 [" + posId + "],托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,升降轴上升,禁用托盘,同时放行托盘"); LogUtil.error(Name + "入库 [" + posId + "],托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,升降轴上升,禁用托盘,同时放行托盘");
LogInfo("入库 [" + posId + "]" + MoveInfo.SLog + ": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降"); LogInfo("入库 [" + posId + "]" + MoveInfo.SLog + ": 升降轴上升,禁用托盘,同时放行托盘,顶升气缸1下降");
TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮",1); TrayDisableManager.AddDisable(currTrayNum, Name, "有料托盘料盘检测信号不亮", 1);
MI_18_UpdownUp(); MI_18_UpdownUp();
} }
else else
{ {
...@@ -641,8 +648,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -641,8 +648,14 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isFull.Equals(false)) if (isFull.Equals(false))
{ {
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
bool needCheck = (tray == null || (!tray.InoutPar.Corrected));
if (!needCheck)
{
LogInfo("出库中,拦截空托盘【 " + currTrayNum + "】托盘已纠正,不再验证料盘检测信号");
}
//顶升上升时才判断 //顶升上升时才判断
if (CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) && if (needCheck&& CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) &&
LineManager.useTrayCheck.Contains(DeviceID) && LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.HIGH)) IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.HIGH))
{ {
...@@ -725,7 +738,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -725,7 +738,13 @@ namespace OnlineStore.DeviceLibrary
} }
if (reIndex >= 0) if (reIndex >= 0)
{ {
if (CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) && TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
bool needCheck = (tray == null || (!tray.InoutPar.Corrected));
if (!needCheck)
{
LogInfo("入库需拦截有料托盘【 " + currTrayNum + "】托盘已纠正,不再验证料盘检测信号");
}
if (needCheck&& CylinderIsOk(IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP) &&
LineManager.useTrayCheck.Contains(DeviceID) && LineManager.useTrayCheck.Contains(DeviceID) &&
IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW)) IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
{ {
......
...@@ -190,7 +190,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -190,7 +190,8 @@ namespace OnlineStore.DeviceLibrary
tray.InoutPar.PlateH = task.plateH; tray.InoutPar.PlateH = task.plateH;
tray.InoutPar.PlateW = task.plateW; tray.InoutPar.PlateW = task.plateW;
TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar); TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar);
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
//tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【100】【有尺寸信息,认为NG】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【100】【有尺寸信息,认为NG】【{tray.ToStr()}】");
} }
else if (resCode == 0) else if (resCode == 0)
...@@ -214,7 +215,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,7 +215,8 @@ namespace OnlineStore.DeviceLibrary
{ {
SServerManager.SendPosToStoreCheck(Name, tray.InoutPar); SServerManager.SendPosToStoreCheck(Name, tray.InoutPar);
} }
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
//tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【初次有料,第二次有料,认为有料】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【初次有料,第二次有料,认为有料】【{tray.ToStr()}】");
} }
} }
...@@ -228,7 +230,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -228,7 +230,8 @@ namespace OnlineStore.DeviceLibrary
TrayManager.ClearInstore(tray, "【屏蔽料盘二次判断】【初次有料,第二次无料】【清空托盘】[" + trayNum + "]"); TrayManager.ClearInstore(tray, "【屏蔽料盘二次判断】【初次有料,第二次无料】【清空托盘】[" + trayNum + "]");
} }
TrayManager.UpdateTrayInfo(trayNum); TrayManager.UpdateTrayInfo(trayNum);
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
// tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【初次有料,第二次无料】【清空托盘】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【初次有料,第二次无料】【清空托盘】【{tray.ToStr()}】");
} }
} }
...@@ -248,7 +251,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -248,7 +251,8 @@ namespace OnlineStore.DeviceLibrary
tray.InoutPar.PlateH = task.plateH; tray.InoutPar.PlateH = task.plateH;
tray.InoutPar.PlateW = task.plateW; tray.InoutPar.PlateW = task.plateW;
TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar); TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar);
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
//tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【100】【有尺寸信息,认为NG】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【100】【有尺寸信息,认为NG】【{tray.ToStr()}】");
} }
else if (resCode == 0) else if (resCode == 0)
...@@ -267,7 +271,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -267,7 +271,8 @@ namespace OnlineStore.DeviceLibrary
tray.InoutPar.rfidLoc = task.rfidLoc; tray.InoutPar.rfidLoc = task.rfidLoc;
tray.InoutPar.ManualJudgeNG = false; tray.InoutPar.ManualJudgeNG = false;
TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar); TrayManager.UpdateTrayInfo(trayNum, true, tray.InOrOutStore, tray.InoutPar);
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
//tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【初次无料,第二次有料】【纠正为有料】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【初次无料,第二次有料】【纠正为有料】【{tray.ToStr()}】");
} }
} }
...@@ -279,7 +284,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -279,7 +284,8 @@ namespace OnlineStore.DeviceLibrary
TrayManager.ClearInstore(tray, "【屏蔽料盘二次判断】【初次无料,第二次无料】【清空托盘】[" + trayNum + "]"); TrayManager.ClearInstore(tray, "【屏蔽料盘二次判断】【初次无料,第二次无料】【清空托盘】[" + trayNum + "]");
} }
TrayManager.UpdateTrayInfo(trayNum); TrayManager.UpdateTrayInfo(trayNum);
tray.InoutPar.Corrected = true; TrayManager.UpdateTrayCorrected(trayNum, true);
//tray.InoutPar.Corrected = true;
LogUtil.info($"【屏蔽料盘二次判断】【初次无料,第二次无料】【清空托盘】【{tray.ToStr()}】"); LogUtil.info($"【屏蔽料盘二次判断】【初次无料,第二次无料】【清空托盘】【{tray.ToStr()}】");
} }
} }
......
...@@ -120,6 +120,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -120,6 +120,16 @@ namespace OnlineStore.DeviceLibrary
SaveMapToFile(); SaveMapToFile();
} }
public static void UpdateTrayCorrected(int trayNum, bool Corrected)
{
LogUtil.info("更新托盘【" + trayNum + "】Corrected=【" + Corrected + "】 ");
if (TrayInfoMap.ContainsKey(trayNum))
{
TrayInfoMap[trayNum].InoutPar.Corrected = Corrected;
TrayInfoMap[trayNum].LastUpdateTime = DateTime.Now;
SaveMapToFile();
}
}
public static void UpdateInStoreNG(int trayNum, bool isNg, string msg) public static void UpdateInStoreNG(int trayNum, bool isNg, string msg)
{ {
LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】NgMsg=【" + msg + "】"); LogUtil.info("更新托盘【" + trayNum + "】InStoreNG=【" + isNg + "】NgMsg=【" + msg + "】");
......
...@@ -32,6 +32,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -32,6 +32,8 @@ namespace OnlineStore.DeviceLibrary
this.smallReel = smallReel; this.smallReel = smallReel;
this.rfid = rfid; this.rfid = rfid;
this.rfidLoc = rfidLoc; this.rfidLoc = rfidLoc;
this.Corrected = false;
this.ManualJudgeNG = false;
} }
/// <summary> /// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!