diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/Model/PrimaryIgnitionModel.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/Model/PrimaryIgnitionModel.cs index 95388a8..b8d71f9 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/Model/PrimaryIgnitionModel.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/Model/PrimaryIgnitionModel.cs @@ -11,9 +11,9 @@ namespace 外科辅料和患者防护罩激光抗性测试仪.Model public int sampleType { get; set; } public string result { get; set; } public string O2 { get; set; } - public float? FireDate { get; set; } - public float? yuhui { get; set; } - public float? yuyan { get; set; } + public double? FireDate { get; set; } + public double? yuhui { get; set; } + public double? yuyan { get; set; } public bool Iszixi { get; set; } public double? costTime { get; set; } diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.Designer.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.Designer.cs index e4bdba4..bab30f3 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.Designer.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.Designer.cs @@ -30,6 +30,8 @@ { uiTableLayoutPanel1 = new Sunny.UI.UITableLayoutPanel(); uiPanel3 = new Sunny.UI.UIPanel(); + uiTextBox7 = new Sunny.UI.UITextBox(); + uiLabel17 = new Sunny.UI.UILabel(); uiLabel8 = new Sunny.UI.UILabel(); uiLabel9 = new Sunny.UI.UILabel(); uiTextBox3 = new Sunny.UI.UITextBox(); @@ -84,6 +86,8 @@ // // uiPanel3 // + uiPanel3.Controls.Add(uiTextBox7); + uiPanel3.Controls.Add(uiLabel17); uiPanel3.Controls.Add(uiLabel8); uiPanel3.Controls.Add(uiLabel9); uiPanel3.Controls.Add(uiTextBox3); @@ -111,6 +115,36 @@ uiPanel3.Text = null; uiPanel3.TextAlignment = ContentAlignment.MiddleCenter; // + // uiTextBox7 + // + uiTextBox7.Font = new Font("微软雅黑", 12F, FontStyle.Regular, GraphicsUnit.Point, 134); + uiTextBox7.Location = new Point(1641, 27); + uiTextBox7.Margin = new Padding(4, 5, 4, 5); + uiTextBox7.MinimumSize = new Size(1, 16); + uiTextBox7.Name = "uiTextBox7"; + uiTextBox7.Padding = new Padding(5); + uiTextBox7.Radius = 3; + uiTextBox7.RectColor = Color.FromArgb(220, 220, 220); + uiTextBox7.ShowText = false; + uiTextBox7.Size = new Size(186, 40); + uiTextBox7.Style = Sunny.UI.UIStyle.Custom; + uiTextBox7.StyleCustomMode = true; + uiTextBox7.TabIndex = 10; + uiTextBox7.Text = "0.000"; + uiTextBox7.TextAlignment = ContentAlignment.MiddleLeft; + uiTextBox7.Watermark = ""; + uiTextBox7.Click += uiTextBox7_Click; + // + // uiLabel17 + // + uiLabel17.Font = new Font("微软雅黑", 13F, FontStyle.Regular, GraphicsUnit.Point, 134); + uiLabel17.ForeColor = Color.FromArgb(48, 48, 48); + uiLabel17.Location = new Point(1473, 29); + uiLabel17.Name = "uiLabel17"; + uiLabel17.Size = new Size(150, 35); + uiLabel17.TabIndex = 9; + uiLabel17.Text = "功率设置:"; + // // uiLabel8 // uiLabel8.Font = new Font("微软雅黑", 14F, FontStyle.Bold, GraphicsUnit.Point, 134); @@ -515,5 +549,7 @@ private Sunny.UI.UITextBox uiTextBox5; private Sunny.UI.UILabel uiLabel16; private Sunny.UI.UILabel uiLabel15; + private Sunny.UI.UITextBox uiTextBox7; + private Sunny.UI.UILabel uiLabel17; } } \ No newline at end of file diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.cs index 763f694..be25bab 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/ParameterSetting.cs @@ -80,6 +80,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 ReadAndUpdateFloatAsync(1378,2,uiTextBox2,"F3",""),//湿地系数 ReadAndUpdateFloatAsync(1528,2,uiTextBox4,"F3",""),//氧浓度系数 ReadAndUpdateFloatAsync(1578,2,uiTextBox3,"F3",""),//穿透温度系数 + ReadAndUpdateFloatAsync(220,2,uiTextBox7,"F3",""),//功率系数 }; await Task.WhenAll(tasks); @@ -237,7 +238,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 }; initPort(); } - private string _serialBuffer = ""; + private string _serialBuffer = ""; SerialPort serialPort = null; private System.Windows.Forms.Timer _powerMeterTimer; private readonly object _serialLock = new object(); @@ -542,6 +543,11 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 } } + private void uiTextBox7_Click(object sender, EventArgs e) + { + ma?.WriteToPLCForNew(uiTextBox7.Text.Trim(), 220, Function.DataType.浮点型, 3); + } + private void SwitchToForm() where T : Form, new() { using (T form = new T()) diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs index f9ff7d5..6591b8a 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PenetrationForm.cs @@ -57,7 +57,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { var timer = new System.Windows.Forms.Timer() { - Interval = 1000, + Interval = 500, }; timer.Tick += async (s, e) => { @@ -78,7 +78,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { var timer = new System.Windows.Forms.Timer() { - Interval = 1000, + Interval = 300, }; timer.Tick += async (s, e) => { diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.Designer.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.Designer.cs index b3bfb40..3ba5095 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.Designer.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.Designer.cs @@ -1182,9 +1182,9 @@ // uiLabel31.Font = new Font("微软雅黑", 12F, FontStyle.Bold, GraphicsUnit.Point, 134); uiLabel31.ForeColor = Color.FromArgb(64, 158, 255); - uiLabel31.Location = new Point(261, 241); + uiLabel31.Location = new Point(289, 241); uiLabel31.Name = "uiLabel31"; - uiLabel31.Size = new Size(246, 31); + uiLabel31.Size = new Size(169, 31); uiLabel31.Style = Sunny.UI.UIStyle.Custom; uiLabel31.StyleCustomMode = true; uiLabel31.TabIndex = 7; diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.cs index e5f9eec..5374c3f 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/PrimaryIgnitionForm.cs @@ -96,7 +96,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { var timer = new System.Windows.Forms.Timer() { - Interval = 1000, + Interval = 100, }; timer.Tick += async (s, e) => { @@ -334,11 +334,12 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { classify = "I4x";//分类 ushort[] fire = _modbusMaster?.ReadHoldingRegisters(1, 190, 2); - firetime = c.UshortToFloat(fire[1], fire[0]);//点火时间 + firetime = c.UshortToFloat(fire[1], fire[0]);//点火时间 ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 300, 4); if (yhlocation != null && yhlocation.Length >= 3) { - yy = c.UshortToFloat(yhlocation[1], yhlocation[0]); //余焰 + //yy = c.UshortToFloat(yhlocation[1], yhlocation[0]); //余焰 + yy = c.UshortToFloat(yhlocation[1], yhlocation[0]); yh = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉 } bool[] fire1 = await ReadModbusCoilAsync(280, 1); diff --git a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs index ed4e77b..0672d01 100644 --- a/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs +++ b/外科辅料和患者防护罩激光抗性测试仪/外科辅料和患者防护罩激光抗性测试仪/SecondaryIgnitionForm.cs @@ -46,7 +46,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { var timer = new System.Windows.Forms.Timer() { - Interval = 1000, + Interval = 500, }; timer.Tick += async (s, e) => { @@ -75,9 +75,9 @@ namespace 外科辅料和患者防护罩激光抗性测试仪 { - ReadFloatAsync(156,2,uiLabel7,"F0",""),//点火时间 - ReadFloatAsync(164,2,uiLabel8,"F0",""),//余焰时间 - ReadFloatAsync(168,2,uiLabel12,"F0",""),//余辉时间 + ReadFloatAsync(156,2,uiLabel7,"F1",""),//点火时间 + ReadFloatAsync(164,2,uiLabel8,"F1",""),//余焰时间 + ReadFloatAsync(168,2,uiLabel12,"F1",""),//余辉时间 ReadLightStatusAsync(),