Commit e4b585f4 LN

出料口条件修改

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