JetPM.cs 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118
  1. using System;
  2. using System.Collections.Generic;
  3. using Aitex.Core.Common;
  4. using Aitex.Core.Common.DeviceData;
  5. using Aitex.Core.RT.DataCenter;
  6. using Aitex.Core.RT.Device;
  7. using Aitex.Core.RT.Device.Unit;
  8. using Aitex.Core.RT.Event;
  9. using Aitex.Core.RT.SCCore;
  10. using Aitex.Core.Util;
  11. using Aitex.Core.RT.OperationCenter;
  12. using Aitex.Sorter.Common;
  13. using MECF.Framework.Common.Device.Bases;
  14. using MECF.Framework.Common.Equipment;
  15. using MECF.Framework.Common.Schedulers;
  16. using MECF.Framework.Common.SubstrateTrackings;
  17. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.PMs;
  18. using VirgoCommon;
  19. using VirgoRT.Devices.IODevices;
  20. using VirgoRT.Instances;
  21. using VirgoRT.Module;
  22. using VirgoRT.Modules;
  23. using Aitex.Core.RT.IOCore;
  24. using Aitex.Core.RT.Log;
  25. namespace VirgoRT.Devices
  26. {
  27. enum ValveType
  28. {
  29. PROCESS,
  30. FAST_PUMP,
  31. SOFT_PUMP,
  32. FAST_VENT,
  33. PURGE,
  34. Mfc1,
  35. Mfc2,
  36. Mfc3,
  37. Mfc4,
  38. Mfc5
  39. }
  40. class JetPM : PM
  41. {
  42. // ----------------------------Fields--------------------------
  43. //
  44. private readonly IoLid _Lid;
  45. //private readonly IoCylinder _LidLocker;
  46. private readonly IoMessage _Messager;
  47. private readonly IoMessage _SubstrateTemperature;
  48. private readonly IoMessage _ForelineTemperature;
  49. private readonly IoMessage _CHBWallTemperature;
  50. private readonly IoSensor _ATM_sw;
  51. private readonly IoSensor _VAC_sw;
  52. private readonly IoSensor _WLK_sw;
  53. private readonly IoSensor _CDAPressure;
  54. //private readonly IoSensor _CDAPressure2;
  55. private readonly IoSensor _CoolantInletTC;
  56. private readonly IoSensor _CoolantOutletTC;
  57. private readonly IoSensor _ArmNotExtend;
  58. private readonly IoSensor _N2Pressure_sw;
  59. private readonly IoSensor _RFG_Interlock;
  60. private readonly IoSensor _FactoryScrubberSensor;
  61. private readonly IoPressureControl _pressureController;
  62. private readonly IoHeater _SubstrateTC;
  63. private readonly IoHeater _ForelineTC;
  64. private readonly IoValve _SoftPumpValve;
  65. private readonly IoValve _FastPumpValve;
  66. private readonly IoValve _ProcessValve;
  67. private readonly IoValve _PurgeValve;
  68. private readonly IoValve _FastVentValve;
  69. private readonly IoValve _Mfc1Valve;
  70. private readonly IoValve _Mfc2Valve;
  71. private readonly IoValve _Mfc3Valve;
  72. private readonly IoValve _Mfc4Valve;
  73. private readonly IoValve _Mfc5Valve;
  74. private readonly IoValve _WaterValve;
  75. //private readonly IoValve _N2SupplyValve;
  76. private readonly IoCylinder _slitDoor;
  77. private readonly IoCylinder _LiftPin;
  78. private readonly IoCylinder _PinSmall; // 3'
  79. private readonly IoCylinder _PinMedium; // 4'
  80. private readonly RfPowerBase _Generator;
  81. private readonly RfPowerBase _GeneratorBias;
  82. private readonly RfMatchBase _Match;
  83. private readonly RfMatchBase _BiasMatch;
  84. private readonly PumpBase _MainPump;
  85. private readonly ChillerBase _Chiller;
  86. private readonly IoGasStick[] _gasLines;
  87. private readonly IoTriStateLift _TriStateLiftPin;
  88. private readonly IoTriStateLift2 _TriStateLiftPin2;
  89. private readonly IoTriStateLift4 _TriStateLiftPin4;
  90. private readonly ChillerBase _gridChiller;
  91. private readonly IoHeater _gridHeater;
  92. private readonly IoReset _ResetPlcSignal;
  93. private readonly R_TRIG _trigBasePressure = new R_TRIG();
  94. private readonly R_TRIG _trigBaseTemperature = new R_TRIG();
  95. private readonly R_TRIG _trigWaterLeak = new R_TRIG();
  96. private readonly R_TRIG _trigScrubberSysAlarm = new R_TRIG();
  97. private readonly R_TRIG _trigWaterValve = new R_TRIG();
  98. private double BasePressure;
  99. private double BaseTemperature;
  100. private bool EnableBiasRF = false;
  101. private int _bigWafer = 0;
  102. private int _midWafer = 0;
  103. private int _smallWafer = 0;
  104. private int gasCount = 0;
  105. private readonly int _LiftPinMode;
  106. private readonly int _ChamberType;
  107. private bool _isFactoryScrubberSysInstalled;
  108. // --------------------------Properties------------------------
  109. //
  110. public new ModuleName Module { get; }
  111. // 门的状态
  112. public bool IsSlitDoorClosed => !_slitDoor.ONFeedback && _slitDoor.OFFFeedback;
  113. public bool IsArmNotExtend => _ArmNotExtend.Value;
  114. // 盖子的状态
  115. public bool IsLidClosed => _Lid.OFFFeedback;
  116. // 盖子的锁
  117. //public bool IsLidLocked => !_LidLocker.ONSetPoint && _LidLocker.OFFSetPoint;
  118. public MovementPosition LiftPinPosition
  119. {
  120. get
  121. {
  122. MovementPosition pos = MovementPosition.Unknown;
  123. if (_LiftPinMode == 0)
  124. {
  125. if (_LiftPin.ONFeedback && !_LiftPin.OFFFeedback)
  126. {
  127. pos = MovementPosition.Up;
  128. }
  129. else if (!_LiftPin.ONFeedback && _LiftPin.OFFFeedback)
  130. {
  131. pos = MovementPosition.Down;
  132. }
  133. }
  134. else if (_LiftPinMode == 1)
  135. pos = _TriStateLiftPin.PinPosition;
  136. else if (_LiftPinMode == 2)
  137. pos = _TriStateLiftPin2.PinPosition;
  138. else if (_LiftPinMode == 4)
  139. pos = _TriStateLiftPin4.PinPosition;
  140. return pos;
  141. }
  142. }
  143. public bool CheckLiftPinBusy()
  144. {
  145. if(_LiftPinMode == 4 && _TriStateLiftPin4 != null)
  146. {
  147. return _TriStateLiftPin4.IsBusy;
  148. }
  149. return false;
  150. }
  151. public MovementPosition SmallPosition
  152. {
  153. get
  154. {
  155. if (_smallWafer == 0)
  156. return MovementPosition.Down;
  157. MovementPosition res = MovementPosition.Unknown;
  158. if (_PinSmall.ONFeedback && !_PinSmall.OFFFeedback)
  159. {
  160. res = MovementPosition.Up;
  161. }
  162. else if (_PinSmall.OFFFeedback && !_PinSmall.ONFeedback)
  163. {
  164. res = MovementPosition.Down;
  165. }
  166. return res;
  167. }
  168. }
  169. public MovementPosition MediumPosition
  170. {
  171. get
  172. {
  173. if (_midWafer == 0)
  174. return MovementPosition.Down;
  175. MovementPosition res = MovementPosition.Unknown;
  176. if (_PinMedium.ONFeedback && !_PinMedium.OFFFeedback)
  177. {
  178. res = MovementPosition.Up;
  179. }
  180. else if (_PinMedium.OFFFeedback && !_PinMedium.ONFeedback)
  181. {
  182. res = MovementPosition.Down;
  183. }
  184. return res;
  185. }
  186. }
  187. public override bool IsError
  188. {
  189. get
  190. {
  191. if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
  192. {
  193. return _MainPump.IsError || _Generator.IsError || _GeneratorBias.IsError;
  194. }
  195. else
  196. {
  197. return _MainPump.IsError || _Generator.IsError;
  198. }
  199. }
  200. }
  201. public override bool IsIdle { get; }
  202. // 腔体压力
  203. public bool IsPressureToleranceEnabled
  204. {
  205. get => _pressureController.EnableTolerance;
  206. set => _pressureController.EnableTolerance = value;
  207. }
  208. public override double ChamberPressure => _pressureController.ProcessGauge.Value;
  209. public override double ChamberPressurePressure => _pressureController.PressureGauge.Value;
  210. public double ForelinePressure => _pressureController.ForelineGauge.Value;
  211. public PressureCtrlMode PressureMode => _pressureController.ThrottleValve.PressureMode;
  212. public double TargetPressure => _pressureController.TargetPressure;
  213. // 压力信号
  214. public bool IsATM => _ATM_sw.Value;
  215. public bool IsVAC => _VAC_sw.Value;
  216. public bool IsWLK => _WLK_sw.Value;
  217. public bool IsRFGInterlockOn => _RFG_Interlock.Value;
  218. // 温度
  219. public float SubstrateTempSP => _SubstrateTC.ControlTcSetPoint;
  220. public float SubstrateTempFB => _SubstrateTC.ControlTcFeedback;
  221. public float CoolantInletTempFB => _SubstrateTC.CoolantInletTcFeedback;
  222. public float CoolantOutletTempFB => _SubstrateTC.CoolantOutletTcFeedback;
  223. // Pump 状态
  224. public bool IsPumpRunning => _MainPump.IsRunning;
  225. public bool IsFastPumpOpened => _FastPumpValve.Status;
  226. public bool IsSoftPumpOpened => _SoftPumpValve.Status;
  227. public bool IsMfc1ValveOpened => _Mfc1Valve.Status;
  228. public bool IsMfc2ValveOpened => _Mfc2Valve.Status;
  229. public bool IsMfc3ValveOpened => _Mfc3Valve.Status;
  230. public bool IsMfc4ValveOpened => _Mfc4Valve.Status;
  231. public bool IsMfc5ValveOpened => _Mfc5Valve.Status;
  232. public bool HasPumpError => _MainPump.IsError || !_MainPump.IsRunning;
  233. public bool IsCDA_OK => _CDAPressure.Value /*&& (SC.GetValue<bool>("System.IsIgnoreCDAPressure2Alarm") || (_CDAPressure2?.Value ?? true))*/;
  234. public bool IsCoolantInletTC_OK => _CoolantInletTC.Value;
  235. public bool IsCoolantOutletTC_OK => _CoolantOutletTC.Value;
  236. // 蝶阀位置
  237. public float TVPosition => _pressureController.ThrottleValve.PositionFeedback;
  238. // 腔体压力.end
  239. // 射频
  240. public float ForwardPower => _Generator.ForwardPower;
  241. public bool IsGeneratorON => _Generator.IsPowerOn;
  242. public float GeneratorSetpoint => _Generator.PowerSetPoint;
  243. // Bias射频
  244. public float ForwardPowerBias => _GeneratorBias.ForwardPower;
  245. public bool IsGeneratorONBias => _GeneratorBias.IsPowerOn;
  246. public float GeneratorSetpointBias => _GeneratorBias.PowerSetPoint;
  247. public float CTune => _GeneratorBias.CTune;
  248. public float CLoad => _GeneratorBias.CLoad;
  249. public int VPP => _GeneratorBias.VPP;
  250. // 流气
  251. public double TotalGasSetpoint
  252. {
  253. get
  254. {
  255. double sum = 0;
  256. foreach (var gas in _gasLines)
  257. {
  258. sum += gas.FlowSP;
  259. }
  260. return sum;
  261. }
  262. }
  263. public bool HasGasOutOfRange
  264. {
  265. get
  266. {
  267. foreach (var gas in _gasLines)
  268. {
  269. if (!gas.IsOutOfRange)
  270. return false;
  271. }
  272. return true;
  273. }
  274. }
  275. public bool CheckFactoryScrubberSysAlarm => _isFactoryScrubberSysInstalled && _FactoryScrubberSensor != null && _FactoryScrubberSensor.Value;
  276. // --------------------------Constructor-----------------------
  277. //
  278. public JetPM(ModuleName mod) : base(mod.ToString())
  279. {
  280. Module = mod;
  281. BasePressure = SC.GetValue<double>($"{mod}.ChamberBasePressureThreshold");
  282. BaseTemperature = SC.GetValue<double>($"{mod}.ChamberBaseTemperatureThreshold");
  283. _smallWafer = SC.GetValue<int>($"System.SmallWafer");
  284. _midWafer = SC.GetValue<int>($"System.MidWafer");
  285. _bigWafer = SC.GetValue<int>($"System.BigWafer");
  286. EnableBiasRF = SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF");
  287. _LiftPinMode = SC.GetValue<int>($"{Module}.LiftPinMode");
  288. _ChamberType = SC.GetValue<int>($"System.ChamberType");
  289. _isFactoryScrubberSysInstalled = SC.ContainsItem($"{Module}.ScrubberIsInstalled") ? SC.GetValue<bool>($"{Module}.ScrubberIsInstalled") : false;
  290. for (int i = 1; i <= 5; i++)
  291. {
  292. if (SC.GetValue<bool>($"{Module}.MfcGas{i}.Enable")) gasCount++;
  293. }
  294. //_gasLines = new IoGasStick[gasCount];
  295. _gasLines = new IoGasStick[5];
  296. //for (int index = 0; index < gasCount; index++)
  297. //{
  298. // _gasLines[index] = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStick{index + 1}");
  299. //}
  300. for (int index = 0; index < 5; index++)
  301. {
  302. _gasLines[index] = DEVICE.GetDevice<IoGasStick>($"{Module}.GasStick{index + 1}");
  303. }
  304. _Lid = DEVICE.GetDevice<IoLid>($"{Module}.{VirgoDevice.Lid}");
  305. //_LidLocker = DEVICE.GetDevice<IoCylinder>($"{Module}.{VirgoDevice.LidLocker}");
  306. _Messager = DEVICE.GetDevice<IoMessage>($"{Module}.Messager");
  307. _SubstrateTemperature = DEVICE.GetDevice<IoMessage>($"{Module}.SubstrateTemperature");
  308. _ForelineTemperature = DEVICE.GetDevice<IoMessage>($"{Module}.ForelineTemperature");
  309. _CHBWallTemperature = DEVICE.GetDevice<IoMessage>($"{Module}.CHBWallTemperature");
  310. _ATM_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorATMSwitch");
  311. _N2Pressure_sw = DEVICE.GetDevice<IoSensor>($"{Module}.N2PressureOk");
  312. _VAC_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorVacSwitch");
  313. _WLK_sw = DEVICE.GetDevice<IoSensor>($"{Module}.SensorWaterLeakOk");
  314. _CDAPressure = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk");
  315. //_CDAPressure2 = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCDAPressureOk2");
  316. _CoolantInletTC = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCoolantInletTCOK");
  317. _CoolantOutletTC = DEVICE.GetDevice<IoSensor>($"{Module}.SensorCoolantOutletTCOK");
  318. _ArmNotExtend = DEVICE.GetDevice<IoSensor>($"{Module}.SensorArmNotExtend");
  319. _RFG_Interlock = DEVICE.GetDevice<IoSensor>($"{Module}.GeneratorInterlock");
  320. _FactoryScrubberSensor = DEVICE.GetDevice<IoSensor>($"{Module}.FactoryScrubberSysNormal");
  321. _pressureController = DEVICE.GetDevice<IoPressureControl>($"{Module}.{VirgoDevice.PressureControl}");
  322. _SubstrateTC = DEVICE.GetDevice<IoHeater>($"{Module}.HeaterChamber");
  323. _ForelineTC = DEVICE.GetDevice<IoHeater>($"{Module}.ForelineHeater");
  324. _SoftPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveSoftPumping}");
  325. _FastPumpValve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveFastPumping}");
  326. _ProcessValve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveProcess}");
  327. _FastVentValve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveFastVent}");
  328. _WaterValve = DEVICE.GetDevice<IoValve>($"{Module}.WaterValve");
  329. _PurgeValve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveChamberPurge}");
  330. _Mfc1Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveMfc1}");
  331. _Mfc2Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveMfc2}");
  332. _Mfc3Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveMfc3}");
  333. _Mfc4Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveMfc4}");
  334. _Mfc5Valve = DEVICE.GetDevice<IoValve>($"{Module}.{VirgoDevice.ValveMfc5}");
  335. _slitDoor = DEVICE.GetDevice<IoCylinder>($"{Module}.{VirgoDevice.SlitDoor}");
  336. _LiftPin = DEVICE.GetDevice<IoCylinder>($"{Module}.{VirgoDevice.LiftPin}");
  337. _PinSmall = DEVICE.GetDevice<IoCylinder>($"{Module}.{VirgoDevice.SmallPin}");
  338. _PinMedium = DEVICE.GetDevice<IoCylinder>($"{Module}.{VirgoDevice.MediumPin}");
  339. _Generator = DEVICE.GetDevice<IoRf>($"{Module}.{VirgoDevice.Rf}");
  340. _GeneratorBias = DEVICE.GetDevice<IoRf>($"{Module}.{VirgoDevice.BiasRf}");
  341. _MainPump = DEVICE.GetDevice<PumpBase>($"{Module}.{VirgoDevice.MainPump}");
  342. _Chiller = DEVICE.GetDevice<ChillerBase>($"{Module}.{VirgoDevice.Chiller}");
  343. _TriStateLiftPin = DEVICE.GetDevice<IoTriStateLift>($"{Module}.{VirgoDevice.TriStateLiftPin}");
  344. _TriStateLiftPin2 = DEVICE.GetDevice<IoTriStateLift2>($"{Module}.{VirgoDevice.TriStateLiftPin2}");
  345. _TriStateLiftPin4 = DEVICE.GetDevice<IoTriStateLift4>($"{Module}.{VirgoDevice.TriStateLiftPin4}");
  346. _gridChiller = DEVICE.GetDevice<ChillerBase>($"{Module}.GridChiller");
  347. _gridHeater = DEVICE.GetDevice<IoHeater>($"{Module}.GridHeater");
  348. _ResetPlcSignal = DEVICE.GetDevice<IoReset>($"{Module}.ResetPlcSignal");
  349. _gridHeater.Controller = (IoHeaterController)_gridChiller;
  350. // RS223 AdTec Generator
  351. if (SC.GetValue<int>($"{mod}.Rf.CommunicationType") == (int)CommunicationType.RS232 &&
  352. SC.GetValue<int>($"{mod}.Rf.MFG") == (int)GeneratorMFG.AdTec)
  353. {
  354. _Generator = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VirgoDevice.Rf}");
  355. }
  356. // Ethernet Comet Generator Bias
  357. if (SC.GetValue<bool>($"{mod}.BiasRf.EnableBiasRF") &&
  358. SC.GetValue<int>($"{mod}.BiasRf.CommunicationType") == (int)CommunicationType.Ethernet &&
  359. SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.Comet)
  360. {
  361. _GeneratorBias = DEVICE.GetDevice<CometRF>($"{Module}.{VirgoDevice.BiasRf}");
  362. }
  363. // RS232 AdTec match
  364. if (SC.GetValue<int>($"{mod}.match.CommunicationType") == (int)CommunicationType.RS232 &&
  365. SC.GetValue<int>($"{mod}.match.MFG") == (int)MatchMFG.AdTec)
  366. {
  367. _Match = DEVICE.GetDevice<AdTecMatch>($"{Module}.{VirgoDevice.Match}");
  368. }
  369. if (SC.GetValue<bool>($"{mod}.match.EnableMatch") &&
  370. SC.GetValue<int>($"{mod}.match.CommunicationType") == (int)CommunicationType.Ethernet &&
  371. SC.GetValue<int>($"{mod}.match.MFG") == (int)MatchMFG.Revtech)
  372. {
  373. _Match = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VirgoDevice.Match}");
  374. }
  375. if (SC.GetValue<bool>($"{mod}.BiasRf.EnableBiasRF") &&
  376. SC.GetValue<int>($"{mod}.BiasRf.CommunicationType") == (int)CommunicationType.RS232 &&
  377. SC.GetValue<int>($"{mod}.BiasRf.MFG") == (int)GeneratorMFG.AdTec)
  378. {
  379. _GeneratorBias = DEVICE.GetDevice<AdTecGenerator>($"{Module}.{VirgoDevice.BiasRf}");
  380. }
  381. if (SC.GetValue<bool>($"{mod}.BiasMatch.EnableBiasMatch") &&
  382. SC.GetValue<int>($"{mod}.BiasMatch.CommunicationType") == (int)CommunicationType.Ethernet &&
  383. SC.GetValue<int>($"{mod}.BiasMatch.MFG") == (int)MatchMFG.Revtech)
  384. {
  385. _BiasMatch = DEVICE.GetDevice<RevtechMatch>($"{Module}.{VirgoDevice.BiasMatch.ToString()}");
  386. }
  387. // RS232 Dry pump, SKY
  388. if (SC.GetValue<int>($"{mod}.DryPump.CommunicationType") == (int)CommunicationType.RS232)
  389. {
  390. if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.SKY)
  391. {
  392. _MainPump = DEVICE.GetDevice<SkyPump>($"{Module}.{VirgoDevice.MainPump}");
  393. }
  394. else if (SC.GetValue<int>($"{mod}.DryPump.MFG") == (int)DryPumpMFG.Edwards)
  395. {
  396. _MainPump = DEVICE.GetDevice<EdwardsPump>($"{Module}.{VirgoDevice.MainPump}");
  397. }
  398. }
  399. if (SC.GetValue<bool>($"{mod}.Chiller.EnableChiller") &&
  400. SC.GetValue<int>($"{mod}.Chiller.CommunicationType") == (int)CommunicationType.RS232 &&
  401. SC.GetValue<int>($"{mod}.Chiller.MFG") == (int)ChillerMFG.SMC)
  402. {
  403. _Chiller = DEVICE.GetDevice<SMCChiller>($"{Module}.{VirgoDevice.Chiller}");
  404. }
  405. System.Diagnostics.Debug.Assert(null != _Generator);
  406. System.Diagnostics.Debug.Assert(null != _MainPump);
  407. if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
  408. {
  409. System.Diagnostics.Debug.Assert(null != _GeneratorBias);
  410. }
  411. WaferManager.Instance.SubscribeLocation(Module, 1);
  412. }
  413. public override bool Initialize()
  414. {
  415. base.Initialize();
  416. OP.Subscribe($"{Module}.LiftPin.SetPosition", (out string reason, int time, object[] param) => {
  417. MovementPosition dir = MovementPosition.Unknown;
  418. if ((string)param[0] == "Up")
  419. dir = MovementPosition.Up;
  420. else if ((string)param[0] == "Down")
  421. dir = MovementPosition.Down;
  422. else if ((string)param[0] == "Middle")
  423. dir = MovementPosition.Middle;
  424. SetLiftPin(dir, out reason);
  425. return true;
  426. });
  427. if (_ChamberType == (int)JetChamber.VirgoMask && IsWLK && IO.DI[$"{ModuleName.PMA}.DI_EFEM_Water_Leak_Sensor"].Value)
  428. {
  429. IO.DO[$"{ModuleName.PMA}.DO_EV5_Water_Valve"].Value = true;
  430. IO.DO[$"{ModuleName.PMB}.DO_EV5_Water_Valve"].Value = true;
  431. LOG.Info($"{Module} DO_EV5_Water_Valve sensor on");
  432. }
  433. else if (_ChamberType == (int)JetChamber.VirgoR && IsWLK && _WaterValve != null)
  434. {
  435. _WaterValve.TurnValve(true, out _);
  436. LOG.Info($"{Module} DO_Water_Valve_On sensor on");
  437. }
  438. DATA.Subscribe($"{Name}.IoTemperatureCtrl.TemperatureControl.SubstrateTemperature", () => SubstrateTempFB);
  439. DATA.Subscribe($"{Module}.WaferSize", () => WaferManager.Instance.GetWafer(Module, 0).Size.ToString());
  440. DATA.Subscribe($"{Module}.EnableBiasRF", () => EnableBiasRF);
  441. return true;
  442. }
  443. // -----------------------------Method-------------------------
  444. //
  445. public override void Home()
  446. {
  447. // 与yp讨论过,PM 初始化不需要
  448. if (IsSlitDoorClosed)
  449. {
  450. SetSlitDoor(false, out _);
  451. }
  452. else if (!IsSlitDoorClosed)
  453. {
  454. SetSlitDoor(false, out _);
  455. }
  456. else if (_slitDoor.State == CylinderState.Error)
  457. {
  458. SetSlitDoor(true, out _);
  459. }
  460. if (SC.GetValue<bool>($"{Module}.BiasRf.EnableBiasRF"))
  461. {
  462. _Messager.SetMessager(1); //Virgo B
  463. }
  464. else
  465. {
  466. _Messager.SetMessager(0); //Virgo A
  467. }
  468. _SubstrateTemperature?.SetMessager(SC.GetValue<int>($"{Module}.SubstrateTemperatureTCTMDiff"));
  469. _ForelineTemperature?.SetMessager(SC.GetValue<int>($"{Module}.ForelineTemperatureTCTMDiff"));
  470. _CHBWallTemperature?.SetMessager(SC.GetValue<int>($"{Module}.CHBWallTemperatureTCTMDiff"));
  471. //_ResetPlcSignal?.Reset();
  472. }
  473. public void ResetPlcSignal()
  474. {
  475. _ResetPlcSignal?.Reset();
  476. }
  477. public void SetSlitDoor(bool open, out string reason)
  478. {
  479. reason = string.Empty;
  480. // [XIAHUAN]: 只在关门的时候检查arm not extend
  481. if (!open && !IsArmNotExtend)
  482. {
  483. EV.PostAlarmLog(Module.ToString(), "Arm Not Extend sensor error");
  484. return;
  485. }
  486. _slitDoor.SetCylinder(open, out reason);
  487. }
  488. public override bool CheckWaterLeak()
  489. {
  490. return _WLK_sw.Value;
  491. }
  492. public override bool CheckCDAOK()
  493. {
  494. return _CDAPressure.Value /*&& (SC.GetValue<bool>("System.IsIgnoreCDAPressure2Alarm") || (_CDAPressure2?.Value ?? true))*/;
  495. }
  496. public override bool CheckCoolantInletTCOK()
  497. {
  498. return _CoolantInletTC?.Value ?? false;
  499. }
  500. public override bool CheckCoolantOutletTCOK()
  501. {
  502. return _CoolantOutletTC?.Value ?? false;
  503. }
  504. public override bool CheckArmExtendOK()
  505. {
  506. return _ArmNotExtend.Value;
  507. }
  508. public override bool CheckAtm()
  509. {
  510. return _ATM_sw.Value && ChamberPressure > 700000;
  511. }
  512. public override bool CheckVacuum()
  513. {
  514. return _VAC_sw.Value && ChamberPressure < 100;
  515. }
  516. public bool CheckSlitDoorOpen()
  517. {
  518. return _slitDoor.State == CylinderState.Open;
  519. }
  520. public bool CheckSlitDoorClose()
  521. {
  522. return _slitDoor.State == CylinderState.Close;
  523. }
  524. public bool CheckLiftUp()
  525. {
  526. return LiftPinPosition == MovementPosition.Up;
  527. }
  528. public bool CheckLiftDown()
  529. {
  530. return LiftPinPosition == MovementPosition.Down;
  531. }
  532. public bool CheckLiftPinPos(MovementPosition pos)
  533. {
  534. return LiftPinPosition == pos;
  535. }
  536. public void StartPump(bool on)
  537. {
  538. //_pressureController.StartPump(on);
  539. _MainPump?.SetPumpOnOff(on);
  540. }
  541. public void SetValveOnOff(ValveType vlvType, bool on)
  542. {
  543. switch (vlvType)
  544. {
  545. case ValveType.PROCESS:
  546. _ProcessValve.TurnValve(on, out _);
  547. break;
  548. case ValveType.FAST_PUMP:
  549. _FastPumpValve.TurnValve(on, out _);
  550. break;
  551. case ValveType.SOFT_PUMP:
  552. _SoftPumpValve.TurnValve(on, out _);
  553. break;
  554. case ValveType.FAST_VENT:
  555. _FastVentValve.TurnValve(on, out _);
  556. break;
  557. case ValveType.PURGE:
  558. _PurgeValve.TurnValve(on, out _);
  559. break;
  560. case ValveType.Mfc1:
  561. _Mfc1Valve.TurnValve(on, out _);
  562. break;
  563. case ValveType.Mfc2:
  564. _Mfc2Valve.TurnValve(on, out _);
  565. break;
  566. case ValveType.Mfc3:
  567. _Mfc3Valve.TurnValve(on, out _);
  568. break;
  569. case ValveType.Mfc4:
  570. _Mfc4Valve.TurnValve(on, out _);
  571. break;
  572. case ValveType.Mfc5:
  573. _Mfc5Valve.TurnValve(on, out _);
  574. break;
  575. default:
  576. throw new ArgumentOutOfRangeException($"Argument error {vlvType}-{on}");
  577. }
  578. }
  579. public void CheckPressureStability() { }
  580. public override void Monitor()
  581. {
  582. foreach (var gas in _gasLines)
  583. {
  584. gas.Monitor();
  585. }
  586. _trigBasePressure.CLK = ChamberPressurePressure >= BasePressure;
  587. if (SC.GetValue<bool>($"{Module}.Chiller.EnableChiller"))
  588. {
  589. _trigBaseTemperature.CLK = CoolantOutletTempFB >= BaseTemperature;
  590. }
  591. else
  592. {
  593. _trigBaseTemperature.CLK = SubstrateTempFB >= BaseTemperature;
  594. }
  595. if (_trigBasePressure.Q)
  596. {
  597. EV.PostMessage(Module.ToString(), EventEnum.DefaultAlarm, "PM pressure out of tolerance");
  598. }
  599. if (_trigBaseTemperature.Q) EV.PostMessage(Module.ToString(), EventEnum.DefaultAlarm, "PM temperature out of tolerance");
  600. if(_ChamberType == (int)JetChamber.VirgoMask)
  601. {
  602. var isWLKError = !IsWLK;
  603. var isEFEMWLKError = !IO.DI[$"{ModuleName.PMA}.DI_EFEM_Water_Leak_Sensor"].Value;
  604. _trigWaterLeak.CLK = isWLKError || isEFEMWLKError;
  605. if (_trigWaterLeak.Q)
  606. {
  607. IO.DO[$"{ModuleName.PMA}.DO_EV5_Water_Valve"].Value = false;
  608. IO.DO[$"{ModuleName.PMB}.DO_EV5_Water_Valve"].Value = false;
  609. if(isWLKError)
  610. EV.PostMessage(Module.ToString(), EventEnum.DefaultAlarm, $"PM water leak");
  611. if (isEFEMWLKError)
  612. EV.PostMessage(ModuleName.EFEM.ToString(), EventEnum.DefaultAlarm, $"EFEM water leak");
  613. }
  614. if (IsWLK && IO.DI[$"{ModuleName.PMA}.DI_EFEM_Water_Leak_Sensor"].Value && IO.DI[$"{ModuleName.PMA}.DI_Reset_Signal_Reply"].Value && !IO.DI[$"{ModuleName.PMA}.DI_Water_Valve_Opened"].Value)
  615. {
  616. IO.DO[$"{ModuleName.PMA}.DO_EV5_Water_Valve"].Value = true;
  617. IO.DO[$"{ModuleName.PMB}.DO_EV5_Water_Valve"].Value = true;
  618. }
  619. _trigScrubberSysAlarm.CLK = CheckFactoryScrubberSysAlarm;
  620. if (_trigScrubberSysAlarm.Q)
  621. {
  622. TryClosePumpAndPostAlarm();
  623. }
  624. }
  625. else if (_ChamberType == (int)JetChamber.VirgoR && _WaterValve != null)
  626. {
  627. _trigWaterLeak.CLK = !IsWLK;
  628. if (_trigWaterLeak.Q)
  629. {
  630. EV.PostWarningLog(Module.ToString(), $"Water Leak SW Sensor alarm !");
  631. _WaterValve.TurnValve(false, out _);
  632. }
  633. _trigWaterValve.CLK = IsWLK && !_WaterValve.Status;
  634. if (_trigWaterValve.Q) EV.PostWarningLog(Module.ToString(), $"Water Valve is off !");
  635. }
  636. }
  637. public void CloseValves()
  638. {
  639. _SoftPumpValve.TurnValve(false, out _);
  640. _FastPumpValve.TurnValve(false, out _);
  641. _ProcessValve.TurnValve(false, out _);
  642. _PurgeValve.TurnValve(false, out _);
  643. _FastVentValve.TurnValve(false, out _);
  644. _PurgeValve.TurnValve(false, out _);
  645. _Mfc1Valve.TurnValve(false, out _);
  646. _Mfc2Valve.TurnValve(false, out _);
  647. _Mfc3Valve.TurnValve(false, out _);
  648. _Mfc4Valve.TurnValve(false, out _);
  649. _Mfc5Valve.TurnValve(false, out _);
  650. foreach (var stick in _gasLines)
  651. {
  652. stick.Stop();
  653. }
  654. }
  655. public bool FlowGas(int gasNum, double val)
  656. {
  657. if (_gasLines.Length <= gasNum)
  658. return false;
  659. _gasLines[gasNum].Flow(val);
  660. return true;
  661. }
  662. public void StopAllGases()
  663. {
  664. foreach (var line in _gasLines)
  665. {
  666. line.Stop();
  667. }
  668. }
  669. public bool SetLiftPin(MovementPosition dirt, out string reason)
  670. {
  671. reason = string.Empty;
  672. switch (dirt)
  673. {
  674. case MovementPosition.Down:
  675. {
  676. if (_LiftPinMode == 0) return _LiftPin.SetCylinder(false, out reason);
  677. if (_LiftPinMode == 1) return _TriStateLiftPin.GoPosition(Position.position3);
  678. if (_LiftPinMode == 2) return _TriStateLiftPin2.GoPosition(Position.position3);
  679. if (_LiftPinMode == 4) return _TriStateLiftPin4.GoPosition(Position.position3);
  680. throw new ArgumentException($"{Module} {Name} {dirt} Movement argument error");
  681. }
  682. case MovementPosition.Up:
  683. {
  684. if (_LiftPinMode == 0) return _LiftPin.SetCylinder(true, out reason);
  685. if (_LiftPinMode == 1) return _TriStateLiftPin.GoPosition(Position.position1);
  686. if (_LiftPinMode == 2) return _TriStateLiftPin2.GoPosition(Position.position1);
  687. if (_LiftPinMode == 4) return _TriStateLiftPin4.GoPosition(Position.position1);
  688. throw new ArgumentException($"{Module} {Name} {dirt} Movement argument error");
  689. }
  690. case MovementPosition.Origin:
  691. {
  692. if (_LiftPinMode == 0) return _LiftPin.SetCylinder(false, out reason);
  693. if (_LiftPinMode == 1) return _TriStateLiftPin.GoPosition(Position.origin);
  694. if (_LiftPinMode == 2) return _TriStateLiftPin2.GoPosition(Position.origin);
  695. if (_LiftPinMode == 4) return _TriStateLiftPin4.GoPosition(Position.origin);
  696. throw new ArgumentException($"{Module} {Name} {dirt} Movement argument error");
  697. }
  698. case MovementPosition.Middle:
  699. if (_LiftPinMode == 1) return _TriStateLiftPin.GoPosition(Position.position2);
  700. else if (_LiftPinMode == 2) return _TriStateLiftPin2.GoPosition(Position.position2);
  701. else if (_LiftPinMode == 4) return _TriStateLiftPin4.GoPosition(Position.position2);
  702. else
  703. throw new ArgumentException("Movement argument error");
  704. case MovementPosition.Left:
  705. case MovementPosition.Right:
  706. throw new ArgumentException("Movement argument error");
  707. }
  708. return true;
  709. }
  710. public void SetGuidePin(WaferSize ws, MovementPosition dirt)
  711. {
  712. if (ws == WaferSize.WS3)
  713. SetGuidePinSmall(dirt);
  714. else if (ws == WaferSize.WS4)
  715. SetGuidePinMedium(dirt);
  716. }
  717. public void PrepareGuidePinForPlace(WaferSize ws)
  718. {
  719. if (ws == WaferSize.WS3)
  720. {
  721. SetGuidePinSmall(MovementPosition.Up);
  722. SetGuidePinMedium(MovementPosition.Down);
  723. }
  724. else if (ws == WaferSize.WS4)
  725. {
  726. SetGuidePinSmall(MovementPosition.Down);
  727. SetGuidePinMedium(MovementPosition.Up);
  728. }
  729. }
  730. public bool CheckGuidePinIsReadyForTransfer(WaferSize ws)
  731. {
  732. if (ws == WaferSize.WS3)
  733. {
  734. return SmallPosition == MovementPosition.Up && MediumPosition == MovementPosition.Down;
  735. }
  736. else if (ws == WaferSize.WS4)
  737. {
  738. return SmallPosition == MovementPosition.Down && MediumPosition == MovementPosition.Up;
  739. }
  740. else if (ws == WaferSize.WS6 || ws == WaferSize.WS8 || ws == WaferSize.WS12)
  741. return true;
  742. else
  743. return true;
  744. }
  745. private void SetGuidePinSmall(MovementPosition dirt)
  746. {
  747. EV.PostInfoLog(Module.ToString(), $"set small pin {dirt}, smallWafer={_smallWafer}");
  748. switch (dirt)
  749. {
  750. case MovementPosition.Down:
  751. if (_smallWafer != 0)
  752. _PinSmall?.SetCylinder(false, out _);
  753. break;
  754. case MovementPosition.Up:
  755. if (_smallWafer != 0)
  756. _PinSmall?.SetCylinder(true, out _);
  757. break;
  758. default:
  759. throw new ArgumentException("Movement argument error");
  760. }
  761. }
  762. private void SetGuidePinMedium(MovementPosition dirt)
  763. {
  764. EV.PostInfoLog(Module.ToString(), $"set medium pin {dirt}, midWafer={_midWafer}");
  765. switch (dirt)
  766. {
  767. case MovementPosition.Down:
  768. if (_midWafer != 0)
  769. _PinMedium?.SetCylinder(false, out _);
  770. break;
  771. case MovementPosition.Up:
  772. if (_midWafer != 0)
  773. _PinMedium?.SetCylinder(true, out _);
  774. break;
  775. default:
  776. throw new ArgumentException("Movement argument error");
  777. }
  778. }
  779. public void SetGeneratorCommunicationMode(int mode)
  780. {
  781. _Generator?.SetCommunicationMode(mode);
  782. }
  783. public bool GeneratorPowerOn(bool on)
  784. {
  785. if (_Generator == null) return false;
  786. if (on && !IsRFGInterlockOn)
  787. {
  788. EV.PostAlarmLog(Module.ToString(), "RF interlock sensor error");
  789. return false;
  790. }
  791. return _Generator.SetPowerOnOff(on, out _);
  792. }
  793. public bool GeneratorSetpower(float val)
  794. {
  795. if (_Generator == null) return false;
  796. if (Math.Abs(val) > 0.01)
  797. _Generator.SetPower((ushort)val);
  798. return true;
  799. }
  800. public bool GeneratorBiasPowerOn(bool on)
  801. {
  802. if (_GeneratorBias == null) return false;
  803. if (on && !IsRFGInterlockOn)
  804. {
  805. EV.PostAlarmLog(Module.ToString(), "Bias RF Interlock sensor error");
  806. return false;
  807. }
  808. return _GeneratorBias.SetPowerOnOff(on, out _);
  809. }
  810. public bool GeneratorBiasSetpower(float val)
  811. {
  812. if (_GeneratorBias == null) return false;
  813. if (Math.Abs(val) > 0.01)
  814. _GeneratorBias.SetPower((ushort)val);
  815. return true;
  816. }
  817. public bool GeneratorBiasSetMatchMode(bool val)
  818. {
  819. if (_BiasMatch != null)
  820. {
  821. _BiasMatch.SetMatchMode(true ? EnumRfMatchTuneMode.Auto.ToString() : EnumRfMatchTuneMode.Manual.ToString(), out _);
  822. return true;
  823. }
  824. if (_GeneratorBias == null) return false;
  825. string reason = string.Empty;
  826. _GeneratorBias.SetMatchingAutoMode(val, out reason);
  827. return true;
  828. }
  829. public bool SetMatchPosition(float c1, float c2)
  830. {
  831. if (_Match == null) return false;
  832. string reason = string.Empty;
  833. _Match.SetMatchPosition(c1, c2, out reason);
  834. return true;
  835. }
  836. public bool SetBiasMatchPosition(float c1, float c2)
  837. {
  838. if (_BiasMatch != null)
  839. {
  840. _BiasMatch.SetMatchPosition(c1, c2, out _);
  841. return true;
  842. }
  843. if (_GeneratorBias == null) return false;
  844. string reason = string.Empty;
  845. _GeneratorBias.SetMatchPosition(c1, c2, out reason);
  846. return true;
  847. }
  848. public void FullOpenTV()
  849. {
  850. _pressureController.FullOpenThrottleValve();
  851. }
  852. public void HeatSubstrate(double val)
  853. {
  854. _SubstrateTC?.RampTemp((float)val);
  855. _SubstrateTC?.TurnOnOff(true);
  856. }
  857. public void HeatChiller(double value, double offset)
  858. {
  859. _Chiller?.SetChillerTemp((float)value, (float)offset);
  860. _Chiller?.SetChillerOnOff(true);
  861. }
  862. public bool CheckChillerStatus()
  863. {
  864. return _Chiller != null && _Chiller.IsRunning && !_Chiller.IsError;
  865. }
  866. public void HeatForeline(double val)
  867. {
  868. _ForelineTC?.RampTemp((float)val);
  869. }
  870. public override bool CheckEnableTransfer(EnumTransferType type)
  871. {
  872. if (type == EnumTransferType.Pick)
  873. {
  874. return _slitDoor.State == CylinderState.Open && LiftPinPosition == MovementPosition.Up;
  875. }
  876. if (type == EnumTransferType.Place)
  877. {
  878. return _slitDoor.State == CylinderState.Open && LiftPinPosition == MovementPosition.Down;
  879. }
  880. return false;
  881. }
  882. public bool CheckEnableTransfer(EnumTransferType type, WaferSize waferSize)
  883. {
  884. if (type == EnumTransferType.Pick)
  885. {
  886. return _slitDoor.State == CylinderState.Open
  887. && LiftPinPosition == MovementPosition.Up
  888. && CheckGuidePinIsReadyForTransfer(waferSize);
  889. }
  890. if (type == EnumTransferType.Place)
  891. {
  892. return _slitDoor.State == CylinderState.Open
  893. && LiftPinPosition == MovementPosition.Down
  894. && CheckGuidePinIsReadyForTransfer(waferSize);
  895. }
  896. return false;
  897. }
  898. public override void TransferHandoff(EnumTransferType type)
  899. {
  900. switch (type)
  901. {
  902. case EnumTransferType.Pick:
  903. SetLiftPin(MovementPosition.Up, out _);
  904. break;
  905. case EnumTransferType.Place:
  906. SetLiftPin(MovementPosition.Down, out _);
  907. break;
  908. case EnumTransferType.Extend:
  909. break;
  910. case EnumTransferType.Retract:
  911. break;
  912. default:
  913. break;
  914. }
  915. }
  916. private void TryClosePumpAndPostAlarm()
  917. {
  918. if (CheckFactoryScrubberSysAlarm)
  919. {
  920. if (IsFastPumpOpened) SetValveOnOff(ValveType.FAST_PUMP, false);
  921. if (IsSoftPumpOpened) SetValveOnOff(ValveType.SOFT_PUMP, false);
  922. EV.PostAlarmLog(Module.ToString(), $"{Module} {Name} Factory Scrubber System is alarm ");
  923. }
  924. }
  925. public override void Reset()
  926. {
  927. _trigBasePressure.RST = true;
  928. _trigBaseTemperature.RST = true;
  929. _trigWaterLeak.RST = true;
  930. }
  931. }
  932. /// <summary>
  933. /// PM Action
  934. /// </summary>
  935. abstract class PmActionBase : ActionBase
  936. {
  937. protected internal JetPM _chamber;
  938. protected PmActionBase(ModuleName mod, JetPM pm) : base(mod)
  939. {
  940. _chamber = pm;
  941. }
  942. }
  943. class PinAction : PmActionBase
  944. {
  945. public MovementPosition Pos { get; }
  946. public bool IsWaferTransfered { get; }
  947. public PMEntity PmEntity { get; set; }
  948. private Hand _blade;
  949. private bool _isPick;
  950. public PinAction(ModuleName mod, JetPM pm, MovementPosition pos, bool isTransferWafer, Hand blade, bool isPick) : base(mod, pm)
  951. {
  952. this.Pos = pos;
  953. IsWaferTransfered = isTransferWafer;
  954. _blade = blade;
  955. _isPick = isPick;
  956. }
  957. public override void Execute()
  958. {
  959. if (Module == ModuleName.PMA)
  960. PmEntity = Singleton<RouteManager>.Instance.PMA;
  961. else if (Module == ModuleName.PMB)
  962. PmEntity = Singleton<RouteManager>.Instance.PMB;
  963. if (PmEntity != null)
  964. {
  965. PmEntity.PostMsg(PMEntity.MSG.MoveLiftPin, Pos, ID, _isPick);
  966. }
  967. }
  968. public override void OnPostWork(string data = null)
  969. {
  970. if (IsWaferTransfered)
  971. {
  972. if (Pos == MovementPosition.Up)
  973. {
  974. WaferManager.Instance.WaferMoved(ModuleName.EfemRobot, _blade==Hand.Blade1 ? 0 : 1, Module, 0);
  975. }
  976. else
  977. {
  978. WaferManager.Instance.WaferMoved(Module, 0, ModuleName.EfemRobot, _blade == Hand.Blade1 ? 0 : 1);
  979. }
  980. Singleton<RouteManager>.Instance.EFEM.EfemDevice.SetRobotMovingInfo( MECF.Framework.Common.CommonData.RobotAction.None, Hand.Both, ModuleName.System);
  981. }
  982. }
  983. }
  984. }