Commit 466f9a6d 刘韬

1

1 个父辈 9d04c02e
...@@ -420,6 +420,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -420,6 +420,7 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1); InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
return true; return true;
} }
string tempShelfNum = "0";
//修正库位 //修正库位
LineMoveP fixMoveP = new LineMoveP(); LineMoveP fixMoveP = new LineMoveP();
protected override void OutStoreProcess() protected override void OutStoreProcess()
...@@ -487,6 +488,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,6 +488,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
tempShelfNum = "0";
MoveInfo.NextMoveStep(StoreMoveStep.SO_21_ToOutDoor); MoveInfo.NextMoveStep(StoreMoveStep.SO_21_ToOutDoor);
InOutStoreLog(outType + "移动到出料口,旋转轴到P11[" + Config.MiddleAxis_P11 + "],升降轴到P12高点[" + Config.UpDownAxis_P12 + "] "); InOutStoreLog(outType + "移动到出料口,旋转轴到P11[" + Config.MiddleAxis_P11 + "],升降轴到P12高点[" + Config.UpDownAxis_P12 + "] ");
MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P11, Config.MiddleAxis_P11_Speed); MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P11, Config.MiddleAxis_P11_Speed);
...@@ -628,6 +630,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -628,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
tempShelfNum = StoreManager.Store.CurrShelfNum;
if (StoreManager.Store.MoveInfo.MoveType.Equals(MoveType.OutStore) && StoreManager.Store.MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut)) if (StoreManager.Store.MoveInfo.MoveType.Equals(MoveType.OutStore) && StoreManager.Store.MoveInfo.MoveStep.Equals(StoreMoveStep.LO_09_WaitOut))
{ {
bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam); bool result = StoreManager.Store.StartTrayOut(MoveInfo.MoveParam);
...@@ -786,17 +789,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -786,17 +789,20 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.OutDoor_SafeSignal).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.OutDoor_SafeSignal).Equals(IO_VALUE.HIGH))
{ {
StoreManager.putShelfFinished(MoveInfo.MoveParam.PosID, "0", "0", MoveInfo.MoveParam.WareCode); StoreManager.putShelfFinished(MoveInfo.MoveParam.PosID, tempShelfNum, "0", MoveInfo.MoveParam.WareCode);
int gongdan = StoreManager.unfinishedTaskCount(Name, "0"); int gongdan = StoreManager.unfinishedTaskCount(Name, tempShelfNum);
if (gongdan == 0) if (gongdan == 0)
{ {
InOutStoreLog("单盘出库:工单已结束"); InOutStoreLog("单盘出库:工单已结束");
if (tempShelfNum != "0")
{
lock (StoreManager.Store) lock (StoreManager.Store)
{ {
StoreManager.LastVisualRfid = ""; StoreManager.LastVisualRfid = "";
StoreManager.ShelfNeedOut = false; StoreManager.ShelfNeedOut = false;
} }
} }
}
MoveInfo.NextMoveStep(StoreMoveStep.SO_27_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.SO_27_GoBack);
InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "],压紧轴到P1[" + moveP.ComPress_P1 + "],关闭出料口门"); InOutStoreLog(outType + "升降轴到P1[" + moveP.UpDown_P1 + "],旋转轴到P1[" + moveP.Middle_P1 + "],压紧轴到P1[" + moveP.ComPress_P1 + "],关闭出料口门");
//CylinderMove(MoveInfo, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down); //CylinderMove(MoveInfo, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
......
...@@ -310,6 +310,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -310,6 +310,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreManager.LastVisualRfid != vrfid) else if (StoreManager.LastVisualRfid != vrfid)
{ {
LogUtil.info("收到服务器出库消息:【" + JsonHelper.SerializeObject(data) + "】");
LogUtil.error(Name + $" 上一个需求单还未结束LastVisualRfid={StoreManager.LastVisualRfid}, CurrentVisualRfid={vrfid}"); LogUtil.error(Name + $" 上一个需求单还未结束LastVisualRfid={StoreManager.LastVisualRfid}, CurrentVisualRfid={vrfid}");
StoreManager.ShelfNeedOut = true; StoreManager.ShelfNeedOut = true;
return; return;
......
...@@ -280,7 +280,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -280,7 +280,13 @@ namespace OnlineStore.DeviceLibrary
// LO_31_BatchAxisToP1(); // LO_31_BatchAxisToP1();
//} //}
//else //else
if (StoreManager.ShelfNeedOut)
{ {
//LO_31_BatchAxisToP1();
}
int xuqiudan = StoreManager.unfinishedTaskCount(Name, CurrShelfNum); int xuqiudan = StoreManager.unfinishedTaskCount(Name, CurrShelfNum);
if (outStoreCount == 0 || (xuqiudan > 0))// && !StoreManager.ShelfNeedOut)) if (outStoreCount == 0 || (xuqiudan > 0))// && !StoreManager.ShelfNeedOut))
{ {
...@@ -292,14 +298,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,14 +298,14 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料架出库:工单已结束,已出库盘数[" + outStoreCount + "],开始送出料架"); InOutStoreLog("料架出库:工单已结束,已出库盘数[" + outStoreCount + "],开始送出料架");
lock (StoreManager.Store) lock (StoreManager.Store)
{ {
StoreManager.ShelfNeedOut = false; //StoreManager.ShelfNeedOut = false;
StoreManager.LastVisualRfid = ""; StoreManager.LastVisualRfid = "";
} }
outStoreCount = 0; outStoreCount = 0;
LO_31_BatchAxisToP1(); LO_31_BatchAxisToP1();
} }
//InOutStoreLog(" 等待料盘出库"); //InOutStoreLog(" 等待料盘出库");
}
} }
#endregion #endregion
...@@ -441,7 +447,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -441,7 +447,8 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StoreMoveStep.LO_18_UpdownDown)) else if (MoveInfo.IsStep(StoreMoveStep.LO_18_UpdownDown))
{ {
if (electricClamp.Release()) { if (electricClamp.Release())
{
MoveInfo.NextMoveStep(StoreMoveStep.LO_19_CylinderRelax); MoveInfo.NextMoveStep(StoreMoveStep.LO_19_CylinderRelax);
InOutStoreLog("料盘移栽: 夹爪气缸放松"); InOutStoreLog("料盘移栽: 夹爪气缸放松");
} }
...@@ -513,7 +520,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -513,7 +520,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.LO_21_NeedSendShelf); MoveInfo.NextMoveStep(StoreMoveStep.LO_21_NeedSendShelf);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InOutStoreLog("料盘移栽:判断是否送出料架"); InOutStoreLog("料盘移栽:判断是否送出料架");
if (T2_MiddleAxis_Run_Count==0) if (T2_MiddleAxis_Run_Count == 0)
T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed); T2_MiddleAxis.AbsMove(MoveInfo, Config.MiddleAxis_P4, Config.MiddleAxis_P4Speed);
int currPositon = T1_BatchAxis.GetAclPosition(); int currPositon = T1_BatchAxis.GetAclPosition();
...@@ -609,6 +616,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -609,6 +616,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void LO_31_BatchAxisToP1(string msg = "") private void LO_31_BatchAxisToP1(string msg = "")
{ {
StoreManager.ShelfNeedOut = false;
MoveInfo.NextMoveStep(StoreMoveStep.LO_31_BatchAxisToP1); MoveInfo.NextMoveStep(StoreMoveStep.LO_31_BatchAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
InOutStoreLog("出库 :" + msg + "开始送出料架,提升伺服到P1点 ["+ Config.BatchAxis_P1 + "] "); InOutStoreLog("出库 :" + msg + "开始送出料架,提升伺服到P1点 ["+ Config.BatchAxis_P1 + "] ");
......
...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals(""); public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public static string LastVisualRfid = ""; public static string LastVisualRfid = "";
public volatile static bool ShelfNeedOut = false; public static bool ShelfNeedOut = false;
public static bool FrontDoorOpen = false; public static bool FrontDoorOpen = false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!