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,18 +157,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,18 +157,14 @@ 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) //{
{
ScanCode();
}
else
{
LastWidth = 0; LastWidth = 0;
int robotIndex = 1; int robotIndex = 1;
if (DeviceID.Equals(301)) if (DeviceID.Equals(301))
...@@ -177,7 +173,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -177,7 +173,7 @@ namespace OnlineStore.DeviceLibrary
} }
string result = SServerManager.GetTraySize(Name, robotIndex, LastCode, out LastWidth); string result = SServerManager.GetTraySize(Name, robotIndex, LastCode, out LastWidth);
LogUtil.info(hengyiName + "出口有料,二维码[" + LastCode + "] 获取料盘尺寸【" + LastWidth + "】【" + result + "】"); 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)
......
...@@ -107,13 +107,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,13 +107,30 @@ namespace OnlineStore.DeviceLibrary
} }
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)
{ {
if (CylinderIsOk(IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down))
{
CylinderMove(SecondMoveInfo, 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 )
{ {
...@@ -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))
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!