Commit 1a94036c LN

1.托盘增加禁用功能,禁用的托盘可在(设备调试->查看禁用托盘)界面手动启用。

2.进仓界面增加启用托盘检测的勾选配置。
3.进仓启用托盘检测功能后,若拦截到入库托盘,需要等待托盘检测信号亮。拦截空托盘出库时,如果托盘检测信号亮,直接禁用托盘。
4.进仓08默认启用托盘检测。
1 个父辈 3e06a6e7
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
<add key="Feed_LastShelfID_103" value="B25" /> <add key="Feed_LastShelfID_103" value="B25" />
<add key="Feed_LastShelfID_104" value="B7" /> <add key="Feed_LastShelfID_104" value="B7" />
<add key="Brush_Delay_Seconds" value="5" /> <add key="Brush_Delay_Seconds" value="5" />
<add key ="SaveErrorImageToFile" value ="1"/> <add key ="SaveErrorImageToFile" value ="1"/>
<add key ="UseTrayCheck" value ="8,"/>
</appSettings> </appSettings>
<!-- <log4net> --> <!-- <log4net> -->
<!-- <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> --> <!-- <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> -->
......
...@@ -91,6 +91,12 @@ ...@@ -91,6 +91,12 @@
<Compile Include="agvtest\FrmAgvTest.Designer.cs"> <Compile Include="agvtest\FrmAgvTest.Designer.cs">
<DependentUpon>FrmAgvTest.cs</DependentUpon> <DependentUpon>FrmAgvTest.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmDisableTray.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmDisableTray.Designer.cs">
<DependentUpon>FrmDisableTray.cs</DependentUpon>
</Compile>
<Compile Include="FrmIOMsg.cs"> <Compile Include="FrmIOMsg.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -175,6 +181,9 @@ ...@@ -175,6 +181,9 @@
<EmbeddedResource Include="agvtest\FrmAgvTest.resx"> <EmbeddedResource Include="agvtest\FrmAgvTest.resx">
<DependentUpon>FrmAgvTest.cs</DependentUpon> <DependentUpon>FrmAgvTest.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmDisableTray.resx">
<DependentUpon>FrmDisableTray.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmIOMsg.resx"> <EmbeddedResource Include="FrmIOMsg.resx">
<DependentUpon>FrmIOMsg.cs</DependentUpon> <DependentUpon>FrmIOMsg.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......

namespace OnlineStore.AssemblyLine
{
partial class FrmDisableTray
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.group3 = new System.Windows.Forms.GroupBox();
this.btnClose = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.btnrefresh = new System.Windows.Forms.Button();
this.Column_trayNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_DeviceName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_datetime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_describle = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_TrayInfo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Del = new System.Windows.Forms.DataGridViewLinkColumn();
this.lblTrayInfo = new System.Windows.Forms.Label();
this.group3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// group3
//
this.group3.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.group3.Controls.Add(this.lblTrayInfo);
this.group3.Controls.Add(this.btnrefresh);
this.group3.Controls.Add(this.btnClose);
this.group3.Controls.Add(this.dataGridView1);
this.group3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.group3.Location = new System.Drawing.Point(8, 7);
this.group3.Name = "group3";
this.group3.Size = new System.Drawing.Size(827, 504);
this.group3.TabIndex = 321;
this.group3.TabStop = false;
this.group3.Text = "禁用托盘列表";
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.ForeColor = System.Drawing.Color.Black;
this.btnClose.Location = new System.Drawing.Point(673, 442);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(121, 36);
this.btnClose.TabIndex = 326;
this.btnClose.Text = "关闭";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.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.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column_trayNum,
this.Column_DeviceName,
this.Column_datetime,
this.Column_describle,
this.Column_TrayInfo,
this.Column_Del});
this.dataGridView1.Location = new System.Drawing.Point(10, 22);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 5;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(803, 400);
this.dataGridView1.TabIndex = 323;
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged);
//
// btnrefresh
//
this.btnrefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnrefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnrefresh.ForeColor = System.Drawing.Color.Black;
this.btnrefresh.Location = new System.Drawing.Point(546, 442);
this.btnrefresh.Name = "btnrefresh";
this.btnrefresh.Size = new System.Drawing.Size(121, 36);
this.btnrefresh.TabIndex = 327;
this.btnrefresh.Text = "刷新";
this.btnrefresh.UseVisualStyleBackColor = true;
this.btnrefresh.Click += new System.EventHandler(this.btnrefresh_Click);
//
// Column_trayNum
//
this.Column_trayNum.HeaderText = "托盘编号";
this.Column_trayNum.Name = "Column_trayNum";
this.Column_trayNum.Width = 80;
//
// Column_DeviceName
//
this.Column_DeviceName.HeaderText = "禁用设备";
this.Column_DeviceName.Name = "Column_DeviceName";
//
// Column_datetime
//
this.Column_datetime.HeaderText = "禁用时间";
this.Column_datetime.Name = "Column_datetime";
this.Column_datetime.Width = 140;
//
// Column_describle
//
this.Column_describle.HeaderText = "禁用原因";
this.Column_describle.Name = "Column_describle";
this.Column_describle.Width = 200;
//
// Column_TrayInfo
//
this.Column_TrayInfo.HeaderText = "料盘信息";
this.Column_TrayInfo.Name = "Column_TrayInfo";
this.Column_TrayInfo.Width = 200;
//
// Column_Del
//
this.Column_Del.FillWeight = 60F;
this.Column_Del.HeaderText = "启用";
this.Column_Del.Name = "Column_Del";
this.Column_Del.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column_Del.Text = "启用";
this.Column_Del.ToolTipText = "启用";
this.Column_Del.UseColumnTextForLinkValue = true;
this.Column_Del.Width = 70;
//
// lblTrayInfo
//
this.lblTrayInfo.Location = new System.Drawing.Point(10, 429);
this.lblTrayInfo.Name = "lblTrayInfo";
this.lblTrayInfo.Size = new System.Drawing.Size(530, 63);
this.lblTrayInfo.TabIndex = 328;
this.lblTrayInfo.Text = "label1";
//
// FrmDisableTray
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(843, 521);
this.Controls.Add(this.group3);
this.Name = "FrmDisableTray";
this.Text = "托盘禁用信息";
this.Load += new System.EventHandler(this.FrmDisableTray_Load);
this.group3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox group3;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnrefresh;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_trayNum;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_DeviceName;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_datetime;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_describle;
private System.Windows.Forms.DataGridViewTextBoxColumn Column_TrayInfo;
private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.Label lblTrayInfo;
}
}
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.AssemblyLine
{
partial class FrmDisableTray : FrmBase
{
public FrmDisableTray()
{
InitializeComponent();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void FrmDisableTray_Load(object sender, EventArgs e)
{
LoadList();
}
private void LoadList()
{
dataGridView1.Rows.Clear();
List<TrayDisableInfo> list = TrayDisableManager.GetDisableList();
foreach (TrayDisableInfo t in list)
{
DataGridViewRow view = new DataGridViewRow();
view.CreateCells(dataGridView1);
view.Cells[Column_trayNum.Index].Value = t.TrayCode;
view.Cells[Column_DeviceName.Index].Value = t.DDeviceName;
view.Cells[Column_describle.Index].Value = t.DDescribe;
view.Cells[Column_datetime.Index].Value =t.DisableTime.ToString("yyyy-MM-dd HH:mm:ss");
TrayInfo tray = TrayManager.GetTrayInfo(t.TrayCode);
string trayInfo = "";
if (tray.InOrOutStore.Equals(0))
{
trayInfo = "空托盘";
}
else if (tray.InOrOutStore.Equals(1))
{
if (tray.InoutPar.InStoreNg)
{
trayInfo = $"入库NG[{tray.InoutPar.NgMsg}][{tray.InoutPar.WareCode}][{tray.InoutPar.PosId}]";
}
else
{
trayInfo = $"入库[{tray.InoutPar.WareCode}][{tray.InoutPar.PosId}]";
}
}
else if (tray.InOrOutStore.Equals(2))
{
trayInfo = $"出库[{tray.InoutPar.WareCode}][{tray.InoutPar.PosId}]";
}
view.Cells[Column_TrayInfo.Index].Value = trayInfo;
dataGridView1.Rows.Add(view);
}
lblTrayInfo.Text = "";
}
private void btnrefresh_Click(object sender, EventArgs e)
{
LoadList();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex != -1 && e.ColumnIndex >= 0)
{
string name = this.dataGridView1.Columns[e.ColumnIndex].Name;
int num = Convert.ToInt32( this.dataGridView1.Rows[e.RowIndex].Cells[Column_trayNum.Index].Value);
int rowIndex = e.RowIndex;
if (name.Equals(this.Column_Del.Name))
{
DialogResult dialogResult = MessageBox.Show("确定启用托盘【"+num+"】?", "提示?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (dialogResult.Equals(DialogResult.OK))
{
LogUtil.info("用户手动启用托盘【" + num + "】");
TrayDisableManager.RemoveDisable(num);
this.dataGridView1.Rows.RemoveAt(rowIndex);
lblTrayInfo.Text = "";
}
}
}
}
private void dataGridView1_SelectionChanged(object sender, EventArgs e)
{
if (dataGridView1.SelectedRows.Count > 0)
{
DataGridViewRow row = dataGridView1.SelectedRows[0];
int num = Convert.ToInt32(row.Cells[Column_trayNum.Index].Value);
TrayInfo tray = TrayManager.GetTrayInfo(num);
lblTrayInfo.Text = tray.ToStr();
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column_trayNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_DeviceName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_datetime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_describle.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_TrayInfo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.托盘初始化ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.托盘初始化ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.iO模块状态ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.iO模块状态ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
...@@ -735,6 +736,7 @@ ...@@ -735,6 +736,7 @@
this.toolStripSeparator6, this.toolStripSeparator6,
this.二维码学习ToolStripMenuItem, this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7, this.toolStripSeparator7,
this.toolStripMenuItem3,
this.托盘初始化ToolStripMenuItem, this.托盘初始化ToolStripMenuItem,
this.toolStripSeparator9, this.toolStripSeparator9,
this.iO模块状态ToolStripMenuItem, this.iO模块状态ToolStripMenuItem,
...@@ -751,7 +753,7 @@ ...@@ -751,7 +753,7 @@
// 扫码测试ToolStripMenuItem // 扫码测试ToolStripMenuItem
// //
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem"; this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试"; this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Visible = false; this.扫码测试ToolStripMenuItem.Visible = false;
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click); this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
...@@ -759,73 +761,85 @@ ...@@ -759,73 +761,85 @@
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Visible = false; this.toolStripSeparator6.Visible = false;
// //
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习"; this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click); this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem3.Text = "查看禁用托盘";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
// //
// 托盘初始化ToolStripMenuItem // 托盘初始化ToolStripMenuItem
// //
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem"; this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码"; this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Visible = false;
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click); this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator9.Visible = false;
// //
// iO模块状态ToolStripMenuItem // iO模块状态ToolStripMenuItem
// //
this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem"; this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem";
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.iO模块状态ToolStripMenuItem.Text = "IO模块状态"; this.iO模块状态ToolStripMenuItem.Text = "IO模块状态";
this.iO模块状态ToolStripMenuItem.Visible = false;
this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click); this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click);
// //
// toolStripSeparator13 // toolStripSeparator13
// //
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator13.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator13.Visible = false;
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(176, 26); this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Text = "AGV调试"; this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
// //
// toolStripSeparator14 // toolStripSeparator14
// //
this.toolStripSeparator14.Name = "toolStripSeparator14"; this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6);
// //
// 查看托盘信息ToolStripMenuItem // 查看托盘信息ToolStripMenuItem
// //
this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem"; this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem";
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息"; this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息";
this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click); this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(173, 6); this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6);
// //
// 清空托盘信息ToolStripMenuItem // 清空托盘信息ToolStripMenuItem
// //
this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem"; this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem";
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26); this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息"; this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息";
this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click); this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click);
// //
...@@ -1065,6 +1079,7 @@ ...@@ -1065,6 +1079,7 @@
private System.Windows.Forms.CheckBox chbSaveImage; private System.Windows.Forms.CheckBox chbSaveImage;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.PictureBox picLine; private System.Windows.Forms.PictureBox picLine;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
} }
} }
...@@ -120,7 +120,7 @@ namespace OnlineStore.AssemblyLine ...@@ -120,7 +120,7 @@ namespace OnlineStore.AssemblyLine
LoadStoreData(); LoadStoreData();
LoadListView(); LoadListView();
托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1); //托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1);
cmbTray.Items.Clear(); cmbTray.Items.Clear();
for (int i = 1; i <= 30; i++) for (int i = 1; i <= 30; i++)
{ {
...@@ -902,21 +902,21 @@ namespace OnlineStore.AssemblyLine ...@@ -902,21 +902,21 @@ namespace OnlineStore.AssemblyLine
MessageBox.Show(msg,"托盘信息列表"); MessageBox.Show(msg,"托盘信息列表");
} }
private void btnClearTray_Click(object sender, EventArgs e) //private void btnClearTray_Click(object sender, EventArgs e)
{ //{
DialogResult resut = MessageBox.Show("确定手动清空所有托盘信息?", "提示", MessageBoxButtons.YesNo); // DialogResult resut = MessageBox.Show("确定手动清空所有托盘信息?", "提示", MessageBoxButtons.YesNo);
if (resut.Equals(DialogResult.Yes)) // if (resut.Equals(DialogResult.Yes))
{ // {
List<TrayInfo> tray = TrayManager.getTrayList(); // List<TrayInfo> tray = TrayManager.getTrayList();
LogUtil.info("-------------------点击:清空托盘。清空前打印托盘信息:"); // LogUtil.info("-------------------点击:清空托盘。清空前打印托盘信息:");
foreach (TrayInfo t in tray) // foreach (TrayInfo t in tray)
{ // {
LogUtil.info(t.ToStr()); // LogUtil.info(t.ToStr());
} // }
TrayManager.ClearTrayInfo(); // TrayManager.ClearTrayInfo();
LogUtil.info("-------------------点击:清空托盘。托盘内容已清空"); // LogUtil.info("-------------------点击:清空托盘。托盘内容已清空");
} // }
} //}
private void btnUpdateTray_Click(object sender, EventArgs e) private void btnUpdateTray_Click(object sender, EventArgs e)
{ {
...@@ -1177,5 +1177,11 @@ namespace OnlineStore.AssemblyLine ...@@ -1177,5 +1177,11 @@ namespace OnlineStore.AssemblyLine
CodeManager.SaveImage = (chbSaveImage.Checked); CodeManager.SaveImage = (chbSaveImage.Checked);
LogUtil.info("勾选 保存扫码图片功能:CodeManager.SaveImage =" + CodeManager.SaveImage); LogUtil.info("勾选 保存扫码图片功能:CodeManager.SaveImage =" + CodeManager.SaveImage);
} }
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
FrmDisableTray frm = new FrmDisableTray();
frm.ShowDialog();
}
} }
} }
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox(); this.groupBox6 = new System.Windows.Forms.GroupBox();
this.chbUseTrayCheck = new System.Windows.Forms.CheckBox();
this.lblInoutInfo = new System.Windows.Forms.Label(); this.lblInoutInfo = new System.Windows.Forms.Label();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label(); this.lblInstoreList = new System.Windows.Forms.Label();
...@@ -111,7 +112,7 @@ ...@@ -111,7 +112,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(497, 6); this.groupBox1.Location = new System.Drawing.Point(497, 6);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(375, 160); this.groupBox1.Size = new System.Drawing.Size(375, 147);
this.groupBox1.TabIndex = 105; this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
...@@ -306,7 +307,7 @@ ...@@ -306,7 +307,7 @@
this.groupBox5.Controls.Add(this.btnTopUp); this.groupBox5.Controls.Add(this.btnTopUp);
this.groupBox5.Location = new System.Drawing.Point(878, 6); this.groupBox5.Location = new System.Drawing.Point(878, 6);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(428, 160); this.groupBox5.Size = new System.Drawing.Size(428, 147);
this.groupBox5.TabIndex = 255; this.groupBox5.TabIndex = 255;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
...@@ -316,7 +317,7 @@ ...@@ -316,7 +317,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White; this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(308, 66); this.btnCloseAll.Location = new System.Drawing.Point(308, 62);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(114, 73); this.btnCloseAll.Size = new System.Drawing.Size(114, 73);
this.btnCloseAll.TabIndex = 259; this.btnCloseAll.TabIndex = 259;
...@@ -329,7 +330,7 @@ ...@@ -329,7 +330,7 @@
this.btnStop2Up.BackColor = System.Drawing.Color.White; this.btnStop2Up.BackColor = System.Drawing.Color.White;
this.btnStop2Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStop2Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop2Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStop2Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop2Up.Location = new System.Drawing.Point(162, 27); this.btnStop2Up.Location = new System.Drawing.Point(162, 23);
this.btnStop2Up.Name = "btnStop2Up"; this.btnStop2Up.Name = "btnStop2Up";
this.btnStop2Up.Size = new System.Drawing.Size(140, 34); this.btnStop2Up.Size = new System.Drawing.Size(140, 34);
this.btnStop2Up.TabIndex = 258; this.btnStop2Up.TabIndex = 258;
...@@ -342,7 +343,7 @@ ...@@ -342,7 +343,7 @@
this.btnStop1Up.BackColor = System.Drawing.Color.White; this.btnStop1Up.BackColor = System.Drawing.Color.White;
this.btnStop1Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStop1Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop1Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStop1Up.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop1Up.Location = new System.Drawing.Point(12, 27); this.btnStop1Up.Location = new System.Drawing.Point(12, 23);
this.btnStop1Up.Name = "btnStop1Up"; this.btnStop1Up.Name = "btnStop1Up";
this.btnStop1Up.Size = new System.Drawing.Size(140, 34); this.btnStop1Up.Size = new System.Drawing.Size(140, 34);
this.btnStop1Up.TabIndex = 256; this.btnStop1Up.TabIndex = 256;
...@@ -355,7 +356,7 @@ ...@@ -355,7 +356,7 @@
this.btnClampSlack.BackColor = System.Drawing.Color.White; this.btnClampSlack.BackColor = System.Drawing.Color.White;
this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClampSlack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnClampSlack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClampSlack.Location = new System.Drawing.Point(12, 105); this.btnClampSlack.Location = new System.Drawing.Point(12, 101);
this.btnClampSlack.Name = "btnClampSlack"; this.btnClampSlack.Name = "btnClampSlack";
this.btnClampSlack.Size = new System.Drawing.Size(140, 34); this.btnClampSlack.Size = new System.Drawing.Size(140, 34);
this.btnClampSlack.TabIndex = 255; this.btnClampSlack.TabIndex = 255;
...@@ -368,7 +369,7 @@ ...@@ -368,7 +369,7 @@
this.btnUpDownUp.BackColor = System.Drawing.Color.White; this.btnUpDownUp.BackColor = System.Drawing.Color.White;
this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnUpDownUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpDownUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownUp.Location = new System.Drawing.Point(162, 105); this.btnUpDownUp.Location = new System.Drawing.Point(162, 101);
this.btnUpDownUp.Name = "btnUpDownUp"; this.btnUpDownUp.Name = "btnUpDownUp";
this.btnUpDownUp.Size = new System.Drawing.Size(140, 34); this.btnUpDownUp.Size = new System.Drawing.Size(140, 34);
this.btnUpDownUp.TabIndex = 252; this.btnUpDownUp.TabIndex = 252;
...@@ -381,7 +382,7 @@ ...@@ -381,7 +382,7 @@
this.btnBeforeAfterBefore.BackColor = System.Drawing.Color.White; this.btnBeforeAfterBefore.BackColor = System.Drawing.Color.White;
this.btnBeforeAfterBefore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnBeforeAfterBefore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBeforeAfterBefore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBeforeAfterBefore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBeforeAfterBefore.Location = new System.Drawing.Point(162, 66); this.btnBeforeAfterBefore.Location = new System.Drawing.Point(162, 62);
this.btnBeforeAfterBefore.Name = "btnBeforeAfterBefore"; this.btnBeforeAfterBefore.Name = "btnBeforeAfterBefore";
this.btnBeforeAfterBefore.Size = new System.Drawing.Size(140, 34); this.btnBeforeAfterBefore.Size = new System.Drawing.Size(140, 34);
this.btnBeforeAfterBefore.TabIndex = 249; this.btnBeforeAfterBefore.TabIndex = 249;
...@@ -394,7 +395,7 @@ ...@@ -394,7 +395,7 @@
this.btnTopUp.BackColor = System.Drawing.Color.White; this.btnTopUp.BackColor = System.Drawing.Color.White;
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(12, 66); this.btnTopUp.Location = new System.Drawing.Point(12, 62);
this.btnTopUp.Name = "btnTopUp"; this.btnTopUp.Name = "btnTopUp";
this.btnTopUp.Size = new System.Drawing.Size(140, 34); this.btnTopUp.Size = new System.Drawing.Size(140, 34);
this.btnTopUp.TabIndex = 246; this.btnTopUp.TabIndex = 246;
...@@ -540,17 +541,30 @@ ...@@ -540,17 +541,30 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 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.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.chbUseTrayCheck);
this.groupBox6.Controls.Add(this.lblInoutInfo); this.groupBox6.Controls.Add(this.lblInoutInfo);
this.groupBox6.Controls.Add(this.lblMoveInfo); this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblInstoreList); this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(498, 172); this.groupBox6.Location = new System.Drawing.Point(498, 156);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(808, 301); this.groupBox6.Size = new System.Drawing.Size(808, 314);
this.groupBox6.TabIndex = 278; this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
// //
// chbUseTrayCheck
//
this.chbUseTrayCheck.AutoSize = true;
this.chbUseTrayCheck.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbUseTrayCheck.Location = new System.Drawing.Point(9, 271);
this.chbUseTrayCheck.Name = "chbUseTrayCheck";
this.chbUseTrayCheck.Size = new System.Drawing.Size(112, 24);
this.chbUseTrayCheck.TabIndex = 282;
this.chbUseTrayCheck.Text = "启用料盘检测";
this.chbUseTrayCheck.UseVisualStyleBackColor = true;
this.chbUseTrayCheck.CheckedChanged += new System.EventHandler(this.chbUseTrayCheck_CheckedChanged);
//
// lblInoutInfo // lblInoutInfo
// //
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green; this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
...@@ -985,6 +999,7 @@ ...@@ -985,6 +999,7 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnDSave; private System.Windows.Forms.Button btnDSave;
private System.Windows.Forms.Label lblInoutInfo; private System.Windows.Forms.Label lblInoutInfo;
private System.Windows.Forms.CheckBox chbUseTrayCheck;
} }
} }
...@@ -23,7 +23,7 @@ namespace OnlineStore.AssemblyLine ...@@ -23,7 +23,7 @@ namespace OnlineStore.AssemblyLine
internal partial class FrmMoveEquip : FrmEquipBase internal partial class FrmMoveEquip : FrmEquipBase
{ {
private bool IsLoad = false; private bool IsLoad = false;
private MoveEquip equipBean; private MoveEquip equipBean;
internal FrmMoveEquip(MoveEquip moveEquip) internal FrmMoveEquip(MoveEquip moveEquip)
{ {
...@@ -37,14 +37,14 @@ namespace OnlineStore.AssemblyLine ...@@ -37,14 +37,14 @@ namespace OnlineStore.AssemblyLine
{ {
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
if (equipBean.UseAxis) if (equipBean.UseAxis)
{ {
axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis }); axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis });
btnUpDownUp.Visible = false; btnUpDownUp.Visible = false;
} }
else else
{ {
tabControl1.TabPages.Remove(tabPage2); tabControl1.TabPages.Remove(tabPage2);
btnUpDownUp.Visible = true; btnUpDownUp.Visible = true;
} }
cmbSizeList.Items.Clear(); cmbSizeList.Items.Clear();
cmbSizeList.Items.Add("0=默认位置"); cmbSizeList.Items.Add("0=默认位置");
...@@ -58,6 +58,7 @@ namespace OnlineStore.AssemblyLine ...@@ -58,6 +58,7 @@ namespace OnlineStore.AssemblyLine
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
LoadDP2(); LoadDP2();
chbUseTrayCheck.Checked = LineManager.useTrayCheck.Contains(equipBean.DeviceID);
IsLoad = true; IsLoad = true;
} }
...@@ -114,7 +115,7 @@ namespace OnlineStore.AssemblyLine ...@@ -114,7 +115,7 @@ namespace OnlineStore.AssemblyLine
{ {
return; return;
} }
if ( this.Visible) if (this.Visible)
{ {
ReadIOList(); ReadIOList();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID); //lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
...@@ -143,7 +144,7 @@ namespace OnlineStore.AssemblyLine ...@@ -143,7 +144,7 @@ namespace OnlineStore.AssemblyLine
{ {
lblInoutInfo.Text = ""; lblInoutInfo.Text = "";
} }
lblMoveInfo.Text = equipBean.GetMoveStr()+"\r\n料仓类型:"+(equipBean.Config.IsBigTray.Equals(1)?"大料盘":"小料盘"); lblMoveInfo.Text = equipBean.GetMoveStr() + "\r\n料仓类型:" + (equipBean.Config.IsBigTray.Equals(1) ? "大料盘" : "小料盘");
string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库" : "不可出库"; string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库" : "不可出库";
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus) + "(" + canOut + ")"; lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
...@@ -176,7 +177,7 @@ namespace OnlineStore.AssemblyLine ...@@ -176,7 +177,7 @@ namespace OnlineStore.AssemblyLine
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(equipBean.Name + "界面定时器出错:" ,ex); LogUtil.error(equipBean.Name + "界面定时器出错:", ex);
} }
} }
...@@ -194,7 +195,7 @@ namespace OnlineStore.AssemblyLine ...@@ -194,7 +195,7 @@ namespace OnlineStore.AssemblyLine
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error);
LogUtil.error("",ex); LogUtil.error("", ex);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e) private void btnOpenDo_Click(object sender, EventArgs e)
...@@ -297,7 +298,7 @@ namespace OnlineStore.AssemblyLine ...@@ -297,7 +298,7 @@ namespace OnlineStore.AssemblyLine
{ {
LogUtil.info(equipBean.Name + "点击:停止"); LogUtil.info(equipBean.Name + "点击:停止");
StopRun(); StopRun();
} }
private void btnReset_Click(object sender, EventArgs e) private void btnReset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equipBean.Name + "点击:复位"); LogUtil.info(equipBean.Name + "点击:复位");
...@@ -347,7 +348,7 @@ namespace OnlineStore.AssemblyLine ...@@ -347,7 +348,7 @@ namespace OnlineStore.AssemblyLine
{ {
if (equipBean.runStatus.Equals(LineRunStatus.Runing)) if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{ {
LogUtil.info(equipBean.Name + "点击:出库测试"); LogUtil.info(equipBean.Name + "点击:出库测试");
equipBean.StartOutStoreMove(new InOutParam()); equipBean.StartOutStoreMove(new InOutParam());
} }
else else
...@@ -369,7 +370,7 @@ namespace OnlineStore.AssemblyLine ...@@ -369,7 +370,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
private void btnStop1Up_Click(object sender, EventArgs e) private void btnStop1Up_Click(object sender, EventArgs e)
{ {
BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1); BtnMove(btnStop1Up, "阻挡1下降", "阻挡1上升", IO_Type.StopCylinder_Down1);
...@@ -394,7 +395,7 @@ namespace OnlineStore.AssemblyLine ...@@ -394,7 +395,7 @@ namespace OnlineStore.AssemblyLine
{ {
MessageBox.Show("升降气缸不在上升端 或 升降轴不在待机点P1", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("升降气缸不在上升端 或 升降轴不在待机点P1", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
private void btnUpDownUp_Click(object sender, EventArgs e) private void btnUpDownUp_Click(object sender, EventArgs e)
{ {
...@@ -446,7 +447,7 @@ namespace OnlineStore.AssemblyLine ...@@ -446,7 +447,7 @@ namespace OnlineStore.AssemblyLine
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
{ {
foreach (Control con in groupBox5.Controls) foreach (Control con in groupBox5.Controls)
{ {
if (con is Button) if (con is Button)
...@@ -526,7 +527,7 @@ namespace OnlineStore.AssemblyLine ...@@ -526,7 +527,7 @@ namespace OnlineStore.AssemblyLine
int height = Convert.ToInt32(cmbDHeight.Text); int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2); int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存",MessageBoxButtons.OKCancel); DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
equipBean.Config.UpdateUpdownP2Detial(size, height, position); equipBean.Config.UpdateUpdownP2Detial(size, height, position);
...@@ -556,7 +557,7 @@ namespace OnlineStore.AssemblyLine ...@@ -556,7 +557,7 @@ namespace OnlineStore.AssemblyLine
} }
int size = Convert.ToInt32(cmbDSize.Text); int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text); int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial( height, size); int position = equipBean.Config.GetUpdownP2Detial(height, size);
txtDP2.Text = position.ToString(); txtDP2.Text = position.ToString();
} }
...@@ -582,15 +583,41 @@ namespace OnlineStore.AssemblyLine ...@@ -582,15 +583,41 @@ namespace OnlineStore.AssemblyLine
cmbDHeight.Text = height.ToString(); cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString(); cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height,size).ToString(); txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height, size).ToString();
} }
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
} }
} }
private void chbUseTrayCheck_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
if (chbUseTrayCheck.Checked)
{
DialogResult result = MessageBox.Show("是否启用料盘检测信号?", "是否确认切换", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
if (result.Equals(DialogResult.Yes))
{
LineManager.AddTrayCheck(equipBean.DeviceID);
LogUtil.info(equipBean.Name + "用户启用料盘检测信号 ");
}
}
else
{
DialogResult result = MessageBox.Show("是否禁用料盘检测信号?", "是否确认切换", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
if (result.Equals(DialogResult.Yes))
{
LineManager.DelTrayCheck(equipBean.DeviceID);
LogUtil.info(equipBean.Name + "用户禁用料盘检测信号 ");
}
}
}
} }
} }
......
20210207 20200225
1.托盘增加禁用功能,禁用的托盘可在(设备调试->查看禁用托盘)界面手动启用。
2.进仓界面增加启用托盘检测的勾选配置。
3.进仓启用托盘检测功能后,若拦截到入库托盘,需要等待托盘检测信号亮。拦截空托盘出库时,如果托盘检测信号亮,直接禁用托盘。
4.进仓08默认启用托盘检测。
20210207
1,料仓门口有料没入库的问题, 1,料仓门口有料没入库的问题,
2,增加流水线示意图, 2,增加流水线示意图,
3,扫码更新 3,扫码更新
20210204.增加一台小料仓 20210204.增加一台小料仓
app.config中,移栽数量改为20. app.config中,移栽数量改为20.
......
...@@ -97,5 +97,7 @@ namespace OnlineStore.Common ...@@ -97,5 +97,7 @@ namespace OnlineStore.Common
public static string Brush_Delay_Seconds = "Brush_Delay_Seconds"; public static string Brush_Delay_Seconds = "Brush_Delay_Seconds";
public static string SaveErrorImageToFile = "SaveErrorImageToFile"; public static string SaveErrorImageToFile = "SaveErrorImageToFile";
public static string UseTrayCheck = "UseTrayCheck";
} }
} }
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
</Compile> </Compile>
<Compile Include="server\BoxInfo.cs" /> <Compile Include="server\BoxInfo.cs" />
<Compile Include="server\LineServer.cs" /> <Compile Include="server\LineServer.cs" />
<Compile Include="assemblymanager\TrayDisableManager.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="eyemLib.dll"> <Content Include="eyemLib.dll">
......
...@@ -1508,6 +1508,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1508,6 +1508,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (TrayDisableManager.DisableTray(currTrayNum))
{
return false;
}
TrayInfo info = TrayManager.GetTrayInfo(trayNum); TrayInfo info = TrayManager.GetTrayInfo(trayNum);
InOutParam param = info.InoutPar; InOutParam param = info.InoutPar;
......
...@@ -1084,6 +1084,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -1084,6 +1084,15 @@ namespace OnlineStore.DeviceLibrary
conIsPro = true; conIsPro = true;
conLastTime = DateTime.Now; conLastTime = DateTime.Now;
List<AlarmMsg> alarmList = new List<AlarmMsg>(); List<AlarmMsg> alarmList = new List<AlarmMsg>();
if (!alarmType.Equals(LineAlarmType.None))
{
alarmList.Add(new AlarmMsg(Name, "line_" + alarmType, WarnMsg));
}
int num = TrayDisableManager.GetDisableList().Count;
if (num > 5)
{
alarmList.Add(new AlarmMsg(Name, "line_Tray" , "已有["+num+"]个托盘被禁用,请尽快处理"));
}
foreach (EquipBase equip in AllEquipMap.Values) foreach (EquipBase equip in AllEquipMap.Values)
{ {
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时")) if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时"))
......
...@@ -179,7 +179,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,7 +179,7 @@ namespace OnlineStore.DeviceLibrary
int trayNum = SecondMoveInfo.MoveParam.TrayNumber; int trayNum = SecondMoveInfo.MoveParam.TrayNumber;
//去掉直接丢盘处理 //去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_CylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MO_58_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 拦截到空托盘【"+trayNum+"】, 上下气缸下降 ,顶升气缸上升"); OutLog("出库 " + MoveInfo.SLog + ": 拦截到空托盘【" + trayNum + "】, 上下气缸下降 ,顶升气缸上升");
if (MoveInfo.MoveParam != null) if (MoveInfo.MoveParam != null)
{ {
MoveInfo.MoveParam.TrayNumber = trayNum; MoveInfo.MoveParam.TrayNumber = trayNum;
...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.MoveParam = SecondMoveInfo.MoveParam; MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
} }
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW); UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP);
} }
...@@ -197,7 +197,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -197,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_CylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_CylinderDown))
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松 "); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松 ");
int trayNum = MoveInfo.MoveParam.TrayNumber; int trayNum = MoveInfo.MoveParam.TrayNumber;
//更新料盘位置 //更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0')); SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0'));
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam); TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam);
...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_CylinderBefore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_CylinderBefore))
{ {
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before)) if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before))
{ {
MoveInfo.NextMoveStep(LineMoveStep.MI_11_CylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MI_11_CylinderDown);
InLog("入库 " + MoveInfo.SLog + " ,上下气缸下降"); InLog("入库 " + MoveInfo.SLog + " ,上下气缸下降");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH); UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
...@@ -463,7 +463,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -463,7 +463,7 @@ namespace OnlineStore.DeviceLibrary
} }
private int sendCount = 0; private int sendCount = 0;
private void MI_08_WaitBox() private void MI_08_WaitBox()
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
int num = MoveInfo.MoveParam.TrayNumber; int num = MoveInfo.MoveParam.TrayNumber;
...@@ -482,6 +482,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -482,6 +482,10 @@ namespace OnlineStore.DeviceLibrary
} }
private bool IsInStoreNeed() private bool IsInStoreNeed()
{ {
if (TrayDisableManager.DisableTray(currTrayNum))
{
return false;
}
if (waitInStoreList.Count > 0) if (waitInStoreList.Count > 0)
{ {
...@@ -519,13 +523,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -519,13 +523,17 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
private bool CheckIsNeedOutStore() private bool CheckIsNeedOutStore()
{ {
if (currTrayNum <= 0) if (currTrayNum <= 0)
{ {
return false; return false;
} }
if (TrayDisableManager.DisableTray(currTrayNum))
{
return false;
}
bool isFull = TrayManager.TrayIsFull(currTrayNum); bool isFull = TrayManager.TrayIsFull(currTrayNum);
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_55_CylinderUp) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter; bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_55_CylinderUp) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter;
...@@ -534,8 +542,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -534,8 +542,16 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isFull.Equals(false)) if (isFull.Equals(false))
{ {
LogInfo(" 出库中,拦截空托盘【 " + currTrayNum + "】~"); if (LineManager.useTrayCheck.Contains(DeviceID) && IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.HIGH))
return true; {
LogInfo(" 出库中,需拦截空托盘【 " + currTrayNum + "】,空托盘料盘检测信号亮,禁用托盘");
TrayDisableManager.AddDisable(currTrayNum, Name, "空托盘料盘检测信号亮");
}
else
{
LogInfo(" 出库中,拦截空托盘【 " + currTrayNum + "】~");
return true;
}
} }
} }
return false; return false;
...@@ -562,7 +578,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -562,7 +578,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (TrayDisableManager.DisableTray(currTrayNum))
{
return false;
}
//如果正在出库执行中,不能拦截入库托盘 //如果正在出库执行中,不能拦截入库托盘
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore)) if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{ {
...@@ -651,7 +670,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -651,7 +670,7 @@ namespace OnlineStore.DeviceLibrary
{ {
waitInStoreList.RemoveAt(reIndex); waitInStoreList.RemoveAt(reIndex);
LogInfo("*******料盘已移走,清理入库任务:【" + param.ToStr() + "】"); LogInfo("*******料盘已移走,清理入库任务:【" + param.ToStr() + "】");
return true; return true;
} }
} }
} }
...@@ -690,7 +709,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -690,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
{ {
trayCheck2LowWait.Stop(); trayCheck2LowWait.Stop();
if (canpro && TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true)) if (canpro && TrayManager.checkWatch(trayCheckWait, TrayManager.SwTrayWaitTime, true))
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
...@@ -814,8 +833,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -814,8 +833,16 @@ namespace OnlineStore.DeviceLibrary
if (isNeed) if (isNeed)
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
if (isFull && LineManager.useTrayCheck.Contains(DeviceID))
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200,等待料盘检测信号");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
}
else
{
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 等待200");
}
} }
else else
{ {
...@@ -885,8 +912,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -885,8 +912,16 @@ namespace OnlineStore.DeviceLibrary
} }
else if (CheckIsNeedInStore()) else if (CheckIsNeedInStore())
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待移栽");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore);
if (LineManager.useTrayCheck.Contains(DeviceID))
{
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.HIGH));
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待料盘检测信号,等待移栽");
}
else
{
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘【" + currTrayNum + "】,有对应的入库任务,等待移栽");
}
isNeedMove = true; isNeedMove = true;
} }
else else
...@@ -955,7 +990,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -955,7 +990,7 @@ namespace OnlineStore.DeviceLibrary
} }
private void MO_16_Stop2Down() private void MO_16_Stop2Down()
{ {
if (LineManager.Line.Move9CanStop2Down(DeviceID,currTrayNum)) if (LineManager.Line.Move9CanStop2Down(DeviceID, currTrayNum))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_16_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_16_Stop2Down);
CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,阻挡气缸1-2下降 "); CheckLog("托盘放行" + SecondMoveInfo.SLog + " ,阻挡气缸1-2下降 ");
...@@ -975,14 +1010,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -975,14 +1010,14 @@ namespace OnlineStore.DeviceLibrary
#region 如果是进仓5,托盘横移后直接结束处理 #region 如果是进仓5,托盘横移后直接结束处理
internal void EndProcessTray() internal void EndProcessTray()
{ {
if (DeviceID.Equals(5)) if (DeviceID.Equals(5))
{ {
if(SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture)&&SecondMoveInfo.MoveStep<= LineMoveStep.MIO_04_Wait) if (SecondMoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && SecondMoveInfo.MoveStep <= LineMoveStep.MIO_04_Wait)
{ {
UpdateTrayNum(); UpdateTrayNum();
LogUtil.info(Name + " EndProcessTray ,结束当前托盘["+currTrayNum+"]处理【" + SecondMoveInfo.MoveType + "】【" + SecondMoveInfo.MoveStep + "】 "); LogUtil.info(Name + " EndProcessTray ,结束当前托盘[" + currTrayNum + "]处理【" + SecondMoveInfo.MoveType + "】【" + SecondMoveInfo.MoveStep + "】 ");
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
} }
} }
......
...@@ -134,6 +134,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -134,6 +134,10 @@ namespace OnlineStore.DeviceLibrary
{ {
outMsg = ""; outMsg = "";
int lineNum = DeviceID % 100; int lineNum = DeviceID % 100;
if (TrayDisableManager.DisableTray(currTrayNum))
{
return null;
}
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum); TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
if (!trayInfo.IsFull) if (!trayInfo.IsFull)
{ {
......
...@@ -142,6 +142,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,6 +142,7 @@ namespace OnlineStore.DeviceLibrary
} }
Config.SetIO(1000); Config.SetIO(1000);
Line = new LineBean(Config, moveECMap, feedingECMap, providingECMap, disChargeLineMap); Line = new LineBean(Config, moveECMap, feedingECMap, providingECMap, disChargeLineMap);
LoadTrayCheck();
LogUtil.info( "加载 完成!"); LogUtil.info( "加载 完成!");
return true; return true;
} }
...@@ -253,5 +254,56 @@ namespace OnlineStore.DeviceLibrary ...@@ -253,5 +254,56 @@ namespace OnlineStore.DeviceLibrary
{ {
return trayHeightList; return trayHeightList;
} }
public static List<int> useTrayCheck = new List<int>();
public static void LoadTrayCheck()
{
string config = ConfigAppSettings.GetValue(Setting_Init.UseTrayCheck);
string[] array = config.Split(',');
foreach(string st in array)
{
try
{
int id = Convert.ToInt32(st.Trim());
if (id > 0 && id <= 20)
{
useTrayCheck.Add(id);
}
}
catch (Exception ex) { }
}
}
public static void AddTrayCheck(int id)
{
if (useTrayCheck.Contains(id))
{
return;
}
useTrayCheck.Add(id);
string config = "";
foreach(int i in useTrayCheck)
{
config += i + ",";
}
ConfigAppSettings.SaveValue(Setting_Init.UseTrayCheck, config);
}
public static void DelTrayCheck(int id)
{
if (!useTrayCheck.Contains(id))
{
return;
}
useTrayCheck.Remove(id);
string config = "";
foreach (int i in useTrayCheck)
{
config += i + ",";
}
ConfigAppSettings.SaveValue(Setting_Init.UseTrayCheck, config);
}
} }
} }
using OnlineStore.Common;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class TrayDisableManager
{
/// <summary>
/// 托盘集合,key=托盘编号,value=托盘详细信息
/// </summary>
private static ConcurrentDictionary<int, TrayDisableInfo> TrayDisableMap = new ConcurrentDictionary<int, TrayDisableInfo>();
public static void ClearDisableMap()
{
List<TrayDisableInfo> tray = GetDisableList();
LogUtil.info("-------------------点击:清空禁用托盘。清空前打印托盘禁用信息:");
foreach (TrayDisableInfo t in tray)
{
LogUtil.info(t.ToStr());
}
TrayDisableMap = new ConcurrentDictionary<int, TrayDisableInfo>();
LogUtil.info("-------------------点击:清空禁用托盘。托盘禁用列表已清空");
}
public static List<TrayDisableInfo> GetDisableList()
{
List<TrayDisableInfo> dislist = new List<TrayDisableInfo>(TrayDisableMap.Values);
return dislist;
}
public static void AddDisable(int trayNum, string deviceName, string describle)
{
TrayDisableInfo t = new TrayDisableInfo(trayNum, deviceName, describle);
if (TrayDisableMap.ContainsKey(trayNum))
{
TrayDisableMap[trayNum] = t;
}
else
{
TrayDisableMap.TryAdd(trayNum, t);
}
LogUtil.info("增加托盘禁用:" + t.ToStr());
}
public static void RemoveDisable(int trayNum)
{
bool result = TrayDisableMap.TryRemove(trayNum, out TrayDisableInfo removeInfo);
if (result && removeInfo != null)
{
LogUtil.info("启用托盘:" + removeInfo.ToStr());
}
}
internal static bool DisableTray(int currTrayNum)
{
return TrayDisableMap.ContainsKey(currTrayNum);
}
}
}
using OnlineStore.Common; using log4net;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -100,4 +101,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,4 +101,32 @@ namespace OnlineStore.DeviceLibrary
internal static int OutStore = 2; internal static int OutStore = 2;
} }
public class TrayDisableInfo
{
public TrayDisableInfo()
{
}
public TrayDisableInfo(int trayNum,string deviceName,string describle)
{
this.TrayCode = trayNum;
this.DDeviceName = deviceName;
this.DDescribe = describle;
DisableTime = DateTime.Now;
}
public int TrayCode { get; set; } = -1;
public string DDeviceName { get; set; } = "";
public string DDescribe { get; set; } = "";
public DateTime DisableTime { get; set; }
public string ToStr()
{
return $"托盘 [{TrayCode }] [{DisableTime.ToLongTimeString() }] [{DDeviceName} [{DDescribe}]";
}
}
} }
...@@ -77,11 +77,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -77,11 +77,11 @@ namespace OnlineStore.LoadCSVLibrary
/// DO 0 阻挡气缸0-2下降SOL StopCylinder_Down2 17 阻挡气缸0-2下降SOL Y12 DO-12 /// DO 0 阻挡气缸0-2下降SOL StopCylinder_Down2 17 阻挡气缸0-2下降SOL Y12 DO-12
/// </summary> /// </summary>
public static string StopCylinder_Down2 = "StopCylinder_Down2"; public static string StopCylinder_Down2 = "StopCylinder_Down2";
/// <summary> /// <summary>
/// 移栽DI/DO 阻挡3-1夹具检测 TrayCheck 0 /// 移栽DI/DO 进仓01料盘检测,TrayCheck,0,PRO_AOI_IP_20,0,进仓01料盘检测
/// </summary> /// </summary>
public static string TrayCheck = "TrayCheck"; public static string TrayCheck = "TrayCheck";
/// <summary> /// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!