Commit 05697aa1 LN

阻挡托盘逻辑修改

1 个父辈 4ea334ca
......@@ -87,15 +87,14 @@ namespace OnlineStore.DeviceLibrary
{
if (TrayManager.checkWatch(swWaitWatch, TrayManager.SwTrayWaitTime, true))
{
swWaitWatch.Stop();
//SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
//TrayManager.UpdateSWState(Config.SidesWayNum, 2);
//SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_StopCylinder1Down);
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待" + TrayManager.StopDownWaitTime);
//IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH);
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_StopCylinder1Down);
CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待" + TrayManager.StopDownWaitTime);
IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
lastStopDown = DateTime.Now;
IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
//IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
}
}
else
......@@ -167,7 +166,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_FixtureCheck);
CheckLog("托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸上升,等待SW_TrayCheck=1)");
IOMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
}
}
......@@ -175,7 +174,7 @@ namespace OnlineStore.DeviceLibrary
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_WaitFixture);
CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1并需要持续:" + TrayManager.SwTrayWaitTime);
IOMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
CheckAndMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
......
......@@ -503,15 +503,15 @@ namespace OnlineStore.DeviceLibrary
{
if (TrayManager.checkWatch(sw41WaitWatch, TrayManager.SwTrayWaitTime,true))
{
//SW41_MoveInfo.NewMove(LineMoveType.InStore);
//SW41_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
//UpateSw41TrayNum();
//SWLog("横移轨道41:检测到SW4_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw41TrayNum + "] ");
//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);
SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
UpateSw41TrayNum();
SWLog("横移轨道41:检测到SW4_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw41TrayNum + "] ");
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);
//阻挡气缸下降500毫秒然后上升
lastSw4StopDownTime = DateTime.Now;
IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
//IOMove(IO_Type.SW4_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
}
}
else
......@@ -551,15 +551,15 @@ namespace OnlineStore.DeviceLibrary
{
if (TrayManager.checkWatch(sw23WaitWatch, TrayManager.SwTrayWaitTime, true))
{
//SW23_MoveInfo.NewMove(LineMoveType.InStore);
//SW23_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
//UpateSw23TrayNum();
//SWLog("横移轨道23:检测到SW2_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw23TrayNum + "] ");
//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);
SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW00_Wait);
UpateSw23TrayNum();
SWLog("横移轨道23:检测到SW2_StopCheck, 定位气缸下降 ,更新托盘号 [" + Sw23TrayNum + "] ");
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);
//阻挡气缸下降500毫秒然后上升
lastSw2StopDownTime = DateTime.Now;
IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
// IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH, TrayManager.StopDownWaitTime);
}
}
else
......@@ -632,11 +632,39 @@ namespace OnlineStore.DeviceLibrary
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_StopDown))
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ");
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW011_WaitCheckTime);
SWLog("横移轨道41: 等待横移4托盘检测信号 , SW011_WaitCheckTime ");
IOMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW011_WaitCheckTime))
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW012_WaitTime);
SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW012_WaitTime))
{
if (IOValue(IO_Type.SW4_TrayCheck).Equals(IO_VALUE.HIGH))
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ");
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.WaitTime(TrayManager.SwTrayWaitTime));
}
else
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW012_WaitTime);
SWLog("横移轨道41: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
}
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck))
{
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp);
......@@ -713,7 +741,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW09_WaitTrayGo))
{
{
lastSw4StopDownTime = DateTime.Now.AddSeconds(-2);
SW41_MoveInfo.EndMove();
SWLog("横移轨道41:横移结束 ");
......@@ -754,11 +782,39 @@ namespace OnlineStore.DeviceLibrary
}
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_StopDown))
{
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道23:SW2_StopDown上升 等待横移3托盘检测信号 ");
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW011_WaitCheckTime);
SWLog("横移轨道23: 等待横移4托盘检测信号 , SW011_WaitCheckTime ");
IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
}
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW011_WaitCheckTime))
{
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW012_WaitTime);
SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
}
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW012_WaitTime))
{
if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH))
{
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ");
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.WaitTime(TrayManager.SwTrayWaitTime));
}
else
{
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW012_WaitTime);
SWLog("横移轨道23: 等待横移4托盘检测信号 , SW012_WaitTime " + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.SwTrayWaitTime));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
}
}
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck))
{
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp);
......
......@@ -408,9 +408,17 @@ namespace OnlineStore.DeviceLibrary
SW01_StopDown=5001,
/// <summary>
/// 等待到托盘信号后,需要持续一段时间
/// </summary>
SW011_WaitCheckTime = 5011,
/// <summary>
/// 等待到托盘信号后,需要持续一段时间
/// </summary>
SW012_WaitTime = 5012,
/// <summary>
/// 等待轨道1夹具检测信号
/// </summary>
SW02_WaitFixtureCheck=5002,
SW02_WaitFixtureCheck =5002,
/// <summary>
/// 横移轨道顶升气缸上升
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!