JetVenusDEPM.cs 42 KB

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