JetVenusSEPM.cs 46 KB

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