JetVenusSEPM.cs 42 KB

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