Commit 466f9a6d 刘韬

1

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