Commit 125d1bc8 LN

位置号错误问题修改

1 个父辈 5ebcd274
using CodeLibrary; using CodeLibrary;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
...@@ -10,7 +11,7 @@ using System.Threading.Tasks; ...@@ -10,7 +11,7 @@ using System.Threading.Tasks;
[Serializable] [Serializable]
public class ReelParam public class ReelParam
{ {
public ReelParam(string wareNo = "", int platew = 0, int plateh = 0,string startPos="",string pos="", bool _IsNg = false, string ngMsg = "") public ReelParam(string wareNo = "", int platew = 0, int plateh = 0, string startPos = "", string pos = "", bool _IsNg = false, string ngMsg = "")
{ {
WareCode = wareNo; WareCode = wareNo;
PlateW = platew; PlateW = platew;
...@@ -21,20 +22,27 @@ public class ReelParam ...@@ -21,20 +22,27 @@ public class ReelParam
this.TargetPos = pos; this.TargetPos = pos;
codeInfos = new List<CodeInfo>(); codeInfos = new List<CodeInfo>();
string[] posArray = TargetPos.Split('_'); string[] posArray = TargetPos.Split('_');
if (posArray.Length >=2) if (posArray.Length >= 2)
{ {
TargetOutShelf = posArray[0]; TargetOutShelf = posArray[0];
if (TargetOutShelf != "NG") if (TargetOutShelf != "NG")
{ {
if (posArray[1].StartsWith("B")) if (posArray[1].StartsWith("B"))
{ {
TargetLoc =26+ posArray[posArray.Length - 1]; int v = 26 + Convert.ToInt32(posArray[posArray.Length - 1]);
TargetLoc = v + "";
}
else if (posArray[1].StartsWith("A2"))
{
int v = 13 + Convert.ToInt32(posArray[posArray.Length - 1]);
TargetLoc = v + "";
} }
else else
{ {
//取最后一位 //取最后一位
TargetLoc = posArray[posArray.Length - 1]; TargetLoc = posArray[posArray.Length - 1];
} }
LogUtil.info($"库位号:{pos},转换后loc位置:{TargetLoc}");
} }
} }
} }
......
...@@ -204,19 +204,22 @@ namespace DeviceLibrary ...@@ -204,19 +204,22 @@ namespace DeviceLibrary
result = WaitIo(Shelf_Back_Check, IO_VALUE.HIGH, 600000, logName + "等待" + Shelf_Back_Check + "信号"); result = WaitIo(Shelf_Back_Check, IO_VALUE.HIGH, 600000, logName + "等待" + Shelf_Back_Check + "信号");
LogUtil.info(logName + " 等待 " + Shelf_Back_Check + "=High 结果: " + result + ",开始等待 FinishEnter 超时10分钟"); Thread.Sleep(5000);
try LineStopRun();
{ AgvClient.SetStatus(agvId, agvName, CurrShelf.realRFID, NodeStatus.FinishEnter, NodeLevel.High);
result = WaitUtil.Wait(600000, delegate () //LogUtil.info(logName + " 等待 " + Shelf_Back_Check + "=High 结果: " + result + ",开始等待 FinishEnter 超时10分钟");
{ //try
return AgvClient.GetCurrStatus(agvId).Equals(NodeStatus.FinishEnter); //{
}, logName + "等待FinishEnter超时"); // result = WaitUtil.Wait(600000, delegate ()
} // {
catch (TimeoutException te) // return AgvClient.GetCurrStatus(agvId).Equals(NodeStatus.FinishEnter);
{ // }, logName + "等待FinishEnter超时");
LogUtil.error(logName + " 超时:" + te); //}
} //catch (TimeoutException te)
LogUtil.info(logName + ",完成,信号已到位"); //{
// LogUtil.error(logName + " 超时:" + te);
//}
LogUtil.info(logName + ",完成,信号已到位 ,停止线体,发送FinishEnter");
LineStopRun(); LineStopRun();
Thread.Sleep(2000); Thread.Sleep(2000);
AgvClient.SetStatus(agvId,agvName, "", NodeStatus.None, NodeLevel.High, true); AgvClient.SetStatus(agvId,agvName, "", NodeStatus.None, NodeLevel.High, true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!