init: 北航大学BH-DAS项目首次入库

This commit is contained in:
XingCheng3
2026-06-08 17:06:10 +08:00
commit 10f06d99cd
207 changed files with 40597 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using MesWork;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NJ_ZC
{
public class ParamT
{
public string procedureName
{
get;
set;
} = "";
public SqlParameter[] sqlParameter
{
get;
set;
}
}
}

222
CCYQ_JieFang/Core/LogRecord.Designer.cs generated Normal file
View File

@@ -0,0 +1,222 @@
namespace LogRecord
{
partial class LogRecord
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.dgv_Log = new System.Windows.Forms.DataGridView();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.btn_Refresh = new System.Windows.Forms.Button();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dgv_Log)).BeginInit();
this.SuspendLayout();
//
// dgv_Log
//
this.dgv_Log.AllowUserToAddRows = false;
this.dgv_Log.AllowUserToDeleteRows = false;
this.dgv_Log.AllowUserToResizeRows = false;
this.dgv_Log.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.dgv_Log.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgv_Log.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgv_Log.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgv_Log.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.,
this.,
this.,
this.,
this.});
this.dgv_Log.Location = new System.Drawing.Point(12, 51);
this.dgv_Log.MultiSelect = false;
this.dgv_Log.Name = "dgv_Log";
this.dgv_Log.ReadOnly = true;
this.dgv_Log.RowHeadersVisible = false;
this.dgv_Log.RowTemplate.Height = 26;
this.dgv_Log.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgv_Log.Size = new System.Drawing.Size(1277, 745);
this.dgv_Log.TabIndex = 72;
//
// button1
//
this.button1.Location = new System.Drawing.Point(358, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 73;
this.button1.Text = "报警";
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(439, 12);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 73;
this.button2.Text = "登录";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(520, 12);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 73;
this.button3.Text = "提示";
this.button3.UseVisualStyleBackColor = true;
this.button3.Visible = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// btn_Refresh
//
this.btn_Refresh.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btn_Refresh.Location = new System.Drawing.Point(12, 10);
this.btn_Refresh.Name = "btn_Refresh";
this.btn_Refresh.Size = new System.Drawing.Size(320, 35);
this.btn_Refresh.TabIndex = 74;
this.btn_Refresh.Text = "刷新";
this.btn_Refresh.UseVisualStyleBackColor = true;
this.btn_Refresh.Click += new System.EventHandler(this.btn_Refresh_Click);
//
// 序号
//
this..AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this..DataPropertyName = "序号";
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this..DefaultCellStyle = dataGridViewCellStyle2;
this..HeaderText = "序号";
this..Name = "序号";
this..ReadOnly = true;
this..SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this..Width = 60;
//
// 工位号
//
this..DataPropertyName = "工位号";
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this..DefaultCellStyle = dataGridViewCellStyle3;
this..HeaderText = "工位号";
this..Name = "工位号";
this..ReadOnly = true;
this..SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this..Visible = false;
this..Width = 250;
//
// 类型
//
this..DataPropertyName = "类型";
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this..DefaultCellStyle = dataGridViewCellStyle4;
this..HeaderText = "类型";
this..Name = "类型";
this..ReadOnly = true;
this..SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this..Width = 90;
//
// 时间
//
this..DataPropertyName = "时间";
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle5.Format = "G";
this..DefaultCellStyle = dataGridViewCellStyle5;
this..HeaderText = "时间";
this..Name = "时间";
this..ReadOnly = true;
this..SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this..Width = 190;
//
// 内容
//
this..AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this..DataPropertyName = "内容";
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this..DefaultCellStyle = dataGridViewCellStyle6;
this..HeaderText = "内容";
this..Name = "内容";
this..ReadOnly = true;
this..SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// LogRecord
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1298, 808);
this.Controls.Add(this.btn_Refresh);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.dgv_Log);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "LogRecord";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "日志";
this.Load += new System.EventHandler(this.LogRecord_Load);
((System.ComponentModel.ISupportInitialize)(this.dgv_Log)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dgv_Log;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button btn_Refresh;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
}
}

View File

@@ -0,0 +1,144 @@
using MesWork;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Configuration.ConfigurationManager;
namespace LogRecord
{
public partial class LogRecord : Form
{
public LogRecord()
{
InitializeComponent();
this.WindowState = FormWindowState.Maximized;
}
public LogRecord(int _Width,int _Height)
{
InitializeComponent();
this.Width = _Width;
this.Height = _Height;
}
private void LogRecord_Load(object sender, EventArgs e)
{
Refresh_Log();
}
private void Refresh_Log()
{
var dt = Select_Log();
dgv_Log.DataSource = dt;
for (int i = 0; i < dt.Rows.Count; i++)
{
var = (Type_Log)Enum.Parse(typeof(Type_Log),dt.Rows[i]["类型"].ToString());
switch ()
{
case Type_Log.Alarm:
RowsColor(i, Color.Red, dgv_Log);
break;
case Type_Log.Login:
RowsColor(i, Color.Green, dgv_Log);
break;
case Type_Log.Tip:
RowsColor(i, Color.Yellow, dgv_Log);
break;
default:
RowsColor(i, Color.Gray, dgv_Log);
break;
}
}
dgv_Log.ClearSelection();
//dgv_Log.CurrentCell = null;
//dgv_Log.Rows[0].Selected = false;
}
private void RowsColor(int row, Color color, DataGridView dgv)
{
var dt = (System.Data.DataTable)dgv.DataSource;
for (int i = 0; i < dt.Columns.Count; i++)
{
dgv.Rows[row].Cells[i].Style.BackColor = color;
}
}
public static bool Insert_Log(Type_Log LogType, string Log_Content)
{
return true;
/*
SELECT [IDG],[Log_Station],[Log_Type],[Log_Time],[Log_Content] FROM [记录_日志_运行日志]
*/
bool success = false;
var sql =
$" INSERT INTO [记录_日志_运行日志]([Log_Station],[Log_Type],[Log_Time],[Log_Content])" +
$" VALUES('{MesWorkForm.StationName}','{LogType.ToString()}',getdate(),'{Log_Content}')";
success = DataLinkMesWork.SQLCommon.ExecuteSql(sql, MesWorkForm.ConnectionString, out string err2);
return success;
}
public static DataTable Select_Log()
{
/*
SELECT [IDG],[Log_Station],[Log_Type],[Log_Time],[Log_Content] FROM [记录_日志_运行日志]
*/
var sql =
$" (SELECT " +
$" row_number() over(order by [Log_Time]) AS 序号" +
$" ,[Log_Station] AS 工位号" +
$" ,[Log_Type] AS 类型" +
$" ,[Log_Time] AS 时间" +
$" ,[Log_Content] AS 内容" +
$" FROM [记录_日志_运行日志]" +
$" WHERE [Log_Station] = '{MesWorkForm.StationName}')" +
$" ORDER BY 序号 DESC";
DataLinkMesWork.SQLCommon.ExecuteDataTable(sql, MesWorkForm.ConnectionString,out DataTable dt, out string err2);
return dt;
}
private void button1_Click(object sender, EventArgs e)
{
Insert_Log(Type_Log.Alarm, "dfghjkjfdfghjk法国红酒看官方一股好久哦i反对牛v军方肯定没得查看你的孙女i的女哦i的妇女哦看v哦对妇女的发");
}
private void button2_Click(object sender, EventArgs e)
{
Insert_Log(Type_Log.Login, "废物");
}
private void button3_Click(object sender, EventArgs e)
{
Insert_Log(Type_Log.Tip, "滚");
}
public enum Type_Log
{
/// <summary>
/// 报警
/// </summary>
Alarm = 1,
/// <summary>
/// 登录
/// </summary>
Login = 2,
/// <summary>
/// 提示
/// </summary>
Tip = 3
}
private void btn_Refresh_Click(object sender, EventArgs e)
{
Refresh_Log();
}
}
}

View File

@@ -0,0 +1,135 @@
<?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="序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="工位号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="类型.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="内容.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MesWork
{
public partial class QingYa_OP0010 { }
public partial class MesWorkForm
{
/// <summary>
///
/// </summary>
/// <param name="_Msg"></param>
public void LoadClientInfo(object _Msg)
{
try
{
string recStr = (string)_Msg;
string m_Source = recStr.Split('|')[0];
string cmd = recStr.Split('|')[1];
//string OpName = recStr.Split('|')[2];
//string tagValue = recStr.Split('|')[3];
switch (m_Source)
{
case "DT":
break;
case "MES":
break;
}
}
catch (Exception err) { }
}
}
}

View File

@@ -0,0 +1,466 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
///1 X WorkStart 2 工件到位(PLC) 工件到位。托盘到达工位,并且托盘上有工件。
///2 X RepairPartStatusPLC 3 RepairPartStatusPLC 备用
///3 STRING RepairPathString 4 RepairPathString "工位返修字符串121211112222111,前2位是西门子字符串格式第一位是总长度第二位是实际长度"
///4 X EngineTypeGetOverMES 5 传递机型(MES) MES传递总成信息给PLC上线工位
///5 X PartPalletGoOver 6 PartPalletGoOver 上线工位。0正常工作1空托盘放行PLC读取到此标志不走申请上线逻辑。
///6 X MaterialVerifyOver 7 MaterialVerifyOver MES保存完质量数据物料数据等与PLC信号交互完成后通知PLC所以工步都完成才可以放行工件正常工作时工件放行的必要条件。
///7 X FalseGo 8 FalseGo 按MES界面[不合格放行]按钮MES发送此信号。操作者判断工件不合格通知设备按不合格方式放行工件工件流转到返修下线工位后返修下线。MES工作完成MES0.3=1MES合格放行MES0.5=0MES0.4=1
///8 INT EngineTypeID 9 EngineTypeID MES发动机机型标志(必须PLC)
///9 STRING EngineID 10 EngineID MES发动机编号(必须PLC)
///10 STRING EngineType 11 机型(MES) MES发动机机型(必须PLC)
///11 X PartPalletStatus 13 PartPalletStatus MES激发变量托盘到位离开(必须PLC)
///12 X HeartBeatPLC 14 HeartBeatPLC 心跳处理PLC收到MES心跳信号后PLC延时5秒后数值取反再写回PLC写回PLC开始计时如果5秒钟MES无反馈报通讯故障。
///13 X HeartBeatMIS 15 HeartBeatMIS 间隔时间5S心跳处理。收到PLC心跳信号后MES按原值回写。PLC收到MES信号后延时5秒取反写入以此循环。
///14 X TargetTimeRead 16 TargetTimeRead MES允许可读工位运行时间
///15 Int MachineTargetTime 17 MachineTargetTime 目标运行时间
///16 Int MachineActualTime 18 MachineActualTime 实际运行时间
///17 X MesRead 19 允许保存(PLC) 质量数据可以读数据
///18 X MesReadOver 20 保存完成(MES) MES保存完数据(必须MIS)
///19 INT QualityMask 21 合格标志(PLC) 质量数据工位合格标志0:没有工作1合格 2 :不合格(必须PLC)
///20 B PalletInfo 22 PalletInfo 0空托盘1合格件2不合格件
///21 INT RepairStatusPLC 23 RepairStatusPLC 0正常件1返修件
///22 INT OrderNo 24 订单号(MES) 订单号(MES)
///23 X StorageNo 25 库位号(MES) 库位号(MES)
///24 X AllowPass 26 允许放行(MES) 允许放行
///25 X PartLoadFinish 27 PartLoadFinish PartLoadFinish
///26 X Reserved_7 28 Reserved_7 备用
///27 X Reserved_8 29 Reserved_8 备用
///28 X Reserved_9 30 Reserved_9 备用
///29 X Reserved_10 31 Reserved_10 备用
///30 X Reserved_11 32 Reserved_11 备用
///31 X Reserved_12 33 Reserved_12 备用
///32 X Reserved_13 34 Reserved_13 备用
///33 X Reserved_14 35 Reserved_14 备用
///34 Int PLCSPareint1 36 PLCSPareint1 备用
///35 Int PLCSPareint2 37 PLCSPareint2 备用
///36 Int PLCSPareint3 38 PLCSPareint3 备用
///37 STRING PLCSarestring1 39 PLCSarestring1 备用
///38 STRING PLCSarestring2 40 PLCSarestring2 备用
///39 STRING MarkID 42 MarkID 机体打标号MES前2位是西门子字符串格式第一位是总长度第二位是实际长度
///40 X PartLoad 43 PartLoad 上线工位PLC向MES申请总成编号。收到该信号后MES将机型标志DBB22 ~23、总成号DBB24 ~63、总成机型DBB64 ~103写入PLC。之后MES通过信号“传递机型DBX0.1”通知PLC。
///41 X EngineTypeGetOverPLC 44 传递机型PLC PLC将机型标志DBB50…51、工件编号DBB52…101、产品型号DBB102…187、托盘编号DBB188…189准备完毕后通知MES。
///42 X PartLoadOK 48 PartLoadOK 备用
///43 X Reserved_18 49 Reserved_18 备用
///44 X PalletDown 50 PalletDown 暂时保留,项目未使用
///45 X ConfirmOkGo 51 ConfirmOkGo 按MES界面[合格放行]按钮MES发送此信号。操作者判断工件合格通知设备工件按合格方式放行工件。MES工作完成MES0.3=1MES合格放行MES0.5=1MES0.4=0
///46 X ResetDevice 52 ResetDevice 针对手动工位无HMI需要复位设备在MES页面操作。
///47 X UnloadCompleted 53 UnloadCompleted 暂时保留,项目未使用
///48 X MachineTime_ReadOver 54 MachineTime_ReadOver 备用
///49 X Reserved_19 58 Reserved_19 备用
///50 X FixOK 59 FixOK 手动拧紧工位单工步螺栓拧紧完成通知PC读取数据。
///51 X Reserved_21 61 Reserved_21 备用
///52 X Reserved_22 62 Reserved_22 备用
///53 X Reserved_23 63 Reserved_23 备用
///54 X Reserved_24 64 Reserved_24 备用
///55 X Reserved_25 65 Reserved_25 备用
///56 X FixAllow 66 FixAllow "设备工作的必须信号,对于有物料验证的工位MES验证完成给出此信号对于无物料验证工位MES直接给出此信号。"
///57 X FixOver 67 FixOver 用于手动拧紧且有质量数据工位。通知设备当前工步拧紧螺钉工作结束。
///58 X MatchingCompleted 68 MatchingCompleted 分线上总线匹配成功是1不成功是0。
///59 X Match 69 Match 分线上总线匹配成功是1不成功是0。
///60 X Reserved_2 70 Reserved_2 备用
///61 X IsAutoGetEngineID 71 IsAutoGetEngineID 自动手动申请工件编号。0是自动方式1手动方式。暂时保留生成流水号方式是在数据库中实现的
///62 X RepairUplineMES 72 RepairUplineMES 上线清空MOBY针对上线工位通知PLC从新开始申请上线流程
///63 INT EngineTypeID_MES 73 机型代码(MES) MES发动机机型标志(必须MES)
///64 STRING EngineID_MES 74 工件编号(MES) MES发动机编号(必须MES)
///65 STRING EngineType_MES 75 EngineType_MES MES发动机机型(必须MES)
///66 X Reserved_20 76 Reserved_20 备用
///67 INT ProcessCode 77 ProcessCode 手动拧紧工位由MES通知PLC拧紧序号
///68 B OnLineState 79 OnLineState 通过线体工位PC实现下达工位工作状态工位有三种状态在线、离线、屏蔽。在线0正常状态实现正常功能。1离线:设备脱离MES工作进入不交互模式。
///69 INT PartPalletCode 80 托盘号(MES) 托盘编号(B5A)
///70 INT BoltCode 88 BoltCode 手动拧紧工位指导PLC所用套筒
///71 INT RepairStatus 93 RepairStatus "0正常件1返修件。对于上线工位MES给出是正常上线还是返修上线,返修路径"
///72 DInt Reserved_15 110 Reserved_15 备用
///73 DInt Reserved_16 111 Reserved_16 备用
///74 B Reserved_17 112 Reserved_17 备用
///75 INT SPareint1 113 SPareint1 备用int1
///76 INT SPareint2 114 SPareint2 备用int2
///77 INT SPareint3 115 SPareint3 备用int3
///78 STRING Sparestring1 116 Sparestring1 备用字符串1
///79 STRING Sparestring2 117 Sparestring2 备用字符串2
///80 X MachineStatusPutOn 1000 机床上电(PLC) 机床上电(必须PLC)
///81 X MachineStatusWorkOn 1001 循环开始(PLC) 循环开始(必须PLC)
///82 X MachineStatusAlarm 1002 设备报警(PLC) 机床故障(必须PLC)
///83 X MachineStatusNoPart 1003 MachineStatusNoPart 上料无件(必须PLC)
///84 X MachineStatusBlock 1004 MachineStatusBlock 下料堵塞(必须PLC)
namespace MesWork
{
/// <summary>
/// 这是变量类型代码的配置,几乎是不变的
/// 请不要随意修改,为了保证变量版本同一,并且方便维护,请联系发行人修改!
/// 请注意,此修改为全局修改!
/// </summary>
public enum EnumTagTypeCodeID
{
/// <summary>
/// 工件到位(PLC)
/// 变量类型Bool
/// 解释:托盘到达工位,并且托盘上有工件。
/// </summary>
WorkStart = 2,
/// <summary>
///
/// </summary>
RepairPartStatusPLC = 3,
/// <summary>
/// 工位返修字符串
/// 变量类型String
/// 解释:工位返修字符串
/// </summary>
RepairPathString = 4,
/// <summary>
/// 传递机型(MES)
/// 变量类型Bool
/// 解释MES传递总成信息给PLC上线工位
/// </summary>
EngineTypeGetOverMES = 5,
/// <summary>
///
/// </summary>
PartPalletGoOver = 6,
/// <summary>
///
/// </summary>
MaterialVerifyOver = 7,
/// <summary>
///
/// </summary>
FalseGo = 8,
/// <summary>
///
/// </summary>
EngineTypeID = 9,
/// <summary>
///
/// </summary>
EngineID = 10,
/// <summary>
/// 机型(MES)
/// 变量类型String
/// </summary>
EngineType = 11,
/// <summary>
///
/// </summary>
PartPalletStatus = 13,
/// <summary>
///
/// </summary>
HeartBeatPLC = 14,
/// <summary>
///
/// </summary>
HeartBeatMIS = 15,
/// <summary>
///
/// </summary>
TargetTimeRead = 16,
/// <summary>
///
/// </summary>
MachineTargetTime = 17,
/// <summary>
///
/// </summary>
MachineActualTime = 18,
/// <summary>
/// 允许保存(PLC)
/// 变量类型Bool
/// </summary>
MesRead = 19,
/// <summary>
/// 保存完成(MES)
/// 变量类型Bool
/// </summary>
MesReadOver = 20,
/// <summary>
/// 合格标志(PLC)
/// 变量类型Int
/// </summary>
QualityMask = 21,
/// <summary>
///
/// </summary>
PalletInfo = 22,
/// <summary>
///
/// </summary>
RepairStatusPLC = 23,
/// <summary>
/// 订单号(MES)
/// 变量类型Int
/// </summary>
OrderNo = 24,
/// <summary>
/// 库位号(MES)
/// 变量类型Bool
/// </summary>
StorageNo = 25,
/// <summary>
/// 允许放行(MES)
/// 变量类型Bool
/// </summary>
AllowPass = 26,
/// <summary>
///
/// </summary>
PartLoadFinish = 27,
/// <summary>
///
/// </summary>
Reserved_7 = 28,
/// <summary>
///
/// </summary>
Reserved_8 = 29,
/// <summary>
///
/// </summary>
Reserved_9 = 30,
/// <summary>
///
/// </summary>
Reserved_10 = 31,
/// <summary>
///
/// </summary>
Reserved_11 = 32,
/// <summary>
///
/// </summary>
Reserved_12 = 33,
/// <summary>
///
/// </summary>
Reserved_13 = 34,
/// <summary>
///
/// </summary>
Reserved_14 = 35,
/// <summary>
///
/// </summary>
PLCSPareint1 = 36,
/// <summary>
///
/// </summary>
PLCSPareint2 = 37,
/// <summary>
///
/// </summary>
PLCSPareint3 = 38,
/// <summary>
///
/// </summary>
PLCSarestring1 = 39,
/// <summary>
///
/// </summary>
PLCSarestring2 = 40,
/// <summary>
///
/// </summary>
MarkID = 42,
/// <summary>
///
/// </summary>
PartLoad = 43,
/// <summary>
/// 传递机型PLC
/// 变量类型Bool
/// </summary>
EngineTypeGetOverPLC = 44,
/// <summary>
///
/// </summary>
PartLoadOK = 48,
/// <summary>
///
/// </summary>
Reserved_18 = 49,
/// <summary>
///
/// </summary>
PalletDown = 50,
/// <summary>
///
/// </summary>
ConfirmOkGo = 51,
/// <summary>
///
/// </summary>
ResetDevice = 52,
/// <summary>
///
/// </summary>
UnloadCompleted = 53,
/// <summary>
///
/// </summary>
MachineTime_ReadOver = 54,
/// <summary>
///
/// </summary>
Reserved_19 = 58,
/// <summary>
///
/// </summary>
FixOK = 59,
/// <summary>
///
/// </summary>
Reserved_21 = 61,
/// <summary>
///
/// </summary>
Reserved_22 = 62,
/// <summary>
///
/// </summary>
Reserved_23 = 63,
/// <summary>
///
/// </summary>
Reserved_24 = 64,
/// <summary>
///
/// </summary>
Reserved_25 = 65,
/// <summary>
///
/// </summary>
FixAllow = 66,
/// <summary>
///
/// </summary>
FixOver = 67,
/// <summary>
///
/// </summary>
MatchingCompleted = 68,
/// <summary>
///
/// </summary>
Match = 69,
/// <summary>
///
/// </summary>
Reserved_2 = 70,
/// <summary>
///
/// </summary>
IsAutoGetEngineID = 71,
/// <summary>
///
/// </summary>
RepairUplineMES = 72,
/// <summary>
/// 机型代码(MES)
/// 变量类型Int
/// </summary>
EngineTypeID_MES = 73,
/// <summary>
/// 工件编号(MES)
/// 变量类型String
/// </summary>
EngineID_MES = 74,
/// <summary>
///
/// </summary>
EngineType_MES = 75,
/// <summary>
///
/// </summary>
Reserved_20 = 76,
/// <summary>
///
/// </summary>
ProcessCode = 77,
/// <summary>
///
/// </summary>
OnLineState = 79,
/// <summary>
/// 托盘号(MES)
/// 变量类型Int
/// </summary>
PartPalletCode = 80,
/// <summary>
///
/// </summary>
BoltCode = 88,
/// <summary>
///
/// </summary>
RepairStatus = 93,
/// <summary>
///
/// </summary>
Reserved_15 = 110,
/// <summary>
///
/// </summary>
Reserved_16 = 111,
/// <summary>
///
/// </summary>
Reserved_17 = 112,
/// <summary>
///
/// </summary>
SPareint1 = 113,
/// <summary>
///
/// </summary>
SPareint2 = 114,
/// <summary>
///
/// </summary>
SPareint3 = 115,
/// <summary>
///
/// </summary>
Sparestring1 = 116,
/// <summary>
///
/// </summary>
Sparestring2 = 117,
/// <summary>
/// 机床上电(PLC)
/// 变量类型Bool
/// </summary>
MachineStatusPutOn = 1000,
/// <summary>
/// 循环开始(PLC)
/// 变量类型Bool
/// </summary>
MachineStatusWorkOn = 1001,
/// <summary>
/// 设备报警(PLC)
/// 变量类型Bool
/// </summary>
MachineStatusAlarm = 1002,
/// <summary>
/// 上料无件(PLC)
/// 变量类型Bool
/// </summary>
MachineStatusNoPart = 1003,
/// <summary>
/// 下料堵塞(PLC)
/// 变量类型Bool
/// </summary>
MachineStatusBlock = 1004,
/// <summary>
/// 下料堵塞(PLC)
/// 变量类型Bool
/// </summary>
havePart70 = 10003,
}
}