diff --git a/ProductionSystem/Forms/HomeForm.Designer.cs b/ProductionSystem/Forms/HomeFormInfo.Designer.cs similarity index 99% rename from ProductionSystem/Forms/HomeForm.Designer.cs rename to ProductionSystem/Forms/HomeFormInfo.Designer.cs index f6b9a64..9510a34 100644 --- a/ProductionSystem/Forms/HomeForm.Designer.cs +++ b/ProductionSystem/Forms/HomeFormInfo.Designer.cs @@ -1,6 +1,6 @@ namespace ProductionSystem.Forms { - partial class HomeForm + partial class HomeFormInfo { /// /// Required designer variable. diff --git a/ProductionSystem/Forms/HomeForm.cs b/ProductionSystem/Forms/HomeFormInfo.cs similarity index 96% rename from ProductionSystem/Forms/HomeForm.cs rename to ProductionSystem/Forms/HomeFormInfo.cs index 5eab489..346e2ce 100644 --- a/ProductionSystem/Forms/HomeForm.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -38,7 +38,7 @@ using System.Collections; namespace ProductionSystem.Forms { - public partial class HomeForm : XtraForm + public partial class HomeFormInfo : XtraForm { private readonly DicService _dicService = new DicService(); private readonly ParaColumnConfigService _paraColumnConfigService = new ParaColumnConfigService(); @@ -60,7 +60,7 @@ namespace ProductionSystem.Forms CancellationToken cureCancellationToken; - public HomeForm() + public HomeFormInfo() { InitializeComponent(); // Program.ProtocolDeviceHelper = new ProtocolDeviceHelper(); @@ -1992,9 +1992,68 @@ namespace ProductionSystem.Forms { head = GetPlcValue("D1100").ToDouble().ToInt(); } + //电流采集值 + if (testResultPoint.Address == "D1202") + { + head = GetPlcValue("D1102").ToDouble().ToInt(); + } + } + else if(paraCategory == "BZ2") + { + //电压采集值 + if (testResultPoint.Address == "D1204") + { + head = GetPlcValue("D1104").ToDouble().ToInt(); + } + //电流采集值 + if (testResultPoint.Address == "D1206") + { + head = GetPlcValue("D1106").ToDouble().ToInt(); + } + } + else if (paraCategory == "BZ3") + { + //电压采集值 + if (testResultPoint.Address == "D1208") + { + head = GetPlcValue("D1108").ToDouble().ToInt(); + } + //电流采集值 + if (testResultPoint.Address == "D1210") + { + head = GetPlcValue("D1110").ToDouble().ToInt(); + } + } + else if (paraCategory == "BZ4") + { + if (testResultPoint.Address == "D1224") + { + head = GetPlcValue("D1226").ToDouble().ToInt(); + } } - - + else if (paraCategory == "BZ5") + { + if (testResultPoint.Address == "D1214") + { + head = GetPlcValue("D1114").ToDouble().ToInt(); + } + } + else if (paraCategory == "BZ6") + { + if (testResultPoint.Address == "D1216") + { + head = GetPlcValue("D1116").ToDouble().ToInt(); + } + } + else if (paraCategory == "BZ7") + { + if (testResultPoint.Address == "D1212") + { + head = GetPlcValue("D1112").ToDouble().ToInt(); + } + } + + var testResult = OmronHelper.GetPlcVal(testResultPoint.DataType, testResultPoint.Address); testResultPoint.Val = testResult.val; result = testResult.val; @@ -2113,7 +2172,7 @@ namespace ProductionSystem.Forms control.TestResultText = "NG"; break; } - + //control.TestResultBackColor = Color.Red; } diff --git a/ProductionSystem/Forms/HomeForm.resx b/ProductionSystem/Forms/HomeFormInfo.resx similarity index 100% rename from ProductionSystem/Forms/HomeForm.resx rename to ProductionSystem/Forms/HomeFormInfo.resx diff --git a/ProductionSystem/Forms/MainForm.cs b/ProductionSystem/Forms/MainForm.cs index 6b85a34..fe16dbf 100644 --- a/ProductionSystem/Forms/MainForm.cs +++ b/ProductionSystem/Forms/MainForm.cs @@ -177,7 +177,7 @@ namespace ProductionSystem.Forms case "bar_BtnShowIndex"://首页 if (!CheckHasMdiChildForm("HomeForm")) { - HomeForm homeForm = new HomeForm + HomeFormInfo homeForm = new HomeFormInfo { MdiParent = this, Dock = DockStyle.Fill diff --git a/ProductionSystem/ProductionSystem.csproj b/ProductionSystem/ProductionSystem.csproj index c8b91f4..0578b9f 100644 --- a/ProductionSystem/ProductionSystem.csproj +++ b/ProductionSystem/ProductionSystem.csproj @@ -234,11 +234,11 @@ MyBaseForm.cs - + Form - - HomeForm.cs + + HomeFormInfo.cs Form @@ -435,8 +435,8 @@ MyBaseForm.cs - - HomeForm.cs + + HomeFormInfo.cs MainForm.cs