Commit 50681474 LN

bug修改

1 个父辈 c4d36aef
...@@ -1312,6 +1312,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -1312,6 +1312,9 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
if ((DateTime.Now - preLogTime).TotalSeconds > 10&&storeRunStatus>StoreRunStatus.Wait)
{
HumitureController.QueryData(Config.GetHumpPortList().ToArray()); HumitureController.QueryData(Config.GetHumpPortList().ToArray());
ASTemperateParam param = HumitureController.LastData; ASTemperateParam param = HumitureController.LastData;
double humidity = 0; double humidity = 0;
...@@ -1322,8 +1325,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -1322,8 +1325,6 @@ namespace OnlineStore.DeviceLibrary
temp = param.Temperate; temp = param.Temperate;
currTempStr = ("当前湿度:" + humidity.ToString() + ",当前温度:" + temp); currTempStr = ("当前湿度:" + humidity.ToString() + ",当前温度:" + temp);
} }
if ((DateTime.Now - preLogTime).TotalSeconds > 10&&storeRunStatus>StoreRunStatus.Wait)
{
preLogTime = DateTime.Now; preLogTime = DateTime.Now;
//用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4 //用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4
//温湿度 //温湿度
......
...@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -262,6 +262,7 @@ namespace OnlineStore.DeviceLibrary
{ {
startInStoreTime = DateTime.Now; startInStoreTime = DateTime.Now;
string posId = param != null ? param.PosInfo.PosId : ""; string posId = param != null ? param.PosInfo.PosId : "";
posId = param.PosInfo.ToStr();
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
...@@ -269,6 +270,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -269,6 +270,11 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,找不到库位信息"); LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,找不到库位信息");
return; return;
} }
if (param.PosInfo.ShelfType <= 0)
{
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,未设置入口位置");
return;
}
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,货叉物料检测有料"); LogUtil.error(LOGGER, StoreName + " 启动入库【" + posId + "】出错,货叉物料检测有料");
...@@ -473,6 +479,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
{ {
startOutStoreTime = DateTime.Now; startOutStoreTime = DateTime.Now;
string posId = param != null ? param.PosInfo.PosId : ""; string posId = param != null ? param.PosInfo.PosId : "";
posId = param.PosInfo.ToStr();
if (storeRunStatus == StoreRunStatus.Runing) if (storeRunStatus == StoreRunStatus.Runing)
{ {
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
...@@ -545,15 +552,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -545,15 +552,18 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_05_GetWare) else if (StoreMove.MoveStep == StoreMoveStep.SO_05_GetWare)
{ {
if (StoreMove.MoveParam.PosInfo.ShelfType <= 0)
{
if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW))
{ {
StoreMove.MoveParam.PosInfo.ShelfType = 1;
OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType); OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(1, Config);
} }
else else
{ {
StoreMove.MoveParam.PosInfo.ShelfType = 2;
OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType); OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(2, Config);
}
} }
//把库位的物品放到取到叉子上之后是出仓完成 //把库位的物品放到取到叉子上之后是出仓完成
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : ""; string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PosInfo.PosId : "";
...@@ -574,8 +584,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -574,8 +584,6 @@ namespace OnlineStore.DeviceLibrary
{ {
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
} }
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckHasTray) else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckHasTray)
{ {
...@@ -628,13 +636,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -628,13 +636,15 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.LOW)) 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); OutStoreLog(" 出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(1, Config);
} }
else if (IOManager.IOValue(IO_Type.RightShelf_Check).Equals(IO_VALUE.LOW)) 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); OutStoreLog("出库: 当前未设置ShelfType,默认ShelfType=" + StoreMove.MoveParam.PosInfo.ShelfType);
StoreMove.MoveParam.UpdateShelfType(2, Config);
} }
else else
{ {
......
...@@ -51,12 +51,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,12 +51,33 @@ namespace OnlineStore.DeviceLibrary
public InOutPosInfo PosInfo { get; set; } 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数值,和对应的料仓位置) /// 夹具编码信息(保存夹具检测到的IO数值,和对应的料仓位置)
/// </summary> /// </summary>
public class InOutPosInfo 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.barcode = barcode;
this.PosId = posId; this.PosId = posId;
...@@ -86,11 +107,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,11 +107,20 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 使用左侧托架=1,还是右侧托架=2 /// 使用左侧托架=1,还是右侧托架=2
/// </summary> /// </summary>
public int ShelfType = 1; public int ShelfType = 0;
public string ToStr() 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!