This commit is contained in:
xyy
2026-01-07 17:02:09 +08:00
parent 253594702b
commit 30e7c8d0e1
3 changed files with 425 additions and 15 deletions

View File

@@ -699,9 +699,9 @@
//
statusStrip1.ImageScalingSize = new Size(24, 24);
statusStrip1.Items.AddRange(new ToolStripItem[] { toolStripStatusLabel1 });
statusStrip1.Location = new Point(0, 382);
statusStrip1.Location = new Point(0, 387);
statusStrip1.Name = "statusStrip1";
statusStrip1.Size = new Size(924, 31);
statusStrip1.Size = new Size(924, 26);
statusStrip1.TabIndex = 22;
statusStrip1.Text = "statusStrip1";
//
@@ -709,7 +709,7 @@
//
toolStripStatusLabel1.BackColor = Color.Red;
toolStripStatusLabel1.Name = "toolStripStatusLabel1";
toolStripStatusLabel1.Size = new Size(118, 24);
toolStripStatusLabel1.Size = new Size(99, 20);
toolStripStatusLabel1.Text = "功率计未连接";
//
// uiLabel25
@@ -1005,7 +1005,7 @@
uiLabel9.Style = Sunny.UI.UIStyle.Custom;
uiLabel9.StyleCustomMode = true;
uiLabel9.TabIndex = 2;
uiLabel9.Text = "余焰时间(s):";
uiLabel9.Text = "燃烧时间(s):";
uiLabel9.TextAlign = ContentAlignment.MiddleLeft;
//
// uiLabel7
@@ -1334,7 +1334,7 @@
uiLabel22.Style = Sunny.UI.UIStyle.Custom;
uiLabel22.StyleCustomMode = true;
uiLabel22.TabIndex = 10;
uiLabel22.Text = "余焰时间(s):";
uiLabel22.Text = "燃烧时间(s):";
uiLabel22.TextAlign = ContentAlignment.MiddleLeft;
//
// uiLabel36

View File

@@ -399,24 +399,26 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
return;
}
float yh = 0, yy = 0, penetime = 0, temperature = 0;
ushort costtime = 0;
bool isfire = false;
ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
if (yhlocation != null && yhlocation.Length >= 4)
{
yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);
yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);
}
//ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
//if (yhlocation != null && yhlocation.Length >= 4)
//{
//yy = c.UshortToFloat(yhlocation[1], yhlocation[0]);
//yh = c.UshortToFloat(yhlocation[3], yhlocation[2]);
//}
yh = float.Parse(uiLabel12.Text);
yy = float.Parse(uiLabel8.Text);
//yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);
bool[] fire = await ReadModbusCoilAsync((ushort)fireCoilAddress, 1);
isfire = fire != null && fire.Length > 0 && fire[0];
ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, (ushort)timeRegAddress, 2);
if (time != null && time.Length > 0)
{
@@ -463,6 +465,414 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
}
}
//private async Task InsertReportAsync()
//{
// if (uiLabel10.Text != null && uiLabel10.Text.Trim() == "1")
// {
// bool[] value1 = await ReadModbusCoilAsync(160, 1);
// bool[] value2 = await ReadModbusCoilAsync(170, 1);
// bool[] value3 = await ReadModbusCoilAsync(180, 1);
// bool[] value4 = await ReadModbusCoilAsync(190, 1);
// if (value1 != null && value1.Length > 0 && value1[0])
// {
// classify = "P4";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(201, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 170, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value2 != null && value2.Length > 0 && value2[0])
// {
// classify = "P3";
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(201, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 170, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value3 != null && value3.Length > 0 && value3[0])
// {
// classify = "P2";
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(201, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 170, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value4 != null && value4.Length > 0 && value4[0])
// {
// classify = "P1";
// ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, 110, 2);
// temperature = c.UshortToFloat(tem[1], tem[0]);//背部温度
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(201, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 170, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// }
// if (uiLabel10.Text != null && uiLabel10.Text.Trim() == "2")
// {
// bool[] value5 = await ReadModbusCoilAsync(161, 1);
// bool[] value6 = await ReadModbusCoilAsync(171, 1);
// bool[] value7 = await ReadModbusCoilAsync(181, 1);
// bool[] value8 = await ReadModbusCoilAsync(191, 1);
// if (value5 != null && value5.Length > 0 && value5[0])
// {
// classify = "P4";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(202, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 172, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value6 != null && value6.Length > 0 && value6[0])
// {
// classify = "P3";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(202, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 172, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value7 != null && value7.Length > 0 && value7[0])
// {
// classify = "P2";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(202, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 172, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value8 != null && value8.Length > 0 && value8[0])
// {
// classify = "P1";
// ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, 112, 2);
// temperature = c.UshortToFloat(tem[1], tem[0]);//背部温度
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(202, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 172, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// }
// if (uiLabel10.Text != null && uiLabel10.Text.Trim() == "3")
// {
// bool[] value9 = await ReadModbusCoilAsync(162, 1);
// bool[] value10 = await ReadModbusCoilAsync(172, 1);
// bool[] value11 = await ReadModbusCoilAsync(182, 1);
// bool[] value12 = await ReadModbusCoilAsync(192, 1);
// if (value9 != null && value9.Length > 0 && value9[0])
// {
// classify = "P4";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(203, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 174, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value10 != null && value10.Length > 0 && value10[0])
// {
// classify = "P3";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(203, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 174, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value11 != null && value11.Length > 0 && value11[0])
// {
// classify = "P2";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(203, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 174, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value12 != null && value12.Length > 0 && value12[0])
// {
// classify = "P1";
// ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, 114, 2);
// temperature = c.UshortToFloat(tem[1], tem[0]);//背部温度
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(203, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 174, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// }
// if (uiLabel10.Text != null && uiLabel10.Text.Trim() == "4")
// {
// bool[] value13 = await ReadModbusCoilAsync(163, 1);
// bool[] value14 = await ReadModbusCoilAsync(173, 1);
// bool[] value15 = await ReadModbusCoilAsync(183, 1);
// bool[] value16 = await ReadModbusCoilAsync(193, 1);
// if (value13 != null && value13.Length > 0 && value13[0])
// {
// classify = "P4";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(204, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 176, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value14 != null && value14.Length > 0 && value14[0])
// {
// classify = "P3";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(204, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 176, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value15 != null && value15.Length > 0 && value15[0])
// {
// classify = "P2";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(204, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 176, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value16 != null && value16.Length > 0 && value16[0])
// {
// classify = "P1";
// ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, 116, 2);
// temperature = c.UshortToFloat(tem[1], tem[0]);//背部温度
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(204, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 176, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// }
// if (uiLabel10.Text != null && uiLabel10.Text.Trim() == "5")
// {
// bool[] value17 = await ReadModbusCoilAsync(164, 1);
// bool[] value18 = await ReadModbusCoilAsync(174, 1);
// bool[] value19 = await ReadModbusCoilAsync(184, 1);
// bool[] value20 = await ReadModbusCoilAsync(194, 1);
// if (value17 != null && value17.Length > 0 && value17[0])
// {
// classify = "P4";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(205, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 178, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value18 != null && value18.Length > 0 && value18[0])
// {
// classify = "P3";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(205, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 178, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value19 != null && value19.Length > 0 && value19[0])
// {
// classify = "P2";//分类
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(205, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 178, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// else if (value20 != null && value20.Length > 0 && value20[0])
// {
// classify = "P1";
// ushort[] tem = _modbusMaster?.ReadHoldingRegisters(1, 118, 2);
// temperature = c.UshortToFloat(tem[1], tem[0]);//背部温度
// ushort[] yhlocation = _modbusMaster?.ReadHoldingRegisters(1, 320, 4);
// if (yhlocation != null && yhlocation.Length >= 3)
// {
// yh = c.UshortToFloat(yhlocation[1], yhlocation[0]);//余焰
// yy = c.UshortToFloat(yhlocation[3], yhlocation[2]);//余辉
// }
// bool[] fire = await ReadModbusCoilAsync(205, 1);
// isfire = (fire != null && fire.Length > 0 && fire[0]) ? true : false;//是否起火
// ushort[] time = _modbusMaster?.ReadHoldingRegisters(1, 178, 2);
// costtime = time[0];//总测试
// ushort[] petime = _modbusMaster?.ReadHoldingRegisters(1, 72, 2);
// penetime = c.UshortToFloat(petime[1], petime[0]);//穿透
// }
// }
// try
// {
// string selectedO2Text = uiComboBox1.Text;
// reportList.Add(new PenetrationModel
// {
// sampleType2 = uiLabel10.Text.Contains("1") ? 1
// : uiLabel10.Text.Contains("2") ? 2
// : uiLabel10.Text.Contains("3") ? 3
// : uiLabel10.Text.Contains("4") ? 4
// : uiLabel10.Text.Contains("5") ? 5 : 0,
// O22 = selectedO2Text,
// result2 = classify,
// temperature2 = temperature,
// yuhui2 = yh,
// yuyan2 = yy,
// Isfire = isfire,
// costTime2 = costtime,
// penetime2 = penetime
// });
// await Task.Delay(100);
// }
// catch (Exception ex)
// {
// Debug.WriteLine($"报表插入失败: {ex.Message}");
// }
//}
private async Task<bool> ReadCoilWithCheckAsync(int address)
{
var result = await ReadModbusCoilAsync((ushort)address, 1);

View File

@@ -128,7 +128,7 @@ namespace 外科辅料和患者防护罩激光抗性测试仪
ReadFloatAsync(38,2,uiLabel7,"F1",""),//点火时间
ReadFloatAsync(44,2,uiLabel8,"F1",""),//余焰时间
ReadFloatAsync(48,2,uiLabel12,"F1",""),//余辉时间
ReadFloatAsync(34,2,uiLabel37,"F1",""),//总测试时间
ReadFloatAsync(34,1,uiLabel37,"F1",""),//总测试时间
ReadLightStatusAsync(),