1
This commit is contained in:
Binary file not shown.
@@ -127,6 +127,24 @@ namespace CleanMachineHMI
|
|||||||
/// 系统是否运行
|
/// 系统是否运行
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool NextStop
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (bool)PlcOperationHelper.Instance.ReadPlcItem(nameof(NextStop), PlcItemTypeDesc.M);
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
PlcOperationHelper.Instance.WritePlcItem(nameof(NextStop), value.ToString(), PlcItemTypeDesc.M);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool StopSys
|
public bool StopSys
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
this.kryptonGroupBox8 = new Krypton.Toolkit.KryptonGroupBox();
|
this.kryptonGroupBox8 = new Krypton.Toolkit.KryptonGroupBox();
|
||||||
this.kryptonContextMenu1 = new Krypton.Toolkit.KryptonContextMenu();
|
|
||||||
this.kryptonContextMenuHeading1 = new Krypton.Toolkit.KryptonContextMenuHeading();
|
|
||||||
this.kryptonContextMenuItems1 = new Krypton.Toolkit.KryptonContextMenuItems();
|
|
||||||
this.kryptonContextMenuItem1 = new Krypton.Toolkit.KryptonContextMenuItem();
|
|
||||||
this.kryptonContextMenuItem2 = new Krypton.Toolkit.KryptonContextMenuItem();
|
|
||||||
this.kryptonButton7 = new Krypton.Toolkit.KryptonButton();
|
this.kryptonButton7 = new Krypton.Toolkit.KryptonButton();
|
||||||
this.label9_SE = new System.Windows.Forms.Label();
|
this.label9_SE = new System.Windows.Forms.Label();
|
||||||
this.kbtn_forceFinish = new Krypton.Toolkit.KryptonButton();
|
this.kbtn_forceFinish = new Krypton.Toolkit.KryptonButton();
|
||||||
this.label4_SD = new System.Windows.Forms.Label();
|
this.label4_SD = new System.Windows.Forms.Label();
|
||||||
this.kryptonButton6 = new Krypton.Toolkit.KryptonButton();
|
this.kryptonButton6 = new Krypton.Toolkit.KryptonButton();
|
||||||
|
this.kryptonContextMenu1 = new Krypton.Toolkit.KryptonContextMenu();
|
||||||
|
this.kryptonContextMenuHeading1 = new Krypton.Toolkit.KryptonContextMenuHeading();
|
||||||
|
this.kryptonContextMenuItems1 = new Krypton.Toolkit.KryptonContextMenuItems();
|
||||||
|
this.kryptonContextMenuItem1 = new Krypton.Toolkit.KryptonContextMenuItem();
|
||||||
|
this.kryptonContextMenuItem2 = new Krypton.Toolkit.KryptonContextMenuItem();
|
||||||
this.kryptonGroupBox9 = new Krypton.Toolkit.KryptonGroupBox();
|
this.kryptonGroupBox9 = new Krypton.Toolkit.KryptonGroupBox();
|
||||||
this.label6_SB = new System.Windows.Forms.Label();
|
this.label6_SB = new System.Windows.Forms.Label();
|
||||||
this.label3_SA = new System.Windows.Forms.Label();
|
this.label3_SA = new System.Windows.Forms.Label();
|
||||||
@@ -50,7 +50,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonButton3 = new Krypton.Toolkit.KryptonButton();
|
this.kryptonButton3 = new Krypton.Toolkit.KryptonButton();
|
||||||
this.knud_WorkedFullPalletNum = new Krypton.Toolkit.KryptonTextBox();
|
this.knud_WorkedFullPalletNum = new Krypton.Toolkit.KryptonTextBox();
|
||||||
this.kryptonGroupBox7 = new Krypton.Toolkit.KryptonGroupBox();
|
this.kryptonGroupBox7 = new Krypton.Toolkit.KryptonGroupBox();
|
||||||
this.labelNextFullStop = new System.Windows.Forms.Label();
|
this.circleButton1 = new CleanMachineHMI.CircleButton();
|
||||||
this.kryptonLabel12 = new Krypton.Toolkit.KryptonLabel();
|
this.kryptonLabel12 = new Krypton.Toolkit.KryptonLabel();
|
||||||
this.kryptonLabel11 = new Krypton.Toolkit.KryptonLabel();
|
this.kryptonLabel11 = new Krypton.Toolkit.KryptonLabel();
|
||||||
this.cbt_fpalletmod = new CleanMachineHMI.CircleButton();
|
this.cbt_fpalletmod = new CleanMachineHMI.CircleButton();
|
||||||
@@ -192,6 +192,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonPanel7 = new Krypton.Toolkit.KryptonPanel();
|
this.kryptonPanel7 = new Krypton.Toolkit.KryptonPanel();
|
||||||
this.kryptonWrapLabel4 = new Krypton.Toolkit.KryptonWrapLabel();
|
this.kryptonWrapLabel4 = new Krypton.Toolkit.KryptonWrapLabel();
|
||||||
this.panMenu = new Krypton.Toolkit.KryptonPanel();
|
this.panMenu = new Krypton.Toolkit.KryptonPanel();
|
||||||
|
this.kryptonButton9 = new Krypton.Toolkit.KryptonButton();
|
||||||
this.btnShiftCount = new Krypton.Toolkit.KryptonButton();
|
this.btnShiftCount = new Krypton.Toolkit.KryptonButton();
|
||||||
this.btnParamater = new Krypton.Toolkit.KryptonButton();
|
this.btnParamater = new Krypton.Toolkit.KryptonButton();
|
||||||
this.btnLogin = new Krypton.Toolkit.KryptonButton();
|
this.btnLogin = new Krypton.Toolkit.KryptonButton();
|
||||||
@@ -203,7 +204,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.btnIO = new Krypton.Toolkit.KryptonButton();
|
this.btnIO = new Krypton.Toolkit.KryptonButton();
|
||||||
this.btnManual = new Krypton.Toolkit.KryptonButton();
|
this.btnManual = new Krypton.Toolkit.KryptonButton();
|
||||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.kryptonButton9 = new Krypton.Toolkit.KryptonButton();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8.Panel)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.kryptonGroupBox8.Panel)).BeginInit();
|
||||||
this.kryptonGroupBox8.Panel.SuspendLayout();
|
this.kryptonGroupBox8.Panel.SuspendLayout();
|
||||||
@@ -302,30 +302,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonGroupBox8.TabIndex = 8;
|
this.kryptonGroupBox8.TabIndex = 8;
|
||||||
this.kryptonGroupBox8.Values.Heading = "";
|
this.kryptonGroupBox8.Values.Heading = "";
|
||||||
//
|
//
|
||||||
// kryptonContextMenu1
|
|
||||||
//
|
|
||||||
this.kryptonContextMenu1.Items.AddRange(new Krypton.Toolkit.KryptonContextMenuItemBase[] {
|
|
||||||
this.kryptonContextMenuHeading1,
|
|
||||||
this.kryptonContextMenuItems1});
|
|
||||||
//
|
|
||||||
// kryptonContextMenuHeading1
|
|
||||||
//
|
|
||||||
this.kryptonContextMenuHeading1.ExtraText = "";
|
|
||||||
//
|
|
||||||
// kryptonContextMenuItems1
|
|
||||||
//
|
|
||||||
this.kryptonContextMenuItems1.Items.AddRange(new Krypton.Toolkit.KryptonContextMenuItemBase[] {
|
|
||||||
this.kryptonContextMenuItem1,
|
|
||||||
this.kryptonContextMenuItem2});
|
|
||||||
//
|
|
||||||
// kryptonContextMenuItem1
|
|
||||||
//
|
|
||||||
this.kryptonContextMenuItem1.Text = "Report1";
|
|
||||||
//
|
|
||||||
// kryptonContextMenuItem2
|
|
||||||
//
|
|
||||||
this.kryptonContextMenuItem2.Text = "Reoprt2";
|
|
||||||
//
|
|
||||||
// kryptonButton7
|
// kryptonButton7
|
||||||
//
|
//
|
||||||
this.kryptonButton7.Anchor = System.Windows.Forms.AnchorStyles.None;
|
this.kryptonButton7.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||||
@@ -384,6 +360,30 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonButton6.MouseDown += new System.Windows.Forms.MouseEventHandler(this.kryptonButton6_MouseDown_1);
|
this.kryptonButton6.MouseDown += new System.Windows.Forms.MouseEventHandler(this.kryptonButton6_MouseDown_1);
|
||||||
this.kryptonButton6.MouseUp += new System.Windows.Forms.MouseEventHandler(this.kryptonButton6_MouseUp_1);
|
this.kryptonButton6.MouseUp += new System.Windows.Forms.MouseEventHandler(this.kryptonButton6_MouseUp_1);
|
||||||
//
|
//
|
||||||
|
// kryptonContextMenu1
|
||||||
|
//
|
||||||
|
this.kryptonContextMenu1.Items.AddRange(new Krypton.Toolkit.KryptonContextMenuItemBase[] {
|
||||||
|
this.kryptonContextMenuHeading1,
|
||||||
|
this.kryptonContextMenuItems1});
|
||||||
|
//
|
||||||
|
// kryptonContextMenuHeading1
|
||||||
|
//
|
||||||
|
this.kryptonContextMenuHeading1.ExtraText = "";
|
||||||
|
//
|
||||||
|
// kryptonContextMenuItems1
|
||||||
|
//
|
||||||
|
this.kryptonContextMenuItems1.Items.AddRange(new Krypton.Toolkit.KryptonContextMenuItemBase[] {
|
||||||
|
this.kryptonContextMenuItem1,
|
||||||
|
this.kryptonContextMenuItem2});
|
||||||
|
//
|
||||||
|
// kryptonContextMenuItem1
|
||||||
|
//
|
||||||
|
this.kryptonContextMenuItem1.Text = "Report1";
|
||||||
|
//
|
||||||
|
// kryptonContextMenuItem2
|
||||||
|
//
|
||||||
|
this.kryptonContextMenuItem2.Text = "Reoprt2";
|
||||||
|
//
|
||||||
// kryptonGroupBox9
|
// kryptonGroupBox9
|
||||||
//
|
//
|
||||||
this.kryptonGroupBox9.CaptionOverlap = 0D;
|
this.kryptonGroupBox9.CaptionOverlap = 0D;
|
||||||
@@ -500,7 +500,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
//
|
//
|
||||||
// kryptonGroupBox7.Panel
|
// kryptonGroupBox7.Panel
|
||||||
//
|
//
|
||||||
this.kryptonGroupBox7.Panel.Controls.Add(this.labelNextFullStop);
|
this.kryptonGroupBox7.Panel.Controls.Add(this.circleButton1);
|
||||||
this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel12);
|
this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel12);
|
||||||
this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel11);
|
this.kryptonGroupBox7.Panel.Controls.Add(this.kryptonLabel11);
|
||||||
this.kryptonGroupBox7.Panel.Controls.Add(this.cbt_fpalletmod);
|
this.kryptonGroupBox7.Panel.Controls.Add(this.cbt_fpalletmod);
|
||||||
@@ -529,19 +529,20 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonGroupBox7.TabIndex = 5;
|
this.kryptonGroupBox7.TabIndex = 5;
|
||||||
this.kryptonGroupBox7.Values.Heading = "";
|
this.kryptonGroupBox7.Values.Heading = "";
|
||||||
//
|
//
|
||||||
// labelNextFullStop
|
// circleButton1
|
||||||
//
|
//
|
||||||
this.labelNextFullStop.AutoSize = true;
|
this.circleButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
|
||||||
this.labelNextFullStop.BackColor = System.Drawing.Color.Transparent;
|
this.circleButton1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
this.labelNextFullStop.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.circleButton1.ForeColor = System.Drawing.Color.White;
|
||||||
this.labelNextFullStop.ForeColor = System.Drawing.Color.Red;
|
this.circleButton1.Location = new System.Drawing.Point(68, 331);
|
||||||
this.labelNextFullStop.Location = new System.Drawing.Point(17, 104);
|
this.circleButton1.Name = "circleButton1";
|
||||||
this.labelNextFullStop.Name = "labelNextFullStop";
|
this.circleButton1.Size = new System.Drawing.Size(60, 60);
|
||||||
this.labelNextFullStop.Size = new System.Drawing.Size(203, 16);
|
this.circleButton1.TabIndex = 53;
|
||||||
this.labelNextFullStop.TabIndex = 52;
|
this.circleButton1.Text = "Auto Stop";
|
||||||
this.labelNextFullStop.Text = "下次满料将停止,点击取消";
|
this.circleButton1.UseVisualStyleBackColor = false;
|
||||||
this.labelNextFullStop.Visible = false;
|
this.circleButton1.Visible = false;
|
||||||
this.labelNextFullStop.Click += new System.EventHandler(this.labelNextFullStop_Click);
|
this.circleButton1.Click += new System.EventHandler(this.circleButton1_Click);
|
||||||
|
this.circleButton1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.circleButton1_KeyUp);
|
||||||
//
|
//
|
||||||
// kryptonLabel12
|
// kryptonLabel12
|
||||||
//
|
//
|
||||||
@@ -692,7 +693,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.cbt_ResetSys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(153)))), ((int)(((byte)(0)))));
|
this.cbt_ResetSys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(153)))), ((int)(((byte)(0)))));
|
||||||
this.cbt_ResetSys.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.cbt_ResetSys.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
this.cbt_ResetSys.ForeColor = System.Drawing.Color.White;
|
this.cbt_ResetSys.ForeColor = System.Drawing.Color.White;
|
||||||
this.cbt_ResetSys.Location = new System.Drawing.Point(173, 41);
|
this.cbt_ResetSys.Location = new System.Drawing.Point(162, 41);
|
||||||
this.cbt_ResetSys.Name = "cbt_ResetSys";
|
this.cbt_ResetSys.Name = "cbt_ResetSys";
|
||||||
this.cbt_ResetSys.Size = new System.Drawing.Size(60, 60);
|
this.cbt_ResetSys.Size = new System.Drawing.Size(60, 60);
|
||||||
this.cbt_ResetSys.TabIndex = 5;
|
this.cbt_ResetSys.TabIndex = 5;
|
||||||
@@ -714,7 +715,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.cbt_StopTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
|
this.cbt_StopTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(64)))), ((int)(((byte)(20)))));
|
||||||
this.cbt_StopTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.cbt_StopTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
this.cbt_StopTran.ForeColor = System.Drawing.Color.White;
|
this.cbt_StopTran.ForeColor = System.Drawing.Color.White;
|
||||||
this.cbt_StopTran.Location = new System.Drawing.Point(98, 41);
|
this.cbt_StopTran.Location = new System.Drawing.Point(96, 41);
|
||||||
this.cbt_StopTran.Name = "cbt_StopTran";
|
this.cbt_StopTran.Name = "cbt_StopTran";
|
||||||
this.cbt_StopTran.Size = new System.Drawing.Size(60, 60);
|
this.cbt_StopTran.Size = new System.Drawing.Size(60, 60);
|
||||||
this.cbt_StopTran.TabIndex = 5;
|
this.cbt_StopTran.TabIndex = 5;
|
||||||
@@ -746,7 +747,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
//
|
//
|
||||||
this.cbt_StartTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(190)))), ((int)(((byte)(107)))));
|
this.cbt_StartTran.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(190)))), ((int)(((byte)(107)))));
|
||||||
this.cbt_StartTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
this.cbt_StartTran.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
this.cbt_StartTran.Location = new System.Drawing.Point(23, 41);
|
this.cbt_StartTran.Location = new System.Drawing.Point(30, 41);
|
||||||
this.cbt_StartTran.Name = "cbt_StartTran";
|
this.cbt_StartTran.Name = "cbt_StartTran";
|
||||||
this.cbt_StartTran.Size = new System.Drawing.Size(60, 60);
|
this.cbt_StartTran.Size = new System.Drawing.Size(60, 60);
|
||||||
this.cbt_StartTran.TabIndex = 5;
|
this.cbt_StartTran.TabIndex = 5;
|
||||||
@@ -1042,6 +1043,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.ktb_ShiftCount.Size = new System.Drawing.Size(71, 23);
|
this.ktb_ShiftCount.Size = new System.Drawing.Size(71, 23);
|
||||||
this.ktb_ShiftCount.TabIndex = 1;
|
this.ktb_ShiftCount.TabIndex = 1;
|
||||||
this.ktb_ShiftCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
this.ktb_ShiftCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||||
|
this.ktb_ShiftCount.Visible = false;
|
||||||
//
|
//
|
||||||
// ktb_FinishedPalletNum
|
// ktb_FinishedPalletNum
|
||||||
//
|
//
|
||||||
@@ -1071,6 +1073,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.kryptonLabel16.Size = new System.Drawing.Size(76, 20);
|
this.kryptonLabel16.Size = new System.Drawing.Size(76, 20);
|
||||||
this.kryptonLabel16.TabIndex = 0;
|
this.kryptonLabel16.TabIndex = 0;
|
||||||
this.kryptonLabel16.Values.Text = "Shift Count";
|
this.kryptonLabel16.Values.Text = "Shift Count";
|
||||||
|
this.kryptonLabel16.Visible = false;
|
||||||
//
|
//
|
||||||
// kryptonLabel15
|
// kryptonLabel15
|
||||||
//
|
//
|
||||||
@@ -2360,6 +2363,45 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.panMenu.Size = new System.Drawing.Size(1000, 59);
|
this.panMenu.Size = new System.Drawing.Size(1000, 59);
|
||||||
this.panMenu.TabIndex = 7;
|
this.panMenu.TabIndex = 7;
|
||||||
//
|
//
|
||||||
|
// kryptonButton9
|
||||||
|
//
|
||||||
|
this.kryptonButton9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.kryptonButton9.AutoSize = true;
|
||||||
|
this.kryptonButton9.Location = new System.Drawing.Point(840, 6);
|
||||||
|
this.kryptonButton9.Name = "kryptonButton9";
|
||||||
|
this.kryptonButton9.OverrideDefault.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.kryptonButton9.OverrideDefault.Back.Color2 = System.Drawing.Color.LightSteelBlue;
|
||||||
|
this.kryptonButton9.Size = new System.Drawing.Size(80, 47);
|
||||||
|
this.kryptonButton9.StateCommon.Content.ShortText.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.kryptonButton9.StateNormal.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.kryptonButton9.StateNormal.Back.Color2 = System.Drawing.Color.LightSteelBlue;
|
||||||
|
this.kryptonButton9.StateNormal.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
||||||
|
this.kryptonButton9.StateNormal.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
||||||
|
this.kryptonButton9.StateNormal.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
||||||
|
this.kryptonButton9.StateNormal.Border.Rounding = 3F;
|
||||||
|
this.kryptonButton9.StatePressed.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(240)))));
|
||||||
|
this.kryptonButton9.StatePressed.Back.Color2 = System.Drawing.Color.RoyalBlue;
|
||||||
|
this.kryptonButton9.StatePressed.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
||||||
|
this.kryptonButton9.StatePressed.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
||||||
|
this.kryptonButton9.StatePressed.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
||||||
|
this.kryptonButton9.StatePressed.Border.Rounding = 3F;
|
||||||
|
this.kryptonButton9.StateTracking.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
||||||
|
this.kryptonButton9.StateTracking.Back.Color2 = System.Drawing.Color.CornflowerBlue;
|
||||||
|
this.kryptonButton9.StateTracking.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
||||||
|
this.kryptonButton9.StateTracking.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
||||||
|
this.kryptonButton9.StateTracking.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
||||||
|
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
||||||
|
this.kryptonButton9.StateTracking.Border.Rounding = 3F;
|
||||||
|
this.kryptonButton9.TabIndex = 22;
|
||||||
|
this.kryptonButton9.Tag = "frmPrinterMain";
|
||||||
|
this.kryptonButton9.Values.Text = "个人报";
|
||||||
|
this.kryptonButton9.Click += new System.EventHandler(this.kryptonButton9_Click);
|
||||||
|
//
|
||||||
// btnShiftCount
|
// btnShiftCount
|
||||||
//
|
//
|
||||||
this.btnShiftCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.btnShiftCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
@@ -2756,45 +2798,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
|
||||||
//
|
//
|
||||||
// kryptonButton9
|
|
||||||
//
|
|
||||||
this.kryptonButton9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
|
||||||
this.kryptonButton9.AutoSize = true;
|
|
||||||
this.kryptonButton9.Location = new System.Drawing.Point(840, 6);
|
|
||||||
this.kryptonButton9.Name = "kryptonButton9";
|
|
||||||
this.kryptonButton9.OverrideDefault.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
|
||||||
this.kryptonButton9.OverrideDefault.Back.Color2 = System.Drawing.Color.LightSteelBlue;
|
|
||||||
this.kryptonButton9.Size = new System.Drawing.Size(80, 47);
|
|
||||||
this.kryptonButton9.StateCommon.Content.ShortText.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
|
||||||
this.kryptonButton9.StateNormal.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
|
||||||
this.kryptonButton9.StateNormal.Back.Color2 = System.Drawing.Color.LightSteelBlue;
|
|
||||||
this.kryptonButton9.StateNormal.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
|
||||||
this.kryptonButton9.StateNormal.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
|
||||||
this.kryptonButton9.StateNormal.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
|
||||||
this.kryptonButton9.StateNormal.Border.Rounding = 3F;
|
|
||||||
this.kryptonButton9.StatePressed.Back.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(240)))));
|
|
||||||
this.kryptonButton9.StatePressed.Back.Color2 = System.Drawing.Color.RoyalBlue;
|
|
||||||
this.kryptonButton9.StatePressed.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
|
||||||
this.kryptonButton9.StatePressed.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
|
||||||
this.kryptonButton9.StatePressed.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
|
||||||
this.kryptonButton9.StatePressed.Border.Rounding = 3F;
|
|
||||||
this.kryptonButton9.StateTracking.Back.Color1 = System.Drawing.Color.WhiteSmoke;
|
|
||||||
this.kryptonButton9.StateTracking.Back.Color2 = System.Drawing.Color.CornflowerBlue;
|
|
||||||
this.kryptonButton9.StateTracking.Back.ColorStyle = Krypton.Toolkit.PaletteColorStyle.HalfCut;
|
|
||||||
this.kryptonButton9.StateTracking.Border.Color1 = System.Drawing.Color.CornflowerBlue;
|
|
||||||
this.kryptonButton9.StateTracking.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Left)
|
|
||||||
| Krypton.Toolkit.PaletteDrawBorders.Right)));
|
|
||||||
this.kryptonButton9.StateTracking.Border.Rounding = 3F;
|
|
||||||
this.kryptonButton9.TabIndex = 22;
|
|
||||||
this.kryptonButton9.Tag = "frmPrinterMain";
|
|
||||||
this.kryptonButton9.Values.Text = "个人报";
|
|
||||||
this.kryptonButton9.Click += new System.EventHandler(this.kryptonButton9_Click);
|
|
||||||
//
|
|
||||||
// frmMainDetailNew
|
// frmMainDetailNew
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
@@ -3060,7 +3063,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
private Krypton.Toolkit.KryptonTextBox ktb_ShiftCount;
|
private Krypton.Toolkit.KryptonTextBox ktb_ShiftCount;
|
||||||
private Krypton.Toolkit.KryptonLabel kryptonLabel16;
|
private Krypton.Toolkit.KryptonLabel kryptonLabel16;
|
||||||
private Krypton.Toolkit.KryptonButton btnShiftCount;
|
private Krypton.Toolkit.KryptonButton btnShiftCount;
|
||||||
private System.Windows.Forms.Label labelNextFullStop;
|
|
||||||
private Krypton.Toolkit.KryptonContextMenu kryptonContextMenu1;
|
private Krypton.Toolkit.KryptonContextMenu kryptonContextMenu1;
|
||||||
private Krypton.Toolkit.KryptonContextMenuItems kryptonContextMenuItems1;
|
private Krypton.Toolkit.KryptonContextMenuItems kryptonContextMenuItems1;
|
||||||
private Krypton.Toolkit.KryptonContextMenuItem kryptonContextMenuItem1;
|
private Krypton.Toolkit.KryptonContextMenuItem kryptonContextMenuItem1;
|
||||||
@@ -3068,5 +3070,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
private Krypton.Toolkit.KryptonContextMenuItem kryptonContextMenuItem2;
|
private Krypton.Toolkit.KryptonContextMenuItem kryptonContextMenuItem2;
|
||||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
private Krypton.Toolkit.KryptonButton kryptonButton9;
|
private Krypton.Toolkit.KryptonButton kryptonButton9;
|
||||||
|
private CircleButton circleButton1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show(this.T("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
KryptonMessageBox.Show(this.T("主业务界面加载发生异常", "LoadMainDetailFrmExp") + $":【{ex.Message}】!");
|
||||||
LogHelper.WriteLog($"1111【{ex.Message}】", LogTypeEum.Err);
|
LogHelper.WriteLog($"【{ex.Message}】", LogTypeEum.Err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1019,35 +1019,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
LogHelper.WriteLog($"作业IR:【{workingIrMsg}】已经结束,数据库信息重置完成。", LogTypeEum.Run);
|
LogHelper.WriteLog($"作业IR:【{workingIrMsg}】已经结束,数据库信息重置完成。", LogTypeEum.Run);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.NextFullStop)
|
|
||||||
{
|
|
||||||
this.NextFullStop = false;
|
|
||||||
|
|
||||||
if (!_device.StopSys && !_device.ManualOrAuto)
|
|
||||||
{
|
|
||||||
_device.StopSys = true;
|
|
||||||
Thread.Sleep(500);
|
|
||||||
_device.StopSys = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
|
||||||
// && !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
|
||||||
//{
|
|
||||||
// if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
|
||||||
// {
|
|
||||||
// //GlobalHelper.SysIsRunFlag = false;
|
|
||||||
// LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Thread.Sleep(200);
|
|
||||||
|
|
||||||
// if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "False", PlcItemTypeDesc.M))
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1547,35 +1518,7 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
private bool _nextFullStop = false;
|
private bool _nextFullStop = false;
|
||||||
public bool NextFullStop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _nextFullStop;
|
|
||||||
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_nextFullStop = value;
|
|
||||||
this.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
|
|
||||||
this.labelNextFullStop.Visible = value;
|
|
||||||
}));
|
|
||||||
|
|
||||||
//if (value)
|
|
||||||
//{
|
|
||||||
//
|
|
||||||
// thi
|
|
||||||
//} else
|
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1603,24 +1546,24 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
if (!Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("StopSys", PlcItemTypeDesc.M))
|
||||||
&& !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
&& !Convert.ToBoolean(PlcOperationHelper.Instance.ReadPlcItem("ManualOrAuto", PlcItemTypeDesc.M)))
|
||||||
{
|
{
|
||||||
|
|
||||||
var modelResult = KryptonMessageBox.Show("是否在下次满料时停止? \n Yes:下次满料自动停止 No:直接停止 Cancel:不停止继续运行", "是否在下次满料时停止", MessageBoxButtons.YesNoCancel);
|
|
||||||
|
|
||||||
|
|
||||||
if (modelResult == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
NextFullStop = true;
|
|
||||||
}
|
|
||||||
else if (modelResult == DialogResult.No)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
if (PlcOperationHelper.Instance.WritePlcItem("StopSys", "True", PlcItemTypeDesc.M))
|
||||||
{
|
{
|
||||||
//GlobalHelper.SysIsRunFlag = false;
|
//GlobalHelper.SysIsRunFlag = false;
|
||||||
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
LogHelper.WriteLog($"用户:【{Global.UserInfo.UserName}】点击停止设备按钮,停止信号发送PLC成功!", LogTypeEum.Run);
|
||||||
}
|
}
|
||||||
|
//var modelResult = KryptonMessageBox.Show("是否在下次满料时停止? \n Yes:下次满料自动停止 No:直接停止 Cancel:不停止继续运行", "是否在下次满料时停止", MessageBoxButtons.YesNoCancel);
|
||||||
|
|
||||||
}
|
|
||||||
|
//if (modelResult == DialogResult.Yes)
|
||||||
|
//{
|
||||||
|
// NextFullStop = true;
|
||||||
|
//}
|
||||||
|
//else if (modelResult == DialogResult.No)
|
||||||
|
//{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2868,10 +2811,6 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void labelNextFullStop_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.NextFullStop = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void kryptonDropButton1_Click(object sender, EventArgs e)
|
private void kryptonDropButton1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -2882,5 +2821,15 @@ namespace CleanMachineHMI.FrmUserControl
|
|||||||
{
|
{
|
||||||
frmMainNew.SwitchFrmMenu(EnumFormType.OperatorReport, false);
|
frmMainNew.SwitchFrmMenu(EnumFormType.OperatorReport, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void circleButton1_KeyUp(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
_device.NextStop = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void circleButton1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,15 +244,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 定义一个委托类型的事件
|
// 定义一个委托类型的事件
|
||||||
public static event EventHandler<EventArgs> OnShowMainFrmAlarmMsg;
|
|
||||||
public static bool eventAlarmLock = false;
|
|
||||||
public static void ShowMainFrmAlarmMsg(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (!eventAlarmLock)
|
|
||||||
{
|
|
||||||
OnShowMainFrmAlarmMsg?.Invoke(sender, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static frmPopupWarningMsg PopupWarningMsgForm { get; set; }
|
public static frmPopupWarningMsg PopupWarningMsgForm { get; set; }
|
||||||
//定义一个委托类型的事件
|
//定义一个委托类型的事件
|
||||||
public static event EventHandler<EventArgs> OnSyncFinishPalletData;
|
public static event EventHandler<EventArgs> OnSyncFinishPalletData;
|
||||||
|
|||||||
@@ -162,6 +162,9 @@ namespace CleanMachineHMI
|
|||||||
|
|
||||||
// public System.Threading.AutoResetEvent thEvent = new System.Threading.AutoResetEvent(false);
|
// public System.Threading.AutoResetEvent thEvent = new System.Threading.AutoResetEvent(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void RefreshPlcItem()
|
private void RefreshPlcItem()
|
||||||
{
|
{
|
||||||
Stopwatch stopWatch = new Stopwatch();
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
@@ -182,7 +185,7 @@ namespace CleanMachineHMI
|
|||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
|
|
||||||
TimeSpan ts = stopWatch.Elapsed;
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
Console.WriteLine($"读取PLC时间:{ts.Milliseconds}", LogTypeEum.Run);
|
// Console.WriteLine($"读取PLC时间:{ts.Milliseconds}", LogTypeEum.Run);
|
||||||
|
|
||||||
if (haschange)
|
if (haschange)
|
||||||
{
|
{
|
||||||
@@ -334,7 +337,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
if (PlcItemMd_M_List != null && PlcItemMd_M_List.Count > 0)
|
if (PlcItemMd_M_List != null && PlcItemMd_M_List.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (PlcItem item in PlcItemMd_M_List.Values)
|
foreach (PlcItem item in PlcItemMd_M_List)
|
||||||
{
|
{
|
||||||
string value = "";
|
string value = "";
|
||||||
if (Convert.ToInt32(item.PlcItemPriAddress) >= 200)
|
if (Convert.ToInt32(item.PlcItemPriAddress) >= 200)
|
||||||
@@ -395,7 +398,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
if (PlcItemMd_D_List != null && PlcItemMd_D_List.Count > 0)
|
if (PlcItemMd_D_List != null && PlcItemMd_D_List.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (PlcItem item in PlcItemMd_D_List.Values)
|
foreach (PlcItem item in PlcItemMd_D_List)
|
||||||
{
|
{
|
||||||
var value = "";
|
var value = "";
|
||||||
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
||||||
@@ -465,28 +468,40 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
string priStr = "D";
|
string priStr = "D";
|
||||||
int index = 10;
|
int index = 10;
|
||||||
|
bool alarmChange = false;
|
||||||
Global.CmWarningLogMd_List.Clear();
|
Global.CmWarningLogMd_List.Clear();
|
||||||
for (var i = 0; i < 9; i++)
|
for (var i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
var plcitem = $"{priStr}{index + i}";
|
var plcitem = $"{priStr}{index + i}";
|
||||||
|
if (lastAlarm[i] != tmpReadAlarmBytArr_D[i])
|
||||||
|
{
|
||||||
|
|
||||||
if (tmpReadAlarmBytArr_D[i] != 0)
|
if (tmpReadAlarmBytArr_D[i] != 0)
|
||||||
{
|
{
|
||||||
var wanglist = Global.CheckWarng(tmpReadAlarmBytArr_D[i], plcitem);
|
var wanglist = Global.CheckWarng(tmpReadAlarmBytArr_D[i], plcitem);
|
||||||
Global.CmWarningLogMd_List.AddRange(wanglist);
|
Global.CmWarningLogMd_List.AddRange(wanglist);
|
||||||
|
}
|
||||||
|
lastAlarm[i] = tmpReadAlarmBytArr_D[i];
|
||||||
|
alarmChange = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
if (Global.CmWarningLogMd_List.Count() > 0)
|
if (alarmChange)
|
||||||
{
|
{
|
||||||
Global.ShowMainFrmAlarmMsg(true, EventArgs.Empty);
|
ShowMainFrmAlarmMsg();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Global.ShowMainFrmAlarmMsg(false, EventArgs.Empty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (Global.CmWarningLogMd_List.Count() > 0)
|
||||||
|
//{
|
||||||
|
// ShowMainFrmAlarmMsg(true, EventArgs.Empty);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// ShowMainFrmAlarmMsg(false, EventArgs.Empty);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
// HandleWaringLog(tmpReadAlarmBytArr_D);
|
// HandleWaringLog(tmpReadAlarmBytArr_D);
|
||||||
}
|
}
|
||||||
@@ -499,11 +514,40 @@ namespace CleanMachineHMI
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ushort[] lastAlarm = new ushort[9] { 0, 0, 0, 0, 0, 0, 0, 0, 0, };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void AlarmChange();
|
||||||
|
|
||||||
|
public event AlarmChange OnShowMainFrmAlarmMsg;
|
||||||
|
|
||||||
|
public void DoShowAlarm(object param)
|
||||||
|
{
|
||||||
|
if (!eventAlarmLock)
|
||||||
|
{
|
||||||
|
OnShowMainFrmAlarmMsg?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool eventAlarmLock = false;
|
||||||
|
public void ShowMainFrmAlarmMsg()
|
||||||
|
{
|
||||||
|
if (_synchronization != null)
|
||||||
|
{
|
||||||
|
_synchronization.Post(DoShowAlarm, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//报警信息记录
|
//报警信息记录
|
||||||
private void HandleWaringLog(ushort[] tmpReadAlarmBytArr_D)
|
private void HandleWaringLog(ushort[] tmpReadAlarmBytArr_D)
|
||||||
{
|
{
|
||||||
@@ -826,12 +870,12 @@ namespace CleanMachineHMI
|
|||||||
if (Global.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WaringStatus == 0).Count > 0)
|
if (Global.CmWarningLogMd_List.FindAll(x => x.WarningHandleResult == 0 && x.WaringStatus == 0).Count > 0)
|
||||||
{
|
{
|
||||||
//frmMainNew.Show_ptb_Alarm(true);
|
//frmMainNew.Show_ptb_Alarm(true);
|
||||||
Global.ShowMainFrmAlarmMsg(true, EventArgs.Empty);
|
ShowMainFrmAlarmMsg();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//frmMainNew.Show_ptb_Alarm(false);
|
//frmMainNew.Show_ptb_Alarm(false);
|
||||||
Global.ShowMainFrmAlarmMsg(false, EventArgs.Empty);
|
ShowMainFrmAlarmMsg();
|
||||||
}
|
}
|
||||||
#if RELEASE
|
#if RELEASE
|
||||||
}
|
}
|
||||||
@@ -855,7 +899,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
if (PlcItemMd_X_List != null && PlcItemMd_X_List.Count > 0)
|
if (PlcItemMd_X_List != null && PlcItemMd_X_List.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (PlcItem item in PlcItemMd_X_List.Values)
|
foreach (PlcItem item in PlcItemMd_X_List)
|
||||||
{
|
{
|
||||||
string value = "";
|
string value = "";
|
||||||
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
||||||
@@ -916,7 +960,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
if (PlcItemMd_Y_List != null && PlcItemMd_Y_List.Count > 0)
|
if (PlcItemMd_Y_List != null && PlcItemMd_Y_List.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (PlcItem item in PlcItemMd_Y_List.Values)
|
foreach (PlcItem item in PlcItemMd_Y_List)
|
||||||
{
|
{
|
||||||
string value = "";
|
string value = "";
|
||||||
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
if (!string.IsNullOrEmpty(item.PlcItemDeviationAddress))
|
||||||
@@ -1018,8 +1062,7 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
case PlcItemTypeDesc.M:
|
case PlcItemTypeDesc.M:
|
||||||
|
|
||||||
PlcItemMd_M_List.TryGetValue(plcItemCode, out var item_M);
|
PlcItem item_M = PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
// PlcItem item_M = PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_M == null)
|
if (item_M == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -1034,8 +1077,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PlcItemTypeDesc.D:
|
case PlcItemTypeDesc.D:
|
||||||
PlcItemMd_D_List.TryGetValue(plcItemCode, out var item_D);
|
PlcItem item_D = PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
// PlcItem item_D = PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_D == null)
|
if (item_D == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -1058,8 +1100,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PlcItemTypeDesc.X:
|
case PlcItemTypeDesc.X:
|
||||||
PlcItemMd_X_List.TryGetValue(plcItemCode, out var item_X);
|
PlcItem item_X = PlcItemMd_X_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
// PlcItem item_X = PlcItemMd_X_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_X == null)
|
if (item_X == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -1074,10 +1115,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PlcItemTypeDesc.Y:
|
case PlcItemTypeDesc.Y:
|
||||||
|
PlcItem item_Y = PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
PlcItemMd_Y_List.TryGetValue(plcItemCode, out var item_Y);
|
|
||||||
|
|
||||||
// PlcItem item_Y = PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_Y == null)
|
if (item_Y == null)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
@@ -1116,8 +1154,7 @@ namespace CleanMachineHMI
|
|||||||
switch (itemType)
|
switch (itemType)
|
||||||
{
|
{
|
||||||
case PlcItemTypeDesc.M:
|
case PlcItemTypeDesc.M:
|
||||||
PlcItemMd_M_List.TryGetValue(plcItemCode, out var item_M);
|
PlcItem item_M = PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
//PlcItem item_M = PlcItemMd_M_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_M == null)
|
if (item_M == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -1125,8 +1162,7 @@ namespace CleanMachineHMI
|
|||||||
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_M.PlcItemModbusAddress), bool.Parse(writeValue));
|
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_M.PlcItemModbusAddress), bool.Parse(writeValue));
|
||||||
return true;
|
return true;
|
||||||
case PlcItemTypeDesc.Y:
|
case PlcItemTypeDesc.Y:
|
||||||
PlcItemMd_Y_List.TryGetValue(plcItemCode, out var item_Y);
|
PlcItem item_Y = PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
//PlcItem item_Y = PlcItemMd_Y_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_Y == null)
|
if (item_Y == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -1134,10 +1170,7 @@ namespace CleanMachineHMI
|
|||||||
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_Y.PlcItemModbusAddress), bool.Parse(writeValue));
|
master.WriteSingleCoil(slaveAddress, Convert.ToUInt16(item_Y.PlcItemModbusAddress), bool.Parse(writeValue));
|
||||||
return true;
|
return true;
|
||||||
case PlcItemTypeDesc.D:
|
case PlcItemTypeDesc.D:
|
||||||
|
PlcItem item_D = PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
|
||||||
PlcItemMd_D_List.TryGetValue(plcItemCode, out var item_D);
|
|
||||||
|
|
||||||
// PlcItem item_D = PlcItemMd_D_List.Find(x => x.PlcItemCode == plcItemCode);
|
|
||||||
if (item_D == null)
|
if (item_D == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -1246,7 +1279,7 @@ namespace CleanMachineHMI
|
|||||||
|
|
||||||
if (DateTime.Now > HeartbeatTime.AddSeconds(5))//心跳超时
|
if (DateTime.Now > HeartbeatTime.AddSeconds(5))//心跳超时
|
||||||
{
|
{
|
||||||
isConn = false;
|
IsConn = false;
|
||||||
//报警处理。
|
//报警处理。
|
||||||
frmMainNew.Show_Plc_Alarm("PLC heartbeat data is abnormal, PLC loses connection!");
|
frmMainNew.Show_Plc_Alarm("PLC heartbeat data is abnormal, PLC loses connection!");
|
||||||
if (ReConnNum % 5 == 0)
|
if (ReConnNum % 5 == 0)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ namespace CleanMachineHMI
|
|||||||
|
|
||||||
private void btnExit_Click(object sender, EventArgs e)
|
private void btnExit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
Application.Exit();
|
Application.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ namespace CleanMachineHMI
|
|||||||
MothedShowMessage = new dlgShowMessage(Test);
|
MothedShowMessage = new dlgShowMessage(Test);
|
||||||
RefreshFrmHost = new dlgRefreshFrmHost(ShowWorkingPalletFullNumAlarm);
|
RefreshFrmHost = new dlgRefreshFrmHost(ShowWorkingPalletFullNumAlarm);
|
||||||
//Show_ptb_Alarm = new dlgShow_ptb_Alarm(ShowPicAlarm);
|
//Show_ptb_Alarm = new dlgShow_ptb_Alarm(ShowPicAlarm);
|
||||||
Global.OnShowMainFrmAlarmMsg += ShowPicAlarm;
|
PlcOperationHelper.Instance.OnShowMainFrmAlarmMsg += ShowPicAlarm;
|
||||||
Show_Plc_Alarm = new dlgShow_Plc_Alarm(ShowPlcAlarm);
|
Show_Plc_Alarm = new dlgShow_Plc_Alarm(ShowPlcAlarm);
|
||||||
RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag);
|
RemoveMaintainingFlag = new dlgShowMessage(ClearMaintainingFlag);
|
||||||
timer.Enabled = true;
|
timer.Enabled = true;
|
||||||
@@ -374,17 +374,20 @@ namespace CleanMachineHMI
|
|||||||
label3Professional.Text = msg;
|
label3Professional.Text = msg;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
private void ShowPicAlarm(object isShowFlag, EventArgs e)
|
private void ShowPicAlarm()
|
||||||
{
|
{
|
||||||
Invoke(new Action(() =>
|
|
||||||
{
|
ptb_Alarm.Visible = Global.CmWarningLogMd_List.Count > 0;
|
||||||
ptb_Alarm.Visible = (bool)isShowFlag;
|
|
||||||
KryptonPage tmpPage = kryptonNavigator1.Pages.FirstOrDefault(x => x.Name == EnumFormType.PlcAlarmLog.ToString());
|
//Invoke(new Action(() =>
|
||||||
if (tmpPage != null && (bool)isShowFlag)
|
//{
|
||||||
{
|
// ptb_Alarm.Visible = (bool)isShowFlag;
|
||||||
frmPlcAlarmLog.RefreshFrmHost(false);
|
// KryptonPage tmpPage = kryptonNavigator1.Pages.FirstOrDefault(x => x.Name == EnumFormType.PlcAlarmLog.ToString());
|
||||||
}
|
// if (tmpPage != null && (bool)isShowFlag)
|
||||||
}));
|
// {
|
||||||
|
// frmPlcAlarmLog.RefreshFrmHost(false);
|
||||||
|
// }
|
||||||
|
//}));
|
||||||
}
|
}
|
||||||
private void InitWarningMsg()
|
private void InitWarningMsg()
|
||||||
{
|
{
|
||||||
@@ -561,7 +564,8 @@ namespace CleanMachineHMI
|
|||||||
//var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList("");
|
//var sysParameters = new CleanMachine.BLL.SYS.ParameterBLL().GetList("");
|
||||||
//int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue);
|
//int maintainAlarmTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainAlarmTime").ParameterValue);
|
||||||
//int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue);
|
//int maintainTime = int.Parse(sysParameters.FirstOrDefault(m => m.ParameterCode == "MaintainTime").ParameterValue);
|
||||||
|
bool lastShowscrapRate = false;
|
||||||
|
int showdMinit = 0;
|
||||||
while (Global.SysThIsRunFlag)
|
while (Global.SysThIsRunFlag)
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
@@ -572,6 +576,7 @@ namespace CleanMachineHMI
|
|||||||
//当前托报废率超过10%,则提示
|
//当前托报废率超过10%,则提示
|
||||||
string sql_CurrPalletmsg = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
|
string sql_CurrPalletmsg = $@"SELECT * FROM CM_WORKING_PALLET WHERE WORKING_STATUS = 0";
|
||||||
DataTable dt_CurrPalletmsg = LeadDbHelperSQLite.Query(sql_CurrPalletmsg).Tables[0];
|
DataTable dt_CurrPalletmsg = LeadDbHelperSQLite.Query(sql_CurrPalletmsg).Tables[0];
|
||||||
|
bool showscrapRate = false;
|
||||||
if (dt_CurrPalletmsg != null && dt_CurrPalletmsg.Rows.Count > 0)
|
if (dt_CurrPalletmsg != null && dt_CurrPalletmsg.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
string palletCodeMsg = dt_CurrPalletmsg.Rows[0]["WORKING_PALLET_CODE"].ToString();
|
string palletCodeMsg = dt_CurrPalletmsg.Rows[0]["WORKING_PALLET_CODE"].ToString();
|
||||||
@@ -606,6 +611,7 @@ namespace CleanMachineHMI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Minutes = 0;
|
||||||
if (Global.UserInfo != null)
|
if (Global.UserInfo != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -616,16 +622,22 @@ namespace CleanMachineHMI
|
|||||||
new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName);
|
new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName);
|
||||||
|
|
||||||
|
|
||||||
int Minutes = (SysRunTime - CleanMachineHMI.Global.MaintainTime) / 60;
|
Minutes = (SysRunTime - CleanMachineHMI.Global.MaintainTime) / 60;
|
||||||
|
|
||||||
|
|
||||||
|
if (showdMinit != Minutes)
|
||||||
|
{
|
||||||
|
showdMinit = Minutes;
|
||||||
BeginInvoke(new Action(() =>
|
BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
|
|
||||||
kryptonLabel1.Text = Minutes + " Minutes";
|
kryptonLabel1.Text = Minutes + " Minutes";
|
||||||
pictureBox1.Visible = Minutes >= Global.MaintainAlarmTime;
|
pictureBox1.Visible = Minutes >= Global.MaintainAlarmTime;
|
||||||
|
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -792,9 +804,21 @@ namespace CleanMachineHMI
|
|||||||
{
|
{
|
||||||
Task.Run(async delegate
|
Task.Run(async delegate
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (Global.UserInfo != null)
|
||||||
|
|
||||||
|
{
|
||||||
|
int SysRunTime = (int)PlcOperationHelper.Instance.ReadPlcItem("SysRuningTime", PlcItemTypeDesc.D);
|
||||||
|
|
||||||
|
if (SysRunTime != 0)
|
||||||
|
{
|
||||||
|
new CleanMachine.BLL.CM.DayWorkTimeBLL().UpdateTime(DateTime.Today, SysRunTime, Global.UserInfo.UserName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
timer.Enabled = false;
|
timer.Enabled = false;
|
||||||
Global.SysThIsRunFlag = false;
|
Global.SysThIsRunFlag = false;
|
||||||
Global.eventAlarmLock = true;
|
PlcOperationHelper.Instance.eventAlarmLock = true;
|
||||||
if (Global.CmWarningLogMd_List.Count > 0)
|
if (Global.CmWarningLogMd_List.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (WarningLog item in Global.CmWarningLogMd_List)
|
foreach (WarningLog item in Global.CmWarningLogMd_List)
|
||||||
|
|||||||
Reference in New Issue
Block a user