From 6ea3f5dcad1614af00761744842ebfb70cdab276 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 08 12月 2024 16:41:40 +0800 Subject: [PATCH] 22 --- CC/iWareCC_ASRS/FormCC.Designer.cs | 266 ++++++++++++++++++++ SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDB2Obj.cs | 81 +++++ CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs | 188 ++++++++++++++ CC/iWareCC_ASRS/Common/Helper/PlcHelper.cs | 72 +++++ CC/iWareCC_ASRS/FormCC.cs | 17 + SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs | 4 CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd | 13 SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs | 16 + SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDBForRead.cs | 81 +++++ 9 files changed, 718 insertions(+), 20 deletions(-) diff --git a/CC/iWareCC_ASRS/Common/Helper/PlcHelper.cs b/CC/iWareCC_ASRS/Common/Helper/PlcHelper.cs new file mode 100644 index 0000000..77182ea --- /dev/null +++ b/CC/iWareCC_ASRS/Common/Helper/PlcHelper.cs @@ -0,0 +1,72 @@ +锘縰sing Admin.NET.Application; +using iWareCC.SrmService; +using iWareCC.StationService; +using iWareCommon.Common.Globle; +using iWareCommon.Utils; +using iWareModel; +using iWareModel.EnumType.XiGangPublicCommon; +using iWareSql.DataAccess; +using iWareSql.DBModel; +using iWareSql.WmsDBModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using XiGang.Core.Model; + + +namespace iWareCC.Common.Helper +{ + /// <summary> + /// 澧炶ˉ鍒涘缓鐨勬墿灞曞府鍔╃被 銆怑ditBy shaocx,2022-02-05銆� + /// </summary> + public class PlcHelper + { + /// <summary> + /// 鑾峰彇妯″紡鍚� + /// </summary> + /// <param name="_task"></param> + /// <returns></returns> + public static string GetModeName(short mode) + { + switch (mode) { + case 1: + return "鎵嬪姩妯″紡"; + case 2: + return "鑷姩妯″紡"; + case 3: + return "鑷姩杩愯涓�"; + case 4: + return "绔嬪嵆鍋滄"; + case 5: + return "寰幆鍋滄"; + default: + return "鏈煡"; + } + } + + /// <summary> + /// 鑾峰彇鎶ヨ绫诲瀷 + /// </summary> + /// <param name="_task"></param> + /// <returns></returns> + public static string GetWarningTypeName(short warn) + { + switch (warn) + { + case 1: + return "瀹夊叏鎶ヨ"; + case 2: + return "纭欢鎶ヨ"; + case 3: + return "瓒呮椂鎶ヨ"; + case 4: + return "璀﹀憡淇℃伅"; + default: + return "鏈煡"; + } + } + } +} diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs index bf763b1..16c436f 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs +++ b/CC/iWareCC_ASRS/Connected Services/StationService/Reference.cs @@ -300,7 +300,28 @@ private string R_1019_ScanField; [System.Runtime.Serialization.OptionalFieldAttribute()] - private int R_HandShakeField; + private bool R_HandShake_FJField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private bool R_HandShake_FXField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private bool R_HandShake_HBField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private bool R_HandShake_MBField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Mode_FJField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Mode_FXField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Mode_HBField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Mode_MBField; [System.Runtime.Serialization.OptionalFieldAttribute()] private iWareCC.StationService.StationDB2ObjForReadComm[] R_StationForReadCommListField; @@ -313,6 +334,18 @@ [System.Runtime.Serialization.OptionalFieldAttribute()] private bool R_Station_FinishField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Warning_FJField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Warning_FXField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Warning_HBField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private short R_Warning_MBField; [System.Runtime.Serialization.OptionalFieldAttribute()] private bool W_1002_ScanFailACKField; @@ -503,14 +536,105 @@ } [System.Runtime.Serialization.DataMemberAttribute()] - public int R_HandShake { + public bool R_HandShake_FJ { get { - return this.R_HandShakeField; + return this.R_HandShake_FJField; } set { - if ((this.R_HandShakeField.Equals(value) != true)) { - this.R_HandShakeField = value; - this.RaisePropertyChanged("R_HandShake"); + if ((this.R_HandShake_FJField.Equals(value) != true)) { + this.R_HandShake_FJField = value; + this.RaisePropertyChanged("R_HandShake_FJ"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool R_HandShake_FX { + get { + return this.R_HandShake_FXField; + } + set { + if ((this.R_HandShake_FXField.Equals(value) != true)) { + this.R_HandShake_FXField = value; + this.RaisePropertyChanged("R_HandShake_FX"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool R_HandShake_HB { + get { + return this.R_HandShake_HBField; + } + set { + if ((this.R_HandShake_HBField.Equals(value) != true)) { + this.R_HandShake_HBField = value; + this.RaisePropertyChanged("R_HandShake_HB"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool R_HandShake_MB { + get { + return this.R_HandShake_MBField; + } + set { + if ((this.R_HandShake_MBField.Equals(value) != true)) { + this.R_HandShake_MBField = value; + this.RaisePropertyChanged("R_HandShake_MB"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Mode_FJ { + get { + return this.R_Mode_FJField; + } + set { + if ((this.R_Mode_FJField.Equals(value) != true)) { + this.R_Mode_FJField = value; + this.RaisePropertyChanged("R_Mode_FJ"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Mode_FX { + get { + return this.R_Mode_FXField; + } + set { + if ((this.R_Mode_FXField.Equals(value) != true)) { + this.R_Mode_FXField = value; + this.RaisePropertyChanged("R_Mode_FX"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Mode_HB { + get { + return this.R_Mode_HBField; + } + set { + if ((this.R_Mode_HBField.Equals(value) != true)) { + this.R_Mode_HBField = value; + this.RaisePropertyChanged("R_Mode_HB"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Mode_MB { + get { + return this.R_Mode_MBField; + } + set { + if ((this.R_Mode_MBField.Equals(value) != true)) { + this.R_Mode_MBField = value; + this.RaisePropertyChanged("R_Mode_MB"); } } } @@ -568,6 +692,58 @@ } [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Warning_FJ { + get { + return this.R_Warning_FJField; + } + set { + if ((this.R_Warning_FJField.Equals(value) != true)) { + this.R_Warning_FJField = value; + this.RaisePropertyChanged("R_Warning_FJ"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Warning_FX { + get { + return this.R_Warning_FXField; + } + set { + if ((this.R_Warning_FXField.Equals(value) != true)) { + this.R_Warning_FXField = value; + this.RaisePropertyChanged("R_Warning_FX"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Warning_HB { + get { + return this.R_Warning_HBField; + } + set { + if ((this.R_Warning_HBField.Equals(value) != true)) { + this.R_Warning_HBField = value; + this.RaisePropertyChanged("R_Warning_HB"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public short R_Warning_MB { + get { + return this.R_Warning_MBField; + } + set { + if ((this.R_Warning_MBField.Equals(value) != true)) { + this.R_Warning_MBField = value; + this.RaisePropertyChanged("R_Warning_MB"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] public bool W_1002_ScanFailACK { get { return this.W_1002_ScanFailACKField; diff --git a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd b/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd index e0069a0..9ce972d 100644 --- a/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd +++ b/CC/iWareCC_ASRS/Connected Services/StationService/item4.xsd @@ -35,11 +35,22 @@ <xs:element minOccurs="0" name="R_1015_Scan" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_1019_CargoNoScan" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_1019_Scan" nillable="true" type="xs:string" /> - <xs:element minOccurs="0" name="R_HandShake" type="xs:int" /> + <xs:element minOccurs="0" name="R_HandShake_FJ" type="xs:boolean" /> + <xs:element minOccurs="0" name="R_HandShake_FX" type="xs:boolean" /> + <xs:element minOccurs="0" name="R_HandShake_HB" type="xs:boolean" /> + <xs:element minOccurs="0" name="R_HandShake_MB" type="xs:boolean" /> + <xs:element minOccurs="0" name="R_Mode_FJ" type="xs:short" /> + <xs:element minOccurs="0" name="R_Mode_FX" type="xs:short" /> + <xs:element minOccurs="0" name="R_Mode_HB" type="xs:short" /> + <xs:element minOccurs="0" name="R_Mode_MB" type="xs:short" /> <xs:element minOccurs="0" name="R_StationForReadCommList" nillable="true" type="tns:ArrayOfStationDB2ObjForReadComm" /> <xs:element minOccurs="0" name="R_StationNo" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="R_Station_Coordinate" type="xs:int" /> <xs:element minOccurs="0" name="R_Station_Finish" type="xs:boolean" /> + <xs:element minOccurs="0" name="R_Warning_FJ" type="xs:short" /> + <xs:element minOccurs="0" name="R_Warning_FX" type="xs:short" /> + <xs:element minOccurs="0" name="R_Warning_HB" type="xs:short" /> + <xs:element minOccurs="0" name="R_Warning_MB" type="xs:short" /> <xs:element minOccurs="0" name="W_1002_ScanFailACK" type="xs:boolean" /> <xs:element minOccurs="0" name="W_1002_ScanSuccessACK" type="xs:boolean" /> <xs:element minOccurs="0" name="W_1004_ScanFailACK" type="xs:boolean" /> diff --git a/CC/iWareCC_ASRS/FormCC.Designer.cs b/CC/iWareCC_ASRS/FormCC.Designer.cs index 3ef7ef6..e6aecde 100644 --- a/CC/iWareCC_ASRS/FormCC.Designer.cs +++ b/CC/iWareCC_ASRS/FormCC.Designer.cs @@ -102,6 +102,23 @@ this.dateTimePicker_Start = new System.Windows.Forms.DateTimePicker(); this.btn_TongJi = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button(); + this.tabDevice = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.lbl_Mode_FJ = new System.Windows.Forms.Label(); + this.lbl_XinTiao_FJ = new System.Windows.Forms.Label(); + this.lbl_Warning_FJ = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.lbl_Warning_MB = new System.Windows.Forms.Label(); + this.lbl_XinTiao_MB = new System.Windows.Forms.Label(); + this.lbl_Mode_MB = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.lbl_Warning_HB = new System.Windows.Forms.Label(); + this.lbl_XinTiao_HB = new System.Windows.Forms.Label(); + this.lbl_Mode_HB = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.lbl_Warning_FX = new System.Windows.Forms.Label(); + this.lbl_XinTiao_FX = new System.Windows.Forms.Label(); + this.lbl_Mode_FX = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tPModeChoice.SuspendLayout(); this.panel_Model.SuspendLayout(); @@ -109,6 +126,11 @@ this.gBoxThread.SuspendLayout(); this.groupBox1.SuspendLayout(); this.tabPage3.SuspendLayout(); + this.tabDevice.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox5.SuspendLayout(); this.SuspendLayout(); // // tabControl1 @@ -117,6 +139,7 @@ this.tabControl1.Controls.Add(this.tPModeChoice); this.tabControl1.Controls.Add(this.tp_Thread); this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Controls.Add(this.tabDevice); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); @@ -1015,6 +1038,223 @@ this.button5.UseVisualStyleBackColor = false; this.button5.Click += new System.EventHandler(this.button5_Click); // + // tabDevice + // + this.tabDevice.Controls.Add(this.groupBox5); + this.tabDevice.Controls.Add(this.groupBox4); + this.tabDevice.Controls.Add(this.groupBox3); + this.tabDevice.Controls.Add(this.groupBox2); + this.tabDevice.Location = new System.Drawing.Point(4, 28); + this.tabDevice.Name = "tabDevice"; + this.tabDevice.Size = new System.Drawing.Size(1539, 898); + this.tabDevice.TabIndex = 10; + this.tabDevice.Text = "设备状态"; + this.tabDevice.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.lbl_Warning_FJ); + this.groupBox2.Controls.Add(this.lbl_XinTiao_FJ); + this.groupBox2.Controls.Add(this.lbl_Mode_FJ); + this.groupBox2.Location = new System.Drawing.Point(50, 49); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(333, 189); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "分拣区域"; + // + // lbl_Mode_FJ + // + this.lbl_Mode_FJ.AutoSize = true; + this.lbl_Mode_FJ.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Mode_FJ.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Mode_FJ.Location = new System.Drawing.Point(16, 33); + this.lbl_Mode_FJ.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Mode_FJ.Name = "lbl_Mode_FJ"; + this.lbl_Mode_FJ.Size = new System.Drawing.Size(91, 24); + this.lbl_Mode_FJ.TabIndex = 37; + this.lbl_Mode_FJ.Text = "设备模式: "; + this.lbl_Mode_FJ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_XinTiao_FJ + // + this.lbl_XinTiao_FJ.AutoSize = true; + this.lbl_XinTiao_FJ.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_XinTiao_FJ.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_XinTiao_FJ.Location = new System.Drawing.Point(16, 81); + this.lbl_XinTiao_FJ.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_XinTiao_FJ.Name = "lbl_XinTiao_FJ"; + this.lbl_XinTiao_FJ.Size = new System.Drawing.Size(55, 24); + this.lbl_XinTiao_FJ.TabIndex = 38; + this.lbl_XinTiao_FJ.Text = "心跳: "; + this.lbl_XinTiao_FJ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_Warning_FJ + // + this.lbl_Warning_FJ.AutoSize = true; + this.lbl_Warning_FJ.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Warning_FJ.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Warning_FJ.Location = new System.Drawing.Point(16, 129); + this.lbl_Warning_FJ.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Warning_FJ.Name = "lbl_Warning_FJ"; + this.lbl_Warning_FJ.Size = new System.Drawing.Size(91, 24); + this.lbl_Warning_FJ.TabIndex = 39; + this.lbl_Warning_FJ.Text = "报警类型: "; + this.lbl_Warning_FJ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.lbl_Warning_MB); + this.groupBox3.Controls.Add(this.lbl_XinTiao_MB); + this.groupBox3.Controls.Add(this.lbl_Mode_MB); + this.groupBox3.Location = new System.Drawing.Point(523, 49); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(333, 189); + this.groupBox3.TabIndex = 1; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "码包区域"; + // + // lbl_Warning_MB + // + this.lbl_Warning_MB.AutoSize = true; + this.lbl_Warning_MB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Warning_MB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Warning_MB.Location = new System.Drawing.Point(16, 129); + this.lbl_Warning_MB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Warning_MB.Name = "lbl_Warning_MB"; + this.lbl_Warning_MB.Size = new System.Drawing.Size(91, 24); + this.lbl_Warning_MB.TabIndex = 39; + this.lbl_Warning_MB.Text = "报警类型: "; + this.lbl_Warning_MB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_XinTiao_MB + // + this.lbl_XinTiao_MB.AutoSize = true; + this.lbl_XinTiao_MB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_XinTiao_MB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_XinTiao_MB.Location = new System.Drawing.Point(16, 81); + this.lbl_XinTiao_MB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_XinTiao_MB.Name = "lbl_XinTiao_MB"; + this.lbl_XinTiao_MB.Size = new System.Drawing.Size(55, 24); + this.lbl_XinTiao_MB.TabIndex = 38; + this.lbl_XinTiao_MB.Text = "心跳: "; + this.lbl_XinTiao_MB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_Mode_MB + // + this.lbl_Mode_MB.AutoSize = true; + this.lbl_Mode_MB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Mode_MB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Mode_MB.Location = new System.Drawing.Point(16, 33); + this.lbl_Mode_MB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Mode_MB.Name = "lbl_Mode_MB"; + this.lbl_Mode_MB.Size = new System.Drawing.Size(91, 24); + this.lbl_Mode_MB.TabIndex = 37; + this.lbl_Mode_MB.Text = "设备模式: "; + this.lbl_Mode_MB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.lbl_Warning_HB); + this.groupBox4.Controls.Add(this.lbl_XinTiao_HB); + this.groupBox4.Controls.Add(this.lbl_Mode_HB); + this.groupBox4.Location = new System.Drawing.Point(50, 321); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(333, 189); + this.groupBox4.TabIndex = 2; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "合包区域"; + // + // lbl_Warning_HB + // + this.lbl_Warning_HB.AutoSize = true; + this.lbl_Warning_HB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Warning_HB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Warning_HB.Location = new System.Drawing.Point(16, 129); + this.lbl_Warning_HB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Warning_HB.Name = "lbl_Warning_HB"; + this.lbl_Warning_HB.Size = new System.Drawing.Size(91, 24); + this.lbl_Warning_HB.TabIndex = 39; + this.lbl_Warning_HB.Text = "报警类型: "; + this.lbl_Warning_HB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_XinTiao_HB + // + this.lbl_XinTiao_HB.AutoSize = true; + this.lbl_XinTiao_HB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_XinTiao_HB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_XinTiao_HB.Location = new System.Drawing.Point(16, 81); + this.lbl_XinTiao_HB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_XinTiao_HB.Name = "lbl_XinTiao_HB"; + this.lbl_XinTiao_HB.Size = new System.Drawing.Size(55, 24); + this.lbl_XinTiao_HB.TabIndex = 38; + this.lbl_XinTiao_HB.Text = "心跳: "; + this.lbl_XinTiao_HB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_Mode_HB + // + this.lbl_Mode_HB.AutoSize = true; + this.lbl_Mode_HB.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Mode_HB.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Mode_HB.Location = new System.Drawing.Point(16, 33); + this.lbl_Mode_HB.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Mode_HB.Name = "lbl_Mode_HB"; + this.lbl_Mode_HB.Size = new System.Drawing.Size(91, 24); + this.lbl_Mode_HB.TabIndex = 37; + this.lbl_Mode_HB.Text = "设备模式: "; + this.lbl_Mode_HB.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.lbl_Warning_FX); + this.groupBox5.Controls.Add(this.lbl_XinTiao_FX); + this.groupBox5.Controls.Add(this.lbl_Mode_FX); + this.groupBox5.Location = new System.Drawing.Point(523, 321); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(333, 189); + this.groupBox5.TabIndex = 3; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "封箱区域"; + // + // lbl_Warning_FX + // + this.lbl_Warning_FX.AutoSize = true; + this.lbl_Warning_FX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Warning_FX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Warning_FX.Location = new System.Drawing.Point(16, 129); + this.lbl_Warning_FX.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Warning_FX.Name = "lbl_Warning_FX"; + this.lbl_Warning_FX.Size = new System.Drawing.Size(91, 24); + this.lbl_Warning_FX.TabIndex = 39; + this.lbl_Warning_FX.Text = "报警类型: "; + this.lbl_Warning_FX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_XinTiao_FX + // + this.lbl_XinTiao_FX.AutoSize = true; + this.lbl_XinTiao_FX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_XinTiao_FX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_XinTiao_FX.Location = new System.Drawing.Point(16, 81); + this.lbl_XinTiao_FX.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_XinTiao_FX.Name = "lbl_XinTiao_FX"; + this.lbl_XinTiao_FX.Size = new System.Drawing.Size(55, 24); + this.lbl_XinTiao_FX.TabIndex = 38; + this.lbl_XinTiao_FX.Text = "心跳: "; + this.lbl_XinTiao_FX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_Mode_FX + // + this.lbl_Mode_FX.AutoSize = true; + this.lbl_Mode_FX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lbl_Mode_FX.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(158)))), ((int)(((byte)(98))))); + this.lbl_Mode_FX.Location = new System.Drawing.Point(16, 33); + this.lbl_Mode_FX.Margin = new System.Windows.Forms.Padding(13, 12, 13, 12); + this.lbl_Mode_FX.Name = "lbl_Mode_FX"; + this.lbl_Mode_FX.Size = new System.Drawing.Size(91, 24); + this.lbl_Mode_FX.TabIndex = 37; + this.lbl_Mode_FX.Text = "设备模式: "; + this.lbl_Mode_FX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // FormCC // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); @@ -1041,6 +1281,15 @@ this.groupBox1.PerformLayout(); this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); + this.tabDevice.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); this.ResumeLayout(false); } @@ -1119,6 +1368,23 @@ private System.Windows.Forms.Label label23; private System.Windows.Forms.Label lbl_currHandlerPackageCodeForIssueOutboundTask; private System.Windows.Forms.Button button25; + private System.Windows.Forms.TabPage tabDevice; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label lbl_Mode_FJ; + private System.Windows.Forms.Label lbl_Warning_FJ; + private System.Windows.Forms.Label lbl_XinTiao_FJ; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label lbl_Warning_MB; + private System.Windows.Forms.Label lbl_XinTiao_MB; + private System.Windows.Forms.Label lbl_Mode_MB; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label lbl_Warning_HB; + private System.Windows.Forms.Label lbl_XinTiao_HB; + private System.Windows.Forms.Label lbl_Mode_HB; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.Label lbl_Warning_FX; + private System.Windows.Forms.Label lbl_XinTiao_FX; + private System.Windows.Forms.Label lbl_Mode_FX; } } diff --git a/CC/iWareCC_ASRS/FormCC.cs b/CC/iWareCC_ASRS/FormCC.cs index 02fb2c7..c26f950 100644 --- a/CC/iWareCC_ASRS/FormCC.cs +++ b/CC/iWareCC_ASRS/FormCC.cs @@ -600,6 +600,23 @@ } stationView = stationServiceClient.GetStationInfo((int)EDevice.Station); + + this.lbl_Mode_FJ.Text = "璁惧妯″紡:" + PlcHelper.GetModeName(stationView.R_Mode_FJ); + this.lbl_XinTiao_FJ.Text = "蹇冭烦:" + stationView.R_HandShake_FJ; + this.lbl_Warning_FJ.Text = "蹇冭烦:" + PlcHelper.GetWarningTypeName(stationView.R_Warning_FJ); + + this.lbl_Mode_MB.Text = "璁惧妯″紡:" + PlcHelper.GetModeName(stationView.R_Mode_MB); + this.lbl_XinTiao_MB.Text = "蹇冭烦:" + stationView.R_HandShake_MB; + this.lbl_Warning_MB.Text = "蹇冭烦:" + PlcHelper.GetWarningTypeName(stationView.R_Warning_MB); + + this.lbl_Mode_HB.Text = "璁惧妯″紡:" + PlcHelper.GetModeName(stationView.R_Mode_HB); + this.lbl_XinTiao_HB.Text = "蹇冭烦:" + stationView.R_HandShake_HB; + this.lbl_Warning_HB.Text = "蹇冭烦:" + PlcHelper.GetWarningTypeName(stationView.R_Warning_HB); + + this.lbl_Mode_FX.Text = "璁惧妯″紡:" + PlcHelper.GetModeName(stationView.R_Mode_FX); + this.lbl_XinTiao_FX.Text = "蹇冭烦:" + stationView.R_HandShake_FX; + this.lbl_Warning_FX.Text = "蹇冭烦:" + PlcHelper.GetWarningTypeName(stationView.R_Warning_FX); + ////鏄剧ずRGV浠诲姟瀹屾垚鍜屽畬鎴愮‘璁や俊鍙� //this.lbl_R_RGV_Finish.Text = "RGV浠诲姟瀹屾垚:" + rgvView.R_RGV_Finish; //this.lbl_W_RGV_FinishACK.Text = "RGV浠诲姟瀹屾垚纭:" + rgvView.W_RGV_FinishACK; diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDB2Obj.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDB2Obj.cs index 4211410..1b54799 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDB2Obj.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDB2Obj.cs @@ -108,15 +108,86 @@ #endregion - + #endregion #region 璇诲彇鍒扮殑Station淇℃伅 /// <summary> - /// 蹇冭烦 + /// 蹇冭烦-鍒嗘嫞鍖哄煙 /// </summary> - [Description("蹇冭烦")] - public int R_HandShake { get; set; } + [Description("蹇冭烦-鍒嗘嫞鍖哄煙")] + public bool R_HandShake_FJ { get; set; } + + /// <summary> + /// 妯″紡(-鍒嗘嫞鍖哄煙 + /// </summary> + [Description("妯″紡(-鍒嗘嫞鍖哄煙")] + public short R_Mode_FJ { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鍒嗘嫞鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鍒嗘嫞鍖哄煙")] + public short R_Warning_FJ { get; set; } + + + /// <summary> + /// 蹇冭烦-鐮佸寘鍖哄煙 + /// </summary> + [Description("蹇冭烦-鐮佸寘鍖哄煙")] + public bool R_HandShake_MB { get; set; } + + /// <summary> + /// 妯″紡(-鐮佸寘鍖哄煙 + /// </summary> + [Description("妯″紡(-鐮佸寘鍖哄煙")] + public short R_Mode_MB { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鐮佸寘鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鐮佸寘鍖哄煙")] + public short R_Warning_MB { get; set; } + + + /// <summary> + /// 蹇冭烦-鍚堝寘鍖哄煙 + /// </summary> + [Description("蹇冭烦-鍚堝寘鍖哄煙")] + public bool R_HandShake_HB { get; set; } + + /// <summary> + /// 妯″紡(-鍚堝寘鍖哄煙 + /// </summary> + [Description("妯″紡(-鍚堝寘鍖哄煙")] + public short R_Mode_HB { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鍚堝寘鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鍚堝寘鍖哄煙")] + public short R_Warning_HB { get; set; } + + + + /// <summary> + /// 蹇冭烦-灏佺鍖哄煙 + /// </summary> + [Description("蹇冭烦-灏佺鍖哄煙")] + public bool R_HandShake_FX { get; set; } + + /// <summary> + /// 妯″紡(-灏佺鍖哄煙 + /// </summary> + [Description("妯″紡(-灏佺鍖哄煙")] + public short R_Mode_FX { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-灏佺鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-灏佺鍖哄煙")] + public short R_Warning_FX { get; set; } + /// <summary> /// Station缂栧彿 /// </summary> @@ -205,7 +276,7 @@ #endregion - + #endregion } diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDBForRead.cs b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDBForRead.cs index 8ab0811..24ffa52 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDBForRead.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/DB/RgvDBForRead.cs @@ -12,12 +12,83 @@ public class StationDBForRead { #region 璇诲彇鍒扮殑Station淇℃伅 + /// <summary> - /// 蹇冭烦 + /// 蹇冭烦-鍒嗘嫞鍖哄煙 /// </summary> - [Description("蹇冭烦")] - public string R_HandShake { get; set; } - + [Description("蹇冭烦-鍒嗘嫞鍖哄煙")] + public string R_HandShake_FJ { get; set; } + + /// <summary> + /// 妯″紡(-鍒嗘嫞鍖哄煙 + /// </summary> + [Description("妯″紡(-鍒嗘嫞鍖哄煙")] + public string R_Mode_FJ { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鍒嗘嫞鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鍒嗘嫞鍖哄煙")] + public string R_Warning_FJ { get; set; } + + + /// <summary> + /// 蹇冭烦-鐮佸寘鍖哄煙 + /// </summary> + [Description("蹇冭烦-鐮佸寘鍖哄煙")] + public string R_HandShake_MB { get; set; } + + /// <summary> + /// 妯″紡(-鐮佸寘鍖哄煙 + /// </summary> + [Description("妯″紡(-鐮佸寘鍖哄煙")] + public string R_Mode_MB { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鐮佸寘鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鐮佸寘鍖哄煙")] + public string R_Warning_MB { get; set; } + + + /// <summary> + /// 蹇冭烦-鍚堝寘鍖哄煙 + /// </summary> + [Description("蹇冭烦-鍚堝寘鍖哄煙")] + public string R_HandShake_HB { get; set; } + + /// <summary> + /// 妯″紡(-鍚堝寘鍖哄煙 + /// </summary> + [Description("妯″紡(-鍚堝寘鍖哄煙")] + public string R_Mode_HB { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-鍚堝寘鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-鍚堝寘鍖哄煙")] + public string R_Warning_HB { get; set; } + + + + /// <summary> + /// 蹇冭烦-灏佺鍖哄煙 + /// </summary> + [Description("蹇冭烦-灏佺鍖哄煙")] + public string R_HandShake_FX { get; set; } + + /// <summary> + /// 妯″紡(-灏佺鍖哄煙 + /// </summary> + [Description("妯″紡(-灏佺鍖哄煙")] + public string R_Mode_FX { get; set; } + + /// <summary> + /// 鎶ヨ绫诲瀷(-灏佺鍖哄煙 + /// </summary> + [Description("鎶ヨ绫诲瀷(-灏佺鍖哄煙")] + public string R_Warning_FX { get; set; } + #region 璇荤殑绔欑偣 @@ -25,7 +96,7 @@ #endregion - + #endregion } diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs index 5f7e820..d90f7f0 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs @@ -1182,10 +1182,10 @@ try { var r_dbBlock = this.DBBlockForRead; - short value = Convert.ToInt16(this.plcService.ReadValuePoint(r_dbBlock.R_HandShake, typeof(short))); + short value = Convert.ToInt16(this.plcService.ReadValuePoint(r_dbBlock.R_HandShake_FJ, typeof(short))); //绾﹀畾 绛夊緟2绉� Thread.Sleep(2000); - short value_next = Convert.ToInt16(this.plcService.ReadValuePoint(r_dbBlock.R_HandShake, typeof(short))); + short value_next = Convert.ToInt16(this.plcService.ReadValuePoint(r_dbBlock.R_HandShake_FJ, typeof(short))); if (value == value_next) {//娌℃湁蹇冭烦 return false; diff --git a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs index 0962dc6..c3f7bcd 100644 --- a/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs +++ b/SDA/iWareSda/Devices/4-Station/StationModel/Station_CacheEntity.cs @@ -256,7 +256,21 @@ { //TODO:杩欓噷鍐欓厤缃殑DB鍦板潃 #region 璇诲彇 - // R_HandShake = R_DBHeaderWithSeparate + "0.0", + R_HandShake_FJ = W_DBHeaderWithSeparate_3000 + "0.0", + R_Mode_FJ = W_DBHeaderWithSeparate_3000 + "2.0", + R_Warning_FJ = W_DBHeaderWithSeparate_3000 + "4.0", + + R_HandShake_MB = W_DBHeaderWithSeparate_3000 + "20.0", + R_Mode_MB = W_DBHeaderWithSeparate_3000 + "22.0", + R_Warning_MB = W_DBHeaderWithSeparate_3000 + "24.0", + + R_HandShake_HB = W_DBHeaderWithSeparate_3000 + "40.0", + R_Mode_HB = W_DBHeaderWithSeparate_3000 + "42.0", + R_Warning_HB = W_DBHeaderWithSeparate_3000 + "44.0", + + R_HandShake_FX = W_DBHeaderWithSeparate_3000 + "60.0", + R_Mode_FX = W_DBHeaderWithSeparate_3000 + "62.0", + R_Warning_FX = W_DBHeaderWithSeparate_3000 + "64.0", R_StationForReadCommList = new List<StationDBForReadComm>() #endregion -- Gitblit v1.9.3