Commit 709fde5a LN

增加夹爪是否有料检测功能。进仓界面增加忽略料叉信号功能

1 个父辈 e4b585f4
......@@ -51,6 +51,7 @@
this.btnClear = new System.Windows.Forms.Button();
this.clampJawControl1 = new OnlineStore.AssemblyLine.useControl.ClampJawControl();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.btnHlhasReel = new System.Windows.Forms.Button();
this.lblInoutInfo = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
......@@ -477,7 +478,7 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(244, 126);
this.lblThisSta.Location = new System.Drawing.Point(244, 129);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(724, 28);
this.lblThisSta.TabIndex = 246;
......@@ -568,6 +569,7 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.btnHlhasReel);
this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblInstoreList);
......@@ -579,6 +581,19 @@
this.groupBox6.TabStop = false;
this.groupBox6.Text = "当前状态";
//
// btnHlhasReel
//
this.btnHlhasReel.BackColor = System.Drawing.Color.White;
this.btnHlhasReel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnHlhasReel.Location = new System.Drawing.Point(843, 14);
this.btnHlhasReel.Name = "btnHlhasReel";
this.btnHlhasReel.Size = new System.Drawing.Size(121, 35);
this.btnHlhasReel.TabIndex = 287;
this.btnHlhasReel.Text = "忽略夹爪有料信号";
this.btnHlhasReel.UseVisualStyleBackColor = false;
this.btnHlhasReel.Visible = false;
this.btnHlhasReel.Click += new System.EventHandler(this.btnHlhasReel_Click);
//
// lblInoutInfo
//
this.lblInoutInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -608,9 +623,9 @@
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(244, 44);
this.lblInstoreList.Location = new System.Drawing.Point(244, 57);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(724, 77);
this.lblInstoreList.Size = new System.Drawing.Size(724, 66);
this.lblInstoreList.TabIndex = 277;
//
// tabPage2
......@@ -1139,6 +1154,7 @@
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox cmbP3Width;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button btnHlhasReel;
}
}
......@@ -157,7 +157,7 @@ namespace OnlineStore.AssemblyLine
lblInoutInfo.Text = (equipBean.MoveInfo.MoveType.Equals(LineMoveType.InStore) ? "入库:" : "出库:") + equipBean.MoveInfo.MoveParam.ToStr();
}
else
{
{
lblInoutInfo.Text = "出料:" + equipBean.MoveInfo.MoveParam.ToStr();
}
}
......@@ -165,7 +165,7 @@ namespace OnlineStore.AssemblyLine
{
lblInoutInfo.Text = "";
}
lblMoveInfo.Text = equipBean.GetMoveStr() +"料仓类型:" + (equipBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
lblMoveInfo.Text = equipBean.GetMoveStr() + "料仓类型:" + (equipBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库" : "不可出库";
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg;
......@@ -198,6 +198,14 @@ namespace OnlineStore.AssemblyLine
{
lblInstoreList.Text = text;
}
if (equipBean.IsNoReelAlarm() && (!equipBean.ClampEmptyMove))
{
btnHlhasReel.Visible = true;
}
else
{
btnHlhasReel.Visible = false;
}
}
catch (Exception ex)
{
......@@ -777,6 +785,15 @@ namespace OnlineStore.AssemblyLine
}
}
}
private void btnHlhasReel_Click(object sender, EventArgs e)
{
if (equipBean.IsNoReelAlarm())
{
equipBean.ClampEmptyMove = true;
LogUtil.info(equipBean.Name + "界面点击:" + btnHlhasReel.Text + ",设置ClampEmptyMove=true ");
}
}
}
}
......
......@@ -572,6 +572,12 @@ namespace OnlineStore.DeviceLibrary
if (ClampJwa != null)
{
wait.IsEnd = ClampJwa.HasReel();
if ((!wait.IsEnd) && IsNoReelAlarm() && ClampEmptyMove)
{
LogUtil.info(Name + " 用户点击了:忽略夹爪有料信号,继续出入库动作");
wait.IsEnd = true;
}
}
}
else if (wait.WaitType.Equals(WaitEnum.W008_InStoreCheckOK))
......@@ -772,5 +778,22 @@ namespace OnlineStore.DeviceLibrary
}
return Color.White;
}
public bool ClampEmptyMove = false;
public bool IsNoReelAlarm()
{
if (runStatus.Equals(LineRunStatus.Busy))
{
if (MoveInfo.MoveType.Equals(LineMoveType.InStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_WaitHasReel))
{
return true;
}
else if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && MoveInfo.MoveStep.Equals(LineMoveStep.MO_57_WaitHasReel))
{
return true;
}
}
return false;
}
}
}
......@@ -385,9 +385,9 @@ namespace OnlineStore.DeviceLibrary
if (UpdownIsInP1())
{
MoveInfo.NextMoveStep(LineMoveStep.FI_25_CheckTray);
InLog("料盘移栽" + MoveInfo.SLog + ":等待 SL_AxisLocationCheck=LOW");
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_ClampCylinder_Check, IO_VALUE.HIGH));
InLog("料盘移栽" + MoveInfo.SLog + ":等待 SL_AxisLocationCheck=LOW 且夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_AxisLocationCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
}
else
{
......
......@@ -283,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.MO_52_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸下降 ");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else
......@@ -303,15 +303,20 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.MO_53_DownWait))
{
MoveInfo.NextMoveStep(LineMoveStep.MO_54_CylinderOpen);
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸夹紧,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【MOVING】【" + DeviceID + "】");
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Relax, IO_Type.ClampCylinder_Work);
ClampEmptyMove = false;
ClampJwa.Push(MoveInfo);
//更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.MOVING, DeviceID.ToString());
EDataManager.UpdateParam(DeviceID, 2, MoveInfo.MoveParam);
if (ClampCount <= 0)
{
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸夹紧,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【MOVING】【" + DeviceID + "】");
//更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.MOVING, DeviceID.ToString());
EDataManager.UpdateParam(DeviceID, 2, MoveInfo.MoveParam);
}
else
{
OutLog("出库 " + MoveInfo.SLog + ": 再次夹料");
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_54_CylinderOpen))
{
......@@ -328,23 +333,6 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.MO_55_CylinderUp))
{
// MoveInfo.NextMoveStep(LineMoveStep.MO_57_ClampCheck);
// if (ClampCount.Equals(0))
// {
// OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH,超时1000");
// MoveInfo.OneWaitCanEndStep = true;
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
// }
// else
// {
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
// OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
// }
//}
//else if (MoveInfo.IsStep(LineMoveStep.MO_57_ClampCheck))
//{
if (UpdownIsUp())
{
//if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH))
......@@ -365,11 +353,20 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MO_56_ResetClamp);
ClampCount = 1;
OutLog("出库 " + MoveInfo.SLog + ": 第一次未抓到料,重新抓一次,夹爪先放松", 1);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa.Relax(MoveInfo);
if (ClampCount <= 0)
{
MoveInfo.NextMoveStep(LineMoveStep.MO_56_ResetClamp);
ClampCount = 1;
OutLog("出库 " + MoveInfo.SLog + ": 第一次未抓到料,重新抓一次,夹爪先放松", 1);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa.Relax(MoveInfo);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MO_57_WaitHasReel);
OutLog("出库 " + MoveInfo.SLog + ": 等待夹爪有料", 1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
}
}
}
else
......@@ -379,6 +376,11 @@ namespace OnlineStore.DeviceLibrary
UpdownUpMove();
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_57_WaitHasReel))
{
MoveInfo.NextMoveStep(LineMoveStep.MO_58_WaitTray);
OutLog("出库 " + MoveInfo.SLog + ": 等待托盘到达");
}
else if (MoveInfo.IsStep(LineMoveStep.MO_58_WaitTray))
{
if (TrayIsOk())
......@@ -411,7 +413,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
}
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
}
......@@ -551,15 +553,15 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.MI_04_DownWait);
InLog("入库 " + MoveInfo.SLog + ": 等待200ms后夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
}
//只有当BOX可以进行出入库时,移栽物品,防止卡住
else if (MoveInfo.IsStep(LineMoveStep.MI_04_DownWait))
{
MoveInfo.NextMoveStep(LineMoveStep.MI_05_CylinderOpen);
InLog("入库 " + MoveInfo.SLog + ": 夹料气缸夹紧");
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Relax, IO_Type.ClampCylinder_Work);
ClampJwa.Push(MoveInfo);
InLog("入库 " + MoveInfo.SLog + ": 夹料气缸夹紧");
ClampEmptyMove = false;
ClampJwa.Push(MoveInfo);
EDataManager.UpdateParam(DeviceID, 1, MoveInfo.MoveParam);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_05_CylinderOpen))
......@@ -568,23 +570,23 @@ namespace OnlineStore.DeviceLibrary
InLog("入库 " + MoveInfo.SLog + ": 上下气缸上升");
UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
}
else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp))
{
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateTrayInfo(num);
RemoveInStore(MoveInfo.MoveParam);
if (OnlyProOutTray)
{
if (ClampJwa.HasReel())
{
//更新位置在皮带线
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, "D7");
MI_08_WaitBox();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MI_07_WaitHasReel);
InLog("入库 " + MoveInfo.SLog + ": 等待夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
}
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_07_WaitHasReel))
{
MI_08_WaitBox();
}
else if (MoveInfo.IsStep(LineMoveStep.MI_08_WaitBox))
{
......@@ -621,8 +623,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_12_CylinderRelax);
InLog("入库 " + MoveInfo.SLog + ",夹料气缸放松");
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa.Relax(MoveInfo);
EDataManager.UpdateParam(DeviceID );
ClampJwa.Relax(MoveInfo);
EDataManager.UpdateParam(DeviceID);
}
else if (MoveInfo.IsStep(LineMoveStep.MI_12_CylinderRelax))
{
......@@ -637,7 +639,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_14_CylinderAfter);
InLog("入库 " + MoveInfo.SLog + ",前后气缸后退,等待300 ");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
}
else
{
......@@ -654,13 +656,13 @@ namespace OnlineStore.DeviceLibrary
{
if (MoveInfo.MoveParam.IsNG)
{
OutLog( MoveInfo.SLog + ",NG料已放到出料口,发送 cancelPutInTask ");
OutLog(MoveInfo.SLog + ",NG料已放到出料口,发送 cancelPutInTask ");
string msg = SServerManager.cancelPutInTask(Name, code);
afterPutCutOK = true;
}
else
else
{
OutLog( MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation ");
OutLog(MoveInfo.SLog + ",工单料到达接驳台,发送 arrive3fRobotLocation ");
string msg = SServerManager.arrive3fRobotLocation(Name, 1, code);
afterPutCutOK = true;
}
......@@ -685,15 +687,15 @@ namespace OnlineStore.DeviceLibrary
msg = "出料机构取料";
}
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知"+ msg + ",等待3000");
InLog("入库 " + MoveInfo.SLog + ",再次通知" + msg + ",等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
sendCount++;
if (sendCount >= 3)
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + " 等待"+ msg + "超时 已发送" + sendCount + "次";
LogUtil.error(WarnMsg );
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] " + " 等待" + msg + "超时 已发送" + sendCount + "次";
LogUtil.error(WarnMsg);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
......@@ -711,6 +713,26 @@ namespace OnlineStore.DeviceLibrary
MoveEndS();
}
}
private void MI_08_WaitBox()
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
TrayManager.UpdateTrayInfo(num);
RemoveInStore(MoveInfo.MoveParam);
if (OnlyProOutTray)
{
//更新位置在皮带线
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INBELT, "D7");
}
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
private bool afterPutCutOK = false;
private int sendCount = 0;
private bool IsInStoreNeed()
......@@ -915,13 +937,14 @@ namespace OnlineStore.DeviceLibrary
isNeed = true;
targetP = "【出库空托盘】";
}
else if (isFull && IsInStoreNeed())
else if (isFull && IsInStoreNeed() && alarmType.Equals(LineAlarmType.None))
{
isNeed = true;
targetP = "【入库托盘】";
}
else if (CheckIsNeedMove())
else if (CheckIsNeedMove() && alarmType.Equals(LineAlarmType.None))
{
//如果是出料口托盘当前报警,暂不拦截
isNeed = true;
targetP = "【出料口托盘】";
}
......@@ -1099,7 +1122,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
}
......@@ -61,9 +61,9 @@ namespace OnlineStore.DeviceLibrary
if (checkHasReel)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitClampHasReel());
//有一个到位就算到位
moveInfo.OneWaitCanEndStep = true;
}
//有一个到位就算到位
moveInfo.OneWaitCanEndStep = true;
}
}
......
......@@ -156,15 +156,17 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,夹料气缸1夹紧
/// </summary>
MI_05_CylinderOpen,
/// <summary>
///移载装置入库处理,上下气缸1上升
/// </summary>
MI_06_CylinderUp,
/// <summary>
/// 移载装置入库处理,检测夹爪料盘检测信号
/// 移载装置入库处理,等待夹爪有料
/// </summary>
MI_07_ClampCheck,
MI_07_WaitHasReel,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
......@@ -332,9 +334,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
MO_56_ResetClamp,
/// <summary>
/// 移栽出库。 夹料气缸检测
/// 移栽出库。 等待夹爪有料
/// </summary>
MO_57_ClampCheck,
MO_57_WaitHasReel,
/// <summary>
/// 移栽出库:开始等待托盘
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!