JetPM.cs 43 KB

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