Commit 125d1bc8 LN

位置号错误问题修改

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