JetVenusSEPM.cs 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.Device;
  3. using Aitex.Core.RT.Device.Unit;
  4. using Aitex.Core.RT.Log;
  5. using Aitex.Core.RT.OperationCenter;
  6. using Aitex.Core.RT.SCCore;
  7. using Aitex.Core.UI.Control;
  8. using Aitex.Core.Util;
  9. using MECF.Framework.Common.Device.Bases;
  10. using MECF.Framework.Common.Equipment;
  11. using MECF.Framework.Common.SubstrateTrackings;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Linq;
  15. using System.Text;
  16. using System.Threading.Tasks;
  17. using Venus_Core;
  18. using Venus_RT.Devices.IODevices;
  19. using Venus_RT.Modules;
  20. using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
  21. namespace Venus_RT.Devices
  22. {
  23. class JetVenusSEPM : JetPMBase
  24. {
  25. #region io变量定义
  26. private readonly IoLid _Lid;
  27. private readonly IoCylinder _slitDoor;
  28. private readonly IoCylinder _LiftPin;
  29. private readonly IoValve _PVN21Valve;
  30. private readonly IoValve _PVN22Valve;
  31. private readonly IoValve _PV11Valve;
  32. private readonly IoValve _PV12Valve;
  33. private readonly IoValve _PV21Valve;
  34. private readonly IoValve _PV22Valve;
  35. private readonly IoValve _PV31Valve;
  36. private readonly IoValve _PV32Valve;
  37. private readonly IoValve _PV41Valve;
  38. private readonly IoValve _PV42Valve;
  39. private readonly IoValve _PV51Valve;//新增
  40. private readonly IoValve _PV52Valve;//新增
  41. private readonly IoValve _PV61Valve;//新增
  42. private readonly IoValve _PV62Valve;//新增
  43. private readonly IoValve _PV71Valve;//新增
  44. private readonly IoValve _PV72Valve;//新增
  45. private readonly IoValve _PV81Valve;//新增
  46. private readonly IoValve _PV82Valve;//新增
  47. private readonly IoValve _PV91Valve;//新增
  48. private readonly IoValve _PV92Valve;//新增
  49. private readonly IoValve _PVA1Valve;//新增
  50. private readonly IoValve _PVA2Valve;//新增
  51. private readonly IoValve _PVB1Valve;//新增
  52. private readonly IoValve _PVB2Valve;//新增
  53. private readonly IoValve _PVC1Valve;//新增
  54. private readonly IoValve _PVC2Valve;//新增
  55. private readonly IoValve _N2Valve;
  56. private readonly IoValve _Mfc1Valve;
  57. private readonly IoValve _Mfc2Valve;
  58. private readonly IoValve _Mfc3Valve;
  59. private readonly IoValve _Mfc4Valve;
  60. private readonly IoValve _Mfc5Valve;
  61. private readonly IoValve _Mfc6Valve;
  62. private readonly IoValve _Mfc7Valve;
  63. private readonly IoValve _Mfc8Valve;
  64. private readonly IoValve _Mfc9Valve; //新增
  65. private readonly IoValve _Mfc10Valve;//新增
  66. private readonly IoValve _Mfc11Valve;//新增 空的
  67. private readonly IoValve _Mfc12Valve;//新增
  68. private readonly IoValve _PVHe1Valve;
  69. private readonly IoValve _PVHe2Valve;
  70. private readonly IoValve _GasFinalValve;
  71. private readonly IoValve _SoftPumpValve;
  72. private readonly IoValve _FastPumpValve;
  73. private readonly IoValve _TurboPumpPumpingValve;
  74. private readonly IoValve _TurboPumpPurgeValve;
  75. private readonly IoValve _GuageValve;
  76. private readonly IoValve _PVHe3Valve;
  77. private readonly IoValve _HeISOValve;
  78. private readonly IoValve _MainPurgeValve;//新增
  79. private readonly IoSensor _ATM_sw;
  80. private readonly IoSensor _CDAPressure;
  81. private readonly IoSensor _N2Pressure_sw;
  82. private readonly IoSensor _VAC_sw;
  83. private readonly IoSensor _WLK_sw;
  84. private readonly IoSensor _Water_Flow;
  85. private readonly IoSensor _RFG_Interlock;
  86. private readonly IoSensor _PM_Lid_Closed;
  87. private readonly IoSensor _Source_RF_Fan;
  88. private readonly IoSensor _TurboPumpInterlock;
  89. private readonly IoSensor _GasBoxDoor;
  90. private readonly IoSensor _GasBoxPressure;
  91. private readonly PumpBase _MainPump;
  92. private readonly ESC5HighVoltage _ESCHV;
  93. private readonly AdixenTurboPump _TurboPump;
  94. private readonly PendulumValve _pendulumValve;
  95. private readonly ChillerBase _Chiller;
  96. private readonly RfPowerBase _Generator;//srf=>AdTecGenerator
  97. private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
  98. private readonly RfMatchBase _Match;
  99. private readonly RfMatchBase _BiasMatch;
  100. private readonly IoHeater _ForelineTC;
  101. private readonly IoHeater _WallTC;
  102. private readonly IoPressureControl _pressureController;
  103. private readonly IoGasStick[] _gasLines;
  104. private readonly IoGasStick _gasLineN2;
  105. private readonly IoBacksideHe _backsideHe;
  106. private readonly IoMfc _heMfc;
  107. private readonly double _foreline_interlock_pressure = 750;
  108. private readonly Dictionary<ValveType, IoValve> Valve2IO;
  109. #endregion
  110. #region 构造函数
  111. public JetVenusSEPM(ModuleName moduleName) : base(moduleName)
  112. {
  113. Module = moduleName;
  114. _Lid = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.Lid}");
  115. _LiftPin = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LiftPin}");
  116. _PVN21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN21}");
  117. _PVN22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN22}");
  118. _PV11Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV11}");
  119. _PV12Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV12}");
  120. _PV21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV21}");
  121. _PV22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV22}");
  122. _PV31Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV31}");
  123. _PV32Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV32}");
  124. _PV41Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV41}");
  125. _PV42Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV42}");
  126. _PV51Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV51}");
  127. _PV52Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV52}");
  128. _PV61Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV61}");
  129. _PV62Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV62}");
  130. _PV71Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV71}");
  131. _PV72Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV72}");
  132. _PV81Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV81}");
  133. _PV82Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV82}");
  134. _PV91Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV91}");
  135. _PV92Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV92}");
  136. _PVA1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVA1}");
  137. _PVA2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVA2}");
  138. _PVB1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVB1}");
  139. _PVB2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVB2}");
  140. _PVC1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVC1}");
  141. _PVC2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVC2}");
  142. _N2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveN2}");
  143. _Mfc1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc1}");
  144. _Mfc2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
  145. _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc3}");
  146. _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc4}");
  147. _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc5}");
  148. _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
  149. _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
  150. _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
  151. _Mfc9Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc9}");
  152. _Mfc10Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc10}");
  153. _Mfc11Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc11}");
  154. _Mfc12Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc12}");
  155. _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
  156. _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
  157. _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
  158. _SoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSoftPump}");
  159. _FastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveFastPump}");
  160. _TurboPumpPumpingValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveTurboPumpPumping}");
  161. _TurboPumpPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveTurboPumpPurge}");
  162. _GuageValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGuage}");
  163. _PVHe3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe3}");
  164. _HeISOValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveHeISO}");
  165. _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
  166. _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
  167. _VAC_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorVacSwitch");
  168. _Water_Flow = DEVICE.GetDevice<IoSensor>($"{Module}.SensorWaterFlowOk");
  169. _WLK_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorWaterLeakOk");
  170. _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
  171. _RFG_Interlock = DEVICE.GetDevice<IoSensor>($"{Module}.GeneratorInterlock");
  172. _PM_Lid_Closed = DEVICE.GetDevice<IoSensor>($"{Module}.SensorPMLidClosed");
  173. _Source_RF_Fan = DEVICE.GetDevice<IoSensor>($"{Module}.SensorSourceRFFan");
  174. _TurboPumpInterlock = DEVICE.GetDevice<IoSensor>($"{Module}.TurboPumpInterlock");
  175. _GasBoxDoor = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxDoorSW");
  176. _GasBoxPressure = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxPressureSW");
  177. _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
  178. _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
  179. _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
  180. _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VenusDevice.PressureControl}");
  181. _gasLines = new IoGasStick[8];
  182. for (int index = 0; index < 8; index++)
  183. {
  184. _gasLines[index] = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStick{index + 1}");
  185. }
  186. _gasLineN2 = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStickN2");
  187. _backsideHe = DEVICE.GetDevice<IoBacksideHe>($"{Module}.BacksideHelium");
  188. _MainPump = DEVICE.GetDevice<PumpBase>($"{Module}.{VenusDevice.MainPump}");
  189. // RS232 Dry pump, SKY
  190. if (SC.GetValue<int>($"{Module}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  191. {
  192. if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  193. {
  194. _MainPump = DEVICE.GetDevice<SkyPump>($"{Module}.{VenusDevice.MainPump}");
  195. }
  196. else if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  197. {
  198. _MainPump = DEVICE.GetDevice<EdwardsPump>($"{Module}.{VenusDevice.MainPump}");
  199. }
  200. }
  201. _ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
  202. _TurboPump = DEVICE.GetDevice<AdixenTurboPump>($"{Module}.{VenusDevice.TurboPump}");
  203. _pendulumValve = DEVICE.GetDevice<PendulumValve>($"{Module}.{VenusDevice.PendulumValve}");
  204. if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
  205. SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
  206. {
  207. if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
  208. {
  209. _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
  210. }
  211. else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
  212. {
  213. _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
  214. }
  215. }
  216. // RS232 AdTec Generator
  217. if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 &&
  218. SC.GetValue<int>($"{Module}.Rf.MFG") == (int)GeneratorMFG.AdTec)
  219. {
  220. _Generator = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.Rf}");
  221. }
  222. // Ethernet Comet Generator Bias
  223. if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
  224. {
  225. if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
  226. SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
  227. {
  228. _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
  229. }
  230. else if (SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
  231. {
  232. _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
  233. }
  234. }
  235. // RS232 AdTec match
  236. if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  237. SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.AdTec)
  238. {
  239. _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.Match}");
  240. }
  241. // Bias Match
  242. if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
  243. SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  244. SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.AdTec)
  245. {
  246. _BiasMatch = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.BiasMatch}");
  247. }
  248. _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
  249. Valve2IO = new Dictionary<ValveType, IoValve>()
  250. {
  251. { ValveType.PVN21, _PVN21Valve },
  252. { ValveType.PVN22, _PVN22Valve },
  253. { ValveType.PV11, _PV11Valve },
  254. { ValveType.PV12, _PV12Valve },
  255. { ValveType.PV21, _PV21Valve },
  256. { ValveType.PV22, _PV22Valve },
  257. { ValveType.PV31, _PV31Valve },
  258. { ValveType.PV32, _PV32Valve },
  259. { ValveType.PV41, _PV41Valve },
  260. { ValveType.PV42, _PV42Valve },
  261. { ValveType.PV51, _PV51Valve },
  262. { ValveType.PV52, _PV52Valve },
  263. { ValveType.PV61, _PV61Valve },
  264. { ValveType.PV62, _PV62Valve },
  265. { ValveType.PV71, _PV71Valve },
  266. { ValveType.PV72, _PV72Valve },
  267. { ValveType.PV81, _PV81Valve },
  268. { ValveType.PV82, _PV82Valve },
  269. { ValveType.PV91, _PV91Valve },
  270. { ValveType.PV92, _PV92Valve },
  271. { ValveType.PVA1, _PVA1Valve },
  272. { ValveType.PVA2, _PVA2Valve },
  273. { ValveType.PVB1, _PVB1Valve },
  274. { ValveType.PVB2, _PVB2Valve },
  275. { ValveType.PVC1, _PVC1Valve },
  276. { ValveType.PVC2, _PVC2Valve },
  277. { ValveType.N2, _N2Valve },
  278. { ValveType.Mfc1, _Mfc1Valve },
  279. { ValveType.Mfc2, _Mfc2Valve },
  280. { ValveType.Mfc3, _Mfc3Valve },
  281. { ValveType.Mfc4, _Mfc4Valve },
  282. { ValveType.Mfc5, _Mfc5Valve },
  283. { ValveType.Mfc6, _Mfc6Valve },
  284. { ValveType.Mfc7, _Mfc7Valve },
  285. { ValveType.Mfc8, _Mfc8Valve },
  286. { ValveType.Mfc9, _Mfc9Valve },
  287. { ValveType.Mfc10, _Mfc10Valve },
  288. { ValveType.Mfc11, _Mfc11Valve },
  289. { ValveType.Mfc12, _Mfc12Valve },
  290. { ValveType.PVHe1, _PVHe1Valve },
  291. { ValveType.PVHe3, _PVHe3Valve },
  292. { ValveType.PVHe2, _PVHe2Valve },
  293. { ValveType.GasFinal, _GasFinalValve},
  294. { ValveType.SoftPump, _SoftPumpValve},
  295. { ValveType.FastPump, _FastPumpValve},
  296. { ValveType.TurboPumpPumping, _TurboPumpPumpingValve},
  297. { ValveType.TurboPumpPurge, _TurboPumpPurgeValve},
  298. { ValveType.Guage, _GuageValve},
  299. { ValveType.HeISO, _HeISOValve},
  300. { ValveType.MainPurge,_MainPurgeValve}
  301. };
  302. }
  303. #endregion
  304. #region 暴露变量
  305. public override bool IsLidClosed => _Lid.OFFFeedback;
  306. public override bool IsSlitDoorClosed
  307. {
  308. get
  309. {
  310. switch (Module)
  311. {
  312. case ModuleName.PMA:
  313. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed;
  314. case ModuleName.PMB:
  315. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed;
  316. case ModuleName.PMC:
  317. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed;
  318. default:
  319. return true;
  320. }
  321. }
  322. }
  323. public override bool IsPumpRunning => _MainPump.IsRunning;
  324. public override bool IsTurboPumpRunning => _TurboPump.IsRunning;
  325. public override bool IsTurboPumpAtSpeed => _TurboPump.AtSpeed;
  326. public override float TurboPumpSpeed => _TurboPump.Speed;
  327. public override bool HasPumpError => _MainPump.IsError || !_MainPump.IsRunning;
  328. public override bool HasTurboPumpError => _TurboPump.IsError || !_TurboPump.IsRunning;
  329. public override bool IsCDA_OK => _CDAPressure.Value;
  330. public override bool IsFastPumpOpened => _FastPumpValve.Status;
  331. public override bool IsSoftPumpOpened => _SoftPumpValve.Status;
  332. public override bool IsMfc1ValveOpened => _Mfc1Valve.Status;
  333. public override bool IsMfc2ValveOpened => _Mfc2Valve.Status;
  334. public override bool IsMfc3ValveOpened => _Mfc3Valve.Status;
  335. public override bool IsMfc4ValveOpened => _Mfc4Valve.Status;
  336. public override bool IsMfc5ValveOpened => _Mfc5Valve.Status;
  337. public override bool IsMfc6ValveOpened => _Mfc6Valve.Status;
  338. public override bool IsMfc7ValveOpened => _Mfc7Valve.Status;
  339. public override bool IsMfc8ValveOpened => _Mfc8Valve.Status;
  340. public bool IsMfc9ValveOpened => _Mfc9Valve.Status;
  341. public bool IsMfc10ValveOpened => _Mfc10Valve.Status;
  342. public bool IsMfc11ValveOpened => _Mfc11Valve.Status;
  343. public bool IsMfc12ValveOpened => _Mfc12Valve.Status;
  344. public override bool IsGuageValveOpened => _GuageValve.Status;
  345. public override bool IsATM => _ATM_sw.Value;
  346. public override bool PVN22ValveIsOpen => _PVN22Valve.Status;
  347. public override bool LiftPinIsDown => _LiftPin.OFFFeedback;
  348. public override bool LiftPinIsUp => _LiftPin.ONFeedback;
  349. public override bool IsVAC => _VAC_sw.Value;
  350. public override bool IsWaterFlowOk => _Water_Flow.Value;
  351. public override bool IsWLK => _WLK_sw.Value;
  352. public override bool IsRFGInterlockOn => _RFG_Interlock.Value;
  353. public override bool PMLidClosed => _PM_Lid_Closed.Value;
  354. public override bool TurboPumpInterlock => _TurboPumpInterlock.Value;
  355. public override bool SourceRFFanInterlock => _Source_RF_Fan.Value;
  356. public override bool SlitDoorClosed
  357. {
  358. get
  359. {
  360. switch (Module)
  361. {
  362. case ModuleName.PMA:
  363. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed;
  364. case ModuleName.PMB:
  365. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed;
  366. case ModuleName.PMC:
  367. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed;
  368. default:
  369. return true;
  370. }
  371. }
  372. }
  373. public override double ProcessLowPressure => _pressureController.ProcessLow.Value;
  374. public override double ProcessHighPressure => _pressureController.ProcessHigh.Value;
  375. public override double ProcessPressure => _pressureController.ProcessGauge.Value;
  376. public override double ChamberPressure => _pressureController.PressureGauge.Value;
  377. public override double ForelinePressure => _pressureController.ForelineGauge.Value;
  378. public override double TargetPressure => _pressureController.TargetPressure;
  379. public override double ESCHePressure => _pressureController.ESCHeGauge.Value;
  380. public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
  381. public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
  382. public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
  383. public override bool IsHVOn => _ESCHV.IsOn;
  384. public override float CoolantInletTempFB => _Chiller.CoolantInletTcFeedback;
  385. public override float CoolantOutletTempFB => _Chiller.CoolantOutletTcFeedback;
  386. public override bool ChillerIsRunning => _Chiller.IsRunning;
  387. public override float ReflectPower => _Generator.ReflectPower;
  388. public override float BiasReflectPower => _GeneratorBias.ReflectPower;
  389. public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
  390. public override MovementPosition LiftPinPosition
  391. {
  392. get
  393. {
  394. MovementPosition pos = MovementPosition.Unknown;
  395. if (_LiftPin.ONFeedback && !_LiftPin.OFFFeedback)
  396. {
  397. pos = MovementPosition.Up;
  398. }
  399. else if (!_LiftPin.ONFeedback && _LiftPin.OFFFeedback)
  400. {
  401. pos = MovementPosition.Down;
  402. }
  403. return pos;
  404. }
  405. }
  406. public override double TotalGasSetpoint
  407. {
  408. get
  409. {
  410. double sum = 0;
  411. foreach (var gas in _gasLines)
  412. {
  413. sum += gas.FlowSP;
  414. }
  415. return sum;
  416. }
  417. }
  418. public override bool HasGasOutOfRange
  419. {
  420. get
  421. {
  422. foreach (var gas in _gasLines)
  423. {
  424. if (!gas.IsOutOfRange)
  425. return false;
  426. }
  427. return true;
  428. }
  429. }
  430. public override bool IsLidLoadlockClosed
  431. {
  432. get
  433. {
  434. LOG.Write(eEvent.ERR_PM,Module,"VenusSE PM is not exist Loadlock!");
  435. return false;
  436. }
  437. }
  438. public override bool IsATMLoadlock
  439. {
  440. get
  441. {
  442. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  443. return false;
  444. }
  445. }
  446. public override bool IsVACLoadLock
  447. {
  448. get
  449. {
  450. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  451. return false;
  452. }
  453. }
  454. public override bool IsLoadlockArmRetract
  455. {
  456. get
  457. {
  458. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  459. return false;
  460. }
  461. }
  462. public override bool IsLoadlockArmExtend
  463. {
  464. get
  465. {
  466. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  467. return false;
  468. }
  469. }
  470. public override bool LoadlockArmRetract
  471. {
  472. get
  473. {
  474. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  475. return false;
  476. }
  477. }
  478. public override bool LoadlockArmExtend
  479. {
  480. get
  481. {
  482. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  483. return false;
  484. }
  485. }
  486. public override float RFMatchC1 => throw new NotImplementedException();
  487. public override float RFMatchC2 => throw new NotImplementedException();
  488. public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  489. public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  490. public override double LoadlockPressure
  491. {
  492. get
  493. {
  494. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  495. return -100;
  496. }
  497. }
  498. public override void BuzzerBlinking(double time)
  499. {
  500. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist SignalTower!");
  501. }
  502. #endregion
  503. #region 公共方法
  504. public override bool CheckAtm()
  505. {
  506. //检查是否是ATM模式
  507. return _ATM_sw.Value && ChamberPressure > 700000;
  508. }
  509. public override bool CheckChillerStatus()
  510. {
  511. return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
  512. }
  513. public override bool CheckGeneratorAndHVInterlock(VenusDevice device)
  514. {
  515. eEvent evt = device == VenusDevice.Rf ? eEvent.ERR_RF : eEvent.ERR_ESC_HV;
  516. if (!PMLidClosed)
  517. {
  518. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM Lid is Open.");
  519. return false;
  520. }
  521. if (!IsVAC)
  522. {
  523. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM is not Vacuum.");
  524. return false;
  525. }
  526. if (!IsWaterFlowOk)
  527. {
  528. LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
  529. return false;
  530. }
  531. if (!IsRFGInterlockOn)
  532. {
  533. LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
  534. return false;
  535. }
  536. if (!SourceRFFanInterlock)
  537. {
  538. LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
  539. return false;
  540. }
  541. if (!SlitDoorClosed)
  542. {
  543. LOG.Write(evt, Module, $"Cannot Power ON {device} as Slit Door is open.");
  544. return false;
  545. }
  546. if ((device == VenusDevice.ESCHV || device == VenusDevice.BiasRf) && WaferManager.Instance.CheckNoWafer(Module, 0))
  547. {
  548. LOG.Write(evt, Module, $"Cannot Power ON {device} as {Module} has no wafer");
  549. return false;
  550. }
  551. return true;
  552. }
  553. public override void CheckIdleInterlock()
  554. {
  555. if (ForelinePressure > _foreline_interlock_pressure)
  556. {
  557. if (_TurboPumpPumpingValve.SetPoint || _TurboPumpPurgeValve.SetPoint || _pendulumValve.IsOpen)
  558. {
  559. _pendulumValve.TurnValve(false);
  560. _TurboPumpPurgeValve.TurnValve(false, out _);
  561. _TurboPumpPumpingValve.TurnValve(false, out _);
  562. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Foreline pressure:{ForelinePressure} exceed {_foreline_interlock_pressure} mtorr, Pendulum valve & PV6 & PV7 closed automaticlly.");
  563. }
  564. }
  565. }
  566. public override bool CheckLiftDown()
  567. {
  568. return _LiftPin.State == CylinderState.Close;
  569. }
  570. public override bool CheckLiftUp()
  571. {
  572. return _LiftPin.State == CylinderState.Open;
  573. }
  574. public override bool CheckSlitDoorClose()
  575. => IsSlitDoorClosed;
  576. public override bool CheckSlitDoorOpen()
  577. => !IsSlitDoorClosed;
  578. public override void CloseValves()
  579. {
  580. _PVN21Valve.TurnValve(false, out _);
  581. //_PVN22Valve.TurnValve(false, out _);
  582. _PV11Valve.TurnValve(false, out _);
  583. _PV12Valve.TurnValve(false, out _);
  584. _PV21Valve.TurnValve(false, out _);
  585. _PV22Valve.TurnValve(false, out _);
  586. _PV31Valve.TurnValve(false, out _);
  587. _PV32Valve.TurnValve(false, out _);
  588. _PV41Valve.TurnValve(false, out _);
  589. _PV42Valve.TurnValve(false, out _);
  590. _PVHe1Valve.TurnValve(false, out _);
  591. _PVHe2Valve.TurnValve(false, out _);
  592. _GasFinalValve.TurnValve(false, out _);
  593. _SoftPumpValve.TurnValve(false, out _);
  594. _FastPumpValve.TurnValve(false, out _);
  595. _TurboPumpPumpingValve.TurnValve(false, out _);
  596. _TurboPumpPurgeValve.TurnValve(false, out _);
  597. _GuageValve.TurnValve(false, out _);
  598. _N2Valve.TurnValve(false, out _);
  599. _FastPumpValve.TurnValve(false, out _);
  600. _PVHe3Valve.TurnValve(false, out _);
  601. _HeISOValve.TurnValve(false, out _);
  602. //新增
  603. _Mfc1Valve.TurnValve(false, out _);
  604. _Mfc2Valve.TurnValve(false, out _);
  605. _Mfc3Valve.TurnValve(false, out _);
  606. _Mfc4Valve.TurnValve(false, out _);
  607. _Mfc5Valve.TurnValve(false, out _);
  608. _Mfc6Valve.TurnValve(false, out _);
  609. _Mfc7Valve.TurnValve(false, out _);
  610. _Mfc8Valve.TurnValve(false, out _);
  611. _Mfc9Valve.TurnValve(false, out _);
  612. _Mfc10Valve.TurnValve(false, out _);
  613. _Mfc11Valve.TurnValve(false, out _);
  614. _Mfc12Valve.TurnValve(false, out _);
  615. _PV51Valve.TurnValve(false, out _);
  616. _PV52Valve.TurnValve(false, out _);
  617. _PV61Valve.TurnValve(false, out _);
  618. _PV62Valve.TurnValve(false, out _);
  619. _PV71Valve.TurnValve(false, out _);
  620. _PV72Valve.TurnValve(false, out _);
  621. _PV81Valve.TurnValve(false, out _);
  622. _PV82Valve.TurnValve(false, out _);
  623. _PV91Valve.TurnValve(false, out _);
  624. _PV92Valve.TurnValve(false, out _);
  625. _PVA1Valve.TurnValve(false, out _);
  626. _PVA2Valve.TurnValve(false, out _);
  627. _PVB1Valve.TurnValve(false, out _);
  628. _PVB2Valve.TurnValve(false, out _);
  629. _PVC1Valve.TurnValve(false, out _);
  630. _PVC2Valve.TurnValve(false, out _);
  631. foreach (var stick in _gasLines)
  632. {
  633. stick.Stop();
  634. }
  635. }
  636. public override bool ExtendWafer()
  637. {
  638. throw new NotImplementedException();
  639. }
  640. public override bool FlowGas(int gasNum, double val)
  641. {
  642. if (_gasLines.Length <= gasNum)
  643. return false;
  644. _gasLines[gasNum].Flow(val);
  645. return true;
  646. }
  647. public override bool FlowN2(double val)
  648. {
  649. _gasLineN2.Flow(val);
  650. return true;
  651. }
  652. public override bool GeneratorBiasPowerOn(bool on)
  653. {
  654. if (_GeneratorBias == null) return false;
  655. if (on && !IsRFGInterlockOn)
  656. {
  657. LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
  658. return false;
  659. }
  660. return _GeneratorBias.SetPowerOnOff(on, out _);
  661. }
  662. public override bool GeneratorBiasSetMatchMode(bool val)
  663. {
  664. if (_GeneratorBias == null) return false;
  665. string reason = string.Empty;
  666. _GeneratorBias.SetMatchingAutoMode(val, out reason);
  667. return true;
  668. }
  669. public override bool GeneratorBiasSetpower(float val)
  670. {
  671. if (_GeneratorBias == null) return false;
  672. if (Math.Abs(val) > 0.01)
  673. _GeneratorBias.SetPower((ushort)val);
  674. return true;
  675. }
  676. public override bool GeneratorPowerOn(bool on)
  677. {
  678. if (_Generator == null) return false;
  679. if (on && !IsRFGInterlockOn)
  680. {
  681. LOG.Write(eEvent.ERR_RF, Module, "射频电源 Interlock条件不满足");
  682. return false;
  683. }
  684. return _Generator.SetPowerOnOff(on, out _);
  685. }
  686. public override bool GeneratorSetpower(float val)
  687. {
  688. if (_Generator == null) return false;
  689. if (Math.Abs(val) > 0.01)
  690. _Generator.SetPower((ushort)val);
  691. return true;
  692. }
  693. public override int GetPVPosition()
  694. {
  695. return _pendulumValve.Position;
  696. }
  697. public override async void HeatChiller(ChillerType chillerType, double value, double offset)
  698. {
  699. _Chiller?.SetChillerTemp((float)value, (float)offset);
  700. await Task.Delay(1000);
  701. _Chiller?.SetChillerOnOff(true);
  702. }
  703. public override void Home()
  704. {
  705. SetLiftPin(MovementPosition.Down, out _);
  706. //转交TM
  707. //if (!_PM_SlitDoor_Closed.Value)
  708. //{
  709. // SetSlitDoor(true, out _);
  710. //}
  711. //else
  712. //{
  713. // SetSlitDoor(false, out _);
  714. //}
  715. //
  716. //SetSlitDoor(false, out _);
  717. OpenValve(ValveType.PVN22, true);
  718. }
  719. public override void OnOffChiller(ChillerType chillerType, bool onoff)
  720. => _Chiller?.SetChillerOnOff(onoff);
  721. public override bool OnOffSetESCHV(bool on)
  722. => _ESCHV.SetPowerOnOff(on);
  723. public override void OpenValve(ValveType vlvType, bool on)
  724. {
  725. if (Valve2IO.ContainsKey(vlvType))
  726. {
  727. Valve2IO[vlvType].TurnValve(on, out _);
  728. LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{(on ? "打开" : "关闭")} 阀 {vlvType.ToString()}");
  729. }
  730. else
  731. {
  732. throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
  733. }
  734. }
  735. public override bool PendulumValveIsOpen()
  736. {
  737. return _pendulumValve.IsOpen;
  738. }
  739. public override bool RetractWafer()
  740. {
  741. throw new NotImplementedException();
  742. }
  743. public override void SetBacksideHeFlow(double flow)
  744. {
  745. if (_backsideHe == null) return;
  746. _backsideHe.Flow(flow);
  747. }
  748. public override bool SetBacksideHePressure(float mTorr)
  749. {
  750. if (_backsideHe == null) return false;
  751. return _backsideHe.SetBacksideHelium(mTorr);
  752. }
  753. public override bool SetBacksideHeThreshold(int nMin, int nMax)
  754. {
  755. if (_backsideHe == null) return false;
  756. return _backsideHe.SetFlowThreshold(nMin, nMax);
  757. }
  758. public override bool SetBiasMatchPosition(float c1, float c2)
  759. {
  760. if (_BiasMatch == null) return false;
  761. string reason = string.Empty;
  762. _BiasMatch.SetMatchPosition(c1, c2, out reason);
  763. return true;
  764. }
  765. public override bool SetBiasPulseMode(bool on)
  766. {
  767. if (_GeneratorBias == null) return false;
  768. _GeneratorBias.SetPulseMode(on);
  769. return true;
  770. }
  771. public override bool SetBiasPulseRateFreq(int nFreq)
  772. {
  773. if (_GeneratorBias == null) return false;
  774. _GeneratorBias.SetPulseRateFreq(nFreq);
  775. return true;
  776. }
  777. public override bool SetDiasPulseDutyCycle(int percentage)
  778. {
  779. if (_GeneratorBias == null) return false;
  780. _GeneratorBias.SetPulseDutyCycle(percentage);
  781. return true;
  782. }
  783. public override bool SetESCClampVoltage(int nVoltage)
  784. {
  785. if (_ESCHV == null) return false;
  786. return _ESCHV.SetOutputVoltage(nVoltage);
  787. }
  788. public override void SetGeneratorCommunicationMode(int mode)
  789. => _Generator?.SetCommunicationMode(mode);
  790. public override bool SetLiftPin(MovementPosition dirt, out string reason)
  791. {
  792. reason = string.Empty;
  793. switch (dirt)
  794. {
  795. case MovementPosition.Down:
  796. return _LiftPin.SetCylinder(false, out reason);
  797. case MovementPosition.Up:
  798. return _LiftPin.SetCylinder(true, out reason);
  799. case MovementPosition.Left:
  800. case MovementPosition.Right:
  801. case MovementPosition.Middle:
  802. throw new ArgumentException("Movement argument error");
  803. }
  804. return true;
  805. }
  806. public override bool SetMatchPosition(float c1, float c2)
  807. {
  808. if (_Match == null) return false;
  809. string reason = string.Empty;
  810. _Match.SetMatchPosition(c1, c2, out reason);
  811. return true;
  812. }
  813. public override bool SetPVPostion(int position)
  814. => _pendulumValve.SetPosition(position);
  815. public override bool SetPVPressure(int pressure)
  816. => _pendulumValve.SetPressure(pressure);
  817. public override bool SetSlitDoor(bool open, out string reason)
  818. {
  819. reason = string.Empty;
  820. OP.DoOperation($"{Module}.SetSlitDoor",Module,open);
  821. return true;
  822. }
  823. public override bool SetWallTCTemperature(float value)
  824. => _WallTC.RampTemp(value);
  825. public override void StopAllGases()
  826. {
  827. foreach (var line in _gasLines)
  828. {
  829. line.Stop();
  830. }
  831. }
  832. public override bool StopGas(int gasNum)
  833. {
  834. if (_gasLines.Length <= gasNum)
  835. return false;
  836. _gasLines[gasNum].Stop();
  837. return true;
  838. }
  839. public override bool StopN2()
  840. {
  841. _gasLineN2.Stop();
  842. return true;
  843. }
  844. public override void SwitchOnBuzzerAndRed()
  845. {
  846. throw new NotImplementedException();
  847. }
  848. public override void TurnDryPump(bool on)
  849. => _MainPump?.SetPumpOnOff(on);
  850. public override bool TurnPendulumValve(bool on)
  851. => _pendulumValve.TurnValve(on);
  852. public override void TurnTurboPump(bool on)
  853. {
  854. _TurboPump?.SetPumpOnOff(on);
  855. }
  856. #endregion
  857. protected override void CheckPermanentInterlock()
  858. {
  859. if (ProcessPressure > 100 && _GuageValve.SetPoint)
  860. {
  861. _GuageValve.TurnValve(false, out _);
  862. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed 100 mtorr, Guage Valve (DO-31) closed automaticlly.");
  863. }
  864. }
  865. }
  866. }