From 12c1c397fea885047649c94060a840102caf71da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Fri, 22 Dec 2023 15:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=8B=E5=8A=9B=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/DeviceDetailEntity.cs | 11 ++++ .../Entity/PlcReadTempEntity.cs | 6 ++ .../MainDetailControlAction.cs | 10 ++++ .../Data/MCProject/nodeForm/MainDetail.xml | 60 +++++++++++++++++++ 4 files changed, 87 insertions(+) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs index 2ae4c29..291a4ed 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/DeviceDetailEntity.cs @@ -232,6 +232,13 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public MCLabel PresDaybin10 { get; set; } public MCLabel PresDaybin11 { get; set; } public MCLabel PresDaybin12 { get; set; } + + + public MCLabel PR2PCP01 { get; set; } + + public MCLabel PR2PCP02 { get; set; } + + public MCLabel PR2PCP03 { get; set; } } public class SwitchLightEntity @@ -549,6 +556,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public ThreeWayValve DV2PCP12 { get; set; } public ThreeWayValve DV2PCP13 { get; set; } public ThreeWayValve DV2PCP14 { get; set; } + + + + } //public class DeviceDetailEntity diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs index b079f49..71d0d0e 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/PlcReadTempEntity.cs @@ -509,5 +509,11 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity public bool DV2PCP13_AlarmR { get; set; } public bool DV2PCP14_AlarmR { get; set; } + + + public float PR2PCP01_Set { get; set; } + public float PR2PCP02_Set { get; set; } + public float PR2PCP03_Set { get; set; } + } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index b073395..0cfc247 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -965,6 +965,10 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DV2PCP13_AlarmR = DB2102.DV2PCP13.AlarmRightPosition; PlcReadTemp.DV2PCP14_AlarmR = DB2102.DV2PCP14.AlarmRightPosition; + PlcReadTemp.PR2PCP01_Set = DB2107.Pressure.PR2PCP01.ActualValue; + PlcReadTemp.PR2PCP02_Set = DB2107.Pressure.PR2PCP02.ActualValue; + PlcReadTemp.PR2PCP03_Set = DB2107.Pressure.PR2PCP03.ActualValue; + ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP01, PlcReadTemp.DV2PCP01_AlarmR, PlcReadTemp.DV2PCP01_SetR, PlcReadTemp.DV2PCP01_AlarmL, PlcReadTemp.DV2PCP01_SetL, 4); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP02, PlcReadTemp.DV2PCP02_AlarmR, PlcReadTemp.DV2PCP02_SetR, PlcReadTemp.DV2PCP02_AlarmL, PlcReadTemp.DV2PCP02_SetL, 0); @@ -1345,6 +1349,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); + + + + LabelE.PR2PCP01.MCValue = (float)Math.Round(PlcReadTemp.PR2PCP01_Set, 2); + LabelE.PR2PCP02.MCValue = (float)Math.Round(PlcReadTemp.PR2PCP02_Set, 2); + LabelE.PR2PCP03.MCValue = (float)Math.Round(PlcReadTemp.PR2PCP03_Set, 2); } /// diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index 2a5e290..16afaf1 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,6 +1,66 @@ + + + + Red + DarkGray + + + False + + + + None + True + True + 0 + ButtonHighlight + 722, 25 + PR2PCP03 + 11, 12 + + + + + Red + DarkGray + + + False + + + + None + True + True + 0 + ButtonHighlight + 741, 125 + PR2PCP02 + 11, 12 + + + + + Red + DarkGray + + + False + + + + None + True + True + 0 + ButtonHighlight + 767, 77 + PR2PCP01 + 11, 12 + 1863, 473 FeededPDG8