Commit 2e672ac4 LN

入仓混乱问题修改。测高去掉小于15归类为8的判定

1 个父辈 b9cc6c99
...@@ -1004,7 +1004,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1004,7 +1004,7 @@ namespace OnlineStore.DeviceLibrary
private int LastWidth = 0; private int LastWidth = 0;
private List<string> LastCodeList = new List<string>(); private List<string> LastCodeList = new List<string>();
private List<string> NextCodeList = new List<string>(); private List<string> NextCodeList = new List<string>();
public int GetHeight() public int GetHeight()
{ {
LastHeight = 0; LastHeight = 0;
int AxisChangeValue = Config.Height_ChangeValue; int AxisChangeValue = Config.Height_ChangeValue;
...@@ -1024,30 +1024,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -1024,30 +1024,30 @@ namespace OnlineStore.DeviceLibrary
height += 5; height += 5;
} }
//如果检测出<=15,都按照8计算 ////如果检测出<=15,都按照8计算
if (height <= 15) //if (height <= 15)
{ //{
LastHeight = 8; // LastHeight = 8;
} //}
else //else
{ //{
List<int> heightList = LineManager.GetTrayList(); List<int> heightList = LineManager.GetTrayList();
heightList = (from m in heightList orderby m descending select m).ToList<int>(); heightList = (from m in heightList orderby m descending select m).ToList<int>();
float minCha = height; float minCha = height;
foreach (int h in heightList) foreach (int h in heightList)
{
//取差值最小的接近值
float cha = Math.Abs(h - (height - 4));
if (cha < minCha)
{ {
//取差值最小的接近值 LastHeight = h;
float cha = Math.Abs(h - (height - 4)); minCha = cha;
if (cha < minCha)
{
LastHeight = h;
minCha = cha;
}
} }
} }
//}
if (LastHeight <= 8) { LastHeight = 8; } if (LastHeight <= 8) { LastHeight = 8; }
string code = CodeManager.ProcessCode(LastCodeList); string code = CodeManager.ProcessCode(LastCodeList);
string msg = Name + " 计算盘高:上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后"+buchongStr+"[" + height + "]" + ",归类为【" + LastHeight + "mm】条码【"+code+"】"; string msg = Name + " 计算盘高:上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后" + buchongStr + "[" + height + "]" + ",归类为【" + LastHeight + "mm】条码【" + code + "】";
LogUtil.info(msg); LogUtil.info(msg);
return LastHeight; return LastHeight;
} }
......
...@@ -607,17 +607,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -607,17 +607,7 @@ namespace OnlineStore.DeviceLibrary
if (Config.WorkDeviceId > 0) if (Config.WorkDeviceId > 0)
{ {
TrayInfo trayInfo = TrayManager.GetTrayInfo(trayNum); TrayInfo trayInfo = TrayManager.GetTrayInfo(trayNum);
//如果是HY02,且T1在等待托盘,先放行一个托盘
if (DeviceID.Equals(202))
{
FeedingEquip feed101 = LineManager.Line.FeedingEquipMap[101];
if (feed101.CurrTrayIsNeed(currTrayNum, false))
{
return false;
}
}
//判断上料T是否在入库等待托盘 //判断上料T是否在入库等待托盘
FeedingEquip feedT = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId]; FeedingEquip feedT = LineManager.Line.FeedingEquipMap[Config.WorkDeviceId];
if (feedT.CurrTrayIsNeed(currTrayNum, false)) if (feedT.CurrTrayIsNeed(currTrayNum, false))
......
...@@ -83,32 +83,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,32 +83,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
return int.Parse(PosId.Substring(2, 2)); return int.Parse(PosId.Substring(1, 1));
}
catch (Exception ex)
{
}
}
return -1;
}
public static int GetPosStoreId(string posId)
{
if (!posId.Equals(""))
{
try
{
int index = posId.IndexOf("#");
if (index > 0)
{
string[] arr = posId.Split('#');
if (arr.Length >= 2)
{
return int.Parse(arr[0]);
}
}
return int.Parse(posId.Substring(2, 2));
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -117,6 +92,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,6 +92,7 @@ namespace OnlineStore.DeviceLibrary
} }
return -1; return -1;
} }
/// <summary> /// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上 /// urgentReel: true 表示紧急料,需要出到料串上
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!