Commit 732606eb LN

皮带线环形线优化

1 个父辈 c4c90572
...@@ -347,7 +347,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,7 +347,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.DLine_Run3).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.DLine_Run3).Equals(IO_VALUE.LOW))
{ {
if (Line3Turn.CanStart(800)) if (Line3Turn.CanStart(500))
{ {
return true; return true;
} }
......
...@@ -157,27 +157,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,27 +157,23 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_03_GetTraySize); MoveInfo.NextMoveStep(LineMoveStep.DO_03_GetTraySize);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
//string lastCode = "";
//foreach (string code in LastCodeList) //如果未扫到条码,重新扫码3次
//if (scanCodeCount < 3 && LastCode.Equals("") && Config.GetCameraList().Count > 0)
//{ //{
// lastCode += code; // ScanCode();
//} //}
//如果未扫到条码,重新扫码3次 //else
if (scanCodeCount < 3 && LastCode.Equals("") && Config.GetCameraList().Count > 0) //{
{ LastWidth = 0;
ScanCode(); int robotIndex = 1;
} if (DeviceID.Equals(301))
else
{ {
LastWidth = 0; robotIndex = 2;
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
string result = SServerManager.GetTraySize(Name, robotIndex, LastCode, out LastWidth);
LogUtil.info(hengyiName + "出口有料,二维码[" + LastCode + "] 获取料盘尺寸【" + LastWidth + "】【" + result + "】");
} }
string result = SServerManager.GetTraySize(Name, robotIndex, LastCode, out LastWidth);
LogUtil.info(hengyiName + "出口有料,二维码[" + LastCode + "] 获取料盘尺寸【" + LastWidth + "】【" + result + "】");
//}
// MoveInfo.EndMove(); // MoveInfo.EndMove();
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize))
......
...@@ -452,8 +452,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -452,8 +452,13 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_13_LoactionDown);
SInLog("托盘放行, " + SecondMoveInfo.SLog + " 托盘开始放行,环形线定位气缸下降"); SInLog("托盘放行, " + SecondMoveInfo.SLog + " 托盘开始放行,环形线定位气缸下降,判断顶升是否需要同时下降");
CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
if (!Config.SidesWayNum.Equals(2))
{
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
}
} }
} }
else else
...@@ -869,6 +874,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -869,6 +874,10 @@ namespace OnlineStore.DeviceLibrary
{ {
InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降"); InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降");
CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
if (Config.SidesWayNum.Equals(1))
{
CylinderMove(null, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
}
} }
else else
{ {
......
...@@ -409,8 +409,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -409,8 +409,9 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
if (Config.SidesWayNum.Equals(3)) if (Config.SidesWayNum.Equals(3))
{ {
InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降"); InLog(MoveInfo.SLog + " 提前下降顶升气缸 ,环形线定位气缸先下降,顶升气缸同时下降");
CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down); CylinderMove(null, IO_Type.SW_LocationCylinder_Up, IO_Type.SW_LocationCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp))
......
...@@ -281,6 +281,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,6 +281,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MI_09_CylinderUp);
InLog("入库 " + MoveInfo.SLog + ": 上下气缸上升"); InLog("入库 " + MoveInfo.SLog + ": 上下气缸上升");
UpdownUpMove(); UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_CylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_CylinderUp))
{ {
......
...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (equipBean.IOValue(LineRun_Do).Equals(IO_VALUE.LOW)) if (equipBean.IOValue(LineRun_Do).Equals(IO_VALUE.LOW))
{ {
if (lineRun.CanStart(800)) if (lineRun.CanStart(500))
{ {
return true; return true;
} }
...@@ -330,7 +330,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -330,7 +330,7 @@ namespace OnlineStore.DeviceLibrary
private string LastCheckDI = ""; private string LastCheckDI = "";
private int subType = 0; private int subType = 0;
internal DateTime LastEndTime = DateTime.Now; internal DateTime LastEndTime = DateTime.Now;
public bool CanStart(int totalMS = 1600) public bool CanStart(int totalMS = 1000)
{ {
TimeSpan span = DateTime.Now - LastEndTime; TimeSpan span = DateTime.Now - LastEndTime;
if (span.TotalMilliseconds > totalMS) if (span.TotalMilliseconds > totalMS)
......
...@@ -74,12 +74,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -74,12 +74,12 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处 //托盘在第一个阻挡处
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil.debug(Name + " [" + trayCount + "] 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"); LogUtil.debug(Name + " [" + trayCount + "] 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0");
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" ); //CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH, 1200); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH, 1200);
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
...@@ -102,18 +102,35 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,18 +102,35 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error(Name + " StartCheckFixture " + "失败,未得到锁"); LogUtil.error(Name + " StartCheckFixture " + "失败,未得到锁");
} }
} }
private void MO_14_TopCylinder_Down() private void MO_14_TopCylinder_Down()
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); // SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
OutLog("放托盘(放开阻挡)" + MoveInfo.SLog + " 物品已移走,顶升气缸1下降"); OutLog("放托盘(放开阻挡)" + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
if (Config.SidesWayNum <= 0) if (Config.SidesWayNum <= 0)
{ {
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); if (CylinderIsOk(IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down))
{
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
else
{
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_16_Stop2Down);
CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,阻挡2下降");
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH));
}
} }
else
{
SecondMoveInfo.EndMove();
CheckLog("托盘放行 结束,触发 TrayPEndEvent ");
lastStopDown = DateTime.Now.AddSeconds(-2);
this.TrayPEndEvent?.Invoke(Config.SidesWayNum, currTrayNum);
}
} }
private InOutParam CheckIsNeedOutStore(out string outMsg ) private InOutParam CheckIsNeedOutStore(out string outMsg )
{ {
...@@ -353,7 +370,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -353,7 +370,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0"); CheckLog("托盘放行 " + SecondMoveInfo.SLog + " ,等待 NextStopCheck=0");
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.NextStopCheck, IO_VALUE.LOW));
} }
...@@ -465,6 +482,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -465,6 +482,10 @@ namespace OnlineStore.DeviceLibrary
OutLog("出料 " + MoveInfo.SLog + " : 上下气缸上升,皮带线准备出料"); OutLog("出料 " + MoveInfo.SLog + " : 上下气缸上升,皮带线准备出料");
UpdownUpMove(); UpdownUpMove();
StartLineOut(MoveInfo.MoveParam); StartLineOut(MoveInfo.MoveParam);
if (Config.SidesWayNum <= 0)
{
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_04_CylinderUp)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_04_CylinderUp))
{ {
...@@ -473,7 +494,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,7 +494,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo("出料 【" + posId + "】" + MoveInfo.SLog + " 更新托盘【" + num + "】为空"); LogInfo("出料 【" + posId + "】" + MoveInfo.SLog + " 更新托盘【" + num + "】为空");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut()); // MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut());
TrayManager.UpdateTrayInfo(num); TrayManager.UpdateTrayInfo(num);
//阻挡气缸移动 //阻挡气缸移动
MO_14_TopCylinder_Down(); MO_14_TopCylinder_Down();
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!