Commit 42a0eb1f LN

增加暂停抓料复选框

1 个父辈 038c4e47
......@@ -33,6 +33,7 @@
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chbDisGetWare = new System.Windows.Forms.CheckBox();
this.chbTrayTest = new System.Windows.Forms.CheckBox();
this.chbDisMove = new System.Windows.Forms.CheckBox();
this.lblCardMsg = new System.Windows.Forms.Label();
......@@ -219,6 +220,7 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.chbDisGetWare);
this.groupBox2.Controls.Add(this.chbTrayTest);
this.groupBox2.Controls.Add(this.chbDisMove);
this.groupBox2.Controls.Add(this.lblCardMsg);
......@@ -227,27 +229,40 @@
this.groupBox2.Controls.Add(this.chbLeftDis);
this.groupBox2.Controls.Add(this.chbDisSL);
this.groupBox2.Controls.Add(this.chbRightDis);
this.groupBox2.Location = new System.Drawing.Point(10, 3);
this.groupBox2.Location = new System.Drawing.Point(5, 3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(302, 630);
this.groupBox2.Size = new System.Drawing.Size(310, 630);
this.groupBox2.TabIndex = 200;
this.groupBox2.TabStop = false;
//
// chbDisGetWare
//
this.chbDisGetWare.AutoSize = true;
this.chbDisGetWare.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDisGetWare.Location = new System.Drawing.Point(11, 24);
this.chbDisGetWare.Name = "chbDisGetWare";
this.chbDisGetWare.Size = new System.Drawing.Size(173, 25);
this.chbDisGetWare.TabIndex = 204;
this.chbDisGetWare.Text = "暂停抓料,准备更新";
this.chbDisGetWare.UseVisualStyleBackColor = true;
this.chbDisGetWare.CheckedChanged += new System.EventHandler(this.chbDisGetWare_CheckedChanged);
//
// chbTrayTest
//
this.chbTrayTest.AutoSize = true;
this.chbTrayTest.Location = new System.Drawing.Point(9, 22);
this.chbTrayTest.Location = new System.Drawing.Point(11, 60);
this.chbTrayTest.Name = "chbTrayTest";
this.chbTrayTest.Size = new System.Drawing.Size(168, 24);
this.chbTrayTest.TabIndex = 203;
this.chbTrayTest.Text = "托盘横移到出料线测试";
this.chbTrayTest.UseVisualStyleBackColor = true;
this.chbTrayTest.Visible = false;
this.chbTrayTest.CheckedChanged += new System.EventHandler(this.chbTrayTest_CheckedChanged);
//
// chbDisMove
//
this.chbDisMove.AutoSize = true;
this.chbDisMove.Location = new System.Drawing.Point(9, 222);
this.chbDisMove.Location = new System.Drawing.Point(11, 240);
this.chbDisMove.Name = "chbDisMove";
this.chbDisMove.Size = new System.Drawing.Size(144, 24);
this.chbDisMove.TabIndex = 202;
......@@ -265,7 +280,7 @@
// chbDisHy
//
this.chbDisHy.AutoSize = true;
this.chbDisHy.Location = new System.Drawing.Point(9, 187);
this.chbDisHy.Location = new System.Drawing.Point(11, 205);
this.chbDisHy.Name = "chbDisHy";
this.chbDisHy.Size = new System.Drawing.Size(194, 24);
this.chbDisHy.TabIndex = 201;
......@@ -287,7 +302,7 @@
// chbLeftDis
//
this.chbLeftDis.AutoSize = true;
this.chbLeftDis.Location = new System.Drawing.Point(9, 67);
this.chbLeftDis.Location = new System.Drawing.Point(11, 93);
this.chbLeftDis.Name = "chbLeftDis";
this.chbLeftDis.Size = new System.Drawing.Size(277, 24);
this.chbLeftDis.TabIndex = 196;
......@@ -298,7 +313,7 @@
// chbDisSL
//
this.chbDisSL.AutoSize = true;
this.chbDisSL.Location = new System.Drawing.Point(9, 152);
this.chbDisSL.Location = new System.Drawing.Point(11, 170);
this.chbDisSL.Name = "chbDisSL";
this.chbDisSL.Size = new System.Drawing.Size(192, 24);
this.chbDisSL.TabIndex = 199;
......@@ -309,7 +324,7 @@
// chbRightDis
//
this.chbRightDis.AutoSize = true;
this.chbRightDis.Location = new System.Drawing.Point(9, 101);
this.chbRightDis.Location = new System.Drawing.Point(11, 126);
this.chbRightDis.Name = "chbRightDis";
this.chbRightDis.Size = new System.Drawing.Size(293, 24);
this.chbRightDis.TabIndex = 197;
......@@ -1120,38 +1135,38 @@
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator6.Visible = false;
//
// 二维码学习ToolStripMenuItem
//
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(173, 6);
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator9.Visible = false;
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
......@@ -1159,36 +1174,36 @@
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator13.Size = new System.Drawing.Size(173, 6);
//
// iO模块状态ToolStripMenuItem
//
this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem";
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.iO模块状态ToolStripMenuItem.Text = "查看料仓状态";
this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator14.Size = new System.Drawing.Size(173, 6);
//
// 查看托盘信息ToolStripMenuItem
//
this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem";
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息";
this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator12.Size = new System.Drawing.Size(173, 6);
//
// 清空托盘信息ToolStripMenuItem
//
this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem";
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息";
this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click);
//
......@@ -1207,31 +1222,31 @@
// 清空日志ToolStripMenuItem
//
this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem";
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.清空日志ToolStripMenuItem.Text = "清空日志";
this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator10.Size = new System.Drawing.Size(141, 6);
//
// 复制日志ToolStripMenuItem
//
this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem";
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复制日志ToolStripMenuItem.Text = "复制日志";
this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator11.Size = new System.Drawing.Size(141, 6);
//
// 版本号ToolStripMenuItem
//
this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem";
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.版本号ToolStripMenuItem.Text = "关于软件";
this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click);
//
......@@ -1582,6 +1597,7 @@
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Panel panel13;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.CheckBox chbDisGetWare;
}
}
......@@ -1265,5 +1265,19 @@ namespace OnlineStore.AssemblyLine
LineManager.TrayToOutLineTest = chbTrayTest.Checked;
LogUtil.info("界面点击勾选:" + chbTrayTest.Text + "=" + LineManager.TrayToOutLineTest);
}
private void chbDisGetWare_CheckedChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (LineManager.DisGetWare.Equals(chbDisGetWare.Checked))
{
return;
}
LineManager.DisGetWare = chbDisGetWare.Checked;
LogUtil.info("界面点击勾选:" + chbDisGetWare.Text + "=" + LineManager.DisGetWare);
}
}
}
......@@ -342,10 +342,18 @@ namespace OnlineStore.DeviceLibrary
if (ScanCodeTask == null || ScanCodeTask.IsCompleted)
{
ClearTimeoutAlarm("扫码结束超时");
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderTake);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
ClearTimeoutAlarm("扫码执行结束超时");
if (!LineManager.DisGetWare)
{
ClearTimeoutAlarm("启用抓料超时");
MoveInfo.NextMoveStep(LineMoveStep.FI_21_CylinderTake);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
}
else if (MoveInfo.IsTimeOut(60))
{
MoveTimeOut(MoveInfo, "启用抓料超时");
}
}
else if (MoveInfo.IsTimeOut(60))
{
......@@ -357,7 +365,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.FI_22_UpdownToP3);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P3[" + Config.UpDownAxisP3 + "]");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
}
else if (MoveInfo.IsStep(LineMoveStep.FI_22_UpdownToP3))
{
......@@ -485,11 +493,11 @@ namespace OnlineStore.DeviceLibrary
}
if (LastResult.Equals(98))
{
InLog(" " + MoveInfo.SLog + " 出库料,开始拦截空托盘 ");
InLog(" " + MoveInfo.SLog + " 出库料,开始拦截空托盘 ");
}
else
{
InLog(" " + MoveInfo.SLog + " 入库料,开始拦截空托盘 ");
InLog(" " + MoveInfo.SLog + " 入库料,开始拦截空托盘 ");
}
ClearTimeoutAlarm("获取库位号超时");
......@@ -521,7 +529,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
}
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{
......@@ -560,21 +568,21 @@ namespace OnlineStore.DeviceLibrary
else
{
if (IOValue(IO_Type.SL_ClampCylinder_Check).Equals(IO_VALUE.LOW))
{
{
FI_37_TrayMoveOk();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FI_36_ClampCheck);
MoveInfo.NextMoveStep(LineMoveStep.FI_36_ClampCheck);
InLog("料盘移栽" + MoveInfo.SLog + ":等待夹爪无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_ClampCylinder_Check, IO_VALUE.LOW));
}
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_36_ClampCheck))
{
FI_37_TrayMoveOk();
}
}
else if (MoveInfo.IsStep(LineMoveStep.FI_37_TrayMoveOk))
{
if (axisCheckTimer != null && axisCheckTimer.Enabled)
......@@ -677,7 +685,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.FI_59_WaitTime))
{
MoveInfo.NextMoveStep(LineMoveStep.FI_60_LineStop);
MoveInfo.NextMoveStep(LineMoveStep.FI_60_LineStop);
InLog("上料完成" + MoveInfo.SLog + ", 料架到达出口,线体横移电机停止 ");
IOMove(IO_Type.SL_LocationSideWay_Run, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutSideWay_Run, IO_VALUE.LOW);
......@@ -718,7 +726,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.FI_62_OutLineRun))
{
MoveEndS();
LastOutShelfId = CurrShelfId;
LastOutShelfId = CurrShelfId;
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_OutLine_Run, IO_VALUE.LOW);
InLog("上料完成,料架到达出口处, 通知AGV取空料架, 入料流程结束,更新LastOutShelfId=" + LastOutShelfId);
......
......@@ -284,6 +284,10 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if (LineManager.DisGetWare)
{
return false;
}
MoveEquip move = MoveEquipMap[id];
if (!move.NoAlarm() || move.waitInStoreList.Count > 0 || move.IsDebug || move.waitOutStoreList.Count > 0)
{
......
......@@ -536,7 +536,10 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if(LineManager.DisGetWare)
{
return false;
}
//如果正在出库执行中,不能拦截入库托盘
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
......
......@@ -22,6 +22,8 @@ namespace OnlineStore.DeviceLibrary
public static bool DisAllMove = false;
public static bool TrayToOutLineTest = false;
public static bool DisGetWare = false;
public static bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!