Commit 50681474 LN

bug修改

1 个父辈 c4d36aef
......@@ -1312,18 +1312,19 @@ namespace OnlineStore.DeviceLibrary
{
try
{
HumitureController.QueryData(Config.GetHumpPortList().ToArray());
ASTemperateParam param = HumitureController.LastData;
double humidity = 0;
double temp = 0;
if (param != null)
{
humidity = param.Humidity;
temp = param.Temperate;
currTempStr = ("当前湿度:" + humidity.ToString() + ",当前温度:" + temp);
}
if ((DateTime.Now - preLogTime).TotalSeconds > 10&&storeRunStatus>StoreRunStatus.Wait)
{
HumitureController.QueryData(Config.GetHumpPortList().ToArray());
ASTemperateParam param = HumitureController.LastData;
double humidity = 0;
double temp = 0;
if (param != null)
{
humidity = param.Humidity;
temp = param.Temperate;
currTempStr = ("当前湿度:" + humidity.ToString() + ",当前温度:" + temp);
}
preLogTime = DateTime.Now;
//用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4
//温湿度
......
......@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
{
startInStoreTime = DateTime.Now;
string posId = param != null ? param.PosInfo.PosId : "";
posId = param.PosInfo.ToStr();
if (storeRunStatus == StoreRunStatus.Runing)
{
if (!LoadParamPosition(param))
......@@ -269,6 +270,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,找不到库位信息");
return;
}
if (param.PosInfo.ShelfType <= 0)
{
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,未设置入口位置");
return;
}
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,货叉物料检测有料");
......@@ -473,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
{
startOutStoreTime = DateTime.Now;
string posId = param != null ? param.PosInfo.PosId : "";
posId = param.PosInfo.ToStr();
if (storeRunStatus == StoreRunStatus.Runing)
{
if (!LoadParamPosition(param))
......@@ -545,15 +552,18 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_05_GetWare)
{
if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW))
{
StoreMove.MoveParam.PosInfo.ShelfType = 1;
OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
}
else
if (StoreMove.MoveParam.PosInfo.ShelfType <= 0)
{
StoreMove.MoveParam.PosInfo.ShelfType = 2;
OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW))
{
OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(1, Config);
}
else
{
OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(2, Config);
}
}
//把库位的物品放到取到叉子上之后是出仓完成
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
......@@ -573,9 +583,7 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.UseShelfCheck)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
}
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckHasTray)
{
......@@ -628,13 +636,15 @@ namespace OnlineStore.DeviceLibrary
{
if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW))
{
StoreMove.MoveParam.PosInfo.ShelfType = 1;
//StoreMove.MoveParam.PosInfo.ShelfType = 1;
OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(1, Config);
}
else if (IOManager.IOValue(IO_Type.RightShelf_Check).Equals(IO_VALUE.LOW))
{
StoreMove.MoveParam.PosInfo.ShelfType = 2;
//StoreMove.MoveParam.PosInfo.ShelfType = 2;
OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(2, Config);
}
else
{
......
......@@ -49,14 +49,35 @@ namespace OnlineStore.DeviceLibrary
}
public InOutPosInfo PosInfo { get; set; }
public LineMoveP MoveP { get; set; }
public LineMoveP MoveP { get; set; }
} /// <summary>
public void UpdateShelfType(int shelfType, Box_Config Config)
{
if (MoveP != null)
{
if (shelfType.Equals(1))
{
MoveP.InOut_P2 = Config.InOutAxis_P2_Position;
}
else
{
MoveP.InOut_P2 = Config.InOutAxis_P3_Position;
}
}
if (PosInfo != null)
{
PosInfo.ShelfType = shelfType;
}
LogUtil.info("UpdateShelfType = " + shelfType);
}
}
/// <summary>
/// 夹具编码信息(保存夹具检测到的IO数值,和对应的料仓位置)
/// </summary>
public class InOutPosInfo
{
public InOutPosInfo(string barcode, string posId, string platew = "", string plateh = "", int shelftype=1)
public InOutPosInfo(string barcode, string posId, string platew = "", string plateh = "", int shelftype=0)
{
this.barcode = barcode;
this.PosId = posId;
......@@ -86,11 +107,20 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 使用左侧托架=1,还是右侧托架=2
/// </summary>
public int ShelfType = 1;
public int ShelfType = 0;
public string ToStr()
{
return " barcode[" + barcode + "],PosId [" + PosId + "] [" + PlateW + "X" + PlateH + "] [" + ShelfType + "]";
string inType = "";
if (ShelfType.Equals(1))
{
inType = "左侧";
}
else
{
inType = "右侧";
}
return " [" + PosId + "] [" + inType + "] [" + barcode + "][" + PlateW + "X" + PlateH + "]";
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!