From b20ef12c7e64188a8e350f1a55e372b293345ff5 Mon Sep 17 00:00:00 2001 From: nodyang Date: Tue, 18 Jul 2023 20:26:27 +0800 Subject: [PATCH] asd --- .../BasePlcHelper.cs | 257 +++ .../LjDry/DryPlc.cs | 1647 +++++++++++++++++ .../LjDry/DrySettingView.cs | 21 + .../LjElectrical/ElectricalPlc.cs | 628 +++++++ .../LjElectrical/ElectricalView.cs | 9 + .../Mesnac.Action.ChemicalWeighing.csproj | 4 + Main/MCEdit/Data/MCProject/nodeDevice.xml | 12 +- 7 files changed, 2573 insertions(+), 5 deletions(-) create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DryPlc.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DrySettingView.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalPlc.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalView.cs diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs index bf4b1f5..f1cd934 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs @@ -1585,5 +1585,262 @@ namespace Mesnac.Action.ChemicalWeighing public DataKeyValue Water3_JogTime { get; set; } + + public DataKeyValue SpeedD1 { get; set; } + public DataKeyValue SpeedD2 { get; set; } + public DataKeyValue SpeedD3 { get; set; } + public DataKeyValue SpeedD4 { get; set; } + + public DataKeyValue SpeedG1 { get; set; } + public DataKeyValue SpeedG2 { get; set; } + public DataKeyValue SpeedG3 { get; set; } + public DataKeyValue SpeedG4 { get; set; } + + public DataKeyValue SpeedG5 { get; set; } + public DataKeyValue SpeedG6 { get; set; } + public DataKeyValue SpeedG7 { get; set; } + public DataKeyValue SpeedG8 { get; set; } + + + public DataKeyValue SpeedH1 { get; set; } + public DataKeyValue SpeedH2 { get; set; } + public DataKeyValue SpeedH3 { get; set; } + public DataKeyValue SpeedH4 { get; set; } + + + public DataKeyValue SpeedS1 { get; set; } + public DataKeyValue SpeedS5 { get; set; } + public DataKeyValue SpeedS7 { get; set; } + public DataKeyValue SpeedS11 { get; set; } + public DataKeyValue SpeedS15 { get; set; } + + + + + public DataKeyValue Dryer0_mode { get; set; } + public DataKeyValue Dryer0_status { get; set; } + public DataKeyValue Dryer0_batch { get; set; } + public DataKeyValue Dryer0_step { get; set; } + public DataKeyValue Dryer0_stepCode { get; set; } + public DataKeyValue Dryer0_totalTime { get; set; } + public DataKeyValue Dryer0_stepTime { get; set; } + public DataKeyValue Dryer0_temperature { get; set; } + public DataKeyValue Dryer0_speed { get; set; } + public DataKeyValue Dryer0_currnet { get; set; } + public DataKeyValue Dryer0_pressure { get; set; } + + public DataKeyValue Dryer1_mode { get; set; } + public DataKeyValue Dryer1_status { get; set; } + public DataKeyValue Dryer1_batch { get; set; } + public DataKeyValue Dryer1_step { get; set; } + public DataKeyValue Dryer1_stepCode { get; set; } + public DataKeyValue Dryer1_totalTime { get; set; } + public DataKeyValue Dryer1_stepTime { get; set; } + public DataKeyValue Dryer1_temperature { get; set; } + public DataKeyValue Dryer1_speed { get; set; } + public DataKeyValue Dryer1_currnet { get; set; } + public DataKeyValue Dryer1_pressure { get; set; } + public DataKeyValue Dryer2_mode { get; set; } + public DataKeyValue Dryer2_status { get; set; } + public DataKeyValue Dryer2_batch { get; set; } + public DataKeyValue Dryer2_step { get; set; } + public DataKeyValue Dryer2_stepCode { get; set; } + public DataKeyValue Dryer2_totalTime { get; set; } + public DataKeyValue Dryer2_stepTime { get; set; } + public DataKeyValue Dryer2_temperature { get; set; } + public DataKeyValue Dryer2_speed { get; set; } + public DataKeyValue Dryer2_currnet { get; set; } + public DataKeyValue Dryer2_pressure { get; set; } + public DataKeyValue Dryer3_mode { get; set; } + public DataKeyValue Dryer3_status { get; set; } + public DataKeyValue Dryer3_batch { get; set; } + public DataKeyValue Dryer3_step { get; set; } + public DataKeyValue Dryer3_stepCode { get; set; } + public DataKeyValue Dryer3_totalTime { get; set; } + public DataKeyValue Dryer3_stepTime { get; set; } + public DataKeyValue Dryer3_temperature { get; set; } + public DataKeyValue Dryer3_speed { get; set; } + public DataKeyValue Dryer3_currnet { get; set; } + public DataKeyValue Dryer3_pressure { get; set; } + + public DataKeyValue Gelater0_mode { get; set; } + public DataKeyValue Gelater0_status { get; set; } + public DataKeyValue Gelater0_batch { get; set; } + public DataKeyValue Gelater0_step { get; set; } + public DataKeyValue Gelater0_stepCode { get; set; } + public DataKeyValue Gelater0_totalTime { get; set; } + public DataKeyValue Gelater0_stepTime { get; set; } + public DataKeyValue Gelater0_temperature { get; set; } + public DataKeyValue Gelater0_speed { get; set; } + public DataKeyValue Gelater0_currnet { get; set; } + public DataKeyValue Gelater0_pressure { get; set; } + public DataKeyValue Gelater1_mode { get; set; } + public DataKeyValue Gelater1_status { get; set; } + public DataKeyValue Gelater1_batch { get; set; } + public DataKeyValue Gelater1_step { get; set; } + public DataKeyValue Gelater1_stepCode { get; set; } + public DataKeyValue Gelater1_totalTime { get; set; } + public DataKeyValue Gelater1_stepTime { get; set; } + public DataKeyValue Gelater1_temperature { get; set; } + public DataKeyValue Gelater1_speed { get; set; } + public DataKeyValue Gelater1_currnet { get; set; } + public DataKeyValue Gelater1_pressure { get; set; } + public DataKeyValue Gelater2_mode { get; set; } + public DataKeyValue Gelater2_status { get; set; } + public DataKeyValue Gelater2_batch { get; set; } + public DataKeyValue Gelater2_step { get; set; } + public DataKeyValue Gelater2_stepCode { get; set; } + public DataKeyValue Gelater2_totalTime { get; set; } + public DataKeyValue Gelater2_stepTime { get; set; } + public DataKeyValue Gelater2_temperature { get; set; } + public DataKeyValue Gelater2_speed { get; set; } + public DataKeyValue Gelater2_currnet { get; set; } + public DataKeyValue Gelater2_pressure { get; set; } + public DataKeyValue Gelater3_mode { get; set; } + public DataKeyValue Gelater3_status { get; set; } + public DataKeyValue Gelater3_batch { get; set; } + public DataKeyValue Gelater3_step { get; set; } + public DataKeyValue Gelater3_stepCode { get; set; } + public DataKeyValue Gelater3_totalTime { get; set; } + public DataKeyValue Gelater3_stepTime { get; set; } + public DataKeyValue Gelater3_temperature { get; set; } + public DataKeyValue Gelater3_speed { get; set; } + public DataKeyValue Gelater3_currnet { get; set; } + public DataKeyValue Gelater3_pressure { get; set; } + public DataKeyValue Gelater4_mode { get; set; } + public DataKeyValue Gelater4_status { get; set; } + public DataKeyValue Gelater4_batch { get; set; } + public DataKeyValue Gelater4_step { get; set; } + public DataKeyValue Gelater4_stepCode { get; set; } + public DataKeyValue Gelater4_totalTime { get; set; } + public DataKeyValue Gelater4_stepTime { get; set; } + public DataKeyValue Gelater4_temperature { get; set; } + public DataKeyValue Gelater4_speed { get; set; } + public DataKeyValue Gelater4_currnet { get; set; } + public DataKeyValue Gelater4_pressure { get; set; } + public DataKeyValue Gelater5_mode { get; set; } + public DataKeyValue Gelater5_status { get; set; } + public DataKeyValue Gelater5_batch { get; set; } + public DataKeyValue Gelater5_step { get; set; } + public DataKeyValue Gelater5_stepCode { get; set; } + public DataKeyValue Gelater5_totalTime { get; set; } + public DataKeyValue Gelater5_stepTime { get; set; } + public DataKeyValue Gelater5_temperature { get; set; } + public DataKeyValue Gelater5_speed { get; set; } + public DataKeyValue Gelater5_currnet { get; set; } + public DataKeyValue Gelater5_pressure { get; set; } + public DataKeyValue Gelater6_mode { get; set; } + public DataKeyValue Gelater6_status { get; set; } + public DataKeyValue Gelater6_batch { get; set; } + public DataKeyValue Gelater6_step { get; set; } + public DataKeyValue Gelater6_stepCode { get; set; } + public DataKeyValue Gelater6_totalTime { get; set; } + public DataKeyValue Gelater6_stepTime { get; set; } + public DataKeyValue Gelater6_temperature { get; set; } + public DataKeyValue Gelater6_speed { get; set; } + public DataKeyValue Gelater6_currnet { get; set; } + public DataKeyValue Gelater6_pressure { get; set; } + public DataKeyValue Gelater7_mode { get; set; } + public DataKeyValue Gelater7_status { get; set; } + public DataKeyValue Gelater7_batch { get; set; } + public DataKeyValue Gelater7_step { get; set; } + public DataKeyValue Gelater7_stepCode { get; set; } + public DataKeyValue Gelater7_totalTime { get; set; } + public DataKeyValue Gelater7_stepTime { get; set; } + public DataKeyValue Gelater7_temperature { get; set; } + public DataKeyValue Gelater7_speed { get; set; } + public DataKeyValue Gelater7_currnet { get; set; } + public DataKeyValue Gelater7_pressure { get; set; } + public DataKeyValue Weter0_mode { get; set; } + public DataKeyValue Weter0_status { get; set; } + public DataKeyValue Weter0_batch { get; set; } + public DataKeyValue Weter0_step { get; set; } + public DataKeyValue Weter0_stepCode { get; set; } + public DataKeyValue Weter0_totalTime { get; set; } + public DataKeyValue Weter0_stepTime { get; set; } + public DataKeyValue Weter0_temperature { get; set; } + public DataKeyValue Weter0_speed { get; set; } + public DataKeyValue Weter0_currnet { get; set; } + public DataKeyValue Weter0_pressure { get; set; } + public DataKeyValue Weter1_mode { get; set; } + public DataKeyValue Weter1_status { get; set; } + public DataKeyValue Weter1_batch { get; set; } + public DataKeyValue Weter1_step { get; set; } + public DataKeyValue Weter1_stepCode { get; set; } + public DataKeyValue Weter1_totalTime { get; set; } + public DataKeyValue Weter1_stepTime { get; set; } + public DataKeyValue Weter1_temperature { get; set; } + public DataKeyValue Weter1_speed { get; set; } + public DataKeyValue Weter1_currnet { get; set; } + public DataKeyValue Weter1_pressure { get; set; } + public DataKeyValue Weter2_mode { get; set; } + public DataKeyValue Weter2_status { get; set; } + public DataKeyValue Weter2_batch { get; set; } + public DataKeyValue Weter2_step { get; set; } + public DataKeyValue Weter2_stepCode { get; set; } + public DataKeyValue Weter2_totalTime { get; set; } + public DataKeyValue Weter2_stepTime { get; set; } + public DataKeyValue Weter2_temperature { get; set; } + public DataKeyValue Weter2_speed { get; set; } + public DataKeyValue Weter2_currnet { get; set; } + public DataKeyValue Weter2_pressure { get; set; } + public DataKeyValue Weter3_mode { get; set; } + public DataKeyValue Weter3_status { get; set; } + public DataKeyValue Weter3_batch { get; set; } + public DataKeyValue Weter3_step { get; set; } + public DataKeyValue Weter3_stepCode { get; set; } + public DataKeyValue Weter3_totalTime { get; set; } + public DataKeyValue Weter3_stepTime { get; set; } + public DataKeyValue Weter3_temperature { get; set; } + public DataKeyValue Weter3_speed { get; set; } + public DataKeyValue Weter3_currnet { get; set; } + public DataKeyValue Weter3_pressure { get; set; } + public DataKeyValue Weter4_mode { get; set; } + public DataKeyValue Weter4_status { get; set; } + public DataKeyValue Weter4_batch { get; set; } + public DataKeyValue Weter4_step { get; set; } + public DataKeyValue Weter4_stepCode { get; set; } + public DataKeyValue Weter4_totalTime { get; set; } + public DataKeyValue Weter4_stepTime { get; set; } + public DataKeyValue Weter4_temperature { get; set; } + public DataKeyValue Weter4_speed { get; set; } + public DataKeyValue Weter4_currnet { get; set; } + public DataKeyValue Weter4_pressure { get; set; } + public DataKeyValue Weter5_mode { get; set; } + public DataKeyValue Weter5_status { get; set; } + public DataKeyValue Weter5_batch { get; set; } + public DataKeyValue Weter5_step { get; set; } + public DataKeyValue Weter5_stepCode { get; set; } + public DataKeyValue Weter5_totalTime { get; set; } + public DataKeyValue Weter5_stepTime { get; set; } + public DataKeyValue Weter5_temperature { get; set; } + public DataKeyValue Weter5_speed { get; set; } + public DataKeyValue Weter5_currnet { get; set; } + public DataKeyValue Weter5_pressure { get; set; } + public DataKeyValue Weter6_mode { get; set; } + public DataKeyValue Weter6_status { get; set; } + public DataKeyValue Weter6_batch { get; set; } + public DataKeyValue Weter6_step { get; set; } + public DataKeyValue Weter6_stepCode { get; set; } + public DataKeyValue Weter6_totalTime { get; set; } + public DataKeyValue Weter6_stepTime { get; set; } + public DataKeyValue Weter6_temperature { get; set; } + public DataKeyValue Weter6_speed { get; set; } + public DataKeyValue Weter6_currnet { get; set; } + public DataKeyValue Weter6_pressure { get; set; } + public DataKeyValue Weter7_mode { get; set; } + public DataKeyValue Weter7_status { get; set; } + public DataKeyValue Weter7_batch { get; set; } + public DataKeyValue Weter7_step { get; set; } + public DataKeyValue Weter7_stepCode { get; set; } + public DataKeyValue Weter7_totalTime { get; set; } + public DataKeyValue Weter7_stepTime { get; set; } + public DataKeyValue Weter7_temperature { get; set; } + public DataKeyValue Weter7_speed { get; set; } + public DataKeyValue Weter7_currnet { get; set; } + public DataKeyValue Weter7_pressure { get; set; } + + + } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DryPlc.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DryPlc.cs new file mode 100644 index 0000000..e3e4403 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DryPlc.cs @@ -0,0 +1,1647 @@ +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Mesnac.Action.ChemicalWeighing.LjDry +{ + public class DryPlc + { + private static BasePlcHelper GetPlcHelper => BasePlcHelper.Instance; + + private static void Down1408(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer0_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer0_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer0_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer0_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer0_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1408() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 1, + Model = Convert.ToBoolean(basePlcHelper.Dryer0_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Dryer0_status.NowValue.ToInt()), + Batch = basePlcHelper.Dryer0_batch.NowValue.ToInt(), + Step = basePlcHelper.Dryer0_step.NowValue.ToInt(), + StepCode = basePlcHelper.Dryer0_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Dryer0_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Dryer0_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Dryer0_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Dryer0_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Dryer0_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Dryer0_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1440(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer1_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer1_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer1_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer1_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer1_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1440() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 2, + Model = Convert.ToBoolean(basePlcHelper.Dryer1_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Dryer1_status.NowValue.ToInt()), + Batch = basePlcHelper.Dryer1_batch.NowValue.ToInt(), + Step = basePlcHelper.Dryer1_step.NowValue.ToInt(), + StepCode = basePlcHelper.Dryer1_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Dryer1_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Dryer1_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Dryer1_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Dryer1_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Dryer1_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Dryer1_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1472(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer2_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer2_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer2_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer2_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer2_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1472() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 3, + Model = Convert.ToBoolean(basePlcHelper.Dryer2_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Dryer2_status.NowValue.ToInt()), + Batch = basePlcHelper.Dryer2_batch.NowValue.ToInt(), + Step = basePlcHelper.Dryer2_step.NowValue.ToInt(), + StepCode = basePlcHelper.Dryer2_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Dryer2_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Dryer2_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Dryer2_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Dryer2_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Dryer2_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Dryer2_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1504(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Dryer3_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer3_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer3_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer3_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Dryer3_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1504() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 4, + Model = Convert.ToBoolean(basePlcHelper.Dryer3_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Dryer3_status.NowValue.ToInt()), + Batch = basePlcHelper.Dryer3_batch.NowValue.ToInt(), + Step = basePlcHelper.Dryer3_step.NowValue.ToInt(), + StepCode = basePlcHelper.Dryer3_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Dryer3_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Dryer3_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Dryer3_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Dryer3_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Dryer3_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Dryer3_pressure.NowValue.ToFloat(), + }; + return view; + + } + + + private static void Down1536(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater0_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater0_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater0_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater0_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater0_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1536() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 5, + Model = Convert.ToBoolean(basePlcHelper.Gelater0_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater0_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater0_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater0_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater0_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater0_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater0_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater0_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater0_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater0_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater0_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1568(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater1_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater1_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater1_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater1_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater1_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1568() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 6, + Model = Convert.ToBoolean(basePlcHelper.Gelater1_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater1_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater1_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater1_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater1_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater1_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater1_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater1_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater1_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater1_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater1_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1600(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater2_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater2_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater2_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater2_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater2_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1600() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 7, + Model = Convert.ToBoolean(basePlcHelper.Gelater2_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater2_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater2_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater2_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater2_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater2_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater2_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater2_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater2_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater2_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater2_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1632(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater3_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater3_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater3_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater3_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater3_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1632() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 8, + Model = Convert.ToBoolean(basePlcHelper.Gelater3_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater3_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater3_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater3_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater3_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater3_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater3_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater3_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater3_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater3_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater3_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1664(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater4_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater4_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater4_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater4_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater4_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1664() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 9, + Model = Convert.ToBoolean(basePlcHelper.Gelater4_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater4_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater4_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater4_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater4_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater4_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater4_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater4_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater4_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater4_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater4_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1696(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater5_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater5_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater5_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater5_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater5_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1696() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 10, + Model = Convert.ToBoolean(basePlcHelper.Gelater5_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater5_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater5_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater5_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater5_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater5_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater5_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater5_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater5_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater5_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater5_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1728(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater6_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater6_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater6_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater6_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater6_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1728() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 11, + Model = Convert.ToBoolean(basePlcHelper.Gelater6_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater6_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater6_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater6_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater6_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater6_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater6_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater6_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater6_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater6_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater6_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1760(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelater7_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater7_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater7_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater7_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelater7_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1760() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 12, + Model = Convert.ToBoolean(basePlcHelper.Gelater7_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Gelater7_status.NowValue.ToInt()), + Batch = basePlcHelper.Gelater7_batch.NowValue.ToInt(), + Step = basePlcHelper.Gelater7_step.NowValue.ToInt(), + StepCode = basePlcHelper.Gelater7_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Gelater7_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Gelater7_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Gelater7_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Gelater7_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Gelater7_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Gelater7_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1792(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter0_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter0_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter0_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter0_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter0_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1792() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 13, + Model = Convert.ToBoolean(basePlcHelper.Weter0_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter0_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter0_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter0_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter0_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter0_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter0_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter0_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter0_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter0_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter0_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1824(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter1_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter1_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter1_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter1_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter1_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1824() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 14, + Model = Convert.ToBoolean(basePlcHelper.Weter1_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter1_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter1_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter1_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter1_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter1_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter1_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter1_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter1_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter1_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter1_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1856(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter2_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter2_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter2_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter2_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter2_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1856() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 15, + Model = Convert.ToBoolean(basePlcHelper.Weter2_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter2_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter2_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter2_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter2_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter2_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter2_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter2_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter2_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter2_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter2_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1888(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter3_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter3_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter3_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter3_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter3_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1888() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 16, + Model = Convert.ToBoolean(basePlcHelper.Weter3_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter3_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter3_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter3_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter3_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter3_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter3_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter3_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter3_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter3_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter3_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1920(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter4_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter4_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter4_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter4_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter4_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1920() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 17, + Model = Convert.ToBoolean(basePlcHelper.Weter4_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter4_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter4_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter4_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter4_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter4_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter4_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter4_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter4_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter4_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter4_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1952(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter5_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter5_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter5_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter5_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter5_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1952() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 18, + Model = Convert.ToBoolean(basePlcHelper.Weter5_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter5_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter5_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter5_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter5_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter5_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter5_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter5_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter5_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter5_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter5_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down1984(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter6_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter6_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter6_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter6_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter6_pressure, + view.Pressure); + } + } + + private static DrySettingView Up1984() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 19, + Model = Convert.ToBoolean(basePlcHelper.Weter6_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter6_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter6_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter6_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter6_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter6_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter6_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter6_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter6_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter6_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter6_pressure.NowValue.ToFloat(), + }; + return view; + + } + + private static void Down2016(DrySettingView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_mode, new object[] + { + view.Model + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_status, new object[] + { + view.Status + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_batch, new object[] + { + view.Batch + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_step, new object[] + { + view.Step + }); + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_stepCode, new object[] + { + view.StepCode + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_totalTime, new object[] + { + view.TotalTime + }); + + basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter7_stepTime, new object[] + { + view.StepTime + }); + + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter7_temperature, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter7_speed, + view.Speed); + + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter7_currnet, + view.Temperature); + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter7_pressure, + view.Pressure); + } + } + + private static DrySettingView Up2016() + { + var basePlcHelper = GetPlcHelper; + DrySettingView view = new DrySettingView + { + Id = 20, + Model = Convert.ToBoolean(basePlcHelper.Weter7_mode.NowValue.ToInt()), + Status = Convert.ToBoolean(basePlcHelper.Weter7_status.NowValue.ToInt()), + Batch = basePlcHelper.Weter7_batch.NowValue.ToInt(), + Step = basePlcHelper.Weter7_step.NowValue.ToInt(), + StepCode = basePlcHelper.Weter7_stepCode.NowValue.ToInt(), + TotalTime = basePlcHelper.Weter7_totalTime.NowValue.ToInt(), + StepTime = basePlcHelper.Weter7_stepTime.NowValue.ToInt(), + Temperature = basePlcHelper.Weter7_temperature.NowValue.ToFloat(), + Speed = basePlcHelper.Weter7_speed.NowValue.ToFloat(), + Currnet = basePlcHelper.Weter7_currnet.NowValue.ToFloat(), + Pressure = basePlcHelper.Weter7_pressure.NowValue.ToFloat(), + }; + return view; + + } + + + public static IList UpFromPlc() + { + IList ls = new List(); + ls.Add(Up1408()); + ls.Add(Up1440()); + ls.Add(Up1472()); + ls.Add(Up1504()); + ls.Add(Up1536()); + ls.Add(Up1568()); + ls.Add(Up1600()); + ls.Add(Up1632()); + ls.Add(Up1664()); + ls.Add(Up1696()); + ls.Add(Up1728()); + ls.Add(Up1760()); + ls.Add(Up1792()); + ls.Add(Up1824()); + ls.Add(Up1856()); + ls.Add(Up1888()); + ls.Add(Up1920()); + ls.Add(Up1952()); + ls.Add(Up1984()); + ls.Add(Up2016()); + + + + return ls; + + } + + public static DrySettingView UpFromPlc(int id) + { + DrySettingView view = new DrySettingView(); + switch (id) + { + case 1: + view = Up1408(); + break; + case 2: + view = Up1440(); + break; + case 3: + view = Up1472(); + break; + case 4: + view = Up1504(); + break; + case 5: + view = Up1536(); + break; + case 6: + view = Up1568(); + break; + case 7: + view = Up1600(); + break; + case 8: + view = Up1632(); + break; + case 9: + view = Up1664(); + break; + case 10: + view = Up1696(); + break; + case 11: + view = Up1728(); + break; + case 12: + view = Up1760(); + break; + case 13: + view = Up1792(); + break; + case 14: + view = Up1824(); + break; + case 15: + view = Up1856(); + break; + case 16: + view = Up1888(); + break; + case 17: + view = Up1920(); + break; + case 18: + view = Up1952(); + break; + case 19: + view = Up1984(); + break; + case 20: + view = Up2016(); + break; + + + } + + return view; + } + + + public static void DownToPlc(DrySettingView view) + { + + switch (view.Id) + { + case 1: + Down1408(view); + break; + case 2: + Down1440(view); + break; + case 3: + Down1472(view); + break; + case 4: + Down1504(view); + break; + case 5: + Down1536(view); + break; + case 6: + Down1568(view); + break; + case 7: + Down1600(view); + break; + case 8: + Down1632(view); + break; + case 9: + Down1664(view); + break; + case 10: + Down1696(view); + break; + case 11: + Down1728(view); + break; + case 12: + Down1760(view); + break; + case 13: + Down1792(view); + break; + case 14: + Down1824(view); + break; + case 15: + Down1856(view); + break; + case 16: + Down1888(view); + break; + case 17: + Down1920(view); + break; + case 18: + Down1952(view); + break; + case 19: + Down1984(view); + break; + case 20: + Down2016(view); + break; + + + + } + } + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DrySettingView.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DrySettingView.cs new file mode 100644 index 0000000..8d7f373 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDry/DrySettingView.cs @@ -0,0 +1,21 @@ +namespace Mesnac.Action.ChemicalWeighing.LjDry +{ + public class DrySettingView + { + public int Id { get; set; } + public string Name { get; set; } + + public bool Model { get; set; } + public bool Status { get; set; } + public int Batch { get; set; } + public int Step { get; set; } + public int StepCode { get; set; } + public int TotalTime { get; set; } + public int StepTime { get; set; } + + public float Temperature { get; set; } + public float Speed { get; set; } + public float Currnet { get; set; } + public float Pressure { get; set; } + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalPlc.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalPlc.cs new file mode 100644 index 0000000..e07340b --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalPlc.cs @@ -0,0 +1,628 @@ +using System.Collections; +using System.Collections.Generic; + +namespace Mesnac.Action.ChemicalWeighing.LjElectrical +{ + public class ElectricalPlc + { + private static BasePlcHelper GetPlcHelper => BasePlcHelper.Instance; + + private static void Down1324(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedD1, + view.Speed); + } + } + + private static ElectricalView Up1324() + { + ElectricalView view = new ElectricalView(); + view.Id = 1; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedD1.NowValue.ToFloat(); + return view; + + } + + // + // + // + // + + + + + private static ElectricalView Up1328() + { + ElectricalView view = new ElectricalView(); + view.Id = 2; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedD2.NowValue.ToFloat(); + return view; + + } + + private static void Down1328(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedD2, + view.Speed); + } + } + + + private static ElectricalView Up1332() + { + ElectricalView view = new ElectricalView(); + view.Id = 3; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedD3.NowValue.ToFloat(); + return view; + + } + + private static void Down1332(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedD4, + view.Speed); + } + } + + + private static ElectricalView Up1336() + { + ElectricalView view = new ElectricalView(); + view.Id = 4; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedD3.NowValue.ToFloat(); + return view; + + } + + private static void Down1336(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedD4, + view.Speed); + } + } + + + private static ElectricalView Up1340() + { + ElectricalView view = new ElectricalView(); + view.Id = 5; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG1.NowValue.ToFloat(); + return view; + + } + + private static void Down1340(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG1, + view.Speed); + } + } + + + private static ElectricalView Up1344() + { + ElectricalView view = new ElectricalView(); + view.Id = 6; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG2.NowValue.ToFloat(); + return view; + + } + + private static void Down1344(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG2, + view.Speed); + } + } + + private static ElectricalView Up1348() + { + ElectricalView view = new ElectricalView(); + view.Id = 7; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG3.NowValue.ToFloat(); + return view; + + } + + private static void Down1348(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG3, + view.Speed); + } + } + + private static ElectricalView Up1352() + { + ElectricalView view = new ElectricalView(); + view.Id = 8; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG4.NowValue.ToFloat(); + return view; + + } + + private static void Down1352(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG4, + view.Speed); + } + } + + + private static ElectricalView Up1356() + { + ElectricalView view = new ElectricalView(); + view.Id = 9; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG5.NowValue.ToFloat(); + return view; + + } + + private static void Down1356(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG5, + view.Speed); + } + } + + + private static ElectricalView Up1360() + { + ElectricalView view = new ElectricalView(); + view.Id = 10; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG6.NowValue.ToFloat(); + return view; + + } + + private static void Down1360(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG6, + view.Speed); + } + } + + private static ElectricalView Up1364() + { + ElectricalView view = new ElectricalView(); + view.Id = 11; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG7.NowValue.ToFloat(); + return view; + + } + + private static void Down1364(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG7, + view.Speed); + } + } + + + private static ElectricalView Up1368() + { + ElectricalView view = new ElectricalView(); + view.Id = 12; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedG8.NowValue.ToFloat(); + return view; + + } + + private static void Down1368(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedG8, + view.Speed); + } + } + + private static ElectricalView Up1372() + { + ElectricalView view = new ElectricalView(); + view.Id = 13; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedH1.NowValue.ToFloat(); + return view; + + } + + private static void Down1372(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedH1, + view.Speed); + } + } + + private static ElectricalView Up1376() + { + ElectricalView view = new ElectricalView(); + view.Id = 14; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedH2.NowValue.ToFloat(); + return view; + + } + + private static void Down1376(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedH2, + view.Speed); + } + } + + + private static ElectricalView Up1380() + { + ElectricalView view = new ElectricalView(); + view.Id = 15; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedH3.NowValue.ToFloat(); + return view; + + } + + private static void Down1380(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedH3, + view.Speed); + } + } + + private static ElectricalView Up1384() + { + ElectricalView view = new ElectricalView(); + view.Id = 16; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedH4.NowValue.ToFloat(); + return view; + + } + + private static void Down1384(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedH4, + view.Speed); + } + } + + private static ElectricalView Up1388() + { + ElectricalView view = new ElectricalView(); + view.Id = 17; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedS1.NowValue.ToFloat(); + return view; + + } + + private static void Down1388(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedS1, + view.Speed); + } + } + + + private static ElectricalView Up1392() + { + ElectricalView view = new ElectricalView(); + view.Id = 18; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedS5.NowValue.ToFloat(); + return view; + + } + + private static void Down1392(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedS5, + view.Speed); + } + } + + + private static ElectricalView Up1396() + { + ElectricalView view = new ElectricalView(); + view.Id = 19; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedS7.NowValue.ToFloat(); + return view; + + } + + private static void Down1396(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedS7, + view.Speed); + } + } + + private static ElectricalView Up1400() + { + ElectricalView view = new ElectricalView(); + view.Id = 20; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedS11.NowValue.ToFloat(); + return view; + + } + + private static void Down1400(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedS11, + view.Speed); + } + } + + + private static ElectricalView Up1404() + { + ElectricalView view = new ElectricalView(); + view.Id = 21; + var basePlcHelper = GetPlcHelper; + view.Speed = basePlcHelper.SpeedS15.NowValue.ToFloat(); + return view; + + } + + private static void Down1404(ElectricalView view) + { + if (null != view) + { + var basePlcHelper = GetPlcHelper; + basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.SpeedS15, + view.Speed); + } + } + + + public static IList UpFromPlc() + { + IList ls = new List(); + ls.Add(Up1324()); + ls.Add(Up1328()); + ls.Add(Up1332()); + ls.Add(Up1336()); + ls.Add(Up1340()); + ls.Add(Up1344()); + ls.Add(Up1348()); + ls.Add(Up1352()); + ls.Add(Up1356()); + ls.Add(Up1360()); + ls.Add(Up1364()); + ls.Add(Up1368()); + ls.Add(Up1372()); + ls.Add(Up1376()); + ls.Add(Up1380()); + ls.Add(Up1384()); + ls.Add(Up1388()); + ls.Add(Up1392()); + ls.Add(Up1396()); + ls.Add(Up1400()); + ls.Add(Up1404()); + return ls; + + } + + public static ElectricalView UpFromPlc(int id) + { + ElectricalView view = new ElectricalView(); + switch (id) + { + case 1: + view = Up1324(); + break; + case 2: + view = Up1328(); + break; + case 3: + view = Up1332(); + break; + case 4: + view = Up1336(); + break; + case 5: + view = Up1340(); + break; + case 6: + view = Up1344(); + break; + case 7: + view = Up1348(); + break; + case 8: + view = Up1352(); + break; + case 9: + view = Up1356(); + break; + case 10: + view = Up1360(); + break; + case 11: + view = Up1364(); + break; + case 12: + view = Up1368(); + break; + case 13: + view = Up1372(); + break; + case 14: + view = Up1376(); + break; + case 15: + view = Up1380(); + break; + case 16: + view = Up1384(); + break; + case 17: + view = Up1388(); + break; + case 18: + view = Up1392(); + break; + case 19: + view = Up1396(); + break; + case 20: + view = Up1400(); + break; + case 21: + view = Up1404(); + break; + + } + + return view; + } + + + public static void DownToPlc(List views) + { + foreach (var view in views) + { + + + switch (view.Id) + { + case 1: + Down1324(view); + break; + case 2: + Down1328(view); + break; + case 3: + Down1332(view); + break; + case 4: + Down1336(view); + break; + case 5: + Down1340(view); + break; + case 6: + Down1344(view); + break; + case 7: + Down1348(view); + break; + case 8: + Down1352(view); + break; + case 9: + Down1356(view); + break; + case 10: + Down1360(view); + break; + case 11: + Down1364(view); + break; + case 12: + Down1368(view); + break; + case 13: + Down1372(view); + break; + case 14: + Down1376(view); + break; + case 15: + Down1380(view); + break; + case 16: + Down1384(view); + break; + case 17: + Down1388(view); + break; + case 18: + Down1392(view); + break; + case 19: + Down1396(view); + break; + case 20: + Down1400(view); + break; + case 21: + Down1404(view); + break; + } + } + } + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalView.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalView.cs new file mode 100644 index 0000000..e170230 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjElectrical/ElectricalView.cs @@ -0,0 +1,9 @@ +namespace Mesnac.Action.ChemicalWeighing.LjElectrical +{ + public class ElectricalView + { + public int Id { get; set; } + public string Name { get; set; } + public float Speed { get; set; } + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index ea5687e..dd15d2f 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -225,6 +225,10 @@ + + + + Form diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml index e030ca4..c9b7427 100644 --- a/Main/MCEdit/Data/MCProject/nodeDevice.xml +++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml @@ -352,6 +352,8 @@ + + @@ -493,7 +495,7 @@ - + @@ -504,7 +506,7 @@ - + @@ -515,7 +517,7 @@ - + @@ -603,7 +605,7 @@ - + @@ -658,7 +660,7 @@ - +