Commit 2249979a LN

1

1 个父辈 ebfa4432
doc/1.png

142.9 KB

...@@ -80,10 +80,10 @@ DO,1,进仓1升降上升SOL,UpDownCylinder_Up,12,PRO_AOI_IP_36,,进仓1升降上升SOL,Y563, ...@@ -80,10 +80,10 @@ DO,1,进仓1升降上升SOL,UpDownCylinder_Up,12,PRO_AOI_IP_36,,进仓1升降上升SOL,Y563,
DO,1,进仓1升降下降SOL,UpDownCylinder_Down,13,PRO_AOI_IP_36,,进仓1升降下降SOL,Y564,Y564 DO,1,进仓1升降下降SOL,UpDownCylinder_Down,13,PRO_AOI_IP_36,,进仓1升降下降SOL,Y564,Y564
,,,,14,PRO_AOI_IP_36,,,Y565,Y565 ,,,,14,PRO_AOI_IP_36,,,Y565,Y565
,,,,,,,,, ,,,,,,,,,
DI,1000,环形线横移4托盘检测,SW4_SideWay_TrayCheck,5,192.168.200.46,0,环形线横移4托盘检测,X556,X556 DI,1000,环形线横移4托盘检测,SW4_SideWay_TrayCheck,5,PRO_AOI_IP_36,0,环形线横移4托盘检测,X556,X556
DI,1000,环形线横移4料盘检测1,SW4_SideWay_ReelCheck,6,192.168.200.46,0,环形线横移4料盘检测1,X557,X557 DI,1000,环形线横移4料盘检测1,SW4_SideWay_ReelCheck,6,PRO_AOI_IP_36,0,环形线横移4料盘检测1,X557,X557
DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,192.168.200.46,0,环形线横移4顶升上升端,X558,X558 DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,PRO_AOI_IP_36,0,环形线横移4顶升上升端,X558,X558
DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,192.168.200.46,0,环形线横移4顶升下降端,X559,X559 DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,PRO_AOI_IP_36,0,环形线横移4顶升下降端,X559,X559
,,,,,,,,, ,,,,,,,,,
DO,1000,环形线横移4顶升上升SOL,SW4_TopCylinder_Up,6,192.168.200.46,0,环形线横移4顶升上升SOL,Y557,Y557 DO,1000,环形线横移4顶升上升SOL,SW4_TopCylinder_Up,6,PRO_AOI_IP_36,0,环形线横移4顶升上升SOL,Y557,Y557
DO,1000,环形线横移4顶升下降SOL,SW4_TopCylinder_Down,7,192.168.200.46,0,环形线横移4顶升下降SOL,Y558,Y558 DO,1000,环形线横移4顶升下降SOL,SW4_TopCylinder_Down,7,PRO_AOI_IP_36,0,环形线横移4顶升下降SOL,Y558,Y558
...@@ -234,12 +234,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,12 +234,10 @@ namespace OnlineStore.DeviceLibrary
//上下气缸上升 //上下气缸上升
if (UseAxis.Equals(false)) if (UseAxis.Equals(false))
{ {
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW); CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Down);
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.HIGH);
} }
//顶升气缸下降 //顶升气缸下降
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.HIGH);
} }
} }
internal virtual void CloseCylinderStop() internal virtual void CloseCylinderStop()
...@@ -459,12 +457,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -459,12 +457,27 @@ namespace OnlineStore.DeviceLibrary
protected void InStoreLog(string msg) protected void InStoreLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
LogUtil.info(Name + "【" + posId + "】" + msg); if (posId.Equals(""))
{
LogUtil.info(Name + msg);
}
else
{
LogUtil.info(Name + "[" + posId + "]" + msg);
}
} }
protected void OutStoreLog(string msg) protected void OutStoreLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
LogUtil.info(Name + "【" + posId + "】" + msg); if (posId.Equals(""))
{
LogUtil.info(Name + msg);
}
else
{
LogUtil.info(Name + "[" + posId + "]" + msg);
}
} }
public string GetMoveStr() public string GetMoveStr()
......
...@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
lineStatus = LineStatus.ResetMove; lineStatus = LineStatus.ResetMove;
IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH); IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH);
MoveInfo.NextMoveStep(LineMoveStep.FR_01_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FR_01_MoveCylinder_Up);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.MoveStep + ":上料横移机构上升,出口顶升下降,所有阻挡气缸上升"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":上料横移机构上升,出口顶升下降,所有阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
if (Config.SidesWayNum <= 0) if (Config.SidesWayNum <= 0)
...@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.FR_01_MoveCylinder_Up: case LineMoveStep.FR_01_MoveCylinder_Up:
MoveInfo.NextMoveStep(LineMoveStep.FR_02_BatchAxisHome); MoveInfo.NextMoveStep(LineMoveStep.FR_02_BatchAxisHome);
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.MoveStep + ":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升");
BatchAxis.HomeMove(MoveInfo); BatchAxis.HomeMove(MoveInfo);
UpdownAxis.HomeMove(MoveInfo); UpdownAxis.HomeMove(MoveInfo);
break; break;
...@@ -314,7 +314,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -314,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
StartInStoreP(); StartInStoreP();
} }
} }
if (LineManager.Line.CanProcessLine() && SecondMoveInfo.MoveType.Equals(LineMoveType.None)) if ( SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{ {
StartCheckFixture(); StartCheckFixture();
} }
......
...@@ -40,33 +40,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -40,33 +40,23 @@ namespace OnlineStore.DeviceLibrary
#region 托盘检测 #region 托盘检测
private void StartCheckFixture() private void StartCheckFixture()
{ {
if (Config.SidesWayNum > 0) if (!LineManager.Line.CanProcessLine())
{
int num = TrayManager.GetTrayNum(DeviceID);
if (LineManager.Line.IsDebug && IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.SW_ReelCheck).Equals(IO_VALUE.LOW))
{
if (NeedCurrTray())
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); return;
TrayManager.UpdateSWState(Config.SidesWayNum, 2);
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_06_TopCylinderUp 横移顶升气缸上 升 )");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp);
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
} }
else if (Config.SidesWayNum > 0)
{ {
preTrayNum = num; int num = TrayManager.GetTrayNum(DeviceID);
TrayManager.UpdateSWState(Config.SidesWayNum, 1); bool isTestNeed = LineManager.Line.runStatus <= LineRunStatus.Wait && IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.SW_ReelCheck).Equals(IO_VALUE.LOW);
} bool isNeedTray = IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && num > 0 && preTrayNum.Equals(num).Equals(false) && LineManager.Line.SwNoProcess(Config.SidesWayNum);
} if (isTestNeed||isNeedTray)
else if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && num > 0 && preTrayNum.Equals(num).Equals(false) && LineManager.Line.SwNoProcess(Config.SidesWayNum))
{ {
//判断是否是需要的托盘 //判断是否是需要的托盘
if (NeedCurrTray()) if (NeedCurrTray())
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
TrayManager.UpdateSWState(Config.SidesWayNum, 2); TrayManager.UpdateSWState(Config.SidesWayNum, 2);
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_06_TopCylinderUp 横移顶升气缸上 升 )"); CheckLog("托盘检测:(MIO_06_TopCylinderUp 横移顶升气缸上 升 )");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp);
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
} }
...@@ -86,7 +76,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
if (num > 0 && IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH)) if (num > 0 && IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH))
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_03_StopCylinder2Down FL阻挡1上升)"); CheckLog("托盘检测:(MIO_03_StopCylinder2Down FL阻挡1上升)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_StopCylinder2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_StopCylinder2Down);
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW));
...@@ -123,23 +113,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -123,23 +113,23 @@ namespace OnlineStore.DeviceLibrary
#region 托盘检测 #region 托盘检测
if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopCylinder1Down)) if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_StopCylinder1Down))
{ {
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_02_FixtureCheck FL阻挡1上升,等待FL_TrayCheck=1)"); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_FixtureCheck);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_StopCylinder2Down); CheckLog("托盘检测:" + SecondMoveInfo.MoveStep + "阻挡1上升,等待FL_TrayCheck=1)");
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_TrayCheck, IO_VALUE.HIGH));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_02_FixtureCheck))
{ {
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_03_StopCylinder2Down FL阻挡1上升)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_StopCylinder2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_StopCylinder2Down);
CheckLog("托盘检测:" + SecondMoveInfo.MoveStep + "FL阻挡1上升)");
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_StopCylinder2Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_03_StopCylinder2Down))
{ {
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_04_Wait ,等待编码信号稳定)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
CheckLog("托盘检测:" + SecondMoveInfo.MoveStep + " ,等待编码信号稳定)");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait))
...@@ -164,10 +154,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -164,10 +154,10 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
bool isFull = TrayManager.TrayIsFull(currTrayNum); bool isFull = TrayManager.TrayIsFull(currTrayNum);
LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currTrayNum + "】没有出入料任务,放盘通过~"); LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currTrayNum + "】没有出入料任务,放盘通过~");
CheckLog("托盘放行 SecondStoreMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"); CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " ,移栽2,需要判断是否可以放盘通过,最多等待10000)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
} }
} }
else else
...@@ -180,14 +170,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -180,14 +170,14 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_05_WaitTime)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_05_WaitTime))
{ {
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_06_TopCylinderUp 顶升气缸上 升 )");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp);
CheckLog("托盘检测: " + SecondMoveInfo.MoveStep + " 顶升气缸上 升 )");
CylinderMove(SecondMoveInfo, IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.FL_TopCylinder_Down, IO_Type.FL_TopCylinder_Up);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp))
{ {
CheckLog("托盘检测(流水线阻挡)SecondStoreMove:(MIO_07_LocationCylinderUp , 定位气缸上升 )");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_07_LocationCylinderUp); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_07_LocationCylinderUp);
CheckLog("托盘检测: " + SecondMoveInfo.MoveStep + " , 定位气缸上升 )");
if (Config.SidesWayNum > 0) if (Config.SidesWayNum > 0)
{ {
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Down, IO_Type.SW_LocationCylinder_Up);
...@@ -208,63 +198,56 @@ namespace OnlineStore.DeviceLibrary ...@@ -208,63 +198,56 @@ namespace OnlineStore.DeviceLibrary
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】 ,需要出库,开始出库处理,升降伺服到P1点"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】 ,需要出库,开始出库处理,升降伺服到P1点");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1);
InStoreLog(" MO_201_UpDownToP1 紧急出料移栽:升降伺服到P1点"); InStoreLog(" 紧急出料移栽 " + SecondMoveInfo.MoveStep + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else else
{ {
CheckLog("托盘检测 SecondStoreMove:(MO_13_LoactionCylinder_Down ,托盘号【" + currTrayNum + "】,直接放盘通过,定位气缸下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
CheckLog("托盘检测 " + SecondMoveInfo.MoveStep + ",托盘号【" + currTrayNum + "】,直接放盘通过,定位气缸下降)");
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) && MoveInfo.MoveType.Equals(LineMoveType.None)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_08_WaitInStore) && MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
CheckLog("托盘放行 SecondStoreMove:(MIO_09_WaitLetFixtureGo ,等待移栽完成后放开阻挡)");
StartOutStoreMove(SecondMoveInfo.MoveParam); StartOutStoreMove(SecondMoveInfo.MoveParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_09_WaitLetFixtureGo);
CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " ,等待移栽完成后放开阻挡)");
} }
#endregion #endregion
#region 不需要出出料,直接放行 #region 不需要托盘或移栽入库料盘完成
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_12_MoveOk)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_12_MoveOk))
{ {
////更新托盘条码信息
//string code = CodeManager.ProcessCode(LastCodeList);
//TrayManager.UpdateTrayCode(currTrayNum, code);
//if (code.Equals(""))
//{
// TrayManager.UpdateInStoreNG(currTrayNum, true);
//}
////从服务器获取库位号
//string result = StoreServerManager.CodeReceived(Name, currTrayNum, LastCodeList, LastHeight, LastWidth);
//if (!result.Equals(""))
//{
// TrayManager.UpdateInStoreNG(currTrayNum, true);
// LogUtil.error(result);
//}
InStoreLog(" SecondStoreMove=MO_13_LoactionCylinder_Down 上料横移机构上升,托盘开始放行,定位气缸下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_13_LoactionCylinder_Down))
{
CheckLog("托盘检测 SecondStoreMove:(MO_14_TopCylinder_Down ,托盘号【" + currTrayNum + "】,直接放盘通过,顶升气缸下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
//只有2号横移不需要下降
if (Config.SidesWayNum.Equals(2)) if (Config.SidesWayNum.Equals(2))
{ {
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); //更新横移托盘已处理完成
TrayManager.UpdateSWState(Config.SidesWayNum, 1);
preTrayNum = currTrayNum;
CheckLog("托盘放行: 此处为环形线横移2,不需要下降, (托盘放行结束) ");
SecondMoveInfo.EndMove();
}
else if (Config.SidesWayNum > 0)
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
InStoreLog("托盘放行, " + SecondMoveInfo.MoveStep + " 托盘开始放行,环形线定位气缸下降");
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
CheckLog("托盘放行, " + SecondMoveInfo.MoveStep + " , 顶升气缸下降)");
CylinderMove(SecondMoveInfo, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_13_LoactionCylinder_Down))
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
CheckLog("托盘放行, " + SecondMoveInfo.MoveStep + " ,环形线顶升气缸下降)");
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
}
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_14_TopCylinder_Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_14_TopCylinder_Down))
{ {
if (Config.SidesWayNum > 0) if (Config.SidesWayNum > 0)
...@@ -277,28 +260,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -277,28 +260,28 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
CheckLog("托盘放行 SecondStoreMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " ,移栽2,需要判断是否可以放盘通过,最多等待10000)");
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_15_WaitCanGo)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_15_WaitCanGo))
{ {
CheckLog("托盘放行 SecondStoreMove:(MO_15_StopCylinder2_Down ,阻挡气缸1-2下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_16_StopCylinder2_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_16_StopCylinder2_Down);
CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " ,阻挡气缸1-2下降)");
IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH); IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH));
// SecondMoveInfo.EndStepWait(); // SecondMoveInfo.EndStepWait();
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_16_StopCylinder2_Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_16_StopCylinder2_Down))
{ {
CheckLog("托盘放行 SecondStoreMove:(MO_16_Tray_Check , 阻挡2托盘检测=0), 延时2秒)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_17_Tray_Check); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_17_Tray_Check);
CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " , 阻挡2托盘检测=0), 延时2秒)");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.LOW));
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_17_Tray_Check)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_17_Tray_Check))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_18_StopCylinder_Back); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_18_StopCylinder_Back);
CheckLog("托盘放行 SecondStoreMove:(MO_17_StopCylinder_Back ,FL阻挡2上升 )"); CheckLog("托盘放行 " + SecondMoveInfo.MoveStep + " ,FL阻挡2上升 )");
IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW); IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
...@@ -316,48 +299,48 @@ namespace OnlineStore.DeviceLibrary ...@@ -316,48 +299,48 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_201_UpDownToP1) && MoveInfo.MoveStep >= (LineMoveStep.FO_07_LocationCylinder_Up)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_201_UpDownToP1) && MoveInfo.MoveStep >= (LineMoveStep.FO_07_LocationCylinder_Up))
{ {
if ( MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_202_MoveCylinder_Give); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_202_MoveCylinder_Give);
InStoreLog(" MO_202_MoveCylinder_Give 紧急出料移栽:上料横移机构到放料端"); InStoreLog("紧急出料移栽"+SecondMoveInfo.MoveStep+":上料横移机构到放料端");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_201_UpDownToP1);
InStoreLog(" MO_201_UpDownToP1 紧急出料移栽:上料横移机构到放料端前先上升横移气缸"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_202_MoveCylinder_Give)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_202_MoveCylinder_Give))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_203_MoveCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_203_MoveCylinder_Down);
InStoreLog(" MO_203_MoveCylinder_Down 紧急出料移栽:上料横移机构下降"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构下降");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_203_MoveCylinder_Down)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_203_MoveCylinder_Down))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_204_UpdownAxisToP2); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_204_UpdownAxisToP2);
int targetP = Config.GetUpdownPositionP2(SecondMoveInfo.MoveParam.PlateH); int targetP = Config.GetUpdownPositionP2(SecondMoveInfo.MoveParam.PlateH);
InStoreLog(" MO_204_UpdownAxisToP2 紧急出料移栽:升降伺服下降到指定位置" + targetP); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服下降到指定位置" + targetP);
UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetP, Config.UpdownAxis_P2Speed);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_204_UpdownAxisToP2)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_204_UpdownAxisToP2))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_205_MoveCylinder_Tighten); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_205_MoveCylinder_Tighten);
InStoreLog(" MO_205_MoveCylinder_Tighten 紧急出料移栽:上料气缸夹紧"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料气缸夹紧");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_205_MoveCylinder_Tighten)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_205_MoveCylinder_Tighten))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_206_UpdownAxisToP1); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_206_UpdownAxisToP1);
InStoreLog(" MO_206_UpdownAxisToP1 紧急出料移栽:升降伺服到P1"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":升降伺服到P1");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_206_UpdownAxisToP1)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_206_UpdownAxisToP1))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up);
InStoreLog(" MO_207_MoveCylinder_Up 紧急出料移栽:上料横移机构上升,更新【" + currTrayNum + "】为空托盘"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构上升,更新【" + currTrayNum + "】为空托盘");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
//更新此托盘为空托盘 //更新此托盘为空托盘
...@@ -368,20 +351,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -368,20 +351,20 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_208_MoveCylinder_Take); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_208_MoveCylinder_Take);
InStoreLog(" MO_208_MoveCylinder_Take 紧急出料移栽:上料横移机构到取料端"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到取料端");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_207_MoveCylinder_Up);
InStoreLog(" MO_207_MoveCylinder_Up 紧急出料移栽:上料横移机构到放料端前先上升横移气缸"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + ":上料横移机构到放料端前先上升横移气缸");
CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_208_MoveCylinder_Take)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_208_MoveCylinder_Take))
{ {
InStoreLog(" SecondStoreMove=MO_13_LoactionCylinder_Down 托盘开始放行,定位气缸下降"); InStoreLog(" 紧急出料移栽" + SecondMoveInfo.MoveStep + " 托盘开始放行,定位气缸下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
} }
...@@ -434,7 +417,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -434,7 +417,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After);
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
InStoreLog("检测到料架, FI_01_TrayLocation_After :升降盘定位气缸下降"); InStoreLog("检测到料架, "+MoveInfo.MoveStep+" :升降盘定位气缸下降");
} }
return true ; return true ;
} }
...@@ -445,7 +428,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -445,7 +428,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_07_LocationCylinder_Up);
InStoreLog(" 定位工位检测到料架:FI_07_LocationCylinder_Up缓冲阻挡上升, 定位气缸上升"); InStoreLog(" 定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡上升, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
} }
...@@ -467,7 +450,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -467,7 +450,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
//等待指定时间 //等待指定时间
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
InStoreLog(" FI_03_InLineStart 入料检测:阻挡检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000"); InStoreLog(" 入料检测: " + MoveInfo.SLog + " 阻挡检测有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000");
} }
else else
{ {
...@@ -490,13 +473,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -490,13 +473,13 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep.Equals(LineMoveStep.Wait)) if (MoveInfo.MoveStep.Equals(LineMoveStep.Wait))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FI_01_TrayLocation_After);
InStoreLog(" FI_01_TrayLocation_After 开始:升降盘定位气缸下降"); InStoreLog(" 料架入库" + MoveInfo.SLog + " :升降盘定位气缸下降");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_01_TrayLocation_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_01_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_02_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FI_02_LocationCylinder_Down);
InStoreLog(" FI_02_LocationCylinder_Down 开始:定位气缸下降,提升伺服移动到P1"); InStoreLog(" 料架入库" + MoveInfo.SLog + ":定位气缸下降,提升伺服移动到P1");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
...@@ -512,7 +495,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -512,7 +495,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_07_LocationCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_07_LocationCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_08_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_08_BatchAxisToP2);
InStoreLog(" FI_08_BatchAxisToP2 开始:提升轴下降到位P2,定位气缸上升"); InStoreLog(" 料架入库" + MoveInfo.SLog + ":提升轴下降到位P2,定位气缸上升");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW); IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SL_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SL_LocationCylinder_Up);
...@@ -520,13 +503,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -520,13 +503,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_08_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_08_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_09_TrayLocation_Before); MoveInfo.NextMoveStep(LineMoveStep.FI_09_TrayLocation_Before);
InStoreLog(" FI_09_TrayLocation_Before 开始:升降盘定位气缸前进"); InStoreLog(" 料架入库" + MoveInfo.SLog + ":升降盘定位气缸前进");
TrayLCylinderBefore(MoveInfo); TrayLCylinderBefore(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_09_TrayLocation_Before)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_09_TrayLocation_Before))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_10_AxisUpMove); MoveInfo.NextMoveStep(LineMoveStep.FI_10_AxisUpMove);
InStoreLog(" FI_10_AxisUpMove 开始:上料轴开始慢速上升到P3点,等待检测到料盘"); InStoreLog(" 料架入库" + MoveInfo.SLog + ":上料轴开始慢速上升到P3点,等待检测到料盘");
BatchAxisToP3(); BatchAxisToP3();
} }
#endregion #endregion
...@@ -545,7 +528,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -545,7 +528,7 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.SL_MoveCylinder_Give).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.SL_MoveCylinder_Take).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SL_MoveCylinder_Give).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.SL_MoveCylinder_Take).Equals(IO_VALUE.LOW))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_13_ScanCode); MoveInfo.NextMoveStep(LineMoveStep.FI_13_ScanCode);
InStoreLog(" FI_13_ScanCode 料盘移栽:开始扫码:暂时不扫码"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":开始扫码:暂时不扫码");
LastCodeList = new List<string>(); LastCodeList = new List<string>();
//MoveInfo.WaitList.Add(WaitResultInfo.WaitFeedScanCode()); //MoveInfo.WaitList.Add(WaitResultInfo.WaitFeedScanCode());
...@@ -568,92 +551,97 @@ namespace OnlineStore.DeviceLibrary ...@@ -568,92 +551,97 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_13_ScanCode)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_13_ScanCode))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_14_MoveCylinder_Take); MoveInfo.NextMoveStep(LineMoveStep.FI_14_MoveCylinder_Take);
InStoreLog(" FI_12_MoveCylinder_Down 料盘移栽:上料横移取料端"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_14_MoveCylinder_Take)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_14_MoveCylinder_Take))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_15_UpdownAxisToP3); MoveInfo.NextMoveStep(LineMoveStep.FI_15_UpdownAxisToP3);
InStoreLog(" FI_12_MoveCylinder_Down 料盘移栽:升降轴到P3"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降轴到P3");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_15_UpdownAxisToP3)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_15_UpdownAxisToP3))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_16_MoveCylinder_Tighten); MoveInfo.NextMoveStep(LineMoveStep.FI_16_MoveCylinder_Tighten);
InStoreLog(" FI_13_MoveCylinder_Tighten 料盘移栽:上料横移机构夹紧"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移机构夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_16_MoveCylinder_Tighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_16_MoveCylinder_Tighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_17_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_17_UpdownAxisToP1);
InStoreLog(" FI_14_MoveCylinder_Up 料盘移栽:升降伺服到P1点,同时伺服运动到P3"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
BatchAxisToP3();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_UpdownAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_UpdownAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_17_BatchAxisToP3);
InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":提升伺服运动到P3");
BatchAxisToP3();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_17_BatchAxisToP3))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize); MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize);
LastHeight = GetHeight(); LastHeight = GetHeight();
LastWidth = GetWidth(); LastWidth = GetWidth();
InStoreLog(" FI_15_SaveSize 料盘移栽:记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_18_SaveSize)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_18_SaveSize))
{ {
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_19_MoveCylinder_Emptying); MoveInfo.NextMoveStep(LineMoveStep.FI_19_MoveCylinder_Emptying);
InStoreLog(" FI_16_MoveCylinder_Emptying 料盘移栽:上料横移气缸放料SOL"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize); MoveInfo.NextMoveStep(LineMoveStep.FI_18_SaveSize);
InStoreLog(" FI_15_SaveSize 料盘移栽:上料横移气缸放料SOL前先上升横移气缸"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移气缸放料SOL前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_MoveCylinder_Emptying)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_19_MoveCylinder_Emptying))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_20_WaitTray); MoveInfo.NextMoveStep(LineMoveStep.FI_20_WaitTray);
InStoreLog(" FI_17_WaitTray 料盘移栽:等待空托盘到达,并顶升上升,定位上升"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":等待空托盘到达,并顶升上升,定位上升");
//TODO 此处需要等待空托盘 //TODO 此处需要等待空托盘
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_WaitTray) && SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))//TODO else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_20_WaitTray) && SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_11_CodeRember))//TODO
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_21_MoveCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FI_21_MoveCylinder_Down);
InStoreLog(" FI_18_MoveCylinder_Down 料盘移栽:上料机构下降"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_MoveCylinder_Down)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_21_MoveCylinder_Down))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_22_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_22_UpdownAxisToP2);
int targetPositon = Config.GetUpdownPositionP2(LastHeight); int targetPositon = Config.GetUpdownPositionP2(LastHeight);
InStoreLog(" FI_19_UpdownAxisToP2 料盘移栽:移栽伺服下降到指定位置:" + targetPositon); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":移栽伺服下降到指定位置:" + targetPositon);
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_UpdownAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_22_UpdownAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_23_MoveCylinder_Slack); MoveInfo.NextMoveStep(LineMoveStep.FI_23_MoveCylinder_Slack);
InStoreLog(" FI_20_MoveCylinder_Slack 料盘移栽:上料气缸放松"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料气缸放松");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_MoveCylinder_Slack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_23_MoveCylinder_Slack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_24_UpDownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_24_UpDownAxisToP1);
InStoreLog(" FI_21_UpDownAxisToP1 料盘移栽:升降伺服到P1点"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":升降伺服到P1点");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_UpDownAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_24_UpDownAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_25_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_25_MoveCylinder_Up);
InStoreLog(" FI_22_MoveCylinder_Up 料盘移栽:上料横移机构上升,记录托盘尺寸, 开始放行,"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":上料横移机构上升,记录托盘尺寸, 托盘开始放行");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
Task.Factory.StartNew(delegate
TrayManager.UpdateTrayInfo(currTrayNum, true, 1, "", "", LastHeight, LastWidth); {
//更新托盘条码信息 //更新托盘条码信息
string code = CodeManager.ProcessCode(LastCodeList); string code = CodeManager.ProcessCode(LastCodeList);
TrayManager.UpdateTrayInfo(currTrayNum, true, 1, code, "", LastHeight, LastWidth);
TrayManager.UpdateTrayCode(currTrayNum, code);
if (code.Equals("")) if (code.Equals(""))
{ {
TrayManager.UpdateInStoreNG(currTrayNum, true); TrayManager.UpdateInStoreNG(currTrayNum, true);
...@@ -665,7 +653,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -665,7 +653,9 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateInStoreNG(currTrayNum, true); TrayManager.UpdateInStoreNG(currTrayNum, true);
LogUtil.error(result); LogUtil.error(result);
} }
});
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_12_MoveOk);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_MoveCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_25_MoveCylinder_Up))
{ {
...@@ -678,19 +668,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -678,19 +668,19 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_31_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_31_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_32_TrayLocationCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.FI_32_TrayLocationCylinder_After);
InStoreLog(" FI_32_TrayLocationCylinder_After 上料完成: 升降盘定位气缸后退"); InStoreLog(" 上料完成" + MoveInfo.SLog + ": 升降盘定位气缸后退");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_32_TrayLocationCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_32_TrayLocationCylinder_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_33_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_33_BatchAxisToP1);
InStoreLog(" FI_33_BatchAxisToP1 上料完成:提升伺服到P1点"); InStoreLog(" 上料完成" + MoveInfo.SLog + ":提升伺服到P1点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_33_BatchAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_33_BatchAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_35_OutTopCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_35_OutTopCylinder_Up);
InStoreLog(" FI_34_LocationCylinder_Down 上料完成,出口顶升气缸上升,出料缓冲阻挡上升"); InStoreLog(" 上料完成" + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
} }
...@@ -699,7 +689,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -699,7 +689,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//TODO //TODO
MoveInfo.NextMoveStep(LineMoveStep.FI_36_SideWayLineRun); MoveInfo.NextMoveStep(LineMoveStep.FI_36_SideWayLineRun);
InStoreLog(" FI_36_SideWayLineRun 上料完成, 线体横移电机运转,等待SL1线体出口横移检测"); InStoreLog(" 上料完成" + MoveInfo.SLog + ", 线体横移电机运转,等待SL1线体出口横移检测");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
...@@ -710,7 +700,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -710,7 +700,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_37_LineStop); MoveInfo.NextMoveStep(LineMoveStep.FI_37_LineStop);
InStoreLog(" FI_37_LineStop 上料完成, 料架到达出口,线体横移电机停止 "); InStoreLog(" 上料完成" + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -719,7 +709,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -719,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_37_LineStop)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_37_LineStop))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_38_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FI_38_TopCylinderDown);
InStoreLog(" FI_38_TopCylinderDown 上料完成, 料架到达出口,出口顶升下降,定位气缸下降, "); InStoreLog(" 上料完成" + MoveInfo.SLog + ", 料架到达出口,出口顶升下降,定位气缸下降, ");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -732,22 +722,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -732,22 +722,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog(" 上料完成, ,料架到达出口处, 通知AGV取空料架, 入料流程结束"); InStoreLog(" 上料完成, ,料架到达出口处, 通知AGV取空料架, 入料流程结束");
AgvClient.ReadyEmpty(Config.AgvOutName); AgvClient.ReadyEmpty(Config.AgvOutName);
} }
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_40_OutLineRun))
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_40_OutLineRun);
// InStoreLog(" FI_40_OutLineRun 上料完成, AGV到达,继续转动出口线体,送走出料料架, ");
//}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_40_OutLineRun))
//{
// MoveInfo.NextMoveStep(LineMoveStep.FI_41_OutLineRun);
// InStoreLog(" FI_41_OutLineRun 上料完成, 上料完成, 料架送出, ");
//}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.FI_41_OutLineRun))
//{
// MoveInfo.EndMove();
// runStatus = LineRunStatus.Runing;
// LogUtil.info("空料架已送出,入料结束");
//}
#endregion #endregion
} }
private void FI_12_MoveCylinder_Give() private void FI_12_MoveCylinder_Give()
...@@ -755,14 +730,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -755,14 +730,14 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_12_MoveCylinder_Give); MoveInfo.NextMoveStep(LineMoveStep.FI_12_MoveCylinder_Give);
InStoreLog(" FI_12_MoveCylinder_Up 料盘移栽:横移机构到放料端"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":横移机构到放料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
else else
{ {
//有料盘 //有料盘
MoveInfo.NextMoveStep(LineMoveStep.FI_11_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FI_11_MoveCylinder_Up);
InStoreLog(" FI_11_MoveCylinder_Up 料盘移栽:检测到料盘,横移机构上升"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":检测到料盘,横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
...@@ -776,7 +751,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -776,7 +751,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//无料盘 //无料盘
MoveInfo.NextMoveStep(LineMoveStep.FI_31_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FI_31_BatchAxisToP2);
InStoreLog(" FI_31_BatchAxisToP2 料盘移栽:未检测到料盘,提升伺服到P2点"); InStoreLog(" 料盘移栽" + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
} }
...@@ -849,7 +824,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -849,7 +824,7 @@ namespace OnlineStore.DeviceLibrary
/// 是否需要拦截当前托盘进行处理 /// 是否需要拦截当前托盘进行处理
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
internal bool NeedCurrTray(bool checkAndMove = false ) internal bool NeedCurrTray(bool checkAndMove = false)
{ {
if (IsDebug && runStatus <= LineRunStatus.Wait) if (IsDebug && runStatus <= LineRunStatus.Wait)
{ {
...@@ -864,7 +839,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -864,7 +839,7 @@ namespace OnlineStore.DeviceLibrary
if (Config.IsCanOut.Equals(1)) if (Config.IsCanOut.Equals(1))
{ {
//此托盘是紧急出料盘,需要通过料架出库 //此托盘是紧急出料盘,需要通过料架出库
if ((IOValue(IO_Type.SW_ReelCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.FL_ReelCheck).Equals(IO_VALUE.HIGH))&&info.EmergencyOut) if ((IOValue(IO_Type.SW_ReelCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.FL_ReelCheck).Equals(IO_VALUE.HIGH)) && info.EmergencyOut)
{ {
if (isFull && runStatus.Equals(LineRunStatus.Runing) && MoveInfo.MoveType.Equals(LineMoveType.OutStore)) if (isFull && runStatus.Equals(LineRunStatus.Runing) && MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{ {
...@@ -882,8 +857,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -882,8 +857,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if ((LineManager.Line.IsDebug&&MoveInfo.MoveType.Equals(LineMoveType.InStore))|| bool trayCanUse = LineManager.Line.runStatus <= LineRunStatus.Wait || (!isFull);
( !isFull && runStatus.Equals(LineRunStatus.Runing) && MoveInfo.MoveType.Equals(LineMoveType.InStore))) if (trayCanUse && runStatus.Equals(LineRunStatus.Runing) && MoveInfo.MoveType.Equals(LineMoveType.InStore))
{ {
//入料执行中, 且需要空托盘 //入料执行中, 且需要空托盘
if (MoveInfo.MoveStep >= LineMoveStep.FI_11_MoveCylinder_Up && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray) if (MoveInfo.MoveStep >= LineMoveStep.FI_11_MoveCylinder_Up && MoveInfo.MoveStep <= LineMoveStep.FI_20_WaitTray)
...@@ -923,7 +898,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -923,7 +898,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FO_07_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_07_LocationCylinder_Up);
InStoreLog(" FO_07_LocationCylinder_Up 定位工位检测到料架:缓冲阻挡上升, 定位气缸上升"); OutStoreLog(" 定位工位检测到料架"+MoveInfo.MoveStep+":缓冲阻挡上升, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
} }
...@@ -936,7 +911,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -936,7 +911,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
//等待指定时间 //等待指定时间
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
InStoreLog(" FO_03_InLineStart 出料检测:阻挡工位有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000"); OutStoreLog(" 出料检测" + MoveInfo.SLog + ":阻挡工位有料架,进料阻挡上升,缓冲阻挡下降,流水线转动2000");
} }
else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.HIGH))
{ {
...@@ -946,7 +921,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -946,7 +921,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH); IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
//等待指定时间 //等待指定时间
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
InStoreLog(" FO_03_InLineStart 出料检测:入料工位有料架,进料阻挡下降,缓冲阻挡上升,流水线转动2000"); OutStoreLog(" 出料检测" + MoveInfo.SLog + ":入料工位有料架,进料阻挡下降,缓冲阻挡上升,流水线转动2000");
} }
else else
{ {
...@@ -969,12 +944,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -969,12 +944,12 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After); MoveInfo.NextMoveStep(LineMoveStep.FO_01_TrayLocation_After);
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
InStoreLog("检测到料架, FO_01_TrayLocation_After :升降盘定位气缸后退"); OutStoreLog(" 出料检测" + MoveInfo.SLog + ":升降盘定位气缸后退");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationCylinder_Down);
InStoreLog(" FO_02_LocationCylinder_Down 开始:定位气缸下降,提升轴移动到P1"); OutStoreLog("出库: " + MoveInfo.SLog + " 开始:定位气缸下降,提升轴移动到P1");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
...@@ -990,26 +965,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -990,26 +965,26 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_07_LocationCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_07_LocationCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_08_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_08_BatchAxisToP2);
InStoreLog(" FO_08_BatchAxisToP2 开始:提升轴下降到位P2"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :提升轴下降到位P2");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW); IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_08_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_08_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_09_TrayLocation_Before); MoveInfo.NextMoveStep(LineMoveStep.FO_09_TrayLocation_Before);
InStoreLog(" FO_09_TrayLocation_Before 开始:升降盘定位气缸前进"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :升降盘定位气缸前进");
TrayLCylinderBefore(MoveInfo); TrayLCylinderBefore(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_09_TrayLocation_Before)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_09_TrayLocation_Before))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_10_AxisUpMove); MoveInfo.NextMoveStep(LineMoveStep.FO_10_AxisUpMove);
InStoreLog(" FO_10_AxisUpMove 开始:上料轴开始慢速上升到P3点"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :上料轴开始慢速上升到P3点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP3, Config.BatchAxis_TargetSpeed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP3, Config.BatchAxis_TargetSpeed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_10_AxisUpMove)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_10_AxisUpMove))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_11_AxisDownMove); MoveInfo.NextMoveStep(LineMoveStep.FO_11_AxisDownMove);
InStoreLog(" FO_31_BatchAxisToP2 料盘移栽:提升伺服下降指定的高度"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + " :提升伺服下降指定的高度");
int targetPosition = Config.BatchAxisP3 + lastOutParam.PlateH * Config.Height_ChangeValue; int targetPosition = Config.BatchAxisP3 + lastOutParam.PlateH * Config.Height_ChangeValue;
BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_TargetSpeed); BatchAxis.AbsMove(MoveInfo, targetPosition, Config.BatchAxis_TargetSpeed);
...@@ -1017,43 +992,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -1017,43 +992,43 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_11_AxisDownMove)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_11_AxisDownMove))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_12_MoveCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_12_MoveCylinder_Down);
InStoreLog(" FO_12_MoveCylinder_Down 料盘移栽:出料横移机构下降"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":出料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_12_MoveCylinder_Down)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_12_MoveCylinder_Down))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_13_MoveCylinder_Slack); MoveInfo.NextMoveStep(LineMoveStep.FO_13_MoveCylinder_Slack);
InStoreLog(" FO_13_MoveCylinder_Slack 料盘移栽:出料横移机构放松"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":出料横移机构放松");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_13_MoveCylinder_Slack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_13_MoveCylinder_Slack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_14_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_14_MoveCylinder_Up);
InStoreLog(" FO_14_MoveCylinder_Up 料盘移栽:上料横移机构上升"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":上料横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_14_MoveCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_14_MoveCylinder_Up))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_31_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_31_BatchAxisToP2);
InStoreLog(" FO_31_BatchAxisToP2 出料完成:未检测到料盘,提升伺服到P2点"); OutStoreLog("出库料盘移栽 " + MoveInfo.SLog + ":未检测到料盘,提升伺服到P2点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocationCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocationCylinder_After);
InStoreLog(" FO_32_TrayLocationCylinder_After 出料完成: 升降盘定位气缸后退"); OutStoreLog("出料完成 " + MoveInfo.SLog + ": 升降盘定位气缸后退");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocationCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocationCylinder_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1);
InStoreLog(" FO_33_BatchAxisToP1 出料完成:提升伺服到P1点"); OutStoreLog("出料完成 " + MoveInfo.SLog + ":提升伺服到P1点");
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_33_BatchAxisToP1)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_33_BatchAxisToP1))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_35_OutTopCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_35_OutTopCylinder_Up);
InStoreLog(" FO_34_LocationCylinder_Down 出料完成,出口顶升气缸上升,出料缓冲阻挡上升"); OutStoreLog("出料完成 " + MoveInfo.SLog + ",出口顶升气缸上升,出料缓冲阻挡上升");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Down, IO_Type.SL_OutTopCylinder_Up);
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
} }
...@@ -1065,7 +1040,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1065,7 +1040,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//TODO //TODO
MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_36_SideWayLineRun);
InStoreLog(" FO_36_SideWayLineRun 出料完成, 线体横移电机运转,等待料架到达出口"); OutStoreLog("出料完成 " + MoveInfo.SLog + ", 线体横移电机运转,等待料架到达出口");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.HIGH);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.HIGH);
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
...@@ -1076,7 +1051,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1076,7 +1051,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_37_LineStop); MoveInfo.NextMoveStep(LineMoveStep.FO_37_LineStop);
InStoreLog(" FO_37_LineStop 出料完成, 料架到达出口,线体横移电机停止 "); OutStoreLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -1085,7 +1060,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1085,7 +1060,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopCylinderDown);
InStoreLog(" FO_38_TopCylinderDown 出料完成, 料架到达出口,出口顶升下降,定位气缸下降, "); OutStoreLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降,定位气缸下降, ");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
...@@ -1093,17 +1068,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -1093,17 +1068,17 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopCylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
InStoreLog(" FO_39_OutLineRun 出料完成, 出口线体运转,料架到达出口处, 通知AGV取空料架, "); OutStoreLog("出料完成 " + MoveInfo.SLog + ", 出口线体运转,料架到达出口处, 通知AGV取空料架, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_40_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_40_OutLineRun);
InStoreLog(" FO_40_OutLineRun 出料完成, AGV到达,继续转动出口线体,送走出料料架, "); OutStoreLog("出料完成 " + MoveInfo.SLog + ", AGV到达,继续转动出口线体,送走出料料架, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_40_OutLineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_41_OutLineRun); MoveInfo.NextMoveStep(LineMoveStep.FO_41_OutLineRun);
InStoreLog(" FO_41_OutLineRun 出料完成, 上料完成, 料架送出, "); OutStoreLog("上料完成 " + MoveInfo.SLog + ", 料架送出, ");
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_41_OutLineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_41_OutLineRun))
{ {
......
...@@ -116,39 +116,52 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,39 +116,52 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置 //初始化摄像机配置
CodeManager.LoadConfig(); CodeManager.LoadConfig();
List<string> cioList = new List<string>(ioList);
string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId); string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId);
if (IsDebug) if (IsDebug)
{ {
try try
{ {
cioList = new List<string>();
string[] testDeviceIdList = ids.Split(','); string[] testDeviceIdList = ids.Split(',');
ioList = new List<string>();
foreach (string str in testDeviceIdList) foreach (string str in testDeviceIdList)
{ {
int id = Convert.ToInt32(str); int id = Convert.ToInt32(str);
if (FeedingEquipMap.ContainsKey(id)) if (FeedingEquipMap.ContainsKey(id))
{ {
FeedingEquip feed = FeedingEquipMap[id]; FeedingEquip feed = FeedingEquipMap[id];
ioList.AddRange(feed.Config.IOIPList); cioList.AddRange(feed.Config.IOIPList);
} }
else if (ProvidingEquipMap.ContainsKey(id)) else if (ProvidingEquipMap.ContainsKey(id))
{ {
ProvidingEquip feed = ProvidingEquipMap[id]; ProvidingEquip feed = ProvidingEquipMap[id];
ioList.AddRange(feed.Config.IOIPList); cioList.AddRange(feed.Config.IOIPList);
} }
else if (DisLineMap.ContainsKey(id)) else if (DisLineMap.ContainsKey(id))
{ {
DischargeLine feed = DisLineMap[id]; DischargeLine feed = DisLineMap[id];
ioList.AddRange(feed.Config.IOIPList); cioList.AddRange(feed.Config.IOIPList);
} }
else if (MoveEquipMap.ContainsKey(id)) else if (MoveEquipMap.ContainsKey(id))
{ {
MoveEquip equip = MoveEquipMap[id]; MoveEquip equip = MoveEquipMap[id];
ioList.AddRange(equip.Config.IOIPList); cioList.AddRange(equip.Config.IOIPList);
}else if (id.Equals(0)) }else if (id.Equals(0))
{ {
ioList.AddRange(Config.IOIPList); cioList = new List<string>();
cioList.AddRange(ioList);
List<string> removeList = new List<string>() {
"192.168.101.22",
"192.168.101.23"
};
foreach(string s in removeList)
{
if (cioList.Contains(s))
{
cioList.Remove(s);
}
}
} }
} }
} }
...@@ -160,7 +173,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -160,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
IOManager.instance.ConnectionIOList(ioList); IOManager.instance.ConnectionIOList(cioList);
Thread.Sleep(5); Thread.Sleep(5);
if (!IsDebug) if (!IsDebug)
{ {
...@@ -253,7 +266,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -253,7 +266,7 @@ namespace OnlineStore.DeviceLibrary
{ {
AgvClient.Init(); AgvClient.Init();
} }
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
StartTime = DateTime.Now; StartTime = DateTime.Now;
...@@ -296,7 +309,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -296,7 +309,8 @@ namespace OnlineStore.DeviceLibrary
TrayManager.TrayErrorMsg = ""; TrayManager.TrayErrorMsg = "";
SetWarnMsg(""); SetWarnMsg("");
PreIsHasProcess = true; PreIsHasProcess = true;
MoveInfo.NewMove(LineMoveType.Reset);
MoveInfo.NextMoveStep(LineMoveStep.Wait);
if (TrayManager.ErrorStoreId > 0) if (TrayManager.ErrorStoreId > 0)
{ {
if (MoveEquipMap.ContainsKey(TrayManager.ErrorStoreId)) if (MoveEquipMap.ContainsKey(TrayManager.ErrorStoreId))
...@@ -308,13 +322,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -308,13 +322,21 @@ namespace OnlineStore.DeviceLibrary
WriteDrivetMotorRun( IO_VALUE.LOW); WriteDrivetMotorRun( IO_VALUE.LOW);
//NG气缸后退 //NG气缸后退
CylinderMove(null, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After); CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
////阻挡都上升
//IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
//IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
//横移轨道下降 //横移轨道下降
SideWayReset(); SideWayStop();
CylinderMove(MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
} }
...@@ -338,6 +360,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -338,6 +360,7 @@ namespace OnlineStore.DeviceLibrary
//停止运动 //停止运动
MoveInfo.EndMove(); MoveInfo.EndMove();
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
//重置通用处理 //重置通用处理
...@@ -461,7 +484,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -461,7 +484,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void WriteDrivetMotorRun(IO_VALUE value) public void WriteDrivetMotorRun(IO_VALUE value)
{ {
IOMove(IO_Type.DriveMotor_Run1, value); IOMove(IO_Type.DriveMotor_Run1, value);
IOMove(IO_Type.DriveMotor_Run2, value); IOMove(IO_Type.DriveMotor_Run2, value);
...@@ -487,37 +510,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,37 +510,37 @@ namespace OnlineStore.DeviceLibrary
} }
private void SleepProcess() private void SleepProcess()
{ {
//休眠处理 ////休眠处理
//判断所有的盘的都是空盘 ////判断所有的盘的都是空盘
bool isHasO = isHasProcess(); //bool isHasO = isHasProcess();
if (!isHasO) //if (!isHasO)
{ //{
if (IsSleep) // if (IsSleep)
{ // {
return; // return;
} // }
if (PreIsHasProcess.Equals(isHasO)) // if (PreIsHasProcess.Equals(isHasO))
{ // {
//判断时间是否需要休眠 // //判断时间是否需要休眠
TimeSpan span = DateTime.Now - LastNoOperateTime; // TimeSpan span = DateTime.Now - LastNoOperateTime;
if (span.TotalSeconds > Config.Sleep_MSeconds) // if (span.TotalSeconds > Config.Sleep_MSeconds)
{ // {
LogUtil.info( Name + "***********已经【" + span.TotalSeconds + "】秒没有操作了,开始进入休眠状态"); // LogUtil.info( Name + "***********已经【" + span.TotalSeconds + "】秒没有操作了,开始进入休眠状态");
UpdateSleep(true); // UpdateSleep(true);
} // }
} // }
else // else
{ // {
PreIsHasProcess = isHasO; // PreIsHasProcess = isHasO;
LastNoOperateTime = DateTime.Now; // LastNoOperateTime = DateTime.Now;
} // }
} //}
else //else
{ //{
PreIsHasProcess = isHasO; // PreIsHasProcess = isHasO;
UpdateSleep(false); // UpdateSleep(false);
} //}
} }
#endregion #endregion
...@@ -830,7 +853,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -830,7 +853,7 @@ namespace OnlineStore.DeviceLibrary
} }
MoveInfo.EndMove(); MoveInfo.EndMove();
WriteDrivetMotorRun( IO_VALUE.LOW); WriteDrivetMotorRun(IO_VALUE.LOW);
IOMove(IO_Type.NGCylinder_After, IO_VALUE.LOW); IOMove(IO_Type.NGCylinder_After, IO_VALUE.LOW);
IOMove(IO_Type.NGCylinder_Before, IO_VALUE.LOW); IOMove(IO_Type.NGCylinder_Before, IO_VALUE.LOW);
IOMove(IO_Type.SW4_MotorRun, IO_VALUE.LOW); IOMove(IO_Type.SW4_MotorRun, IO_VALUE.LOW);
...@@ -844,6 +867,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -844,6 +867,12 @@ namespace OnlineStore.DeviceLibrary
protected override void ResetProcess() protected override void ResetProcess()
{ {
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (!MoveInfo.IsInWait)
{
bool isOk = true; bool isOk = true;
//判断是否所有的已经返回完成 //判断是否所有的已经返回完成
...@@ -858,40 +887,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -858,40 +887,42 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
SetWarnMsg( moveEquip.Name + "在复位过程中报警,需要重新复位"); SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位");
}
} }
} }
if (!ResetSingleISOk())
{
isOk = false;
} }
//if (!ResetSingleISOk())
//{
// isOk = false;
//}
if (isOk) if (isOk)
{ {
PreIsHasProcess = false; PreIsHasProcess = false;
//打开流水线 //打开流水线
WriteDrivetMotorRun( IO_VALUE.HIGH); WriteDrivetMotorRun(IO_VALUE.HIGH);
//所有原点重置完成 //所有原点重置完成
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
LogUtil.info( Name + "所有设备重置完成,打开流水线,开始运转!"); lineStatus = LineStatus.StoreOnline;
LogUtil.info(Name + "所有设备重置完成,打开流水线,开始运转!");
} }
} }
private bool ResetSingleISOk()
{
//气缸需要到位
if (IOValue(IO_Type.SW4_TopCylinder_Down).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.NGCylinder_After).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.SW4_TopCylinder_Up).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.NGCylinder_Before).Equals(IO_VALUE.LOW)
)
{
return true;
}
else
{
return false;
}
} }
//private bool ResetSingleISOk()
//{
// //气缸需要到位
// if (IOValue(IO_Type.SW4_TopCylinder_Down).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.NGCylinder_After).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.SW4_TopCylinder_Up).Equals(IO_VALUE.LOW) &&
// IOValue(IO_Type.NGCylinder_Before).Equals(IO_VALUE.LOW)
// )
// {
// return true;
// }
// else
// {
// return false;
// }
//}
} }
......
...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
public bool CanProcessLine(bool isCheckSleep = true) public bool CanProcessLine(bool isCheckSleep = true)
{ {
if (IsDebug) if (runStatus<=LineRunStatus.Wait)
{ {
return true; return true;
} }
...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 横移处理 #region 横移处理-
/// <summary> /// <summary>
/// 横移无处理 /// 横移无处理
/// </summary> /// </summary>
...@@ -387,18 +387,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -387,18 +387,6 @@ namespace OnlineStore.DeviceLibrary
private static LineMoveInfo SW41_MoveInfo = null; private static LineMoveInfo SW41_MoveInfo = null;
private static LineMoveInfo SW23_MoveInfo = null; private static LineMoveInfo SW23_MoveInfo = null;
private bool SideWayReset()
{
SideWayStop();
CylinderMove(null, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(null, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(null, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
CylinderMove(null, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
CylinderMove(null, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
return true;
}
private void SideWayStop() private void SideWayStop()
{ {
SideWay41IsWait = false; SideWay41IsWait = false;
......
...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.MH_UpDownCylinder_Up: case LineMoveStep.MH_UpDownCylinder_Up:
MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back); MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back);
LogInfo(MoveInfo.MoveType + " :: (上升到位,顶升气缸下降,前后气缸回退 )开始"); LogInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸回退 )开始");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
......
...@@ -62,41 +62,41 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,41 +62,41 @@ namespace OnlineStore.DeviceLibrary
#region 移载装置 移栽物品操作 #region 移载装置 移栽物品操作
if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_50_StartOutProcess)) if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_50_StartOutProcess))
{ {
OutStoreLog("出库: MO_51_BeforeAfterCylinderBefore ( 前后气缸前进 )");
MoveInfo.NextMoveStep(LineMoveStep.MO_51_BeforeAfterCylinderBefore); MoveInfo.NextMoveStep(LineMoveStep.MO_51_BeforeAfterCylinderBefore);
OutStoreLog("出库 "+MoveInfo.MoveStep+": 前后气缸前进 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_51_BeforeAfterCylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_51_BeforeAfterCylinderBefore))
{ {
OutStoreLog("出库: MO_52_UpDownCylinderDown ( 上下气缸1下降 )");
MoveInfo.NextMoveStep(LineMoveStep.MO_52_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MO_52_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 )");
UpdownDownBoxMove(MoveInfo.MoveParam.PlateH); UpdownDownBoxMove(MoveInfo.MoveParam.PlateH);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_52_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_52_UpDownCylinderDown))
{ {
OutStoreLog("出库: MO_53_UpDownCylinderDownWait ( 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)");
MoveInfo.NextMoveStep(LineMoveStep.MO_53_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.MO_53_UpDownCylinderDownWait);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_53_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_53_UpDownCylinderDownWait))
{ {
OutStoreLog("出库: MO_54_ClampCylinderSlack ( 夹料气缸1夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.MO_54_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.MO_54_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_54_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_54_ClampCylinderSlack))
{ {
OutStoreLog("出库: MO_55_UpDownCylinderUp ( 上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MO_55_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MO_55_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_55_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_55_UpDownCylinderUp))
{ {
OutStoreLog("出库: MO_56_BeforeAfterCylinderAfter( 前后气缸1后退)");
MoveInfo.NextMoveStep(LineMoveStep.MO_56_BeforeAfterCylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.MO_56_BeforeAfterCylinderAfter);
OutStoreLog("出库 " + MoveInfo.SLog + ": 前后气缸1后退)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
} }
#endregion #endregion
...@@ -106,7 +106,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -106,7 +106,9 @@ namespace OnlineStore.DeviceLibrary
&& MoveInfo.MoveStep.Equals(LineMoveStep.MO_56_BeforeAfterCylinderAfter) && MoveInfo.MoveStep.Equals(LineMoveStep.MO_56_BeforeAfterCylinderAfter)
&& !SecondMoveInfo.IsInWait) && !SecondMoveInfo.IsInWait)
{ {
OutStoreLog("出库:( MO_06_UpDownCylinderDown,夹具检测编码完成, 上下气缸1下降 )"); //去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹具检测编码完成, 上下气缸1下降 )");
if (MoveInfo.MoveParam != null) if (MoveInfo.MoveParam != null)
{ {
MoveInfo.MoveParam.TrayNumber = SecondMoveInfo.MoveParam.TrayNumber; MoveInfo.MoveParam.TrayNumber = SecondMoveInfo.MoveParam.TrayNumber;
...@@ -116,8 +118,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,8 +118,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = SecondMoveInfo.MoveParam; MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
} }
//去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
UpdownDownMove(MoveInfo.MoveParam.PlateH); UpdownDownMove(MoveInfo.MoveParam.PlateH);
////判断盘号,如果是七寸盘,不需要下降,直接放盘 ////判断盘号,如果是七寸盘,不需要下降,直接放盘
...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown))
{ {
OutStoreLog("出库:(MO_07_ClampCylinderTighten 夹料气缸1放松 )"); OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松 )");
int bagWidth = MoveInfo.MoveParam.PlateW; int bagWidth = MoveInfo.MoveParam.PlateW;
LogInfo("【" + posId + "】出库时,更新盘空满信息 托盘号【" + MoveInfo.MoveParam.TrayNumber + "】,是否有料盘【" + true + "】,出库入库【" + 2 + "】"); LogInfo("【" + posId + "】出库时,更新盘空满信息 托盘号【" + MoveInfo.MoveParam.TrayNumber + "】,是否有料盘【" + true + "】,出库入库【" + 2 + "】");
...@@ -150,8 +150,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -150,8 +150,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_ClampCylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_ClampCylinderTighten))
{ {
OutStoreLog("出库:(MO_08_UpDownCylinderUp 上下气缸1上升)");
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_UpDownCylinderUp); this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp))
...@@ -224,21 +224,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -224,21 +224,21 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDown)) if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDown))
{ {
InStoreLog("入库:(MI_07_UpDownCylinderDownWait, 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧");
MoveInfo.NextMoveStep(LineMoveStep.MI_07_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.MI_07_UpDownCylinderDownWait);
InStoreLog("入库 " + MoveInfo.SLog + ": 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
//只有当BOX可以进行出入库时,移栽物品,防止卡住 //只有当BOX可以进行出入库时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDownWait))
{ {
InStoreLog("入库:(MI_08_ClampCylinderSlack,夹料气缸1夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.MI_08_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.MI_08_ClampCylinderSlack);
InStoreLog("入库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_ClampCylinderSlack))
{ {
InStoreLog("入库:(MI_09_UpDownCylinderUp,上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp);
InStoreLog("入库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp))
......
...@@ -255,21 +255,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -255,21 +255,21 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown)) if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown))
{ {
InStoreLog("出料:(PO_02_UpDownCylinderDownWait, 上下气缸1下降后等待0.3秒再夹紧");
MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait); MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait);
OutStoreLog("出库 "+MoveInfo.SLog+" : 上下气缸1下降后等待0.3秒再夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
//只有当BOX可以进行出出料时,移栽物品,防止卡住 //只有当BOX可以进行出出料时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait))
{ {
InStoreLog("出料:(PO_02_UpDownCylinderDownWait,夹料气缸夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack); MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack))
{ {
InStoreLog("出料:(PO_04_UpDownCylinderUp,上下气缸上升)");
MoveInfo.NextMoveStep(LineMoveStep.PO_04_UpDownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.PO_04_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + " : 上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove(); UpdownUpMove();
} }
...@@ -292,34 +292,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -292,34 +292,34 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox))
{ {
InStoreLog("出料:(PO_06_BeforeAfterCylinderBefore,前后气缸前进)");
MoveInfo.NextMoveStep(LineMoveStep.PO_06_BeforeAfterCylinderBefore); MoveInfo.NextMoveStep(LineMoveStep.PO_06_BeforeAfterCylinderBefore);
OutStoreLog("出库:PO_06_BeforeAfterCylinderBefore,前后气缸前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore))
{ {
InStoreLog("出料:(PO_07_UpDownCylinderDown ,上下气缸下降)");
MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown);
OutStoreLog("出库:PO_07_UpDownCylinderDown ,上下气缸下降)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH); UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown))
{ {
InStoreLog("出料: (PO_08_ClampCylinderTighten,夹料气缸放松)");
MoveInfo.NextMoveStep(LineMoveStep.PO_08_ClampCylinderTighten); MoveInfo.NextMoveStep(LineMoveStep.PO_08_ClampCylinderTighten);
InStoreLog("出料: (PO_08_ClampCylinderTighten,夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_ClampCylinderTighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_ClampCylinderTighten))
{ {
InStoreLog("出料:(PO_09_UpdownCylinderUp,上下气缸上升)");
MoveInfo.NextMoveStep(LineMoveStep.PO_09_UpdownCylinderUp); MoveInfo.NextMoveStep(LineMoveStep.PO_09_UpdownCylinderUp);
OutStoreLog("出库:PO_09_UpdownCylinderUp,上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove(); UpdownUpMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp))
{ {
InStoreLog("出料:(PO_10_BeforeAfterCylinderAfter,前后气缸后退,等待4000 )");
MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter); MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter);
OutStoreLog("出库:PO_10_BeforeAfterCylinderAfter,前后气缸后退,等待4000 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000));
......
...@@ -152,6 +152,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -152,6 +152,7 @@ namespace OnlineStore.DeviceLibrary
internal static bool RightTrayCode(int trayNum, int preTrayNum, bool isCanUpdateMax) internal static bool RightTrayCode(int trayNum, int preTrayNum, bool isCanUpdateMax)
{ {
return true;
int defNext = preTrayNum + 1; int defNext = preTrayNum + 1;
if (preTrayNum.Equals(0) || MaxTrayNum.Equals(0) || trayNum.Equals(defNext)) if (preTrayNum.Equals(0) || MaxTrayNum.Equals(0) || trayNum.Equals(defNext))
{ {
......
...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
Thread.Sleep(60); Thread.Sleep(10);
} }
else else
{ {
......
...@@ -82,6 +82,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -82,6 +82,10 @@ namespace OnlineStore.DeviceLibrary
{ {
get { return moveStep; } get { return moveStep; }
} }
public string SLog
{
get { return moveStep + ""; }
}
public void NextMoveStep(LineMoveStep step) public void NextMoveStep(LineMoveStep step)
{ {
......
...@@ -623,7 +623,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -623,7 +623,10 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:上料横移机构上升,同时伺服运动到P3 /// 料盘移栽:上料横移机构上升,同时伺服运动到P3
/// </summary> /// </summary>
FI_17_UpdownAxisToP1 , FI_17_UpdownAxisToP1 ,
/// <summary>
/// 料盘移栽:批量轴到P3点,检测是否有料盘
/// </summary>
FI_17_BatchAxisToP3,
/// <summary> /// <summary>
/// 料盘移栽:记录高度尺寸 /// 料盘移栽:记录高度尺寸
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!