JetVenusDEPM.cs 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.DataCenter;
  3. using Aitex.Core.RT.Device;
  4. using Aitex.Core.RT.Device.Unit;
  5. using Aitex.Core.RT.Log;
  6. using Aitex.Core.RT.OperationCenter;
  7. using Aitex.Core.RT.SCCore;
  8. using Aitex.Core.UI.Control;
  9. using Aitex.Core.Util;
  10. using Aitex.Core.RT.Fsm;
  11. using MECF.Framework.Common.Device.Bases;
  12. using MECF.Framework.Common.Equipment;
  13. using MECF.Framework.Common.SubstrateTrackings;
  14. using System;
  15. using System.Collections.Generic;
  16. using System.Linq;
  17. using System.Text;
  18. using System.Threading.Tasks;
  19. using System.Windows.Media;
  20. using Venus_Core;
  21. using Venus_RT.Devices.IODevices;
  22. using Venus_RT.Modules;
  23. using IoMfc = Venus_RT.Devices.IODevices.IoMfc;
  24. namespace Venus_RT.Devices
  25. {
  26. class JetVenusDEPM : JetPMBase
  27. {
  28. #region io变量定义
  29. private int _chamberWaferSize;
  30. private readonly IoLid _Lid;
  31. private readonly IoCylinder _linerDoor;
  32. private readonly IoCylinder _LiftPin;
  33. private readonly IoValve _PVN21Valve;
  34. private readonly IoValve _PVN22Valve;
  35. private readonly IoValve _PV11Valve;
  36. private readonly IoValve _PV12Valve;
  37. private readonly IoValve _PV21Valve;
  38. private readonly IoValve _PV22Valve;
  39. private readonly IoValve _PV31Valve;
  40. private readonly IoValve _PV32Valve;
  41. private readonly IoValve _PV41Valve;
  42. private readonly IoValve _PV42Valve;
  43. private readonly IoValve _PV51Valve;//新增
  44. private readonly IoValve _PV52Valve;//新增
  45. private readonly IoValve _PV61Valve;//新增
  46. private readonly IoValve _PV62Valve;//新增
  47. private readonly IoValve _PV71Valve;//新增
  48. private readonly IoValve _PV72Valve;//新增
  49. private readonly IoValve _PV81Valve;//新增
  50. private readonly IoValve _PV82Valve;//新增
  51. private readonly IoValve _PV91Valve;//新增
  52. private readonly IoValve _PV92Valve;//新增
  53. private readonly IoValve _PVA1Valve;//新增
  54. private readonly IoValve _PVA2Valve;//新增
  55. private readonly IoValve _PVB1Valve;//新增
  56. private readonly IoValve _PVB2Valve;//新增
  57. private readonly IoValve _PVC1Valve;//新增
  58. private readonly IoValve _PVC2Valve;//新增
  59. private readonly IoValve _N2Valve;
  60. private readonly IoValve _Mfc1Valve;
  61. private readonly IoValve _Mfc2Valve;
  62. private readonly IoValve _Mfc3Valve;
  63. private readonly IoValve _Mfc4Valve;
  64. private readonly IoValve _Mfc5Valve;
  65. private readonly IoValve _Mfc6Valve;
  66. private readonly IoValve _Mfc7Valve;
  67. private readonly IoValve _Mfc8Valve;
  68. private readonly IoValve _Mfc9Valve; //新增
  69. private readonly IoValve _Mfc10Valve;//新增
  70. private readonly IoValve _Mfc11Valve;//新增 空的
  71. private readonly IoValve _Mfc12Valve;//新增
  72. private readonly IoValve _PVHe1Valve;
  73. private readonly IoValve _PVHe2Valve;
  74. private readonly IoValve _GasFinalValve;
  75. //private readonly IoValve _SoftPumpValve;
  76. private readonly IoValve _FastPumpValve;
  77. private readonly IoValve _TurboPumpPumpingValve;
  78. private readonly IoValve _TurboPumpPurgeValve;
  79. private readonly IoValve _GuageValve;
  80. private readonly IoValve _PVHe3Valve;
  81. private readonly IoValve _PVHe4Valve;
  82. private readonly IoValve _HeISOValve;
  83. private readonly IoValve _HeISOValveOut;
  84. private readonly IoValve _MainPurgeValve;//新增
  85. private readonly IoValve _SecondPurgeValve;//新增
  86. private readonly IoValve _PurgeValve;
  87. private readonly IoSensor _ATM_sw;
  88. private readonly IoSensor _CDAPressure;
  89. private readonly IoSensor _N2Pressure_sw;
  90. private readonly IoSensor _VAC_sw;
  91. private readonly IoSensor _WLK_sw;
  92. private readonly IoSensor _ESCCoolentFlow_sw;
  93. private readonly IoSensor _Water_Flow;
  94. private readonly IoSensor _RFG_Interlock;
  95. //private readonly IoSensor _PM_Lid_Closed;
  96. private readonly IoSensor _Source_RF_Fan;
  97. private readonly IoSensor _TurboPumpInterlock;
  98. private readonly IoSensor _GasBoxDoor;
  99. private readonly IoSensor _GasBoxPressure;
  100. private readonly PumpBase _MainPump;
  101. private readonly ESC5HighVoltage _ESCHV;
  102. private readonly AdixenTurboPump _TurboPump;
  103. private readonly PendulumValve _pendulumValve;
  104. private readonly ChillerBase _Chiller;
  105. private readonly ChillerBase _WallChiller;
  106. private readonly RfPowerBase _Generator;//srf=>AdTecGenerator
  107. private readonly RfPowerBase _GeneratorBias;//brf=>CometRF
  108. private readonly RfMatchBase _Match;
  109. private readonly RfMatchBase _BiasMatch;
  110. private readonly IoHeater _ForelineTC;
  111. private readonly IoHeater _WallTC;
  112. private readonly IoPressureControl _pressureController;
  113. private readonly IoGasStick[] _gasLines;
  114. private readonly IoGasStick _gasLineN2;
  115. private readonly IoBacksideHe _backsideHe;
  116. private readonly IoBacksideHe _backsideHeOut;
  117. private readonly IoMagnet _Magnet;
  118. private readonly IoMfc _heMfc;
  119. private readonly double _foreline_interlock_pressure = 750;
  120. private readonly Dictionary<ValveType, IoValve> Valve2IO;
  121. #endregion
  122. #region 构造函数
  123. public JetVenusDEPM(ModuleName moduleName) : base(moduleName)
  124. {
  125. Module = moduleName;
  126. _chamberWaferSize = SC.GetValue<int>($"{Module}.WaferSize");
  127. _Lid = DEVICE.GetDevice<IoLid>($"{Module}.{VenusDevice.Lid}");
  128. _LiftPin = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LiftPin}");
  129. _linerDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VenusDevice.LinerDoor}");
  130. _PVN21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN21}");
  131. _PVN22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVN22}");
  132. _PV11Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV11}");
  133. _PV12Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV12}");
  134. _PV21Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV21}");
  135. _PV22Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV22}");
  136. _PV31Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV31}");
  137. _PV32Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV32}");
  138. _PV41Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV41}");
  139. _PV42Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV42}");
  140. _PV51Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV51}");
  141. _PV52Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV52}");
  142. _PV61Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV61}");
  143. _PV62Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV62}");
  144. _PV71Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV71}");
  145. _PV72Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV72}");
  146. _PV81Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV81}");
  147. _PV82Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV82}");
  148. _PV91Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV91}");
  149. _PV92Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePV92}");
  150. _PVA1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVA1}");
  151. _PVA2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVA2}");
  152. _PVB1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVB1}");
  153. _PVB2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVB2}");
  154. _PVC1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVC1}");
  155. _PVC2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVC2}");
  156. _N2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveN2}");
  157. _Mfc1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc1}");
  158. _Mfc2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc2}");
  159. _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc3}");
  160. _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc4}");
  161. _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc5}");
  162. _Mfc6Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc6}");
  163. _Mfc7Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc7}");
  164. _Mfc8Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc8}");
  165. _Mfc9Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc9}");
  166. _Mfc10Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc10}");
  167. _Mfc11Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc11}");
  168. _Mfc12Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMfc12}");
  169. _PVHe1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe1}");
  170. _PVHe2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe2}");
  171. _GasFinalValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGasFinal}");
  172. _PurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePurge}");
  173. //_SoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSoftPump}");
  174. _FastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveFastPump}");
  175. _TurboPumpPumpingValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveTurboPumpPumping}");
  176. _TurboPumpPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveTurboPumpPurge}");
  177. _GuageValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveGuage}");
  178. _PVHe3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe3}");
  179. _PVHe4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValvePVHe4}");
  180. _HeISOValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveHeISO}");
  181. _HeISOValveOut = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveHeISOOut}");
  182. _SecondPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveSecondPurge}");
  183. _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
  184. _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
  185. _MainPurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VenusDevice.ValveMainPurge}");
  186. _VAC_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorVacSwitch");
  187. _Water_Flow = DEVICE.GetDevice<IoSensor>($"{Module}.SensorWaterFlowOk");
  188. _WLK_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorWaterLeakOk");
  189. _ESCCoolentFlow_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCoolantFlowSwitch");
  190. _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
  191. _RFG_Interlock = DEVICE.GetDevice<IoSensor>($"{Module}.GeneratorInterlock");
  192. //_PM_Lid_Closed = DEVICE.GetDevice<IoSensor>($"{Module}.SensorPMLidClosed");
  193. //_Source_RF_Fan = DEVICE.GetDevice<IoSensor>($"{Module}.SensorSourceRFFan");
  194. _TurboPumpInterlock = DEVICE.GetDevice<IoSensor>($"{Module}.TurboPumpInterlock");
  195. _GasBoxDoor = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxDoorSW");
  196. _GasBoxPressure = DEVICE.GetDevice<IoSensor>($"{Module}.GasBoxPressureSW");
  197. _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
  198. _WallTC = DEVICE.GetDevice<IoHeater>($"{Module}.WallHeater");
  199. _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
  200. _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VenusDevice.PressureControl}");
  201. _gasLines = new IoGasStick[12];
  202. for (int index = 0; index < 12; index++)
  203. {
  204. _gasLines[index] = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStick{index + 1}");
  205. }
  206. _gasLineN2 = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStickN2");
  207. _backsideHe = DEVICE.GetDevice<IoBacksideHe>($"{Module}.BacksideHelium");
  208. if (_chamberWaferSize == 8)
  209. _backsideHeOut = DEVICE.GetDevice<IoBacksideHe>($"{Module}.BacksideHeliumOut");
  210. _MainPump = DEVICE.GetDevice<PumpBase>($"{Module}.{VenusDevice.MainPump}");
  211. // RS232 Dry pump, SKY
  212. if (SC.GetValue<int>($"{Module}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  213. {
  214. if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  215. {
  216. _MainPump = DEVICE.GetDevice<SkyPump>($"{Module}.{VenusDevice.MainPump}");
  217. }
  218. else if (SC.GetValue<int>($"{Module}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  219. {
  220. _MainPump = DEVICE.GetDevice<EdwardsPump>($"{Module}.{VenusDevice.MainPump}");
  221. }
  222. }
  223. _ESCHV = DEVICE.GetDevice<ESC5HighVoltage>($"{Module}.{VenusDevice.ESCHV}");
  224. _TurboPump = DEVICE.GetDevice<AdixenTurboPump>($"{Module}.{VenusDevice.TurboPump}");
  225. _pendulumValve = DEVICE.GetDevice<PendulumValve>($"{Module}.{VenusDevice.PendulumValve}");
  226. if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
  227. SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS232)
  228. {
  229. if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
  230. {
  231. _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.Chiller}");
  232. }
  233. else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
  234. {
  235. _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
  236. }
  237. }
  238. else
  239. if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller") &&
  240. SC.GetValue<int>($"{Module}.Chiller.CommunicationType") == (int)CommunicationType.RS485 &&
  241. SC.GetValue<bool>($"{Module}.Chiller.ShareCOM"))
  242. {
  243. if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.SMC)
  244. {
  245. _Chiller = DEVICE.GetDevice<SMCShareChiller>($"{Module}.{VenusDevice.Chiller}");
  246. }
  247. else if (SC.GetValue<int>($"{Module}.Chiller.MFG") == (int)ChillerMFG.AIRSYS)
  248. {
  249. _Chiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.Chiller}");
  250. }
  251. }
  252. if (SC.GetValue<bool>($"{Module}.WallChiller.EnableChiller") &&
  253. SC.GetValue<int>($"{Module}.WallChiller.CommunicationType") == (int)CommunicationType.RS232)
  254. {
  255. if (SC.GetValue<int>($"{Module}.WallChiller.MFG") == (int)ChillerMFG.SMC)
  256. {
  257. _WallChiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VenusDevice.WallChiller}");
  258. }
  259. else if (SC.GetValue<int>($"{Module}.WallChiller.MFG") == (int)ChillerMFG.AIRSYS)
  260. {
  261. _WallChiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.WallChiller}");
  262. }
  263. }
  264. else
  265. if (SC.GetValue<bool>($"{Module}.WallChiller.EnableChiller") &&
  266. SC.GetValue<int>($"{Module}.WallChiller.CommunicationType") == (int)CommunicationType.RS485 &&
  267. SC.GetValue<bool>($"{Module}.WallChiller.ShareCOM"))
  268. {
  269. if (SC.GetValue<int>($"{Module}.WallChiller.MFG") == (int)ChillerMFG.SMC)
  270. {
  271. _WallChiller = DEVICE.GetDevice<SMCShareChiller>($"{Module}.{VenusDevice.WallChiller}");
  272. }
  273. else if (SC.GetValue<int>($"{Module}.WallChiller.MFG") == (int)ChillerMFG.AIRSYS)
  274. {
  275. _WallChiller = DEVICE.GetDevice<AIRSYSChiller>($"{Module}.{VenusDevice.WallChiller}");
  276. }
  277. }
  278. // RS232 AdTec Generator
  279. if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 &&
  280. SC.GetValue<int>($"{Module}.Rf.MFG") == (int)GeneratorMFG.AdTec)
  281. {
  282. _Generator = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.Rf}");
  283. }
  284. // Ethernet & RS232 Generator Bias
  285. if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
  286. {
  287. if (SC.GetValue<int>($"{Module}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
  288. SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
  289. {
  290. _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VenusDevice.BiasRf}");
  291. }
  292. else if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 && SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
  293. {
  294. _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VenusDevice.BiasRf}");
  295. }
  296. else if (SC.GetValue<int>($"{Module}.Rf.CommunicationType") == (int)CommunicationType.RS232 && SC.GetValue<int>($"{Module}.BiasRf.MFG") == (int)GeneratorMFG.Truplasma)
  297. {
  298. _GeneratorBias = DEVICE.GetDevice<TruPlasmaRF>($"{Module}.{VenusDevice.BiasRf}");
  299. }
  300. }
  301. // RS232 AdTec match
  302. if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  303. SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.AdTec)
  304. {
  305. _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.Match}");
  306. }
  307. else if (SC.GetValue<int>($"{Module}.Match.CommunicationType") == (int)CommunicationType.RS232 &&
  308. SC.GetValue<int>($"{Module}.Match.MFG") == (int)MatchMFG.Tru)
  309. {
  310. _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VenusDevice.Match}");
  311. }
  312. // Bias Match
  313. if (SC.GetValue<bool>($"{Module}.BiasMatch.EnableBiasMatch") &&
  314. SC.GetValue<int>($"{Module}.BiasMatch.CommunicationType") == (int)CommunicationType.RS232 &&
  315. SC.GetValue<int>($"{Module}.BiasMatch.MFG") == (int)MatchMFG.Tru)
  316. {
  317. _BiasMatch = DEVICE.GetDevice<TruPlasmaMatch>($"{Module}.{VenusDevice.BiasMatch}");
  318. }
  319. _foreline_interlock_pressure = SC.GetValue<double>($"{Module}.ForelineInterlockPressure");
  320. _Magnet = DEVICE.GetDevice<IoMagnet>($"{Module}.AIoMagnet");
  321. Valve2IO = new Dictionary<ValveType, IoValve>()
  322. {
  323. { ValveType.PVN21, _PVN21Valve },
  324. { ValveType.PVN22, _PVN22Valve },
  325. { ValveType.PV11, _PV11Valve },
  326. { ValveType.PV12, _PV12Valve },
  327. { ValveType.PV21, _PV21Valve },
  328. { ValveType.PV22, _PV22Valve },
  329. { ValveType.PV31, _PV31Valve },
  330. { ValveType.PV32, _PV32Valve },
  331. { ValveType.PV41, _PV41Valve },
  332. { ValveType.PV42, _PV42Valve },
  333. { ValveType.PV51, _PV51Valve },
  334. { ValveType.PV52, _PV52Valve },
  335. { ValveType.PV61, _PV61Valve },
  336. { ValveType.PV62, _PV62Valve },
  337. { ValveType.PV71, _PV71Valve },
  338. { ValveType.PV72, _PV72Valve },
  339. { ValveType.PV81, _PV81Valve },
  340. { ValveType.PV82, _PV82Valve },
  341. { ValveType.PV91, _PV91Valve },
  342. { ValveType.PV92, _PV92Valve },
  343. { ValveType.PVA1, _PVA1Valve },
  344. { ValveType.PVA2, _PVA2Valve },
  345. { ValveType.PVB1, _PVB1Valve },
  346. { ValveType.PVB2, _PVB2Valve },
  347. { ValveType.PVC1, _PVC1Valve },
  348. { ValveType.PVC2, _PVC2Valve },
  349. { ValveType.N2, _N2Valve },
  350. { ValveType.Mfc1, _Mfc1Valve },
  351. { ValveType.Mfc2, _Mfc2Valve },
  352. { ValveType.Mfc3, _Mfc3Valve },
  353. { ValveType.Mfc4, _Mfc4Valve },
  354. { ValveType.Mfc5, _Mfc5Valve },
  355. { ValveType.Mfc6, _Mfc6Valve },
  356. { ValveType.Mfc7, _Mfc7Valve },
  357. { ValveType.Mfc8, _Mfc8Valve },
  358. { ValveType.Mfc9, _Mfc9Valve },
  359. { ValveType.Mfc10, _Mfc10Valve },
  360. { ValveType.Mfc11, _Mfc11Valve },
  361. { ValveType.Mfc12, _Mfc12Valve },
  362. { ValveType.PVHe1, _PVHe1Valve },
  363. { ValveType.PVHe3, _PVHe3Valve },
  364. { ValveType.PVHe2, _PVHe2Valve },
  365. { ValveType.PVHe4, _PVHe4Valve },
  366. { ValveType.GasFinal, _GasFinalValve},
  367. { ValveType.Purge, _PurgeValve},
  368. { ValveType.FastPump, _FastPumpValve},
  369. { ValveType.TurboPumpPumping, _TurboPumpPumpingValve},
  370. { ValveType.TurboPumpPurge, _TurboPumpPurgeValve},
  371. { ValveType.Guage, _GuageValve},
  372. { ValveType.HeISO, _HeISOValve},
  373. { ValveType.HeISOOut, _HeISOValveOut},
  374. { ValveType.MainPurge,_MainPurgeValve},
  375. { ValveType.SecondPurge, _SecondPurgeValve},
  376. };
  377. SensorWithAlarm();
  378. DATA.Subscribe($"{Name}.ESCHePressure", () => ESCHePressure);
  379. DATA.Subscribe($"{Name}.ESCHeOutPressure", () => ESCHeOutPressure);
  380. DATA.Subscribe($"{Name}.ESCHV.Temp", () => CoolantOutletTempFB);
  381. DATA.Subscribe($"{Name}.Chiller.Temp", () => CoolantInletTempFB);
  382. }
  383. #endregion
  384. #region 暴露变量
  385. public override int ChamberWaferSize => _chamberWaferSize;
  386. public override bool IsLidClosed => _Lid.OFFFeedback;
  387. public override bool IsSlitDoorClosed
  388. {
  389. get
  390. {
  391. if (Singleton<RouteManager>.Instance.seTM != null)
  392. {
  393. switch (Module)
  394. {
  395. case ModuleName.PMA:
  396. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed;
  397. case ModuleName.PMB:
  398. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed;
  399. case ModuleName.PMC:
  400. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed;
  401. case ModuleName.PMD:
  402. return Singleton<RouteManager>.Instance.seTM.IsPMDSlitDoorClosed;
  403. default:
  404. return false;
  405. }
  406. }
  407. else
  408. return false;
  409. }
  410. }
  411. public override bool IsLinerDoorClosed => _linerDoor.State == CylinderState.Close;
  412. public override bool IsPumpRunning => _MainPump.IsRunning;
  413. public override bool IsISOOpen => _TurboPumpPumpingValve.Status;
  414. public override bool IsTurboPumpRunning => _TurboPump.IsRunning;
  415. public override bool IsPenVOpen => _pendulumValve.DeviceData.IsOpen;
  416. public override bool IsTurboPumpAtSpeed => _TurboPump.AtSpeed;
  417. public override float TurboPumpSpeed => _TurboPump.Speed;
  418. public override bool HasPumpError => _MainPump.IsError || !_MainPump.IsRunning;
  419. public override bool HasTurboPumpError => _TurboPump.IsError || !_TurboPump.IsRunning;
  420. public override bool IsCDA_OK => _CDAPressure.Value;
  421. public override bool IsFastPumpOpened => _FastPumpValve.Status;
  422. public override bool IsSoftPumpOpened { get; }//_SoftPumpValve.Status
  423. public override bool IsMfc1ValveOpened => _Mfc1Valve.Status;
  424. public override bool IsMfc2ValveOpened => _Mfc2Valve.Status;
  425. public override bool IsMfc3ValveOpened => _Mfc3Valve.Status;
  426. public override bool IsMfc4ValveOpened => _Mfc4Valve.Status;
  427. public override bool IsMfc5ValveOpened => _Mfc5Valve.Status;
  428. public override bool IsMfc6ValveOpened => _Mfc6Valve.Status;
  429. public override bool IsMfc7ValveOpened => _Mfc7Valve.Status;
  430. public override bool IsMfc8ValveOpened => _Mfc8Valve.Status;
  431. public override double MFC1FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas1").FeedBack;
  432. public override double MFC2FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas2").FeedBack;
  433. public override double MFC3FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas3").FeedBack;
  434. public override double MFC4FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas4").FeedBack;
  435. public override double MFC5FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas5").FeedBack;
  436. public override double MFC6FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas6").FeedBack;
  437. public override double MFC7FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas7").FeedBack;
  438. public override double MFC8FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas8").FeedBack;
  439. public override double MFC9FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas9").FeedBack;
  440. public override double MFC10FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas10").FeedBack;
  441. public override double MFC11FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas11").FeedBack;
  442. public override double MFC12FeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcGas12").FeedBack;
  443. public override double HeliumFeedBack => DEVICE.GetDevice<IoMfc>($"{Module}.MfcHe").FeedBack;
  444. public bool IsMfc9ValveOpened => _Mfc9Valve.Status;
  445. public bool IsMfc10ValveOpened => _Mfc10Valve.Status;
  446. public bool IsMfc11ValveOpened => _Mfc11Valve.Status;
  447. public bool IsMfc12ValveOpened => _Mfc12Valve.Status;
  448. public override bool IsGuageValveOpened => _GuageValve.Status;
  449. public override bool IsATM => _ATM_sw.Value;
  450. public override bool PVN22ValveIsOpen => _PVN22Valve.Status;
  451. public override bool LiftPinIsDown => _LiftPin.OFFFeedback;
  452. public override bool LiftPinIsUp => _LiftPin.ONFeedback;
  453. public override bool IsVAC => _VAC_sw.Value;
  454. //public override bool IsWaterFlowOk => _Water_Flow.Value;
  455. public override bool IsWaterFlowOk => false;
  456. public override bool IsWLK => _WLK_sw.Value;
  457. public override bool IsRFGInterlockOn => _RFG_Interlock.Value;
  458. //public override bool PMLidClosed => _PM_Lid_Closed.Value;
  459. public override bool TurboPumpInterlock => _TurboPumpInterlock.Value;
  460. public override bool LinerDoorClosed => _linerDoor.State == CylinderState.Close;
  461. public override float PendulumPressure => _pendulumValve.Pressure;
  462. public override float PendulumPosition => _pendulumValve.Position;
  463. public override float BiasForwardPower => _GeneratorBias.ForwardPower;
  464. public override float MagnetIntensity => _Magnet.MagnetPowerIntensity;
  465. public override bool SlitDoorClosed
  466. {
  467. get
  468. {
  469. switch (Module)
  470. {
  471. case ModuleName.PMA:
  472. return Singleton<RouteManager>.Instance.seTM.IsPMASlitDoorClosed;
  473. case ModuleName.PMB:
  474. return Singleton<RouteManager>.Instance.seTM.IsPMBSlitDoorClosed;
  475. case ModuleName.PMC:
  476. return Singleton<RouteManager>.Instance.seTM.IsPMCSlitDoorClosed;
  477. case ModuleName.PMD:
  478. return Singleton<RouteManager>.Instance.seTM.IsPMDSlitDoorClosed;
  479. default:
  480. return true;
  481. }
  482. }
  483. }
  484. //public override double ProcessLowPressure => _pressureController.ProcessLow.Value;
  485. //public override double ProcessHighPressure => _pressureController.ProcessHigh.Value;
  486. public override double ProcessPressure => _pendulumValve.Pressure >= 950 ? 950 : _pendulumValve.Pressure;
  487. public override double ChamberPressure => _pressureController.PressureGauge.Value;
  488. public override double ForelinePressure => _pressureController.ForelineGauge.Value;
  489. public override double TargetPressure => _pressureController.TargetPressure;
  490. public override double ESCHePressure => _pressureController.ESCHeGauge.Value;
  491. public override double ESCHeOutPressure => _pressureController.ESCHeOutGauge.Value;
  492. public override int ESCOutputVoltage => _ESCHV.OutputVoltage;
  493. public override double ESCPositiveOutputCurrent => _ESCHV.PositiveOutputCurrent;
  494. public override double ESCNegativeOutputCurrent => _ESCHV.NegativeOutputCurrent;
  495. public override bool IsHVOn => _ESCHV.IsOn;
  496. public override float CoolantInletWallTempFB
  497. {
  498. get
  499. {
  500. switch (SC.GetValue<int>($"{Module}.WallChiller.CommunicationType"))
  501. {
  502. case (int)CommunicationType.RS232:
  503. return _WallChiller.ControlTcFeedback;
  504. case (int)CommunicationType.RS485:
  505. return _WallChiller.Temperature;
  506. default:
  507. return 0;
  508. }
  509. }
  510. }
  511. public override float CoolantInletTempFB
  512. {
  513. get
  514. {
  515. switch (SC.GetValue<int>($"{Module}.Chiller.CommunicationType"))
  516. {
  517. case (int)CommunicationType.RS232:
  518. return _Chiller.ControlTcFeedback;
  519. case (int)CommunicationType.RS485:
  520. return _Chiller.Temperature;
  521. default:
  522. return 0;
  523. }
  524. }
  525. }
  526. public override float CoolantOutletTempFB => _Chiller.CoolantOutletTcFeedback;
  527. public override bool ChillerIsRunning => _Chiller.IsRunning;
  528. public override float ReflectPower => _Generator.ReflectPower;
  529. public override float BiasReflectPower => _GeneratorBias.ReflectPower;
  530. public override bool BackSideHeOutOfRange => _backsideHe.OutOfRange;
  531. public override bool BackSideOutHeOutOfRange => _backsideHeOut.OutOfRange;
  532. public override MovementPosition LiftPinPosition
  533. {
  534. get
  535. {
  536. MovementPosition pos = MovementPosition.Unknown;
  537. if (_LiftPin.ONFeedback && !_LiftPin.OFFFeedback)
  538. {
  539. pos = MovementPosition.Up;
  540. }
  541. else if (!_LiftPin.ONFeedback && _LiftPin.OFFFeedback)
  542. {
  543. pos = MovementPosition.Down;
  544. }
  545. return pos;
  546. }
  547. }
  548. public override double TotalGasSetpoint
  549. {
  550. get
  551. {
  552. double sum = 0;
  553. foreach (var gas in _gasLines)
  554. {
  555. sum += gas.FlowSP;
  556. }
  557. return sum;
  558. }
  559. }
  560. public override bool HasGasOutOfRange
  561. {
  562. get
  563. {
  564. foreach (var gas in _gasLines)
  565. {
  566. if (!gas.IsOutOfRange)
  567. return false;
  568. }
  569. return true;
  570. }
  571. }
  572. public override bool IsLidLoadlockClosed
  573. {
  574. get
  575. {
  576. //LOG.Write(eEvent.ERR_PM,Module,"VenusSE PM is not exist Loadlock!");
  577. return false;
  578. }
  579. }
  580. //public override bool IsATMLoadlock
  581. //{
  582. // get
  583. // {
  584. // //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  585. // return false;
  586. // }
  587. //}
  588. //public override bool IsVACLoadLock
  589. //{
  590. // get
  591. // {
  592. // //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  593. // return false;
  594. // }
  595. //}
  596. public override bool IsLoadlockArmRetract
  597. {
  598. get
  599. {
  600. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  601. return false;
  602. }
  603. }
  604. public override bool IsLoadlockArmExtend
  605. {
  606. get
  607. {
  608. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  609. return false;
  610. }
  611. }
  612. public override bool LoadlockArmRetract
  613. {
  614. get
  615. {
  616. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  617. return false;
  618. }
  619. }
  620. public override bool LoadlockArmExtend
  621. {
  622. get
  623. {
  624. //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  625. return false;
  626. }
  627. }
  628. public override float RFMatchC1 => _Match != null ? _Match.TunePosition1 : 0;
  629. public override float RFMatchC2 => _Match != null ? _Match.TunePosition1 : 0;
  630. public override float BiasRFMatchC1 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  631. public override float BiasRFMatchC2 => _BiasMatch != null ? _BiasMatch.TunePosition1 : 0;
  632. //public override double LoadlockPressure
  633. //{
  634. // get
  635. // {
  636. // //LOG.Write(eEvent.ERR_PM, Module, "VenusSE PM is not exist Loadlock!");
  637. // return -100;
  638. // }
  639. //}
  640. public override void Monitor()
  641. {
  642. CheckPermanentInterlock();
  643. }
  644. public override void BuzzerBlinking(double time)
  645. {
  646. LOG.Write(eEvent.ERR_PM, Module, "VenusDE PM is not exist SignalTower!");
  647. }
  648. #endregion
  649. #region 公共方法
  650. //public override bool CheckAtm()
  651. //{
  652. // //检查是否是ATM模式
  653. // return _ATM_sw.Value && ChamberPressure > 700000;
  654. //}
  655. public override void RTCloseEvent()
  656. {
  657. if (_GeneratorBias.IsPowerOn)
  658. {
  659. GeneratorBiasPowerOn(false);
  660. }
  661. if (PendulumValveIsOpen())
  662. {
  663. //SetPVPostion(0);
  664. TurnPendulumValve(false);
  665. }
  666. }
  667. public override bool CheckChillerStatus()
  668. {
  669. return _Chiller != null /*&& _Chiller.IsRunning*/ && !_Chiller.IsError;
  670. }
  671. public override bool CheckGeneratorAndHVInterlock(VenusDevice device)
  672. {
  673. eEvent evt = device == VenusDevice.Rf ? eEvent.ERR_RF : eEvent.ERR_ESC_HV;
  674. if (!IsLidClosed)
  675. {
  676. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM Lid is Open.");
  677. return false;
  678. }
  679. if (!IsVAC)
  680. {
  681. LOG.Write(evt, Module, $"Cannot Power ON {device} as PM is not Vacuum.");
  682. return false;
  683. }
  684. //if (!IsWaterFlowOk)
  685. //{
  686. // LOG.Write(evt, Module, $"Cannot Power ON {device} as Water Flow is OFF.");
  687. // return false;
  688. //}
  689. if (!IsRFGInterlockOn)
  690. {
  691. LOG.Write(evt, Module, $"Cannot Power ON {device} as Generator Interlock is OFF.");
  692. return false;
  693. }
  694. //if (!SourceRFFanInterlock)
  695. //{
  696. // LOG.Write(evt, Module, $"Cannot Power ON {device} as Source RF Fan is OFF.");
  697. // return false;
  698. //}
  699. if (!SlitDoorClosed)
  700. {
  701. LOG.Write(evt, Module, $"Cannot Power ON {device} as Slit Door is open.");
  702. return false;
  703. }
  704. if (!LinerDoorClosed)
  705. {
  706. LOG.Write(evt, Module, $"Cannot Power ON {device} as Liner Door is open.");
  707. return false;
  708. }
  709. if ((device == VenusDevice.ESCHV || device == VenusDevice.BiasRf) && WaferManager.Instance.CheckNoWafer(Module, 0))
  710. {
  711. LOG.Write(evt, Module, $"Cannot Power ON {device} as {Module} has no wafer");
  712. return false;
  713. }
  714. return true;
  715. }
  716. public override bool SetBiasMatchWorkMode(MatchWorkMode matchWorkMode)
  717. {
  718. if (_BiasMatch == null) return false;
  719. if (matchWorkMode == MatchWorkMode.Auto)
  720. {
  721. return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Auto, out _);
  722. }
  723. else if (matchWorkMode == MatchWorkMode.Manual)
  724. {
  725. return _BiasMatch.SetMatchMode(EnumRfMatchTuneMode.Manual, out _);
  726. }
  727. return false;
  728. }
  729. public override bool IsRFAble()
  730. {
  731. return false;
  732. }
  733. public override bool StartControlPressure(int pressureSetpoint, int flowSetpoint)
  734. {
  735. OpenValve(ValveType.TurboPumpPumping, true);
  736. if (_TurboPumpPumpingValve.Status)
  737. {
  738. OpenValve(ValveType.Purge, true);
  739. OpenValve(ValveType.GasFinal, false);
  740. //OpenValve(ValveType.N2, true);
  741. OpenValve(ValveType.PVN22, true);
  742. TurnPendulumValve(true);
  743. SetPVPressure(pressureSetpoint);
  744. return true;
  745. }
  746. else
  747. {
  748. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot control pressure,cause Turbo Pump Pumping Valve is Close");
  749. return true;
  750. }
  751. }
  752. public async override void AbortControlPressure()
  753. {
  754. SetPVPostion(1000);
  755. OpenValve(ValveType.PVN22, false);
  756. OpenValve(ValveType.N2, false);
  757. await Task.Delay(2000);
  758. OpenValve(ValveType.GasFinal, true);
  759. OpenValve(ValveType.Purge, false);
  760. //return true;
  761. }
  762. public override void CheckIdleInterlock(int delaytime)
  763. {
  764. if (ForelinePressure > _foreline_interlock_pressure)
  765. {
  766. if (_TurboPumpPumpingValve.SetPoint || _TurboPumpPurgeValve.SetPoint || _pendulumValve.IsOpen)
  767. {
  768. _pendulumValve.TurnValve(false);
  769. _TurboPumpPurgeValve.TurnValve(false, out _);
  770. _TurboPumpPumpingValve.TurnValve(false, out _);
  771. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Foreline pressure:{ForelinePressure} exceed {_foreline_interlock_pressure} mtorr, Pendulum valve & PV6 & PV7 closed automaticlly.");
  772. }
  773. }
  774. }
  775. public override bool CheckLiftDown()
  776. {
  777. return _LiftPin.State == CylinderState.Close;
  778. }
  779. public override bool CheckLiftUp()
  780. {
  781. return _LiftPin.State == CylinderState.Open;
  782. }
  783. public override bool CheckLinerDoorOpen()
  784. {
  785. return _linerDoor.State == CylinderState.Open;
  786. }
  787. public override bool CheckLinerDoorClose()
  788. {
  789. return IsLinerDoorClosed;
  790. }
  791. public override bool CheckSlitDoorClose()
  792. => IsSlitDoorClosed;
  793. public override bool CheckSlitDoorOpen()
  794. => !IsSlitDoorClosed;// !IsLinerDoorClosed
  795. public async override void CloseValves(int? delayTime = null)
  796. {
  797. _PVN21Valve.TurnValve(false, out _);
  798. //_PVN22Valve.TurnValve(false, out _);
  799. _PV11Valve.TurnValve(false, out _);
  800. _PV12Valve.TurnValve(false, out _);
  801. _PV21Valve.TurnValve(false, out _);
  802. _PV22Valve.TurnValve(false, out _);
  803. _PV31Valve.TurnValve(false, out _);
  804. _PV32Valve.TurnValve(false, out _);
  805. _PV41Valve.TurnValve(false, out _);
  806. _PV42Valve.TurnValve(false, out _);
  807. _PVHe1Valve.TurnValve(false, out _);
  808. _PVHe2Valve.TurnValve(false, out _);
  809. _GasFinalValve.TurnValve(false, out _);
  810. //_SoftPumpValve.TurnValve(false, out _);
  811. _FastPumpValve.TurnValve(false, out _);
  812. //_TurboPumpPumpingValve.TurnValve(false, out _);
  813. //_TurboPumpPurgeValve.TurnValve(false, out _);
  814. _GuageValve.TurnValve(false, out _);
  815. _PurgeValve.TurnValve(false, out _);
  816. _N2Valve.TurnValve(false, out _);
  817. _FastPumpValve.TurnValve(false, out _);
  818. _PVHe3Valve.TurnValve(false, out _);
  819. _PVHe4Valve?.TurnValve(false, out _);
  820. _HeISOValve.TurnValve(false, out _);
  821. _HeISOValveOut.TurnValve(false, out _);
  822. _MainPurgeValve.TurnValve(false, out _);
  823. _SecondPurgeValve.TurnValve(false, out _);
  824. //新增
  825. _Mfc1Valve.TurnValve(false, out _);
  826. _Mfc2Valve.TurnValve(false, out _);
  827. _Mfc3Valve.TurnValve(false, out _);
  828. _Mfc4Valve.TurnValve(false, out _);
  829. _Mfc5Valve.TurnValve(false, out _);
  830. _Mfc6Valve.TurnValve(false, out _);
  831. _Mfc7Valve.TurnValve(false, out _);
  832. _Mfc8Valve.TurnValve(false, out _);
  833. _Mfc9Valve.TurnValve(false, out _);
  834. _Mfc10Valve.TurnValve(false, out _);
  835. _Mfc11Valve.TurnValve(false, out _);
  836. _Mfc12Valve.TurnValve(false, out _);
  837. _PV51Valve.TurnValve(false, out _);
  838. _PV52Valve.TurnValve(false, out _);
  839. _PV61Valve.TurnValve(false, out _);
  840. _PV62Valve.TurnValve(false, out _);
  841. _PV71Valve.TurnValve(false, out _);
  842. _PV72Valve.TurnValve(false, out _);
  843. _PV81Valve.TurnValve(false, out _);
  844. _PV82Valve.TurnValve(false, out _);
  845. _PV91Valve.TurnValve(false, out _);
  846. _PV92Valve.TurnValve(false, out _);
  847. _PVA1Valve.TurnValve(false, out _);
  848. _PVA2Valve.TurnValve(false, out _);
  849. _PVB1Valve.TurnValve(false, out _);
  850. _PVB2Valve.TurnValve(false, out _);
  851. _PVC1Valve.TurnValve(false, out _);
  852. _PVC2Valve.TurnValve(false, out _);
  853. foreach (var stick in _gasLines)
  854. {
  855. stick.Stop();
  856. }
  857. if (delayTime != null)
  858. {
  859. await Task.Delay((int)delayTime);
  860. }
  861. }
  862. public override bool CheckValve(ValveType valve)
  863. {
  864. if (Valve2IO.ContainsKey(valve))
  865. return Valve2IO[valve].Status;
  866. else
  867. {
  868. LOG.Write(eEvent.ERR_DEVICE_INFO, Module, $"cannot check {valve}, as the dictionary not contain");
  869. return false;
  870. }
  871. }
  872. public override bool ExtendWafer()
  873. {
  874. throw new NotImplementedException();
  875. }
  876. public override bool FlowGas(int gasNum, double val)
  877. {
  878. if (_gasLines.Length <= gasNum)
  879. return false;
  880. _gasLines[gasNum].Flow(val);
  881. return true;
  882. }
  883. public override bool FlowN2(double val)
  884. {
  885. _gasLineN2.Flow(val);
  886. return true;
  887. }
  888. public override bool GeneratorBiasPowerOn(bool on)
  889. {
  890. if (_GeneratorBias == null) return false;
  891. if (on && !IsRFGInterlockOn)
  892. {
  893. LOG.Write(eEvent.ERR_RF, Module, "Bias射频电源 Interlock条件不满足");
  894. return false;
  895. }
  896. return _GeneratorBias.SetPowerOnOff(on, out _);
  897. }
  898. //public override bool MagnetPowerOn(bool on)
  899. //{
  900. // if (_Magnet == null) return false;
  901. // return _Magnet.SetMagnetOnOff(on, out _);
  902. //}
  903. public override bool GeneratorBiasSetMatchMode(bool val)
  904. {
  905. if (_GeneratorBias == null) return false;
  906. string reason = string.Empty;
  907. _GeneratorBias.SetMatchingAutoMode(val, out reason);
  908. return true;
  909. }
  910. public override bool GeneratorBiasSetpower(float val)
  911. {
  912. if (_GeneratorBias == null) return false;
  913. _GeneratorBias.SetPower((ushort)val);
  914. return true;
  915. }
  916. public override bool GeneratorPowerOn(bool on)
  917. {
  918. if (_Generator == null) return false;
  919. if (on && !IsRFGInterlockOn)
  920. {
  921. LOG.Write(eEvent.ERR_RF, Module, "射频电源 Interlock条件不满足");
  922. return false;
  923. }
  924. return _Generator.SetPowerOnOff(on, out _);
  925. }
  926. public override bool GeneratorSetpower(float val)
  927. {
  928. if (_Generator == null) return false;
  929. if (Math.Abs(val) > 0.01)
  930. _Generator.SetPower((ushort)val);
  931. return true;
  932. }
  933. public override bool MagnetSetpower(float val)
  934. {
  935. if (_Magnet == null) return false;
  936. if (Math.Abs(val) >= 0)
  937. _Magnet.SetMagnetPower(val);
  938. return true;
  939. }
  940. public override bool SetFieldRatio(float val)
  941. {
  942. if (_Magnet == null) return false;
  943. _Magnet.SetFieldRatio(val);
  944. return true;
  945. }
  946. public override bool SetWaveform(int val)
  947. {
  948. if (_Magnet == null) return false;
  949. _Magnet.SetWaveform(val);
  950. return true;
  951. }
  952. public override float GetPVPosition()
  953. {
  954. return _pendulumValve.Position;
  955. }
  956. public override async void HeatChiller(ChillerType chillerType, double value, double offset)
  957. {
  958. SC.SetItemValue($"{Module}.{chillerType}.LastTemp", value);
  959. switch (chillerType)
  960. {
  961. case ChillerType.Chiller:
  962. _Chiller?.SetChillerTemp((float)value, (float)offset);
  963. await Task.Delay(1000);
  964. _Chiller?.SetChillerOnOff(true);
  965. break;
  966. case ChillerType.WallChiller:
  967. _WallChiller?.SetChillerTemp((float)value, (float)offset);
  968. await Task.Delay(1000);
  969. _WallChiller?.SetChillerOnOff(true);
  970. break;
  971. }
  972. }
  973. public override void Home()
  974. {
  975. SetLiftPin(MovementPosition.Down, out _);
  976. //转交TM
  977. if (!IsSlitDoorClosed)
  978. {
  979. SetSlitDoor(false, out _);
  980. }
  981. if (!IsLinerDoorClosed) //
  982. {
  983. SetLinerDoor(false, out _);
  984. }
  985. SetLinerDoor(false, out _);
  986. OpenValve(ValveType.PVN22, false);
  987. _GeneratorBias?.ReConnect();
  988. _ESCHV?.ReConnect();
  989. _BiasMatch?.ReConnect();
  990. _MainPump?.ReConnect();
  991. _TurboPump?.ReConnect();
  992. _pendulumValve?.ReConnect();
  993. _GeneratorBias?.Reset();
  994. _BiasMatch?.Reset();
  995. _Magnet?.Reset();
  996. }
  997. public override void OnOffChiller(ChillerType chillerType, bool onoff)
  998. {
  999. switch (chillerType)
  1000. {
  1001. case ChillerType.Chiller:
  1002. _Chiller?.SetChillerOnOff(onoff);
  1003. break;
  1004. case ChillerType.WallChiller:
  1005. _WallChiller?.SetChillerOnOff(onoff);
  1006. break;
  1007. }
  1008. }
  1009. public override bool OnOffSetESCHV(bool on)
  1010. => _ESCHV.SetPowerOnOff(on);
  1011. public override void OpenValve(ValveType vlvType, bool on)
  1012. {
  1013. if (vlvType != ValveType.SoftPump)
  1014. {
  1015. if (Valve2IO.ContainsKey(vlvType))
  1016. {
  1017. if (vlvType == ValveType.TurboPumpPurge && on)
  1018. {
  1019. if (!IsISOOpen)
  1020. {
  1021. LOG.Write(eEvent.WARN_DEFAULT_WARN, Module, $"Chamber TurboPumpPumping valve is not open, can not turn on TurboPumpPurge valve.");
  1022. return;
  1023. }
  1024. }
  1025. else if (vlvType == ValveType.TurboPumpPumping && !on)
  1026. {
  1027. if (IsTurboPumpRunning)
  1028. {
  1029. if (IsPenVOpen)
  1030. {
  1031. LOG.Write(eEvent.WARN_DEFAULT_WARN, Module, $"Chamber TurboPump is open but Pendulum Valve is open, can not turn off TurboPumpPumping valve.");
  1032. return;
  1033. }
  1034. }
  1035. }
  1036. if (vlvType == ValveType.TurboPumpPurge && !_TurboPumpPumpingValve.Status && on)
  1037. {
  1038. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Purge, cause Turbo Pump Valve not open");
  1039. return;
  1040. }
  1041. if (vlvType == ValveType.TurboPumpPumping && on)
  1042. {
  1043. if (!_MainPump.IsRunning)
  1044. {
  1045. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause Dry Pump Valve is not open");
  1046. return;
  1047. }
  1048. if (ForelinePressure > SC.GetValue<int>($"{Module}.TurboPumpPumpingValveMinForelinePressure"))
  1049. {
  1050. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"cannot open Turbo Pump Pump, cause forelinePressure:{ForelinePressure}");
  1051. return;
  1052. }
  1053. }
  1054. Valve2IO[vlvType].TurnValve(on, out _);
  1055. LOG.Write(eEvent.EV_DEVICE_INFO, Module, $"{(on ? "打开" : "关闭")} 阀 {vlvType.ToString()}");
  1056. }
  1057. else
  1058. {
  1059. throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
  1060. }
  1061. }
  1062. }
  1063. public override bool FullMFC(int gasNum)
  1064. {
  1065. _gasLines[gasNum].Pump();
  1066. return true;
  1067. }
  1068. public override bool PumpGas(int gasNum)
  1069. {
  1070. if (_gasLines.Length <= gasNum)
  1071. return false;
  1072. switch (gasNum)
  1073. {
  1074. case 0:
  1075. //OpenValve(ValveType.PV11, true);
  1076. OpenValve(ValveType.Mfc1, true);
  1077. break;
  1078. case 1:
  1079. //OpenValve(ValveType.PV21, true);
  1080. OpenValve(ValveType.Mfc2, true);
  1081. break;
  1082. case 2:
  1083. //OpenValve(ValveType.PV31, true);
  1084. OpenValve(ValveType.Mfc3, true);
  1085. break;
  1086. case 3:
  1087. //OpenValve(ValveType.PV41, true);
  1088. OpenValve(ValveType.Mfc4, true);
  1089. break;
  1090. case 4:
  1091. //OpenValve(ValveType.PV51, true);
  1092. OpenValve(ValveType.Mfc5, true);
  1093. break;
  1094. case 5:
  1095. //OpenValve(ValveType.PV61, true);
  1096. OpenValve(ValveType.Mfc6, true);
  1097. break;
  1098. case 6:
  1099. //OpenValve(ValveType.PV71, true);
  1100. OpenValve(ValveType.Mfc7, true);
  1101. break;
  1102. case 7:
  1103. //OpenValve(ValveType.PV81, true);
  1104. OpenValve(ValveType.Mfc8, true);
  1105. break;
  1106. case 8:
  1107. //OpenValve(ValveType.PV91, true);
  1108. OpenValve(ValveType.Mfc9, true);
  1109. break;
  1110. case 9:
  1111. //OpenValve(ValveType.PVA1, true);
  1112. OpenValve(ValveType.Mfc10, true);
  1113. break;
  1114. case 10:
  1115. //OpenValve(ValveType.PVB1, true);
  1116. OpenValve(ValveType.Mfc11, true);
  1117. break;
  1118. case 11:
  1119. //OpenValve(ValveType.PVC1, true);
  1120. OpenValve(ValveType.Mfc12, true);
  1121. break;
  1122. }
  1123. _gasLines[gasNum].Pump();
  1124. OpenValve(ValveType.SecondPurge, true);
  1125. return true;
  1126. }
  1127. public override bool PendulumValveIsOpen()
  1128. {
  1129. return _pendulumValve.DeviceData.IsOpen;
  1130. }
  1131. public override bool RetractWafer()
  1132. {
  1133. throw new NotImplementedException();
  1134. }
  1135. public override void SetBacksideHeFlow(double flow)
  1136. {
  1137. if (_backsideHe == null) return;
  1138. _backsideHe.Flow(flow);
  1139. }
  1140. public override bool SetBacksideHePressure(float mTorr)
  1141. {
  1142. if (_backsideHe == null) return false;
  1143. return _backsideHe.SetBacksideHelium(mTorr);
  1144. }
  1145. public override void SetBacksideOutHeFlow(double flow)
  1146. {
  1147. if (_backsideHeOut == null) return;
  1148. _backsideHeOut.Flow(flow);
  1149. }
  1150. public override bool SetBacksideOutHePressure(float mTorr)
  1151. {
  1152. if (_backsideHeOut == null) return false;
  1153. return _backsideHeOut.SetBacksideHelium(mTorr);
  1154. }
  1155. public override bool SetBacksideOutHeThreshold(float nMin, float nMax)
  1156. {
  1157. if (_backsideHeOut == null) return false;
  1158. return _backsideHeOut.SetFlowThreshold(nMin, nMax);
  1159. }
  1160. public override bool SetHeliumPump(bool On)
  1161. {
  1162. if (_backsideHe == null) return false;
  1163. return _backsideHe.HeliumPumpOn(On);
  1164. }
  1165. public override bool SetOutHeliumPump(bool On)
  1166. {
  1167. if (_backsideHeOut == null) return false;
  1168. return _backsideHeOut.HeliumPumpOn(On);
  1169. }
  1170. public override bool SetBacksideHeThreshold(float nMin, float nMax)
  1171. {
  1172. if (_backsideHe == null) return false;
  1173. return _backsideHe.SetFlowThreshold(nMin, nMax);
  1174. }
  1175. public override bool SetBiasMatchPosition(float c1, float c2)
  1176. {
  1177. if (_BiasMatch == null) return false;
  1178. string reason = string.Empty;
  1179. _BiasMatch.SetMatchPosition(c1, c2, out reason);
  1180. return true;
  1181. }
  1182. public override bool SetBiasPulseMode(bool on)
  1183. {
  1184. if (_GeneratorBias == null) return false;
  1185. _GeneratorBias.SetPulseMode(on);
  1186. return true;
  1187. }
  1188. public override bool SetBiasPulseRateFreq(int nFreq)
  1189. {
  1190. if (_GeneratorBias == null) return false;
  1191. _GeneratorBias.SetPulseRateFreq(nFreq);
  1192. return true;
  1193. }
  1194. public override bool SetDiasPulseDutyCycle(int percentage)
  1195. {
  1196. if (_GeneratorBias == null) return false;
  1197. _GeneratorBias.SetPulseDutyCycle(percentage);
  1198. return true;
  1199. }
  1200. public override bool SetESCClampVoltage(int nVoltage)
  1201. {
  1202. if (_ESCHV == null) return false;
  1203. return _ESCHV.SetOutputVoltage(nVoltage);
  1204. }
  1205. public override void SetGeneratorCommunicationMode(int mode)
  1206. => _Generator?.SetCommunicationMode(mode);
  1207. public override bool SetLiftPin(MovementPosition dirt, out string reason)
  1208. {
  1209. reason = string.Empty;
  1210. switch (dirt)
  1211. {
  1212. case MovementPosition.Down:
  1213. return _LiftPin.SetCylinder(false, out reason);
  1214. case MovementPosition.Up:
  1215. return _LiftPin.SetCylinder(true, out reason);
  1216. case MovementPosition.Left:
  1217. case MovementPosition.Right:
  1218. case MovementPosition.Middle:
  1219. throw new ArgumentException("Movement argument error");
  1220. }
  1221. return true;
  1222. }
  1223. public override bool SetMatchPosition(float c1, float c2)
  1224. {
  1225. if (_Match == null) return false;
  1226. string reason = string.Empty;
  1227. _Match.SetMatchPosition(c1, c2, out reason);
  1228. return true;
  1229. }
  1230. public override bool SetPVPostion(float position)
  1231. => _pendulumValve.SetPosition(position);
  1232. public override bool SetPVPressure(float pressure)
  1233. => _pendulumValve.SetPressure(pressure);
  1234. public override bool SetSlitDoor(bool open, out string reason)
  1235. {
  1236. reason = string.Empty;
  1237. //OP.DoOperation($"{Singleton<RouteManager>.Instance.seTM.Module}.SetSlitDoor", Module, open);
  1238. return true;
  1239. }
  1240. public override bool SetLinerDoor(bool open, out string reason)
  1241. {
  1242. return _linerDoor.SetCylinder(open, out reason);
  1243. }
  1244. public override bool SetWallTCTemperature(float value)
  1245. => _WallTC.RampTemp(value);
  1246. public override void StopAllGases()
  1247. {
  1248. foreach (var line in _gasLines)
  1249. {
  1250. line.Stop();
  1251. }
  1252. }
  1253. public override bool StopGas(int gasNum)
  1254. {
  1255. if (_gasLines.Length <= gasNum)
  1256. return false;
  1257. _gasLines[gasNum].Stop();
  1258. return true;
  1259. }
  1260. public override bool StopN2()
  1261. {
  1262. _gasLineN2.Stop();
  1263. return true;
  1264. }
  1265. public override void SwitchOnBuzzerAndRed()
  1266. {
  1267. throw new NotImplementedException();
  1268. }
  1269. public override void TurnDryPump(bool on)
  1270. => _MainPump?.SetPumpOnOff(on);
  1271. public override bool TurnPendulumValve(bool on)
  1272. {
  1273. if (on && (!TurboPumpInterlock || !IsCDA_OK || !IsTurboPumpAtSpeed || !IsWLK))
  1274. {
  1275. LOG.Write(eEvent.ERR_PENDULUM_VALVE, Module, "Cannot open PendulumValve, as Interlock not arrival");
  1276. return false;
  1277. }
  1278. return _pendulumValve.TurnValve(on);
  1279. }
  1280. public override void TurnTurboPump(bool on)
  1281. {
  1282. _TurboPump?.SetPumpOnOff(on);
  1283. }
  1284. public override bool PreparePlace()
  1285. {
  1286. if (!SetLinerDoor(true, out string reason))
  1287. {
  1288. LOG.Write(eEvent.ERR_PM, Module, $"Set Liner Door Open failed:{reason}");
  1289. return false;
  1290. }
  1291. //
  1292. if (!SetLiftPin(MovementPosition.Down, out reason))
  1293. {
  1294. LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin down failed:{reason}");
  1295. return false;
  1296. }
  1297. return true;
  1298. }
  1299. public override bool PreparePick()
  1300. {
  1301. if (!SetLinerDoor(true, out string reason))
  1302. {
  1303. LOG.Write(eEvent.ERR_PM, Module, $"Set Liner Door Open failed:{reason}");
  1304. return false;
  1305. }
  1306. if (!SetLiftPin(MovementPosition.Up, out reason))
  1307. {
  1308. LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin Up failed:{reason}");
  1309. return false;
  1310. }
  1311. return true;
  1312. }
  1313. public override bool PreparePlaceIsOK()
  1314. {
  1315. return LiftPinIsDown && CheckLinerDoorOpen();
  1316. }
  1317. public override bool PreparePickIsOK()
  1318. {
  1319. return LiftPinIsUp && CheckLinerDoorOpen();
  1320. }
  1321. public override bool EndPlace()
  1322. {
  1323. if (!SetLiftPin(MovementPosition.Down, out string reason))
  1324. {
  1325. LOG.Write(eEvent.ERR_PM, Module, $"Set Lift Pin Down failed:{reason}");
  1326. return false;
  1327. }
  1328. if (!SetLinerDoor(false, out reason))
  1329. {
  1330. LOG.Write(eEvent.ERR_PM, Module, $"Set Liner Door Close failed:{reason}");
  1331. return false;
  1332. }
  1333. return true;
  1334. }
  1335. public override bool EndPick()
  1336. {
  1337. if (!SetLinerDoor(false, out string reason))
  1338. {
  1339. LOG.Write(eEvent.ERR_PM, Module, $"Set Liner Door Close failed:{reason}");
  1340. return false;
  1341. }
  1342. return true;
  1343. }
  1344. private void ALARM_WLK_Notify()
  1345. {
  1346. if (Singleton<RouteManager>.Instance.GetPM(Module).IsProcessing)
  1347. {
  1348. LOG.Write(eEvent.ERR_PM, Module, "WaterLeak is off");
  1349. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1350. }
  1351. }
  1352. private void ALARM_RFGInterlock_Notify()
  1353. {
  1354. if (Singleton<RouteManager>.Instance.GetPM(Module).IsProcessing)
  1355. {
  1356. LOG.Write(eEvent.ERR_PM, Module, "RFGInterlock is off");
  1357. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1358. }
  1359. }
  1360. private void ALARM_TurboPumpInterlock_Notify()
  1361. {
  1362. if (Singleton<RouteManager>.Instance.GetPM(Module).IsProcessing)
  1363. {
  1364. LOG.Write(eEvent.ERR_PM, Module, "TurboPumpInterlock is off");
  1365. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1366. }
  1367. }
  1368. private void ALARM_GasBoxDoor_Notify()
  1369. {
  1370. if (Singleton<RouteManager>.Instance.GetPM(Module).IsProcessing)
  1371. {
  1372. LOG.Write(eEvent.ERR_PM, Module, "GasBoxDoor is off");
  1373. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1374. }
  1375. }
  1376. private void ALARM_GasBoxPressure_Notify()
  1377. {
  1378. if (Singleton<RouteManager>.Instance.GetPM(Module).IsProcessing)
  1379. {
  1380. LOG.Write(eEvent.ERR_PM, Module, "GasBoxPressure is off");
  1381. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1382. }
  1383. }
  1384. private void ALARM_ESCCoolentFlow()
  1385. {
  1386. LOG.Write(eEvent.ERR_PM, Module, "ESC Coolent Flow is off");
  1387. Singleton<RouteManager>.Instance.GetPM(Module).PostMsg(FSM_MSG.ALARM);
  1388. }
  1389. private void SensorWithAlarm()
  1390. {
  1391. _WLK_sw.WarningAction += ALARM_WLK_Notify;
  1392. _RFG_Interlock.WarningAction += ALARM_RFGInterlock_Notify;
  1393. _TurboPumpInterlock.WarningAction += ALARM_TurboPumpInterlock_Notify;
  1394. _GasBoxDoor.WarningAction += ALARM_GasBoxDoor_Notify;
  1395. _GasBoxPressure.WarningAction += ALARM_GasBoxPressure_Notify;
  1396. _ESCCoolentFlow_sw.WarningAction += ALARM_ESCCoolentFlow;
  1397. }
  1398. public override bool EndPlaceIsOK()
  1399. {
  1400. return CheckSlitDoorClose() && LiftPinIsDown && CheckLinerDoorClose();
  1401. }
  1402. public override bool EndPickIsOK()
  1403. {
  1404. return CheckSlitDoorClose() && CheckLinerDoorClose();
  1405. }
  1406. #endregion
  1407. protected override void CheckPermanentInterlock()
  1408. {
  1409. if (ChamberPressure > 950 && _GuageValve.SetPoint)
  1410. {
  1411. _GuageValve.TurnValve(false, out _);
  1412. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed 950 mtorr, Guage Valve (DO-31) closed automaticlly.");
  1413. }
  1414. if (ChamberPressure < 950 && !_GuageValve.SetPoint)
  1415. {
  1416. _GuageValve.TurnValve(true, out _);
  1417. LOG.Write(eEvent.WARN_DEVICE_INFO, Module, $"Process pressure:{ChamberPressure} exceed 950 mtorr, Guage Valve (DO-31) open automaticlly.");
  1418. }
  1419. }
  1420. public override void PMInError()
  1421. {
  1422. CloseValves(2000);
  1423. GeneratorPowerOn(false);
  1424. GeneratorBiasPowerOn(false);
  1425. OpenValve(ValveType.TurboPumpPumping, true);
  1426. OpenValve(ValveType.TurboPumpPurge, true);
  1427. _Magnet.SetMagnetPower(0);
  1428. if (IsTurboPumpAtSpeed)
  1429. {
  1430. OpenValve(ValveType.TurboPumpPumping, true);
  1431. _pendulumValve.SetPosition(1000);
  1432. }
  1433. SetBacksideHeThreshold(0, 0);
  1434. if (_chamberWaferSize == 8)
  1435. SetBacksideOutHeThreshold(0, 0);
  1436. OnOffSetESCHV(false);
  1437. }
  1438. }
  1439. }