Commit c5c0adeb 张东亮

出库长皮带线30秒内未检测到料盘时自动屏蔽库位

1 个父辈 a20ce6d7
......@@ -366,7 +366,7 @@ namespace OnlineStore.DeviceLibrary
/// <param name="barcode"></param>
/// <param name="poid"></param>
/// <returns></returns>
public static string DisablePos(string deviceName, string barcode, string poid)
public static string DisablePos(string deviceName, string barcode, string poid,string reason="")
{
string msg = "";
try
......@@ -383,7 +383,8 @@ namespace OnlineStore.DeviceLibrary
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("posId", poid);//posId:库位号
paramMap.Add("barcode", barcode); // barcode = 料盘的条码
paramMap.Add("barcode", barcode); // barcode = 料盘的条码
paramMap.Add("msg", reason);
string server = GetAddr(Addr_disabledPos, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
......

using HalconDotNet;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -6,6 +7,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
......@@ -376,12 +378,20 @@ namespace OnlineStore.DeviceLibrary
{
timeOutSeconds = 40;
}
if (MoveInfo.IsStep(StepEnum.Line_02_WaitReduceSig))
{
timeOutSeconds = 30;
}
//一分钟还未检测到
if (span.TotalSeconds > timeOutSeconds && alarmType <= AlarmType.IoSingleTimeOut)
{
ConfigIO io = baseConfig.getWaitIO(wait.IoType);
WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "] 等待" + NotOkMsg + " 超时 " + Math.Round(span.TotalSeconds, 1) + "秒";
if (MoveInfo.IsStep(StepEnum.Line_02_WaitReduceSig))
{
SServerManager.DisablePos("仓内长皮带线", MoveInfo.MoveParam.PosInfo.barcode, MoveInfo.MoveParam.PosInfo.PosId,$"在长皮带线{timeOutSeconds}S内未检测到料盘");
wait.IsEnd=true;
}
LogUtil.error(WarnMsg, moveInfo.ErrorLogType, moveInfo.logSeconds());
if (NoAlarm())
{
......
......@@ -142,7 +142,7 @@
this.tabPage2.Controls.Add(this.panel1);
this.tabPage2.Location = new System.Drawing.Point(4, 32);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(192, 64);
this.tabPage2.Size = new System.Drawing.Size(988, 602);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -153,7 +153,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(192, 64);
this.panel1.Size = new System.Drawing.Size(988, 602);
this.panel1.TabIndex = 1;
//
// tableLayoutPanel1
......@@ -178,7 +178,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 19.04762F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(192, 64);
this.tableLayoutPanel1.Size = new System.Drawing.Size(988, 602);
this.tableLayoutPanel1.TabIndex = 0;
//
// InputControl
......@@ -189,11 +189,11 @@
this.tableLayoutPanel1.SetColumnSpan(this.InputControl, 2);
this.InputControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.InputControl.EquipText = "上料机构";
this.InputControl.Location = new System.Drawing.Point(4, 43);
this.InputControl.Location = new System.Drawing.Point(4, 374);
this.InputControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.InputControl.MoveInfo = "暂无出入库";
this.InputControl.Name = "InputControl";
this.InputControl.Size = new System.Drawing.Size(184, 4);
this.InputControl.Size = new System.Drawing.Size(980, 106);
this.InputControl.TabIndex = 5;
this.InputControl.WorkStatus = "暂未启动";
//
......@@ -203,11 +203,11 @@
this.ReelControlA1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA1.ColorStatus = System.Drawing.Color.White;
this.ReelControlA1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA1.Location = new System.Drawing.Point(4, 25);
this.ReelControlA1.Location = new System.Drawing.Point(4, 204);
this.ReelControlA1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ReelControlA1.Name = "ReelControlA1";
this.ReelControlA1.ReelText = "暂存区物料";
this.ReelControlA1.Size = new System.Drawing.Size(88, 1);
this.ReelControlA1.Size = new System.Drawing.Size(486, 77);
this.ReelControlA1.TabIndex = 0;
//
// ReelControlA2
......@@ -216,11 +216,11 @@
this.ReelControlA2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlA2.ColorStatus = System.Drawing.Color.White;
this.ReelControlA2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlA2.Location = new System.Drawing.Point(4, 34);
this.ReelControlA2.Location = new System.Drawing.Point(4, 289);
this.ReelControlA2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ReelControlA2.Name = "ReelControlA2";
this.ReelControlA2.ReelText = "暂存区物料";
this.ReelControlA2.Size = new System.Drawing.Size(88, 1);
this.ReelControlA2.Size = new System.Drawing.Size(486, 77);
this.ReelControlA2.TabIndex = 1;
//
// ReelControlB1
......@@ -229,11 +229,11 @@
this.ReelControlB1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB1.ColorStatus = System.Drawing.Color.White;
this.ReelControlB1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB1.Location = new System.Drawing.Point(100, 25);
this.ReelControlB1.Location = new System.Drawing.Point(498, 204);
this.ReelControlB1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ReelControlB1.Name = "ReelControlB1";
this.ReelControlB1.ReelText = "暂存区物料";
this.ReelControlB1.Size = new System.Drawing.Size(88, 1);
this.ReelControlB1.Size = new System.Drawing.Size(486, 77);
this.ReelControlB1.TabIndex = 2;
//
// BoxControl
......@@ -248,7 +248,7 @@
this.BoxControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BoxControl.MoveInfo = "暂无出入库";
this.BoxControl.Name = "BoxControl";
this.BoxControl.Size = new System.Drawing.Size(184, 13);
this.BoxControl.Size = new System.Drawing.Size(980, 192);
this.BoxControl.TabIndex = 4;
this.BoxControl.WorkStatus = "暂未启动";
//
......@@ -259,11 +259,11 @@
this.ShelfAControl.ColorStatus = System.Drawing.Color.White;
this.ShelfAControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfAControl.EquipText = "A料口";
this.ShelfAControl.Location = new System.Drawing.Point(4, 55);
this.ShelfAControl.Location = new System.Drawing.Point(4, 488);
this.ShelfAControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ShelfAControl.MoveInfo = "暂无出入库";
this.ShelfAControl.Name = "ShelfAControl";
this.ShelfAControl.Size = new System.Drawing.Size(88, 5);
this.ShelfAControl.Size = new System.Drawing.Size(486, 110);
this.ShelfAControl.TabIndex = 6;
this.ShelfAControl.WorkStatus = "暂未启动";
//
......@@ -274,11 +274,11 @@
this.ShelfBControl.ColorStatus = System.Drawing.Color.White;
this.ShelfBControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.ShelfBControl.EquipText = "B料口";
this.ShelfBControl.Location = new System.Drawing.Point(100, 55);
this.ShelfBControl.Location = new System.Drawing.Point(498, 488);
this.ShelfBControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ShelfBControl.MoveInfo = "暂无出入库";
this.ShelfBControl.Name = "ShelfBControl";
this.ShelfBControl.Size = new System.Drawing.Size(88, 5);
this.ShelfBControl.Size = new System.Drawing.Size(486, 110);
this.ShelfBControl.TabIndex = 7;
this.ShelfBControl.Visible = false;
this.ShelfBControl.WorkStatus = "暂未启动";
......@@ -289,11 +289,11 @@
this.ReelControlB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ReelControlB2.ColorStatus = System.Drawing.Color.White;
this.ReelControlB2.Dock = System.Windows.Forms.DockStyle.Fill;
this.ReelControlB2.Location = new System.Drawing.Point(100, 34);
this.ReelControlB2.Location = new System.Drawing.Point(498, 289);
this.ReelControlB2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ReelControlB2.Name = "ReelControlB2";
this.ReelControlB2.ReelText = "暂存区物料";
this.ReelControlB2.Size = new System.Drawing.Size(88, 1);
this.ReelControlB2.Size = new System.Drawing.Size(486, 77);
this.ReelControlB2.TabIndex = 3;
//
// lblStatus
......@@ -584,51 +584,51 @@
// 开机自动启动ToolStripMenuItem
//
this.开机自动启动ToolStripMenuItem.Name = "开机自动启动ToolStripMenuItem";
this.开机自动启动ToolStripMenuItem.Size = new System.Drawing.Size(224, 32);
this.开机自动启动ToolStripMenuItem.Size = new System.Drawing.Size(221, 32);
this.开机自动启动ToolStripMenuItem.Text = "开机自动启动";
this.开机自动启动ToolStripMenuItem.Click += new System.EventHandler(this.开机自动启动ToolStripMenuItem_Click);
//
// toolStripSeparator15
//
this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(221, 6);
this.toolStripSeparator15.Size = new System.Drawing.Size(218, 6);
//
// 启用蜂鸣器ToolStripMenuItem
//
this.启用蜂鸣器ToolStripMenuItem.Name = "启用蜂鸣器ToolStripMenuItem";
this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(224, 32);
this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(221, 32);
this.启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
this.启用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.启用蜂鸣器ToolStripMenuItem_Click);
//
// toolStripSeparator25
//
this.toolStripSeparator25.Name = "toolStripSeparator25";
this.toolStripSeparator25.Size = new System.Drawing.Size(221, 6);
this.toolStripSeparator25.Size = new System.Drawing.Size(218, 6);
//
// aGVCancelStateToolStripMenuItem
//
this.aGVCancelStateToolStripMenuItem.Name = "aGVCancelStateToolStripMenuItem";
this.aGVCancelStateToolStripMenuItem.Size = new System.Drawing.Size(224, 32);
this.aGVCancelStateToolStripMenuItem.Size = new System.Drawing.Size(221, 32);
this.aGVCancelStateToolStripMenuItem.Text = "AGV信号屏蔽";
this.aGVCancelStateToolStripMenuItem.Click += new System.EventHandler(this.aGVCancelStateToolStripMenuItem_Click);
//
// toolStripSeparator17
//
this.toolStripSeparator17.Name = "toolStripSeparator17";
this.toolStripSeparator17.Size = new System.Drawing.Size(221, 6);
this.toolStripSeparator17.Size = new System.Drawing.Size(218, 6);
this.toolStripSeparator17.Visible = false;
//
// 禁用安全光栅ToolStripMenuItem
//
this.禁用安全光栅ToolStripMenuItem.Name = "禁用安全光栅ToolStripMenuItem";
this.禁用安全光栅ToolStripMenuItem.Size = new System.Drawing.Size(224, 32);
this.禁用安全光栅ToolStripMenuItem.Size = new System.Drawing.Size(221, 32);
this.禁用安全光栅ToolStripMenuItem.Text = "禁用安全光栅";
this.禁用安全光栅ToolStripMenuItem.Click += new System.EventHandler(this.启用安全光栅ToolStripMenuItem_Click);
//
// 启用门禁ToolStripMenuItem
//
this.启用门禁ToolStripMenuItem.Name = "启用门禁ToolStripMenuItem";
this.启用门禁ToolStripMenuItem.Size = new System.Drawing.Size(224, 32);
this.启用门禁ToolStripMenuItem.Size = new System.Drawing.Size(221, 32);
this.启用门禁ToolStripMenuItem.Text = "禁用门禁";
this.启用门禁ToolStripMenuItem.Click += new System.EventHandler(this.启用门禁ToolStripMenuItem_Click);
//
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!