| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 | 
							- using System;
 
- using System.Xml;
 
- using Aitex.Core.Common.DeviceData;
 
- using Aitex.Core.RT.Device;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.IOCore;
 
- using Aitex.Core.RT.OperationCenter;
 
- using Aitex.Core.RT.SCCore;
 
- using Aitex.Core.RT.Tolerance;
 
- using Aitex.Core.Util;
 
- using Venus_RT.Devices.IODevices;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Core.RT.DataCenter;
 
- namespace Venus_RT.Devices
 
- {
 
-     class IoTMPressureCtrl : BaseDevice, IDevice
 
-     {
 
-         public readonly IoPressureMeter TMPressureGauge;
 
-         public readonly IoPressureMeter LLAPressureGauge;
 
-         public readonly IoPressureMeter LLBPressureGauge;
 
-         public readonly IoPressureMeter MFForelineGauge;
 
-         public readonly IoPressureMeter LLForelineGauge;
 
-         private readonly ToleranceChecker _tolerance = new ToleranceChecker();
 
-         private readonly R_TRIG _trigTMPressureGauge = new R_TRIG();
 
-         private readonly R_TRIG _trigLLAPressureGauge = new R_TRIG();
 
-         private readonly R_TRIG _trigLLBPressureGauge = new R_TRIG();
 
-         private readonly R_TRIG _trigMFForelineGauge = new R_TRIG();
 
-         private readonly R_TRIG _trigLLForelineGauge = new R_TRIG();
 
-         private readonly AOAccessor _aoMFPressureSP;
 
-         private readonly AOAccessor _aoLLAPressureSP;
 
-         private readonly AOAccessor _aoLLBPressureSP;
 
-         // Properties
 
-         //
 
-         public double TargetPressure { get; set; }
 
-         // Constructor
 
-         //
 
-         public IoTMPressureCtrl(string module, XmlElement node, string ioModule = "")
 
-         {
 
-             base.Module = module;
 
-             base.Name = node.GetAttribute("id");
 
-             base.Display = node.GetAttribute("display");
 
-             base.DeviceID = node.GetAttribute("schematicId");
 
-             TMPressureGauge = ParseDeviceNode<IoPressureMeter>(Module, "MFPressureMeter", node);
 
-             LLAPressureGauge = ParseDeviceNode<IoPressureMeter>(Module, "LLAPressureMeter", node);
 
-             LLBPressureGauge = ParseDeviceNode<IoPressureMeter>(Module, "LLBPressureMeter", node);
 
-             MFForelineGauge = ParseDeviceNode<IoPressureMeter>(Module, "MFForelineMeter", node);
 
-             LLForelineGauge = ParseDeviceNode<IoPressureMeter>(Module, "LLForelineMeter", node);
 
-             _aoMFPressureSP = ParseAoNode("aoMFPressure", node, ioModule);
 
-             _aoLLAPressureSP = ParseAoNode("aoLLAPressure", node, ioModule);
 
-             _aoLLBPressureSP = ParseAoNode("aoLLBPressure", node, ioModule);
 
-         }
 
-         public bool Initialize()
 
-         {
 
-             DATA.Subscribe($"{Module}.{Name}.TMChamberSetPoint", () => _GetRealFloat(_aoMFPressureSP));
 
-             DATA.Subscribe($"{Module}.{Name}.LLAChamberSetPoint", () => _GetRealFloat(_aoLLAPressureSP));
 
-             DATA.Subscribe($"{Module}.{Name}.LLBChamberSetPoint", () => _GetRealFloat(_aoLLBPressureSP));
 
-             return true;
 
-         }
 
-         public void SetTMPressure(float pressure)
 
-         {
 
-             _SetRealFloat(_aoMFPressureSP, pressure);          
 
-         }
 
-         public void SetLLAPressure(float pressure)
 
-         {
 
-             _SetRealFloat(_aoLLAPressureSP, pressure);
 
-         }
 
-         public void SetLLBPressure(float pressure)
 
-         {
 
-             _SetRealFloat(_aoLLBPressureSP, pressure);
 
-         }
 
-         public void Terminate()
 
-         {
 
-         }
 
-         public void Monitor()
 
-         {
 
-             _trigTMPressureGauge.CLK = TMPressureGauge.GaugeAlarm;
 
-             if (_trigTMPressureGauge.Q) LOG.Write(eEvent.ERR_DEVICE_INFO, Module, "MF pressure gauge Alarm");
 
-             _trigLLAPressureGauge.CLK = LLAPressureGauge.GaugeAlarm;
 
-             if (_trigLLAPressureGauge.Q) LOG.Write(eEvent.ERR_DEVICE_INFO, Module, "Chamber pressure gauge Alarm");
 
-             _trigLLBPressureGauge.CLK = LLBPressureGauge.GaugeAlarm;
 
-             if (_trigLLBPressureGauge.Q) LOG.Write(eEvent.ERR_DEVICE_INFO, Module, "Foreline pressure gauge Alarm");
 
-             _trigMFForelineGauge.CLK = MFForelineGauge.GaugeAlarm;
 
-             if (_trigMFForelineGauge.Q) LOG.Write(eEvent.ERR_DEVICE_INFO, Module, "Process High Gauge Alarm");
 
-             _trigLLForelineGauge.CLK = LLForelineGauge.GaugeAlarm;
 
-             if (_trigLLForelineGauge.Q) LOG.Write(eEvent.ERR_DEVICE_INFO, Module, "Process Low Gauge Alarm");
 
-         }
 
-         public void Reset()
 
-         {
 
-             _trigTMPressureGauge.RST = true;
 
-             _trigLLAPressureGauge.RST = true;
 
-             _trigLLBPressureGauge.RST = true;
 
-             _trigMFForelineGauge.RST = true;
 
-             _trigLLForelineGauge.RST = true;
 
-         }
 
-     }
 
- }
 
 
  |