Commit e4b585f4 LN

出料口条件修改

1 个父辈 d95cd194
...@@ -137,7 +137,7 @@ namespace OnlineStore.AssemblyLine ...@@ -137,7 +137,7 @@ namespace OnlineStore.AssemblyLine
BoxInfo box = LineServer.GetBoxInfo(equip.DeviceID); BoxInfo box = LineServer.GetBoxInfo(equip.DeviceID);
string online = "✘"; string online = "✘";
string str = "BOX"; string str = "BOX";
if (equip.DeviceID.Equals(7)) if (equip.DeviceID.Equals(LineManager.OutMoveId))
{ {
str = "出料机构"; str = "出料机构";
} }
......
...@@ -447,7 +447,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -447,7 +447,7 @@ namespace OnlineStore.DeviceLibrary
LastWidth = GetWidth(); LastWidth = GetWidth();
MoveInfo.MoveParam.PlateW = LastWidth; MoveInfo.MoveParam.PlateW = LastWidth;
InLog("料盘移栽" + MoveInfo.SLog + ":获取到料盘尺寸 [" + LastWidth + "X" + LastHeight + "]"); InLog("料盘移栽" + MoveInfo.SLog + ":获取到料盘尺寸 [" + LastWidth + "X" + LastHeight + "]");
if (LastWidth.Equals(7)) if (LastWidth.Equals(LineManager.OutMoveId))
{ {
if (LastHeight > 16) if (LastHeight > 16)
{ {
......
...@@ -281,7 +281,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,7 +281,7 @@ namespace OnlineStore.DeviceLibrary
CheckAndMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000));
} }
else else
{ {
...@@ -298,7 +298,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -298,7 +298,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号"); CheckLog("托盘阻挡" + MoveInfo.SLog + " 再次等待托盘信号");
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(30000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(60000));
} }
else else
{ {
......
...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,7 +22,7 @@ namespace OnlineStore.DeviceLibrary
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
ClampJwa = new ClampJawBean(jawconfig); ClampJwa = new ClampJawBean(jawconfig);
Name = ($" D{ DeviceID }-进仓{ DeviceID.ToString().PadLeft(1, '0') } ").ToUpper(); Name = ($" D{ DeviceID }-进仓{ DeviceID.ToString().PadLeft(1, '0') } ").ToUpper();
if (DeviceID.Equals(7)) if (DeviceID.Equals(LineManager.OutMoveId))
{ {
OnlyProOutTray = true; OnlyProOutTray = true;
Name = $" D{ DeviceID }-出料口"; Name = $" D{ DeviceID }-出料口";
......
...@@ -487,10 +487,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,10 +487,14 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
MoveInfo.NewMove(LineMoveType.InStore); MoveInfo.NewMove(LineMoveType.InStore);
string msg = "入库【" + posId + "】处理(移栽)";
if (OnlyProOutTray)
{
msg = "料盘移栽["+param.ToShortStr()+"]";
}
if (UpdownIsUp()) if (UpdownIsUp())
{ {
LogInfo("入库【" + posId + "】处理(移栽):MI_02_ToLineUp, 前后气缸后退,等待夹爪检测=LOW"); LogInfo(msg+" :MI_02_ToLineUp, 前后气缸后退,等待夹爪检测=LOW");
MoveInfo.NextMoveStep(LineMoveStep.MI_02_ToLineUp); MoveInfo.NextMoveStep(LineMoveStep.MI_02_ToLineUp);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
...@@ -498,7 +502,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -498,7 +502,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogInfo("入库【" + posId + "】处理(移栽):MI_01_UpdownUp, 顶升气缸先上升"); LogInfo(msg + ":MI_01_UpdownUp, 顶升气缸先上升");
MoveInfo.NextMoveStep(LineMoveStep.MI_01_UpdownUp); MoveInfo.NextMoveStep(LineMoveStep.MI_01_UpdownUp);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
UpdownUpMove(); UpdownUpMove();
...@@ -924,7 +928,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -924,7 +928,7 @@ namespace OnlineStore.DeviceLibrary
if (isNeed) if (isNeed)
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog +targetP+ " 等待200"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + targetP + " 等待200");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
} }
else else
...@@ -957,7 +961,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -957,7 +961,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>30,暂不顶升上升"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 高度>30,暂不顶升上升");
} }
} }
else if (SecondMoveInfo.MoveParam != null) else if ((!OnlyProOutTray) && SecondMoveInfo.MoveParam != null)
{ {
if (!LineServer.RightInPosId(DeviceID, SecondMoveInfo.MoveParam.PosId)) if (!LineServer.RightInPosId(DeviceID, SecondMoveInfo.MoveParam.PosId))
{ {
...@@ -1036,10 +1040,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1036,10 +1040,10 @@ namespace OnlineStore.DeviceLibrary
{ {
msg = "开始移栽"; msg = "开始移栽";
} }
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待"+ msg + "超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待" + msg + "超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg + ",暂时放托盘离开"); LogUtil.error(WarnMsg + ",暂时放托盘离开");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + msg+"超时,放托盘离开,顶升气缸1下降"); InLog("放托盘(放开阻挡): " + MoveInfo.SLog + msg + "超时,放托盘离开,顶升气缸1下降");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
} }
......
...@@ -14,6 +14,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,6 +14,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public class LineManager public class LineManager
{ {
public static int OutMoveId = 7;
public static bool TrayToOutLineTest = false; public static bool TrayToOutLineTest = false;
public static bool DisGetWare = false; public static bool DisGetWare = false;
......
...@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -71,7 +71,7 @@ namespace OnlineStore.DeviceLibrary
} }
public string ToShortStr() public string ToShortStr()
{ {
return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")}"; return $" [{ rfid }][{ WareCode }] [{ PosId }] [{ PlateW }x{ PlateH }] {(urgentReel ? "[紧急料]" : "")} {(cutReel ? "[分盘料]" : "")} {(IsNG ? "[NG]" : "")}";
} }
/// <summary> /// <summary>
/// 根据PosId获取对应的料仓ID,若PosId=="",返回-1 /// 根据PosId获取对应的料仓ID,若PosId=="",返回-1
......
...@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
if (box != null && span.TotalSeconds < ClientKeepSecond) if (box != null && span.TotalSeconds < ClientKeepSecond)
{ {
if (id.Equals(7)) if (id.Equals(LineManager.OutMoveId))
{ {
LineStatus status = (LineStatus)box.SStatus; LineStatus status = (LineStatus)box.SStatus;
LineRunStatus runs = (LineRunStatus)box.SRunStatus; LineRunStatus runs = (LineRunStatus)box.SRunStatus;
...@@ -132,7 +132,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
public static bool BoxCanReviceTray(int id, out string NotOkMsg) public static bool BoxCanReviceTray(int id, out string NotOkMsg)
{ {
string str = "料仓"+id+"可以入库"; string str = "料仓"+id+"可以入库";
if (id.Equals(7)) if (id.Equals(LineManager.OutMoveId))
{ {
str = "出料机构可取料"; str = "出料机构可取料";
} }
...@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
if (span.TotalSeconds < ClientKeepSecond && box.HasTray.Equals(0) && box.SAlarmType.Equals(LineAlarmType.None)) if (span.TotalSeconds < ClientKeepSecond && box.HasTray.Equals(0) && box.SAlarmType.Equals(LineAlarmType.None))
{ {
if (id.Equals(7)) if (id.Equals(LineManager.OutMoveId))
{ {
if (box.WaitInStoreList == null || box.WaitInStoreList.Count <= 0) if (box.WaitInStoreList == null || box.WaitInStoreList.Count <= 0)
{ {
...@@ -290,7 +290,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -290,7 +290,14 @@ namespace OnlineStore.DeviceLibrary
{ {
Dictionary<string, object> paramList = new Dictionary<string, object>(); Dictionary<string, object> paramList = new Dictionary<string, object>();
paramList.Add(S_Cmd, cmd_startIn); paramList.Add(S_Cmd, cmd_startIn);
if (id.Equals(LineManager.OutMoveId))
{
paramList.Add(S_CanOutStore, 1);
}
else
{
paramList.Add(S_CanOutStore, 0); paramList.Add(S_CanOutStore, 0);
}
paramList.Add(S_PosId, param.PosId); paramList.Add(S_PosId, param.PosId);
paramList.Add(S_PlateH, param.PlateH); paramList.Add(S_PlateH, param.PlateH);
paramList.Add(S_PlateW, param.PlateW); paramList.Add(S_PlateW, param.PlateW);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!