JetVenusDEPM.cs 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129
  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 JetVenusDEPM : 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 IoValve _SecondPurgeValve;//新增
  80. private readonly IoValve _PurgeValve;
  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 JetVenusDEPM(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. _N2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveN2}");
  145. _Mfc1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc1}");
  146. _Mfc2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
  147. _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc3}");
  148. _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc4}");
  149. _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc5}");
  150. _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
  151. _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
  152. _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
  153. _Mfc9Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc9}");
  154. _Mfc10Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc10}");
  155. _Mfc11Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc11}");
  156. _Mfc12Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc12}");
  157. _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
  158. _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
  159. _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
  160. _PurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePurge}");
  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. _SecondPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSecondPurge}");
  169. _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
  170. _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
  171. _MainPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMainPurge}");
  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.Purge, _PurgeValve},
  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. };
  308. }
  309. #endregion
  310. #region 暴露变量
  311. public override bool IsLidClosed => _Lid.OFFFeedback;
  312. public override bool IsSlitDoorClosed
  313. {
  314. get
  315. {
  316. if (Singleton<RouteManager>.Instance.seTM!=null)
  317. {
  318. switch (Module)
  319. {
  320. case ModuleName.PMA:
  321. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed;
  322. case ModuleName.PMB:
  323. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed;
  324. case ModuleName.PMC:
  325. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed;
  326. default:
  327. return false;
  328. }
  329. }
  330. else
  331. return false;
  332. }
  333. }
  334. public override bool IsPumpRunning => _MainPump.IsRunning;
  335. public override bool IsTurboPumpRunning => _TurboPump.IsRunning;
  336. public override bool IsTurboPumpAtSpeed => _TurboPump.AtSpeed;
  337. public override float TurboPumpSpeed => _TurboPump.Speed;
  338. public override bool HasPumpError => _MainPump.IsError || !_MainPump.IsRunning;
  339. public override bool HasTurboPumpError => _TurboPump.IsError || !_TurboPump.IsRunning;
  340. public override bool IsCDA_OK => _CDAPressure.Value;
  341. public override bool IsFastPumpOpened => _FastPumpValve.Status;
  342. public override bool IsSoftPumpOpened { get; }//_SoftPumpValve.Status
  343. public override bool IsMfc1ValveOpened => _Mfc1Valve.Status;
  344. public override bool IsMfc2ValveOpened => _Mfc2Valve.Status;
  345. public override bool IsMfc3ValveOpened => _Mfc3Valve.Status;
  346. public override bool IsMfc4ValveOpened => _Mfc4Valve.Status;
  347. public override bool IsMfc5ValveOpened => _Mfc5Valve.Status;
  348. public override bool IsMfc6ValveOpened => _Mfc6Valve.Status;
  349. public override bool IsMfc7ValveOpened => _Mfc7Valve.Status;
  350. public override bool IsMfc8ValveOpened => _Mfc8Valve.Status;
  351. public bool IsMfc9ValveOpened => _Mfc9Valve.Status;
  352. public bool IsMfc10ValveOpened => _Mfc10Valve.Status;
  353. public bool IsMfc11ValveOpened => _Mfc11Valve.Status;
  354. public bool IsMfc12ValveOpened => _Mfc12Valve.Status;
  355. public override bool IsGuageValveOpened => _GuageValve.Status;
  356. public override bool IsATM => _ATM_sw.Value;
  357. public override bool PVN22ValveIsOpen => _PVN22Valve.Status;
  358. public override bool LiftPinIsDown => _LiftPin.OFFFeedback;
  359. public override bool LiftPinIsUp => _LiftPin.ONFeedback;
  360. public override bool IsVAC => _VAC_sw.Value;
  361. //public override bool IsWaterFlowOk => _Water_Flow.Value;
  362. public override bool IsWaterFlowOk => false;
  363. public override bool IsWLK => _WLK_sw.Value;
  364. public override bool IsRFGInterlockOn => _RFG_Interlock.Value;
  365. public override bool PMLidClosed => _PM_Lid_Closed.Value;
  366. public override bool TurboPumpInterlock => _TurboPumpInterlock.Value;
  367. public override bool SourceRFFanInterlock => _Source_RF_Fan.Value;
  368. public override bool SlitDoorClosed
  369. {
  370. get
  371. {
  372. switch (Module)
  373. {
  374. case ModuleName.PMA:
  375. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed && Singleton<RouteManager>.Instance.PMA.IsSlitDoorClose;
  376. case ModuleName.PMB:
  377. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed && Singleton<RouteManager>.Instance.PMB.IsSlitDoorClose;
  378. case ModuleName.PMC:
  379. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed && Singleton<RouteManager>.Instance.PMC.IsSlitDoorClose;
  380. default:
  381. return true;
  382. }
  383. }
  384. }
  385. //public override double ProcessLowPressure => _pressureController.ProcessLow.Value;
  386. //public override double ProcessHighPressure => _pressureController.ProcessHigh.Value;
  387. public override double ProcessPressure => _pressureController.ProcessGauge.Value;
  388. public override double ChamberPressure => _pressureController.PressureGauge.Value;
  389. public override double ForelinePressure => _pressureController.ForelineGauge.Value;
  390. public override double TargetPressure => _pressureController.TargetPressure;
  391. public override double ESCHePressure => 1.0;
  392. public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
  393. public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
  394. public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
  395. public override bool IsHVOn => _ESCHV.IsOn;
  396. public override float CoolantInletTempFB => _Chiller.CoolantInletTcFeedback;
  397. public override float CoolantOutletTempFB => _Chiller.CoolantOutletTcFeedback;
  398. public override bool ChillerIsRunning => _Chiller.IsRunning;
  399. public override float ReflectPower => _Generator.ReflectPower;
  400. public override float BiasReflectPower => _GeneratorBias.ReflectPower;
  401. public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
  402. public override MovementPosition LiftPinPosition
  403. {
  404. get
  405. {
  406. MovementPosition pos = MovementPosition.Unknown;
  407. if (_LiftPin.ONFeedback && !_LiftPin.OFFFeedback)
  408. {
  409. pos = MovementPosition.Up;
  410. }
  411. else if (!_LiftPin.ONFeedback && _LiftPin.OFFFeedback)
  412. {
  413. pos = MovementPosition.Down;
  414. }
  415. return pos;
  416. }
  417. }
  418. public override double TotalGasSetpoint
  419. {
  420. get
  421. {
  422. double sum = 0;
  423. foreach (var gas in _gasLines)
  424. {
  425. sum += gas.FlowSP;
  426. }
  427. return sum;
  428. }
  429. }
  430. public override bool HasGasOutOfRange
  431. {
  432. get
  433. {
  434. foreach (var gas in _gasLines)
  435. {
  436. if (!gas.IsOutOfRange)
  437. return false;
  438. }
  439. return true;
  440. }
  441. }
  442. public override bool IsLidLoadlockClosed
  443. {
  444. get
  445. {
  446. //LOG.Write(eEvent.ERR_PM,Module,"VenusSE PM is not exist Loadlock!");
  447. return false;
  448. }
  449. }
  450. public override bool IsATMLoadlock
  451. {
  452. get
  453. {
  454. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  455. return false;
  456. }
  457. }
  458. public override bool IsVACLoadLock
  459. {
  460. get
  461. {
  462. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  463. return false;
  464. }
  465. }
  466. public override bool IsLoadlockArmRetract
  467. {
  468. get
  469. {
  470. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  471. return false;
  472. }
  473. }
  474. public override bool IsLoadlockArmExtend
  475. {
  476. get
  477. {
  478. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  479. return false;
  480. }
  481. }
  482. public override bool LoadlockArmRetract
  483. {
  484. get
  485. {
  486. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  487. return false;
  488. }
  489. }
  490. public override bool LoadlockArmExtend
  491. {
  492. get
  493. {
  494. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  495. return false;
  496. }
  497. }
  498. public override float RFMatchC1 => _Match!=null? _Match.TunePosition1 : 0;
  499. public override float RFMatchC2 => _Match != null ? _Match.TunePosition1 : 0;
  500. public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  501. public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  502. public override double LoadlockPressure
  503. {
  504. get
  505. {
  506. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  507. return -100;
  508. }
  509. }
  510. public override void BuzzerBlinking(double time)
  511. {
  512. LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist SignalTower!");
  513. }
  514. #endregion
  515. #region 公共方法
  516. public override bool CheckAtm()
  517. {
  518. //检查是否是ATM模式
  519. return _ATM_sw.Value && ChamberPressure > 700000;
  520. }
  521. public override bool CheckChillerStatus()
  522. {
  523. return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
  524. }
  525. public override bool CheckGeneratorAndHVInterlock(VenusDevice device)
  526. {
  527. eEvent evt = device == VenusDevice.Rf ? eEvent.ERR_RF : eEvent.ERR_ESC_HV;
  528. if (!PMLidClosed)
  529. {
  530. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM Lid is Open.");
  531. return false;
  532. }
  533. if (!IsVAC)
  534. {
  535. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM is not Vacuum.");
  536. return false;
  537. }
  538. //if (!IsWaterFlowOk)
  539. //{
  540. // LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
  541. // return false;
  542. //}
  543. if (!IsRFGInterlockOn)
  544. {
  545. LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
  546. return false;
  547. }
  548. if (!SourceRFFanInterlock)
  549. {
  550. LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
  551. return false;
  552. }
  553. if (!SlitDoorClosed)
  554. {
  555. LOG.Write(evt, Module, $"Cannot Power ON {device} as Slit Door is open.");
  556. return false;
  557. }
  558. if ((device == VenusDevice.ESCHV || device == VenusDevice.BiasRf) && WaferManager.Instance.CheckNoWafer(Module, 0))
  559. {
  560. LOG.Write(evt, Module, $"Cannot Power ON {device} as {Module} has no wafer");
  561. return false;
  562. }
  563. return true;
  564. }
  565. public override void CheckIdleInterlock()
  566. {
  567. if (ForelinePressure > _foreline_interlock_pressure)
  568. {
  569. if (_TurboPumpPumpingValve.SetPoint || _TurboPumpPurgeValve.SetPoint || _pendulumValve.IsOpen)
  570. {
  571. _pendulumValve.TurnValve(false);
  572. _TurboPumpPurgeValve.TurnValve(false, out _);
  573. _TurboPumpPumpingValve.TurnValve(false, out _);
  574. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Foreline pressure:{ForelinePressure} exceed {_foreline_interlock_pressure} mtorr, Pendulum valve & PV6 & PV7 closed automaticlly.");
  575. }
  576. }
  577. }
  578. public override bool CheckLiftDown()
  579. {
  580. return _LiftPin.State == CylinderState.Close;
  581. }
  582. public override bool CheckLiftUp()
  583. {
  584. return _LiftPin.State == CylinderState.Open;
  585. }
  586. public override bool CheckSlitDoorClose()
  587. => IsSlitDoorClosed;
  588. public override bool CheckSlitDoorOpen()
  589. => !IsSlitDoorClosed;
  590. public override void CloseValves(int? delayTime = null)
  591. {
  592. _PVN21Valve.TurnValve(false, out _);
  593. //_PVN22Valve.TurnValve(false, out _);
  594. _PV11Valve.TurnValve(false, out _);
  595. _PV12Valve.TurnValve(false, out _);
  596. _PV21Valve.TurnValve(false, out _);
  597. _PV22Valve.TurnValve(false, out _);
  598. _PV31Valve.TurnValve(false, out _);
  599. _PV32Valve.TurnValve(false, out _);
  600. _PV41Valve.TurnValve(false, out _);
  601. _PV42Valve.TurnValve(false, out _);
  602. _PVHe1Valve.TurnValve(false, out _);
  603. _PVHe2Valve.TurnValve(false, out _);
  604. _GasFinalValve.TurnValve(false, out _);
  605. //_SoftPumpValve.TurnValve(false, out _);
  606. _FastPumpValve.TurnValve(false, out _);
  607. _TurboPumpPumpingValve.TurnValve(false, out _);
  608. _TurboPumpPurgeValve.TurnValve(false, out _);
  609. _GuageValve.TurnValve(false, out _);
  610. _PurgeValve.TurnValve(false, out _);
  611. _N2Valve.TurnValve(false, out _);
  612. _FastPumpValve.TurnValve(false, out _);
  613. _PVHe3Valve.TurnValve(false, out _);
  614. _HeISOValve.TurnValve(false, out _);
  615. _MainPurgeValve.TurnValve(false, out _);
  616. _SecondPurgeValve.TurnValve(false, out _);
  617. //新增
  618. _Mfc1Valve.TurnValve(false, out _);
  619. _Mfc2Valve.TurnValve(false, out _);
  620. _Mfc3Valve.TurnValve(false, out _);
  621. _Mfc4Valve.TurnValve(false, out _);
  622. _Mfc5Valve.TurnValve(false, out _);
  623. _Mfc6Valve.TurnValve(false, out _);
  624. _Mfc7Valve.TurnValve(false, out _);
  625. _Mfc8Valve.TurnValve(false, out _);
  626. _Mfc9Valve.TurnValve(false, out _);
  627. _Mfc10Valve.TurnValve(false, out _);
  628. _Mfc11Valve.TurnValve(false, out _);
  629. _Mfc12Valve.TurnValve(false, out _);
  630. _PV51Valve.TurnValve(false, out _);
  631. _PV52Valve.TurnValve(false, out _);
  632. _PV61Valve.TurnValve(false, out _);
  633. _PV62Valve.TurnValve(false, out _);
  634. _PV71Valve.TurnValve(false, out _);
  635. _PV72Valve.TurnValve(false, out _);
  636. _PV81Valve.TurnValve(false, out _);
  637. _PV82Valve.TurnValve(false, out _);
  638. _PV91Valve.TurnValve(false, out _);
  639. _PV92Valve.TurnValve(false, out _);
  640. _PVA1Valve.TurnValve(false, out _);
  641. _PVA2Valve.TurnValve(false, out _);
  642. _PVB1Valve.TurnValve(false, out _);
  643. _PVB2Valve.TurnValve(false, out _);
  644. _PVC1Valve.TurnValve(false, out _);
  645. _PVC2Valve.TurnValve(false, out _);
  646. foreach (var stick in _gasLines)
  647. {
  648. stick.Stop();
  649. }
  650. }
  651. public override bool ExtendWafer()
  652. {
  653. throw new NotImplementedException();
  654. }
  655. public override bool FlowGas(int gasNum, double val)
  656. {
  657. if (_gasLines.Length <= gasNum)
  658. return false;
  659. _gasLines[gasNum].Flow(val);
  660. return true;
  661. }
  662. public override bool FlowN2(double val)
  663. {
  664. _gasLineN2.Flow(val);
  665. return true;
  666. }
  667. public override bool GeneratorBiasPowerOn(bool on)
  668. {
  669. if (_GeneratorBias == null) return false;
  670. if (on && !IsRFGInterlockOn)
  671. {
  672. LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
  673. return false;
  674. }
  675. return _GeneratorBias.SetPowerOnOff(on, out _);
  676. }
  677. public override bool GeneratorBiasSetMatchMode(bool val)
  678. {
  679. if (_GeneratorBias == null) return false;
  680. string reason = string.Empty;
  681. _GeneratorBias.SetMatchingAutoMode(val, out reason);
  682. return true;
  683. }
  684. public override bool GeneratorBiasSetpower(float val)
  685. {
  686. if (_GeneratorBias == null) return false;
  687. if (Math.Abs(val) > 0.01)
  688. _GeneratorBias.SetPower((ushort)val);
  689. return true;
  690. }
  691. public override bool GeneratorPowerOn(bool on)
  692. {
  693. if (_Generator == null) return false;
  694. if (on && !IsRFGInterlockOn)
  695. {
  696. LOG.Write(eEvent.ERR_RF, Module, "射频电源 Interlock条件不满足");
  697. return false;
  698. }
  699. return _Generator.SetPowerOnOff(on, out _);
  700. }
  701. public override bool GeneratorSetpower(float val)
  702. {
  703. if (_Generator == null) return false;
  704. if (Math.Abs(val) > 0.01)
  705. _Generator.SetPower((ushort)val);
  706. return true;
  707. }
  708. public override int GetPVPosition()
  709. {
  710. return _pendulumValve.Position;
  711. }
  712. public override async void HeatChiller(ChillerType chillerType, double value, double offset)
  713. {
  714. _Chiller?.SetChillerTemp((float)value, (float)offset);
  715. await Task.Delay(1000);
  716. _Chiller?.SetChillerOnOff(true);
  717. }
  718. public override void Home()
  719. {
  720. SetLiftPin(MovementPosition.Down, out _);
  721. //转交TM
  722. if (!IsSlitDoorClosed)
  723. {
  724. SetSlitDoor(true, out _);
  725. }
  726. else
  727. {
  728. SetSlitDoor(false, out _);
  729. }
  730. //SetSlitDoor(false, out _);
  731. //OpenValve(ValveType.PVN22, true);
  732. }
  733. public override void OnOffChiller(ChillerType chillerType, bool onoff)
  734. => _Chiller?.SetChillerOnOff(onoff);
  735. public override bool OnOffSetESCHV(bool on)
  736. => _ESCHV.SetPowerOnOff(on);
  737. public override void OpenValve(ValveType vlvType, bool on)
  738. {
  739. if (vlvType != ValveType.SoftPump)
  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. }
  752. public override bool PendulumValveIsOpen()
  753. {
  754. return _pendulumValve.IsOpen;
  755. }
  756. public override bool RetractWafer()
  757. {
  758. throw new NotImplementedException();
  759. }
  760. public override void SetBacksideHeFlow(double flow)
  761. {
  762. if (_backsideHe == null) return;
  763. _backsideHe.Flow(flow);
  764. }
  765. public override bool SetBacksideHePressure(float mTorr)
  766. {
  767. if (_backsideHe == null) return false;
  768. return _backsideHe.SetBacksideHelium(mTorr);
  769. }
  770. public override bool SetBacksideHeThreshold(int nMin, int nMax)
  771. {
  772. if (_backsideHe == null) return false;
  773. return _backsideHe.SetFlowThreshold(nMin, nMax);
  774. }
  775. public override bool SetBiasMatchPosition(float c1, float c2)
  776. {
  777. if (_BiasMatch == null) return false;
  778. string reason = string.Empty;
  779. _BiasMatch.SetMatchPosition(c1, c2, out reason);
  780. return true;
  781. }
  782. public override bool SetBiasPulseMode(bool on)
  783. {
  784. if (_GeneratorBias == null) return false;
  785. _GeneratorBias.SetPulseMode(on);
  786. return true;
  787. }
  788. public override bool SetBiasPulseRateFreq(int nFreq)
  789. {
  790. if (_GeneratorBias == null) return false;
  791. _GeneratorBias.SetPulseRateFreq(nFreq);
  792. return true;
  793. }
  794. public override bool SetDiasPulseDutyCycle(int percentage)
  795. {
  796. if (_GeneratorBias == null) return false;
  797. _GeneratorBias.SetPulseDutyCycle(percentage);
  798. return true;
  799. }
  800. public override bool SetESCClampVoltage(int nVoltage)
  801. {
  802. if (_ESCHV == null) return false;
  803. return _ESCHV.SetOutputVoltage(nVoltage);
  804. }
  805. public override void SetGeneratorCommunicationMode(int mode)
  806. => _Generator?.SetCommunicationMode(mode);
  807. public override bool SetLiftPin(MovementPosition dirt, out string reason)
  808. {
  809. reason = string.Empty;
  810. switch (dirt)
  811. {
  812. case MovementPosition.Down:
  813. return _LiftPin.SetCylinder(false, out reason);
  814. case MovementPosition.Up:
  815. return _LiftPin.SetCylinder(true, out reason);
  816. case MovementPosition.Left:
  817. case MovementPosition.Right:
  818. case MovementPosition.Middle:
  819. throw new ArgumentException("Movement argument error");
  820. }
  821. return true;
  822. }
  823. public override bool SetMatchPosition(float c1, float c2)
  824. {
  825. if (_Match == null) return false;
  826. string reason = string.Empty;
  827. _Match.SetMatchPosition(c1, c2, out reason);
  828. return true;
  829. }
  830. public override bool SetPVPostion(int position)
  831. => _pendulumValve.SetPosition(position);
  832. public override bool SetPVPressure(float pressure)
  833. => _pendulumValve.SetPressure(pressure);
  834. public override bool SetSlitDoor(bool open, out string reason)
  835. {
  836. reason = string.Empty;
  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. #endregion
  941. protected override void CheckPermanentInterlock()
  942. {
  943. if (ProcessPressure > 100 && _GuageValve.SetPoint)
  944. {
  945. _GuageValve.TurnValve(false, out _);
  946. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ProcessPressure} exceed 100 mtorr, Guage Valve (DO-31) closed automaticlly.");
  947. }
  948. }
  949. }
  950. }