Commit 261a5797 LN

横移机构可以同时存在两个托盘

1 个父辈 74efec2b
...@@ -162,7 +162,7 @@ AIO的dll更新,增加重连功能。 ...@@ -162,7 +162,7 @@ AIO的dll更新,增加重连功能。
上料模块,只有料盘到达流水线上方后才拦截托盘。 上料模块,只有料盘到达流水线上方后才拦截托盘。
20200228修改,横移机构可以同时存在两个托盘
......
...@@ -317,7 +317,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -317,7 +317,8 @@ namespace OnlineStore.DeviceLibrary
//横移轨道下降 //横移轨道下降
SideWayStop(); SideWayStop();
SW23WaitTrayNum = -1;
SW41WaitTrayNum = -1;
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
......
...@@ -147,6 +147,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -147,6 +147,9 @@ namespace OnlineStore.DeviceLibrary
{ {
int storeId = checkWaitInfo.MoveParam.GetStoreId(); int storeId = checkWaitInfo.MoveParam.GetStoreId();
wait.IsEnd = LineServer.BoxCanReviceTray(storeId); wait.IsEnd = LineServer.BoxCanReviceTray(storeId);
}else if (wait.WaitType.Equals(WaitEnum.W010_SWCanTopUp))
{
wait.IsEnd = SwCanUpMove(wait.TargetPosition);
} }
if (wait.IsEnd && checkWaitInfo.OneWaitCanEndStep) if (wait.IsEnd && checkWaitInfo.OneWaitCanEndStep)
{ {
...@@ -221,119 +224,129 @@ namespace OnlineStore.DeviceLibrary ...@@ -221,119 +224,129 @@ namespace OnlineStore.DeviceLibrary
#region 横移处理- #region 横移处理-
internal int SW23WaitTrayNum = -1;
internal int SW41WaitTrayNum = -1;
internal int Sw41TrayNum = 0; internal int Sw41TrayNum = 0;
internal int Sw23TrayNum = 0; internal int Sw23TrayNum = 0;
private void Equip_TrayPEndEvent(int swNum, int trayNum) private void Equip_TrayPEndEvent(int swNum, int trayNum)
{ {
try { try
if (swNum <= 0 || this.runStatus <= (LineRunStatus.Wait))
{
return;
}
if (swNum.Equals(2))
{ {
if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None)) if (swNum <= 0 || this.runStatus <= (LineRunStatus.Wait))
{ {
Sw23TrayNum = trayNum; return;
SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck);
SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,托盘号 [" + Sw23TrayNum + "] ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
}
else
{
LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW23_MoveInfo 忙碌中");
} }
} if (swNum.Equals(2))
else if (swNum.Equals(4))
{
if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
Sw41TrayNum = trayNum; if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None))
SW41_MoveInfo.NewMove(LineMoveType.InStore); {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck); Sw23TrayNum = trayNum;
SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] "); SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down); SW23WaitTrayNum = -1;
CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down); SWLog("横移轨道23:检测到SW2_TrayCheck,再次检测, 托盘号 [" + Sw23TrayNum + "] ,清空 SW23WaitTrayNum=" + SW23WaitTrayNum);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
// CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
// CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
}
else
{
SW23WaitTrayNum = trayNum;
LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW23_MoveInfo 忙碌中,记录 SW23WaitTrayNum="+ SW23WaitTrayNum);
}
} }
else else if (swNum.Equals(4))
{ {
LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW41_MoveInfo 忙碌中"); if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None))
{
Sw41TrayNum = trayNum;
SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
SW41WaitTrayNum = -1;
SWLog("横移轨道41:检测到SW4_TrayCheck,再次检测,托盘号 [" + Sw41TrayNum + "] ,清空 SW41WaitTrayNum=" + SW41WaitTrayNum);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
//CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
// CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
}
else
{
SW41WaitTrayNum = trayNum;
LogInfo("Equip_TrayPEndEvent【" + swNum + "】【" + trayNum + "】失败,SW41_MoveInfo 忙碌中,记录 SW41WaitTrayNum ="+ SW41WaitTrayNum);
}
} }
} }
}catch(Exception ex) catch (Exception ex)
{ {
LogUtil.error(Name + "Equip_TrayPEndEvent出错:",ex); LogUtil.error(Name + "Equip_TrayPEndEvent出错:", ex);
} }
} }
/// <summary> /// <summary>
/// 入料三和出料四使用,判断是否可以开始处理托盘
/// 横移无处理,上料机构和出料机构判断使用 /// 横移无处理,上料机构和出料机构判断使用
/// </summary> /// </summary>
internal bool SwNoProcess(int sidesWayNum) internal bool SwNoProcess(int sidesWayNum)
{ {
//20200228修改,横移机构可以同时存在两个托盘
try try
{ {
if (LineManager.Line.runStatus <= LineRunStatus.Wait || sidesWayNum <= 0) if (LineManager.Line.runStatus <= LineRunStatus.Wait || sidesWayNum <= 0)
{ {
return true; return true;
} }
if (sidesWayNum.Equals(2)) if (sidesWayNum.Equals(2) && SW23WaitTrayNum < 0)
{ {
LineMoveInfo moveInfo = FeedingEquipMap[104].SecondMoveInfo; // LineMoveInfo moveInfo = FeedingEquipMap[104].SecondMoveInfo;
if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None)) if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
return true;
if (moveInfo.MoveType.Equals(LineMoveType.None)) //if (moveInfo.MoveType.Equals(LineMoveType.None))
{ //{
return true; // return true;
} //}
else if (moveInfo.MoveType.Equals(LineMoveType.CheckFixture) && //else if (moveInfo.MoveType.Equals(LineMoveType.CheckFixture) &&
moveInfo.MoveStep >= LineMoveStep.MO_15_WaitCanGo && // moveInfo.MoveStep >= LineMoveStep.MO_15_WaitCanGo &&
moveInfo.MoveStep <= LineMoveStep.MO_18_StopCylinder_Back) //moveInfo.MoveStep <= LineMoveStep.MO_18_StopCylinder_Back)
{ //{
return true; // return true;
} //}
} else if (SW23_MoveInfo.MoveStep .Equals( LineMoveStep.SW12_WaitTrayGo) }
&& moveInfo.MoveType.Equals(LineMoveType.None)) else if (SW23_MoveInfo.MoveStep <= (LineMoveStep.SW12_WaitTrayGo)
{ && SW23_MoveInfo.MoveStep >= (LineMoveStep.SW10_WatOutFixture2))
{
return true; return true;
} }
} }
else if (sidesWayNum.Equals(3) && runStatus <= LineRunStatus.Wait) else if (sidesWayNum.Equals(3) && SW23WaitTrayNum < 0 && runStatus <= LineRunStatus.Wait)
{ {
return true; return true;
} }
if (sidesWayNum.Equals(4)) if (sidesWayNum.Equals(4) && SW41WaitTrayNum < 0)
{ {
LineMoveInfo moveInfo = FeedingEquipMap[101].SecondMoveInfo; // LineMoveInfo moveInfo = FeedingEquipMap[101].SecondMoveInfo;
if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None)) if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
return true;
if (moveInfo.MoveType.Equals(LineMoveType.None)) //if (moveInfo.MoveType.Equals(LineMoveType.None))
{ //{
return true; // return true;
} //}
else if (moveInfo.MoveType.Equals(LineMoveType.CheckFixture) && //else if (moveInfo.MoveType.Equals(LineMoveType.CheckFixture) &&
moveInfo.MoveStep >= LineMoveStep.MO_15_WaitCanGo && // moveInfo.MoveStep >= LineMoveStep.MO_15_WaitCanGo &&
moveInfo.MoveStep <= LineMoveStep.MO_18_StopCylinder_Back) //moveInfo.MoveStep <= LineMoveStep.MO_18_StopCylinder_Back)
{ //{
return true; // return true;
} //}
} }
else if (SW41_MoveInfo.Equals( LineMoveStep.SW12_WaitTrayGo) else if (SW41_MoveInfo.MoveStep <= (LineMoveStep.SW12_WaitTrayGo)
&& moveInfo.MoveType.Equals(LineMoveType.None)) && SW41_MoveInfo.MoveStep >= (LineMoveStep.SW10_WatOutFixture2))
{ {
return true; return true;
} }
} }
else if (sidesWayNum.Equals(3) && runStatus <= LineRunStatus.Wait) else if (sidesWayNum.Equals(3) && SW41WaitTrayNum < 0 && runStatus <= LineRunStatus.Wait)
{ {
return true; return true;
} }
...@@ -344,6 +357,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -344,6 +357,44 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
/// <summary>
/// 横移机构横移顶升之前判断
/// 等待横移机构是否可以开始顶升上升横移
/// </summary>
internal bool SwCanUpMove(int sidesWayNum)
{
//20200228修改,横移机构可以同时存在两个托盘
try
{
if (LineManager.Line.runStatus <= LineRunStatus.Wait || sidesWayNum <= 0)
{
return true;
}
if (sidesWayNum.Equals(3))
{
LineMoveInfo moveInfo = FeedingEquipMap[104].SecondMoveInfo;
if (moveInfo.MoveType.Equals(LineMoveType.None))
{
return true;
}
}
else if (sidesWayNum.Equals(1))
{
LineMoveInfo moveInfo = FeedingEquipMap[101].SecondMoveInfo;
if (moveInfo.MoveType.Equals(LineMoveType.None))
{
return true;
}
}
}
catch (Exception ex)
{
LogUtil.error("SwCanUpMove [" + sidesWayNum + "] error :" + ex.ToString());
}
return false;
}
private static LineMoveInfo SW41_MoveInfo = null; private static LineMoveInfo SW41_MoveInfo = null;
private static LineMoveInfo SW23_MoveInfo = null; private static LineMoveInfo SW23_MoveInfo = null;
...@@ -384,6 +435,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -384,6 +435,15 @@ namespace OnlineStore.DeviceLibrary
sdIsInprocess = false; sdIsInprocess = false;
return; return;
} }
if (SW23_MoveInfo.MoveType.Equals(LineMoveType.None) && SW23WaitTrayNum > 0)
{
Equip_TrayPEndEvent(2, SW23WaitTrayNum);
}
if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None) && SW41WaitTrayNum > 0)
{
Equip_TrayPEndEvent(4, SW41WaitTrayNum);
}
if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None) && ProvidingEquipMap[204].runStatus <= LineRunStatus.Wait) if (SW41_MoveInfo.MoveType.Equals(LineMoveType.None) && ProvidingEquipMap[204].runStatus <= LineRunStatus.Wait)
{ {
...@@ -393,12 +453,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -393,12 +453,12 @@ namespace OnlineStore.DeviceLibrary
if (TrayManager.checkWatch(sw41WaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(sw41WaitWatch, TrayManager.SwTrayWaitTime, true))
{ {
SW41_MoveInfo.NewMove(LineMoveType.InStore); SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
UpateSw41TrayNum(); UpateSw41TrayNum();
SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] "); SWLog("横移轨道41:检测到SW4_TrayCheck,再次检测,更新托盘号 [" + Sw41TrayNum + "] ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down); //CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down); //CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
} }
} }
else if (IOValue(IO_Type.SW4_StopCheck).Equals(IO_VALUE.HIGH) && else if (IOValue(IO_Type.SW4_StopCheck).Equals(IO_VALUE.HIGH) &&
...@@ -413,9 +473,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -413,9 +473,9 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo.NewMove(LineMoveType.InStore); SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
UpateSw41TrayNum(); UpateSw41TrayNum();
SWLog("横移轨道41:检测到SW4_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw41TrayNum + "] "); SWLog("横移轨道41:检测到SW4_StopCheck, 开始处理托盘 ,更新托盘号 [" + Sw41TrayNum + "] ");
CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down); //CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down); //CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
//阻挡气缸下降500毫秒然后上升 //阻挡气缸下降500毫秒然后上升
lastSw4StopDownTime = DateTime.Now; lastSw4StopDownTime = DateTime.Now;
//IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime); //IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
...@@ -441,12 +501,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -441,12 +501,12 @@ namespace OnlineStore.DeviceLibrary
if (TrayManager.checkWatch(sw23WaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(sw23WaitWatch, TrayManager.SwTrayWaitTime, true))
{ {
SW23_MoveInfo.NewMove(LineMoveType.InStore); SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
UpateSw23TrayNum(); UpateSw23TrayNum();
SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,更新托盘号 [" + Sw23TrayNum + "] "); SWLog("横移轨道23:检测到SW2_TrayCheck,再次检测,更新托盘号 [" + Sw23TrayNum + "] ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down); //CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down); //CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
} }
} }
else if (IOValue(IO_Type.SW2_StopCheck).Equals(IO_VALUE.HIGH) && else if (IOValue(IO_Type.SW2_StopCheck).Equals(IO_VALUE.HIGH) &&
...@@ -461,9 +521,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -461,9 +521,9 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo.NewMove(LineMoveType.InStore); SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
UpateSw23TrayNum(); UpateSw23TrayNum();
SWLog("横移轨道23:检测到SW2_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw23TrayNum + "] "); SWLog("横移轨道23:检测到SW2_StopCheck, 开始处理托盘 ,更新托盘号 [" + Sw23TrayNum + "] ");
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down); //CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down); //CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
//阻挡气缸下降500毫秒然后上升 //阻挡气缸下降500毫秒然后上升
lastSw2StopDownTime = DateTime.Now; lastSw2StopDownTime = DateTime.Now;
// IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime); // IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
...@@ -533,7 +593,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -533,7 +593,7 @@ namespace OnlineStore.DeviceLibrary
if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW00_Wait)) if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW00_Wait))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW01_StopDown); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW01_StopDown);
SWLog("横移轨道41: 阻挡气缸下降 等待 SW4_StopCheck=0" ); SWLog("横移轨道41: 阻挡气缸下降 等待 SW4_StopCheck=0");
IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH); IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_StopCheck, IO_VALUE.LOW)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_StopCheck, IO_VALUE.LOW));
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime)); //SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
...@@ -551,31 +611,39 @@ namespace OnlineStore.DeviceLibrary ...@@ -551,31 +611,39 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime); SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); // SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_WaitTime)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_WaitTime))
{ {
if (IOValue(IO_Type.SW4_TrayCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SW4_TrayCheck).Equals(IO_VALUE.HIGH))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCanUp);
SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 "); SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ,等待横移1(上料1)无托盘处理 ");
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitSWCanTopUp(1));
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
} }
else else
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime); SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
// SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); // SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
} }
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_WaitCheck)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_WaitCanUp))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW05_TopCylinderUp); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW05_LocationDown);
SWLog("横移轨道41:定位气缸下降 ");
CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
CylinderMove(SW41_MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_LocationDown))
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 "); SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 ");
IOMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
...@@ -583,15 +651,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -583,15 +651,15 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(50); Thread.Sleep(50);
CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up); CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up);
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_TopCylinderUp)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_TopCylinderUp))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_WaitNoTray); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW07_WaitNoTray);
SWLog("横移轨道41: 等待 SW1_TrayCheck=0 "); SWLog("横移轨道41: 等待 SW1_TrayCheck=0 ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.LOW)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.LOW));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WaitNoTray)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_WaitNoTray))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW07_DriveMotorMove); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW08_DriveMotorMove);
SWLog("横移轨道41:开始转动电机 ,等待1000,SW4_TrayCheck=0, SW1_TrayCheck=1 "); SWLog("横移轨道41:开始转动电机 ,等待1000,SW4_TrayCheck=0, SW1_TrayCheck=1 ");
IOMove(IO_Type.SW4_MotorRun, IO_VALUE.HIGH); IOMove(IO_Type.SW4_MotorRun, IO_VALUE.HIGH);
IOMove(IO_Type.SW1_MotorRun, IO_VALUE.HIGH); IOMove(IO_Type.SW1_MotorRun, IO_VALUE.HIGH);
...@@ -599,34 +667,36 @@ namespace OnlineStore.DeviceLibrary ...@@ -599,34 +667,36 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.LOW)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.LOW));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_DriveMotorMove)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW08_DriveMotorMove))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW08_WaitOutCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW09_WaitOutCheck);
SWLog("横移轨道41:收到SW1_TrayCheck,先顶升4下降,等待托盘到达出口 "); SWLog("横移轨道41:收到SW1_TrayCheck,先顶升4下降,等待托盘到达出口 ");
CylinderMove(null, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down); CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW08_WaitOutCheck)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW09_WaitOutCheck))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW09_WatOutFixture2); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW10_WatOutFixture2);
SWLog("横移轨道41:再次验证托盘是否在出口处 "); SWLog("横移轨道41:再次验证托盘是否在出口处,停止横移4的皮带线 ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
//需要停止横移4的皮带线
IOMove(IO_Type.SW4_MotorRun, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_MotorRun, IO_VALUE.LOW));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW09_WatOutFixture2)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW10_WatOutFixture2))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW10_TopDown); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW11_TopDown);
SWLog("横移轨道41:托盘已到达出口,顶升气缸下降,判断入料1是否需要此托盘 "); SWLog("横移轨道41:托盘已到达出口,顶升气缸下降,判断入料1是否需要此托盘 ");
CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down); // CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
Thread.Sleep(50); //Thread.Sleep(50);
if (!CheckTrayIsNeed(101, Sw41TrayNum)) if (!CheckTrayIsNeed(101, Sw41TrayNum))
{ {
CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down); CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
} }
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW10_TopDown)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW11_TopDown))
{ {
//开始入库 //开始入库
bool result = FeedingEquipMap[101].CanStartCheckOut(Sw41TrayNum); bool result = FeedingEquipMap[101].CanStartCheckOut(Sw41TrayNum);
...@@ -691,10 +761,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -691,10 +761,10 @@ namespace OnlineStore.DeviceLibrary
if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW00_Wait)) if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW00_Wait))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW01_StopDown); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW01_StopDown);
SWLog("横移轨道23:阻挡气缸下降 等待 SW2_StopCheck=0 " ); SWLog("横移轨道23:阻挡气缸下降 等待 SW2_StopCheck=0 ");
IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH); IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_StopCheck, IO_VALUE.LOW)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_StopCheck, IO_VALUE.LOW));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime)); // SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_StopDown)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_StopDown))
{ {
...@@ -709,31 +779,38 @@ namespace OnlineStore.DeviceLibrary ...@@ -709,31 +779,38 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime); SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); // SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_WaitTime)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_WaitTime))
{ {
if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW04_WaitCanUp);
SWLog("横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 "); SWLog("横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ,等待横移3(上料4)处无托盘 ");
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitSWCanTopUp(3));
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
} }
else else
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_WaitTime);
SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime); SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime)); // SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
} }
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_WaitCheck)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_WaitCanUp))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW05_TopCylinderUp); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW05_LocationDown);
SWLog("横移轨道23:定位气缸下降 ");
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW2_LocationCylinder_Down);
CylinderMove(SW23_MoveInfo, IO_Type.SW3_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
}
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_LocationDown)) {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 "); SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 ");
IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
...@@ -741,15 +818,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -741,15 +818,15 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(50); Thread.Sleep(50);
CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Down, IO_Type.SW3_TopCylinder_Up); CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Down, IO_Type.SW3_TopCylinder_Up);
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_TopCylinderUp)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_TopCylinderUp))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_WaitNoTray); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW07_WaitNoTray);
SWLog("横移轨道23: 等待 SW3_TrayCheck=0 "); SWLog("横移轨道23: 等待 SW3_TrayCheck=0 ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.LOW)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.LOW));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WaitNoTray)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_WaitNoTray))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW07_DriveMotorMove); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW08_DriveMotorMove);
SWLog("横移轨道23:开始转动电机 ,等待1000,SW2_TrayCheck=0, SW3_TrayCheck=1 "); SWLog("横移轨道23:开始转动电机 ,等待1000,SW2_TrayCheck=0, SW3_TrayCheck=1 ");
IOMove(IO_Type.SW2_MotorRun, IO_VALUE.HIGH); IOMove(IO_Type.SW2_MotorRun, IO_VALUE.HIGH);
IOMove(IO_Type.SW3_MotorRun, IO_VALUE.HIGH); IOMove(IO_Type.SW3_MotorRun, IO_VALUE.HIGH);
...@@ -757,34 +834,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -757,34 +834,35 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.LOW)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.LOW));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_DriveMotorMove)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW08_DriveMotorMove))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW08_WaitOutCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW09_WaitOutCheck);
SWLog("横移轨道23:收到 SW3_TrayCheck,先顶升2下降,,等待托盘到达出口 "); SWLog("横移轨道23:收到 SW3_TrayCheck,先顶升2下降,,等待托盘到达出口 ");
CylinderMove(null, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down); CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW08_WaitOutCheck)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW09_WaitOutCheck))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW09_WatOutFixture2); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW10_WatOutFixture2);
SWLog("横移轨道23:再次验证托盘是否在出口处 "); SWLog("横移轨道23:再次验证托盘是否在出口处 ,停止横移2的皮带线 ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH));
IOMove(IO_Type.SW2_MotorRun, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_MotorRun, IO_VALUE.LOW));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW09_WatOutFixture2)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW10_WatOutFixture2))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW10_TopDown); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW11_TopDown);
SWLog("横移轨道23:托盘已到达出口,顶升气缸下降 "); SWLog("横移轨道23:托盘已到达出口,顶升气缸下降 ");
CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down); // CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down);
Thread.Sleep(50); //Thread.Sleep(50);
if (!CheckTrayIsNeed(104, Sw23TrayNum)) if (!CheckTrayIsNeed(104, Sw23TrayNum))
{ {
CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down); CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down);
} }
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW10_TopDown)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW11_TopDown))
{ {
//开始入库 //开始入库
bool result = FeedingEquipMap[104].CanStartCheckOut(Sw23TrayNum); bool result = FeedingEquipMap[104].CanStartCheckOut(Sw23TrayNum);
......
...@@ -290,6 +290,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -290,6 +290,13 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = WaitEnum.W009_BoxCanInstore; wait.WaitType = WaitEnum.W009_BoxCanInstore;
return wait; return wait;
} }
public static WaitResultInfo WaitSWCanTopUp(int swNum)
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W010_SWCanTopUp;
wait.TargetPosition = swNum;
return wait;
}
//public static WaitResultInfo WaitSideWay() //public static WaitResultInfo WaitSideWay()
//{ //{
// WaitResultInfo wait = new WaitResultInfo(); // WaitResultInfo wait = new WaitResultInfo();
...@@ -386,9 +393,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -386,9 +393,9 @@ namespace OnlineStore.DeviceLibrary
else if (WaitType.Equals(WaitEnum.W009_BoxCanInstore)) else if (WaitType.Equals(WaitEnum.W009_BoxCanInstore))
{ {
return "BOX可以开始入库"; return "BOX可以开始入库";
}else if (WaitType.Equals(WaitEnum.W010_SW34NoTray)) }else if (WaitType.Equals(WaitEnum.W010_SWCanTopUp))
{ {
return "等待横移34无托盘"; return "等待横移"+TargetPosition+"无托盘";
} }
else if (WaitType.Equals(WaitEnum.W101_BatchAxisMove)) else if (WaitType.Equals(WaitEnum.W101_BatchAxisMove))
{ {
...@@ -509,9 +516,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -509,9 +516,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
internal static int W009_BoxCanInstore = 9; internal static int W009_BoxCanInstore = 9;
/// <summary> /// <summary>
/// 等待横移34无托盘 /// 等待横移模块可以顶升,等待入料四和入料一处无托盘处理
/// </summary> /// </summary>
internal static int W010_SW34NoTray = 10; internal static int W010_SWCanTopUp = 10;
/// <summary> /// <summary>
/// 入料模块:批量轴缓慢上升,并检测有料盘后停止 /// 入料模块:批量轴缓慢上升,并检测有料盘后停止
/// </summary> /// </summary>
......
...@@ -420,40 +420,39 @@ namespace OnlineStore.DeviceLibrary ...@@ -420,40 +420,39 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
SW03_WaitTime = 5003, SW03_WaitTime = 5003,
/// <summary> /// <summary>
/// 等待轨道1夹具检测信号 /// 等待轨道1夹具检测信号,等待横移3或横移1无托盘
/// </summary> /// </summary>
SW04_WaitCheck = 5004, SW04_WaitCanUp= 5004,
/// <summary>
/// 定位气缸下降
/// </summary>
SW05_LocationDown=5005,
/// <summary> /// <summary>
/// 横移轨道顶升气缸上升 /// 横移轨道顶升气缸上升
/// </summary> /// </summary>
SW05_TopCylinderUp= 5005, SW06_TopCylinderUp= 5006,
/// <summary> /// <summary>
/// 等待第二个横移没有托盘 /// 等待第二个横移没有托盘
/// </summary> /// </summary>
SW06_WaitNoTray=5006, SW07_WaitNoTray=5007,
/// <summary> /// <summary>
/// 横移轨道点击转动 /// 横移轨道点击转动
/// </summary> /// </summary>
SW07_DriveMotorMove=5007, SW08_DriveMotorMove=5008,
/// <summary> /// <summary>
/// 收到横移轨道2夹具检测信号 /// 收到横移轨道2夹具检测信号
/// </summary> /// </summary>
SW08_WaitOutCheck=5008, SW09_WaitOutCheck=5009,
/// <summary> /// <summary>
/// 等待出口信号持续一段时间 /// 等待出口信号持续一段时间
/// </summary> /// </summary>
SW09_WatOutFixture2=5009, SW10_WatOutFixture2=5010,
/// <summary> /// <summary>
/// 停止横移轨道转动,横移轨道顶升气缸下降 /// 停止横移轨道转动,横移轨道顶升气缸下降
/// </summary> /// </summary>
SW10_TopDown=5010, SW11_TopDown=5011,
///// <summary>
///// 阻挡2下降,等待托盘流出
///// </summary>
//SW11_StopDrive=5011,
/// <summary> /// <summary>
/// 等待托盘流出,上升阻挡气缸 /// 等待托盘流出,上升阻挡气缸
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!