From 87be1d70527f4096e05fc670e90ac93bb363dfca Mon Sep 17 00:00:00 2001 From: wangsr Date: Mon, 18 Dec 2023 11:23:24 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E8=AE=BE=E5=A4=87=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E7=9B=91=E6=8E=A7=E4=B8=89=E9=80=9A=E9=98=80=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjDeliver/DeliverInitAction.cs | 60 +-- .../LjDeliver/Entity/DeliverEntity.cs | 19 - .../LjDeliver/Entity/PlcTempEntity.cs | 16 - .../MainDetailControlAction.cs | 8 +- .../Mesnac.Controls.ChemicalWeighing.csproj | 28 +- ...eeWayValueCL0.png => ThreeWayValveCL0.png} | Bin ...eeWayValueCL1.png => ThreeWayValveCL1.png} | Bin ...eeWayValueCL2.png => ThreeWayValveCL2.png} | Bin ...yValueCLAll.png => ThreeWayValveCLAll.png} | Bin ...CLHError.png => ThreeWayValveCLHError.png} | Bin ...HVError.png => ThreeWayValveCLHVError.png} | Bin ...CLVError.png => ThreeWayValveCLVError.png} | Bin ...eeWayValueCR0.png => ThreeWayValveCR0.png} | Bin ...eeWayValueCR1.png => ThreeWayValveCR1.png} | Bin ...eeWayValueCR2.png => ThreeWayValveCR2.png} | Bin ...yValueCRAll.png => ThreeWayValveCRAll.png} | Bin ...CRHError.png => ThreeWayValveCRHError.png} | Bin ...HVError.png => ThreeWayValveCRHVError.png} | Bin ...CRVError.png => ThreeWayValveCRVError.png} | Bin DataBlockHelper/PlcConnect.cs | 11 +- .../Data/MCProject/nodeForm/LjDeliver.xml | 46 ++- .../Data/MCProject/nodeForm/MainDetail.xml | 380 +++++------------- 22 files changed, 159 insertions(+), 409 deletions(-) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCL0.png => ThreeWayValveCL0.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCL1.png => ThreeWayValveCL1.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCL2.png => ThreeWayValveCL2.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCLAll.png => ThreeWayValveCLAll.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCLHError.png => ThreeWayValveCLHError.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCLHVError.png => ThreeWayValveCLHVError.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCLVError.png => ThreeWayValveCLVError.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCR0.png => ThreeWayValveCR0.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCR1.png => ThreeWayValveCR1.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCR2.png => ThreeWayValveCR2.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCRAll.png => ThreeWayValveCRAll.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCRHError.png => ThreeWayValveCRHError.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCRHVError.png => ThreeWayValveCRHVError.png} (100%) rename Controls/Mesnac.Controls.ChemicalWeighing/Resources/{ThreeWayValueCRVError.png => ThreeWayValveCRVError.png} (100%) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs index b31232a..807b4c8 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/DeliverInitAction.cs @@ -34,11 +34,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB1Helper DB1 = new DB1Helper(); DB90Helper DB90 = new DB90Helper(); - DB2103Helper DB2103 = new DB2103Helper(); byte[] b1; - byte[] b90; //db1\90\2103的byte数组 - byte[] b2103; + byte[] b90; //db1/90的byte数组 /// /// 所有Alarm点位 @@ -56,7 +54,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver //JzfEntity JzfE = new JzfEntity(); ThreeWayValveEntity ThreeWayValveE = new ThreeWayValveEntity(); LjSwitchEntity LjSwitchE = new LjSwitchEntity(); - RSCREWBIGEntity RSCREWBIGE = new RSCREWBIGEntity(); MCLabelEntity LabelE = new MCLabelEntity(); /// @@ -102,7 +99,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver //ControlsHelper.ControlImport(JzfE, Controls); ControlsHelper.ControlImport(ThreeWayValveE, Controls); ControlsHelper.ControlImport(LjSwitchE, Controls); - ControlsHelper.ControlImport(RSCREWBIGE, Controls); ControlsHelper.ControlImport(LabelE, Controls); this.AlarmMoveText.Font = new Font("宋体", 15f, FontStyle.Regular, GraphicsUnit.Point, 134); @@ -121,39 +117,18 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver DB1 = new DB1Helper(); DB90 = new DB90Helper(); - DB2103 = new DB2103Helper(); DB1GetData(); DB90GetData(); - DB2103GetData(); DB1SetData(); DB90SetData(); - DB2103SetData(); AlarmControl(); } #region plc读取前端控件值写入 - private void DB2103GetData() - { - PlcTemp.DM1ASF01_Set = DB2103.DM1ASF01.Run; - PlcTemp.DM1BSF01_Set = DB2103.DM1BSF01.Run; - PlcTemp.DM1CSF01_Set = DB2103.DM1CSF01.Run; - PlcTemp.DM1DSF01_Set = DB2103.DM1DSF01.Run; - PlcTemp.DM1ESF01_Set = DB2103.DM1ESF01.Run; - PlcTemp.DM1FSF01_Set = DB2103.DM1FSF01.Run; - PlcTemp.DM1GSF01_Set = DB2103.DM1GSF01.Run; - PlcTemp.DM1HSF01_Set = DB2103.DM1HSF01.Run; - PlcTemp.DM1ISF01_Set = DB2103.DM1ISF01.Run; - PlcTemp.DM1JSF01_Set = DB2103.DM1JSF01.Run; - PlcTemp.DM1KSF01_Set = DB2103.DM1KSF01.Run; - PlcTemp.DM1LSF01_Set = DB2103.DM1LSF01.Run; - PlcTemp.DM1MSF01_Set = DB2103.DM1MSF01.Run; - PlcTemp.DM1NSF01_Set = DB2103.DM1NSF01.Run; - PlcTemp.DM1OSF01_Set = DB2103.DM1OSF01.Running; - } private void DB1GetData() { @@ -437,26 +412,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver PlcTemp.DV1PCP20_AlarmR = DB90.DV1PCP20.AlarmRightPosition; } - private void DB2103SetData() - { - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ASF01, PlcTemp.DM1ASF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1BSF01, PlcTemp.DM1BSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1CSF01, PlcTemp.DM1CSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1DSF01, PlcTemp.DM1DSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ESF01, PlcTemp.DM1ESF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1FSF01, PlcTemp.DM1FSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1GSF01, PlcTemp.DM1GSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1HSF01, PlcTemp.DM1HSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1ISF01, PlcTemp.DM1ISF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1JSF01, PlcTemp.DM1JSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1KSF01, PlcTemp.DM1KSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1LSF01, PlcTemp.DM1LSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1MSF01, PlcTemp.DM1MSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1NSF01, PlcTemp.DM1NSF01_Set); - ControlsHelper.SetRSCREWBIG(RSCREWBIGE.DM1OSF01, PlcTemp.DM1OSF01_Set); - - } - private void DB1SetData() { ControlsHelper.SetMCLabel(LabelE.PR1ASI01, PlcTemp.PR1ASI01_Set); @@ -594,7 +549,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP01, PlcTemp.DV1PCP01_AlarmR, PlcTemp.DV1PCP01_SetR, PlcTemp.DV1PCP01_AlarmL, PlcTemp.DV1PCP01_SetL, 2); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP02, PlcTemp.DV1PCP02_AlarmR, PlcTemp.DV1PCP02_SetR, PlcTemp.DV1PCP02_AlarmL, PlcTemp.DV1PCP02_SetL, 2); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP03, PlcTemp.DV1PCP03_AlarmR, PlcTemp.DV1PCP03_SetR, PlcTemp.DV1PCP03_AlarmL, PlcTemp.DV1PCP03_SetL, 0); - ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP04, PlcTemp.DV1PCP04_AlarmR, PlcTemp.DV1PCP04_SetR, PlcTemp.DV1PCP04_AlarmL, PlcTemp.DV1PCP04_SetL, 0); + ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP04, PlcTemp.DV1PCP04_AlarmR, PlcTemp.DV1PCP04_SetR, PlcTemp.DV1PCP04_AlarmL, PlcTemp.DV1PCP04_SetL, 3); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP05, PlcTemp.DV1PCP05_AlarmR, PlcTemp.DV1PCP05_SetR, PlcTemp.DV1PCP05_AlarmL, PlcTemp.DV1PCP05_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP06, PlcTemp.DV1PCP06_AlarmR, PlcTemp.DV1PCP06_SetR, PlcTemp.DV1PCP06_AlarmL, PlcTemp.DV1PCP06_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP07, PlcTemp.DV1PCP07_AlarmR, PlcTemp.DV1PCP07_SetR, PlcTemp.DV1PCP07_AlarmL, PlcTemp.DV1PCP07_SetL, 2); @@ -606,7 +561,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP13, PlcTemp.DV1PCP13_AlarmR, PlcTemp.DV1PCP13_SetR, PlcTemp.DV1PCP13_AlarmL, PlcTemp.DV1PCP13_SetL, 1); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP14, PlcTemp.DV1PCP14_AlarmR, PlcTemp.DV1PCP14_SetR, PlcTemp.DV1PCP14_AlarmL, PlcTemp.DV1PCP14_SetL, 1); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP15, PlcTemp.DV1PCP15_AlarmR, PlcTemp.DV1PCP15_SetR, PlcTemp.DV1PCP15_AlarmL, PlcTemp.DV1PCP15_SetL, 0); - ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP16, PlcTemp.DV1PCP16_AlarmL, PlcTemp.DV1PCP16_SetL, PlcTemp.DV1PCP16_AlarmR, PlcTemp.DV1PCP16_SetR, 2); + ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP16, PlcTemp.DV1PCP16_AlarmR, PlcTemp.DV1PCP16_SetR, PlcTemp.DV1PCP16_AlarmL, PlcTemp.DV1PCP16_SetL, 2); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP17, PlcTemp.DV1PCP17_AlarmR, PlcTemp.DV1PCP17_SetR, PlcTemp.DV1PCP17_AlarmL, PlcTemp.DV1PCP17_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP18, PlcTemp.DV1PCP18_AlarmR, PlcTemp.DV1PCP18_SetR, PlcTemp.DV1PCP18_AlarmL, PlcTemp.DV1PCP18_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeWayValveE.DV1PCP19, PlcTemp.DV1PCP19_AlarmR, PlcTemp.DV1PCP19_SetR, PlcTemp.DV1PCP19_AlarmL, PlcTemp.DV1PCP19_SetL, 0); @@ -622,7 +577,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver { b1 = DB1.bytes; b90 = DB90.bytes; - b2103 = DB2103.bytes; StringBuilder sb = new StringBuilder(); @@ -643,14 +597,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver sb.Append(rows["Alarm_Cn_Info"].ToString()); sb.Append(@" \ "); } - else if ((int)rows["Alarm_Block"] == 2103 && b2103[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true - && (int)rows["Alarm_Word"] >= 81 && (int)rows["Alarm_Word"] <= 165) - { - sb.Append(rows["Alarm_Other_Info"].ToString()); - sb.Append(" "); - sb.Append(rows["Alarm_Cn_Info"].ToString()); - sb.Append(@" \ "); - } } string str = sb.ToString(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs index d4e38e5..8ba6cc2 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/DeliverEntity.cs @@ -67,25 +67,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity } - internal class RSCREWBIGEntity - { - public RSCREWBIG DM1ASF01 { get; set; } - public RSCREWBIG DM1BSF01 { get; set; } - public RSCREWBIG DM1CSF01 { get; set; } - public RSCREWBIG DM1DSF01 { get; set; } - public RSCREWBIG DM1ESF01 { get; set; } - public RSCREWBIG DM1FSF01 { get; set; } - public RSCREWBIG DM1GSF01 { get; set; } - public RSCREWBIG DM1HSF01 { get; set; } - public RSCREWBIG DM1ISF01 { get; set; } - public RSCREWBIG DM1JSF01 { get; set; } - public RSCREWBIG DM1KSF01 { get; set; } - public RSCREWBIG DM1LSF01 { get; set; } - public RSCREWBIG DM1MSF01 { get; set; } - public RSCREWBIG DM1NSF01 { get; set; } - public RSCREWBIG DM1OSF01 { get; set; } - } - internal class LjSwitchEntity { public LjSwith BU1DBT01 { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs index a592fb7..a7a8100 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliver/Entity/PlcTempEntity.cs @@ -65,22 +65,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver.Entity public float PR2DBT01_Set { get; set; } public float PR3DBT01_Set { get; set; } - public bool DM1ASF01_Set { get; set; } - public bool DM1BSF01_Set { get; set; } - public bool DM1CSF01_Set { get; set; } - public bool DM1DSF01_Set { get; set; } - public bool DM1ESF01_Set { get; set; } - public bool DM1FSF01_Set { get; set; } - public bool DM1GSF01_Set { get; set; } - public bool DM1HSF01_Set { get; set; } - public bool DM1ISF01_Set { get; set; } - public bool DM1JSF01_Set { get; set; } - public bool DM1KSF01_Set { get; set; } - public bool DM1LSF01_Set { get; set; } - public bool DM1MSF01_Set { get; set; } - public bool DM1NSF01_Set { get; set; } - public bool DM1OSF01_Set { get; set; } - public bool BU1DBT01_Set { get; set; } public bool BU1DBT02_Set { get; set; } public bool BU1DBT03_Set { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs index 4ebbd94..c1781b6 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs @@ -893,7 +893,7 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DV2PCP03_AlarmR = DB2102.DV2PCP03.AlarmRightPosition; PlcReadTemp.DV2PCP04_AlarmR = DB2102.DV2PCP04.AlarmRightPosition; PlcReadTemp.DV2PCP05_AlarmR = DB2102.DV2PCP05.AlarmRightPosition; - PlcReadTemp.DV2PCP06_AlarmR = DB2102.DV2PCP06.AlarmRightPosition; + PlcReadTemp.DV2PCP06_AlarmR = DB2102.DV2PCP06.AlarmRightPosition; PlcReadTemp.DV2PCP07_AlarmR = DB2102.DV2PCP07.AlarmRightPosition; PlcReadTemp.DV2PCP08_AlarmR = DB2102.DV2PCP08.AlarmRightPosition; PlcReadTemp.DV2PCP09_AlarmR = DB2102.DV2PCP09.AlarmRightPosition; @@ -904,13 +904,13 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl PlcReadTemp.DV2PCP14_AlarmR = DB2102.DV2PCP14.AlarmRightPosition; - ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP01, PlcReadTemp.DV2PCP01_AlarmR, PlcReadTemp.DV2PCP01_SetR, PlcReadTemp.DV2PCP01_AlarmL, PlcReadTemp.DV2PCP01_SetL, 0); + 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); - ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP03, PlcReadTemp.DV2PCP03_AlarmR, PlcReadTemp.DV2PCP03_SetR, PlcReadTemp.DV2PCP03_AlarmL, PlcReadTemp.DV2PCP03_SetL, 0); + ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP03, PlcReadTemp.DV2PCP03_AlarmL, PlcReadTemp.DV2PCP03_SetL, PlcReadTemp.DV2PCP03_AlarmR, PlcReadTemp.DV2PCP03_SetR, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP04, PlcReadTemp.DV2PCP04_AlarmR, PlcReadTemp.DV2PCP04_SetR, PlcReadTemp.DV2PCP04_AlarmL, PlcReadTemp.DV2PCP04_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP05, PlcReadTemp.DV2PCP05_AlarmR, PlcReadTemp.DV2PCP05_SetR, PlcReadTemp.DV2PCP05_AlarmL, PlcReadTemp.DV2PCP05_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP06, PlcReadTemp.DV2PCP06_AlarmR, PlcReadTemp.DV2PCP06_SetR, PlcReadTemp.DV2PCP06_AlarmL, PlcReadTemp.DV2PCP06_SetL, 0); - ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP07, PlcReadTemp.DV2PCP07_AlarmR, PlcReadTemp.DV2PCP07_SetR, PlcReadTemp.DV2PCP07_AlarmL, PlcReadTemp.DV2PCP07_SetL, 0); + ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP07, PlcReadTemp.DV2PCP07_AlarmL, PlcReadTemp.DV2PCP07_SetL, PlcReadTemp.DV2PCP07_AlarmR, PlcReadTemp.DV2PCP07_SetR, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP08, PlcReadTemp.DV2PCP08_AlarmR, PlcReadTemp.DV2PCP08_SetR, PlcReadTemp.DV2PCP08_AlarmL, PlcReadTemp.DV2PCP08_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP09, PlcReadTemp.DV2PCP09_AlarmR, PlcReadTemp.DV2PCP09_SetR, PlcReadTemp.DV2PCP09_AlarmL, PlcReadTemp.DV2PCP09_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP10, PlcReadTemp.DV2PCP10_AlarmR, PlcReadTemp.DV2PCP10_SetR, PlcReadTemp.DV2PCP10_AlarmL, PlcReadTemp.DV2PCP10_SetL, 0); diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj index 3c5e168..60f66e0 100644 --- a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj +++ b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj @@ -713,20 +713,6 @@ - - - - - - - - - - - - - - @@ -734,6 +720,20 @@ + + + + + + + + + + + + + + diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL0.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL0.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL0.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL0.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL1.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL1.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL1.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL1.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL2.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL2.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCL2.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCL2.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLAll.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLAll.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLAll.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLAll.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLHError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLHError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLHError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLHError.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLHVError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLHVError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLHVError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLHVError.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLVError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLVError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCLVError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCLVError.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR0.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR0.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR0.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR0.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR1.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR1.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR1.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR1.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR2.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR2.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCR2.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCR2.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRAll.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRAll.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRAll.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRAll.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRHError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRHError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRHError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRHError.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRHVError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRHVError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRHVError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRHVError.png diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRVError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRVError.png similarity index 100% rename from Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValueCRVError.png rename to Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveCRVError.png diff --git a/DataBlockHelper/PlcConnect.cs b/DataBlockHelper/PlcConnect.cs index c85771c..8681fd3 100644 --- a/DataBlockHelper/PlcConnect.cs +++ b/DataBlockHelper/PlcConnect.cs @@ -21,13 +21,20 @@ namespace DataBlockHelper SiemensPLCS siemensPLCS = SiemensPLCS.S1500; SiemensS7Net s7 = new SiemensS7Net(siemensPLCS); s7.SetPersistentConnection(); - s7.IpAddress = "192.168.1.110"; + //s7.IpAddress = "192.168.1.110"; + s7.IpAddress = "127.18.4.100"; s7.Port = 102; var su = s7.ConnectServer(); if (!su.IsSuccess) { - + s7.IpAddress = "192.168.0.100"; + s7.Port = 7788; + var su1 = s7.ConnectServer(); + if (!su1.IsSuccess) + { + return new SiemensS7Net(siemensPLCS); + } } return s7; diff --git a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml index 0e29bcd..5c92a92 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/LjDeliver.xml @@ -1,6 +1,24 @@ + + + + + + False + + + + None + True + True + MiddleCenter + White + 598, 107 + SpecialLabelBlue503 + 3, 16 + @@ -335,7 +353,7 @@ - 572, 95 + 557, 97 DV1PCP04 22, 12 @@ -362,9 +380,9 @@ True MiddleCenter White - 584, 72 + 572, 72 SpecialLabelBlue511 - 786, 3 + 798, 3 @@ -380,7 +398,7 @@ True MiddleCenter White - 584, 73 + 572, 73 SpecialLabelBlue512 3, 30 @@ -903,7 +921,7 @@ True MiddleCenter 128, 255, 128 - 1386, 141 + 1386, 140 SpecialLabelBlue679 3, 14 @@ -939,7 +957,7 @@ True MiddleCenter 128, 255, 128 - 1505, 141 + 1505, 140 SpecialLabelBlue677 3, 14 @@ -1440,7 +1458,7 @@ - 602, 98 + 585, 98 DV1PCP11 22, 12 @@ -1449,7 +1467,7 @@ - 608, 117 + 603, 120 DV1PCP12 22, 12 @@ -1467,9 +1485,9 @@ True MiddleCenter White - 621, 119 + 598, 123 SpecialLabelBlue662 - 55, 3 + 78, 3 @@ -1494,9 +1512,9 @@ True MiddleCenter White - 616, 101 + 616, 123 SpecialLabelBlue661 - 3, 50 + 3, 28 @@ -1512,9 +1530,9 @@ True MiddleCenter White - 673, 121 + 673, 123 SpecialLabelBlue660 - 3, 34 + 3, 32 diff --git a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml index b09fc4c..af172fb 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/MainDetail.xml @@ -1,6 +1,60 @@ + + + + + + False + + + + None + True + True + MiddleCenter + MintCream + 858, 78 + SpecialLabelBlue273 + 3, 21 + + + + + + + False + + + + None + True + True + MiddleCenter + MintCream + 778, 128 + SpecialLabelBlue274 + 3, 22 + + + + + + + False + + + + None + True + True + MiddleCenter + MintCream + 871, 25 + SpecialLabelBlue275 + 3, 21 + @@ -8226,21 +8280,6 @@ Xie3 24, 8 - - 739, 168 - Chuiqizhi3 - 8, 20 - - - 761, 168 - Chuiqizhi2 - 8, 20 - - - 717, 167 - Chuiqizhi1 - 8, 20 - 660, 226 Xie2 @@ -9060,9 +9099,9 @@ True MiddleCenter MintCream - 661, 223 + 662, 223 SpecialLabelBlue369 - 28, 3 + 27, 3 @@ -9094,7 +9133,7 @@ - 679, 245 + 680, 243 DV2PCP01 22, 12 @@ -9114,7 +9153,7 @@ MintCream 686, 223 SpecialLabelBlue373 - 3, 33 + 3, 29 @@ -10076,7 +10115,7 @@ - 902, 92 + 884, 94 DV2PCP07 22, 12 @@ -10085,7 +10124,7 @@ - 912, 38 + 899, 40 DV2PCP05 22, 12 @@ -10094,9 +10133,9 @@ - 800, 146 + 799, 148 DV2PCP03 - 22, 12 + 22, 10 @@ -10776,16 +10815,16 @@ True MiddleCenter MintCream - 1465, 20 + 1465, 25 SpecialLabelBlue494 - 3, 182 + 3, 177 - 1454, 14 + 1451, 14 DV2PCP11 22, 12 @@ -10803,16 +10842,16 @@ True MiddleCenter MintCream - 1452, 78 + 1452, 80 SpecialLabelBlue495 - 3, 126 + 3, 124 - 1438, 71 + 1438, 69 DV2PCP12 22, 12 @@ -10830,9 +10869,9 @@ True MiddleCenter MintCream - 1556, 125 + 1556, 127 SpecialLabelBlue496 - 3, 78 + 3, 76 @@ -10857,9 +10896,9 @@ True MiddleCenter MintCream - 1368, 125 + 1368, 129 SpecialLabelBlue497 - 3, 81 + 3, 77 @@ -11154,9 +11193,9 @@ True MiddleCenter MintCream - 912, 43 + 872, 43 SpecialLabelBlue509 - 305, 3 + 345, 3 @@ -11172,73 +11211,9 @@ True MiddleCenter MintCream - 899, 96 + 859, 96 SpecialLabelBlue510 - 312, 3 - - - - TurnOff - 923, 27 - Jzf29 - 13, 11 - - - - TurnOff - 923, 81 - Jzf28 - 13, 11 - - - - TurnOff - 921, 52 - Jzf27 - 13, 11 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 899, 57 - SpecialLabelBlue512 - 28, 1 - - - - - 896, 40 - fdsfdsfgfbn - 14, 13 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 899, 34 - SpecialLabelBlue511 - 1, 23 + 352, 3 @@ -11254,69 +11229,19 @@ True MiddleCenter MintCream - 912, 22 + 912, 43 SpecialLabelBlue513 - 3, 185 + 3, 164 - 899, 14 + 857, 14 DV2PCP04 22, 12 - - - TurnOff - 921, 104 - Jzf26 - 13, 11 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 868, 108 - SpecialLabelBlue515 - 59, 1 - - - - - 865, 91 - LjSwith329 - 14, 13 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 868, 88 - SpecialLabelBlue514 - 1, 20 - @@ -11331,16 +11256,16 @@ True MiddleCenter MintCream - 898, 74 + 898, 96 SpecialLabelBlue516 - 3, 130 + 3, 108 - 884, 66 + 844, 66 DV2PCP06 22, 12 @@ -11376,9 +11301,9 @@ True MiddleCenter MintCream - 1126, 156 + 1126, 159 SpecialLabelBlue518 - 3, 53 + 3, 49 @@ -11389,13 +11314,6 @@ DV2PCP09 22, 12 - - - TurnOff - 817, 159 - Jzf25 - 13, 11 - @@ -11410,9 +11328,9 @@ True MiddleCenter MintCream - 1004, 156 + 1004, 159 SpecialLabelBlue519 - 3, 53 + 3, 50 @@ -11437,59 +11355,9 @@ True MiddleCenter MintCream - 802, 150 + 778, 150 SpecialLabelBlue520 - 516, 3 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 788, 164 - SpecialLabelBlue521 - 37, 1 - - - - - 785, 147 - LjSwith330 - 14, 13 - - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 788, 136 - SpecialLabelBlue522 - 1, 28 - - - - TurnOff - 818, 132 - Jzf24 - 13, 11 + 540, 3 @@ -11505,16 +11373,16 @@ True MiddleCenter MintCream - 812, 126 + 812, 150 SpecialLabelBlue523 - 3, 78 + 3, 54 - 800, 116 + 764, 117 DV2PCP02 22, 12 @@ -11992,24 +11860,6 @@ StorageBinViewBig12 46, 51 - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 747, 136 - SpecialLabelBlue542 - 79, 1 - @@ -12028,24 +11878,6 @@ SpecialLabelBlue541 1136, 3 - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 769, 87 - SpecialLabelBlue544 - 162, 1 - @@ -12064,24 +11896,6 @@ SpecialLabelBlue543 1009, 3 - - - - - - False - - - - None - True - True - MiddleCenter - Aqua - 725, 33 - SpecialLabelBlue547 - 205, 1 - @@ -12114,9 +11928,9 @@ True MiddleCenter Aqua - 769, 87 + 769, 198 SpecialLabelBlue548 - 1, 224 + 1, 113 @@ -12150,9 +11964,9 @@ True MiddleCenter Aqua - 747, 136 + 747, 196 SpecialLabelBlue550 - 1, 151 + 1, 91 @@ -12186,9 +12000,9 @@ True MiddleCenter Aqua - 725, 34 + 725, 194 SpecialLabelBlue552 - 1, 230 + 1, 70