JetVenusSEPM.cs 44 KB

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