123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.RT.Device;
- using MECF.Framework.Common.Device.Bases;
- using MECF.Framework.Common.Equipment;
- namespace JetVirgoPM.Devices
- {
- interface IPlasmaControl
- {
- // Generator
- float ReflectPower { get; }
- //void SetRfMode(RfMode mode);
- void SetPower(ushort val);
- bool SetPowerOnOff(bool on, out string str);
- //void SetPulsingFrequency(float val);
- //void SetDuty(float val);
- // Match
- void SetMatchWorkMode(EnumRfMatchTuneMode mode);
- void SetPosition(byte c1, byte c2);
- }
- interface IGenerator
- {
- bool IsRfOn { get; }
- float PowerSetPoint { get; }
- float RFForwardPower { get; }
- float RFReflectPower { get; }
- bool SetPowerOnOff(bool on, out string str);
- void SetRfMode(RfMode mode);
- void SetPower(ushort val);
- //void TurnOn(bool on);
- }
- interface IMatch
- {
- EnumRfMatchTuneMode WorkMode { get; set; }
- void SetPosition(byte c1, byte c2);
- }
- public enum GeneratorStatus
- {
- Unknown,
- OFF,
- ON,
- ERROR
- }
- public enum GeneratorControlMode
- {
- Manual = 0,
- Analog = 1,
- RS232 = 2
- }
- /// <summary>
- ///
- /// </summary>
- class PlasmaController : BaseDevice, IDevice, IPlasmaControl
- {
- private readonly RfPowerBase _Generator;
- private readonly RfMatchBase _Match;
- // --------------------------Properties------------------------
- //
- public float ReflectPower => _Generator.ReflectPower;
- // --------------------------Constructor-----------------------
- //
- public PlasmaController(ModuleName mod)
- {
- _Generator = new AdTecGenerator(mod,Name);
- _Match = new AdTecMatch(mod, Name);
- }
- public bool Initialize()
- {
- throw new System.NotImplementedException();
- }
- public void Monitor()
- {
- throw new System.NotImplementedException();
- }
- public void Reset()
- {
- throw new System.NotImplementedException();
- }
- public void SetMatchWorkMode(EnumRfMatchTuneMode mode)
- {
- _Match.TuneMode1 = mode;
- _Match.TuneMode2 = mode;
- }
- public void SetPosition(byte c1, byte c2)
- {
- _Match.TunePosition1 = c1;
- }
- public void SetPower(ushort val)
- {
- _Generator.SetPower(val);
- }
- //public void SetRfMode(EnumRfPowerWorkMode mode)
- //{
- // _Generator.SetRfMode(mode);
- //}
- public void Terminate()
- {
- throw new System.NotImplementedException();
- }
- public bool SetPowerOnOff(bool on, out string str)
- {
- str = "";
- _Generator.SetPowerOnOff(on, out str);
- return true;
- }
- }
- }
|