using CFX.Structures; using CFX.Structures.CommonUseEquipment; using CFX.Structures.SolderReflow; using Sln.Iot.CFX.Entity; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sln.Iot.CFX.CFXBusiness { public class CFXUnitProcessedDataGet { private static readonly Lazy lazy = new Lazy(() => new CFXUnitProcessedDataGet()); public static CFXUnitProcessedDataGet Instance { get { return lazy.Value; } } /// /// 真空点胶数据 /// /// public CommonProcessData ProcessDataGet1() { UnitsProcess1Entity entity = new UnitsProcess1Entity() { GlueAmountSetValue1 = 123.4f, GluePushSpeedSetValue1 = 10.1f, BarrelA1TempActValue1 = 60, BarrelA2TempActValue1 = 60, BarrelB1TempActValue1 = 60, BarrelB2TempActValue1 = 60, PumpAPressureActValue1 = 3.5f, PumpBPressureActValue1 = 3.2f, VacuumDegreeActValue1 = 3000.4f, PressureHoldTimeSetValue1 = 100, GlueAmountSetValue2 = 123.4f, GluePushSpeedSetValue2 = 10.1f, BarrelA1TempActValue2 = 60, BarrelA2TempActValue2 = 60, BarrelB1TempActValue2 = 60, BarrelB2TempActValue2 = 60, PumpAPressureActValue2 = 3.5f, PumpBPressureActValue2 = 3.2f, VacuumDegreeActValue2 = 3000.4f, PressureHoldTimeSetValue2 = 100, }; CommonProcessData processData = new CommonProcessData() { ZoneData = new List { new CommonUseZoneData() { Setpoints = new List() { new CommonUseSetpoint() { Setpoint = entity.GlueAmountSetValue1, SetpointName = "GlueAmountSetValue1" }, new CommonUseSetpoint() { Setpoint = entity.GluePushSpeedSetValue1, SetpointName = "GluePushSpeedSetValue1" }, new CommonUseSetpoint() { Setpoint = entity.PressureHoldTimeSetValue1, SetpointName = "PressureHoldTimeSetValue1" }, }, Readings = new List() { new CommonUseReading() { ReadingValue = entity.BarrelA1TempActValue1, ReadingName = "BarrelA1TempActValue1", }, new CommonUseReading() { ReadingValue = entity.BarrelA2TempActValue1, ReadingName = "BarrelA2TempActValue1", }, new CommonUseReading() { ReadingValue = entity.BarrelB1TempActValue1, ReadingName = "BarrelB1TempActValue1", }, new CommonUseReading() { ReadingValue = entity.BarrelB2TempActValue1, ReadingName = "BarrelB2TempActValue1", }, new CommonUseReading() { ReadingValue = entity.PumpAPressureActValue1, ReadingName = "PumpAPressureActValue1", }, new CommonUseReading() { ReadingValue = entity.PumpBPressureActValue1, ReadingName = "PumpBPressureActValue1", }, new CommonUseReading() { ReadingValue = entity.VacuumDegreeActValue1, ReadingName = "VacuumDegreeActValue1", }, }, Zone = new CommonUseZone() { ZoneName = "Zone1", StageSequence = 1, StageName = "VacuumInjection1" }, }, new CommonUseZoneData() { Setpoints = new List() { new CommonUseSetpoint() { Setpoint = entity.GlueAmountSetValue2, SetpointName = "GlueAmountSetValue2" }, new CommonUseSetpoint() { Setpoint = entity.GluePushSpeedSetValue2, SetpointName = "GluePushSpeedSetValue2" }, new CommonUseSetpoint() { Setpoint = entity.PressureHoldTimeSetValue2, SetpointName = "PressureHoldTimeSetValue2" }, }, Readings = new List() { new CommonUseReading() { ReadingValue = entity.BarrelA1TempActValue2, ReadingName = "BarrelA1TempActValue2", }, new CommonUseReading() { ReadingValue = entity.BarrelA2TempActValue2, ReadingName = "BarrelA2TempActValue2", }, new CommonUseReading() { ReadingValue = entity.BarrelB1TempActValue2, ReadingName = "BarrelB1TempActValue2", }, new CommonUseReading() { ReadingValue = entity.BarrelB2TempActValue2, ReadingName = "BarrelB2TempActValue2", }, new CommonUseReading() { ReadingValue = entity.PumpAPressureActValue2, ReadingName = "PumpAPressureActValue2", }, new CommonUseReading() { ReadingValue = entity.PumpBPressureActValue2, ReadingName = "PumpBPressureActValue2", }, new CommonUseReading() { ReadingValue = entity.VacuumDegreeActValue2, ReadingName = "VacuumDegreeActValue2", }, }, Zone = new CommonUseZone() { ZoneName = "Zone2", StageSequence = 2, StageName = "VacuumInjection2" }, } } }; return processData; } /// /// 升降回流数据 /// /// public CommonProcessData ProcessDataGet2() { CommonProcessData processData = new CommonProcessData() { ZoneData = new List { new CommonUseZoneData() { Zone = new CommonUseZone() { ZoneName = "Zone1", StageSequence = 1, StageName = "Conveyor1" }, }, new CommonUseZoneData() { Zone = new CommonUseZone() { ZoneName = "Zone2", StageSequence = 2, StageName = "Conveyor2" }, } } }; return processData; } /// /// 隧道烤箱数据 /// /// public CommonProcessData ProcessDataGet3() { UnitsProcess3Entity entity = new UnitsProcess3Entity() { PreheatOvenTempActValue = 800, PreCureOven1TempActValue = 800, PreCureOven2TempActValue = 800, PreCureOven3TempActValue = 800, PreCureOven4TempActValue = 800, CureOven1ActValue = 800, CureOven2ActValue = 800, CureOven3ActValue = 800, CureOven4ActValue = 800, }; CommonProcessData processData = new CommonProcessData() { ZoneData = new List { new CommonUseZoneData() { Readings = new List() { new CommonUseReading() { ReadingValue = entity.PreheatOvenTempActValue, ReadingName = "PreheatOvenTempActValue", } }, Zone = new CommonUseZone() { ZoneName = "Zone1", StageSequence = 1, StageName = "PreHeatOvem" }, }, new CommonUseZoneData() { Readings = new List() { new CommonUseReading() { ReadingValue = entity.PreCureOven1TempActValue, ReadingName = "PreCureOven1TempActValue", }, new CommonUseReading() { ReadingValue = entity.PreCureOven2TempActValue, ReadingName = "PreCureOven2TempActValue", }, new CommonUseReading() { ReadingValue = entity.PreCureOven3TempActValue, ReadingName = "PreCureOven3TempActValue", }, new CommonUseReading() { ReadingValue = entity.PreCureOven4TempActValue, ReadingName = "PreCureOven4TempActValue", } }, Zone = new CommonUseZone() { ZoneName = "Zone2", StageSequence = 2, StageName = "PreCureOven" }, }, new CommonUseZoneData() { Readings = new List() { new CommonUseReading() { ReadingValue = entity.CureOven1ActValue, ReadingName = "CureOven1ActValue", }, new CommonUseReading() { ReadingValue = entity.CureOven2ActValue, ReadingName = "CureOven2ActValue", }, new CommonUseReading() { ReadingValue = entity.CureOven3ActValue, ReadingName = "CureOven3ActValue", }, new CommonUseReading() { ReadingValue = entity.CureOven4ActValue, ReadingName = "CureOven4ActValue", } }, Zone = new CommonUseZone() { ZoneName = "Zone3", StageSequence = 3, StageName = "CureOven" }, } } }; return processData; } } }