AlignTaskEx.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Aitex.Core.Common;
  2. using athosRT.Devices.EFEM.ABS;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace athosRT.Devices.EFEM.Task
  9. {
  10. public class AlignTaskEx : CheckImp, ITask
  11. {
  12. public bool Execute(out string result, params string[] args)
  13. {
  14. result = string.Empty;
  15. string str = "CoolingBuffer1";
  16. BufferServerModule entity = (BufferServerModule)this.GetEntity(str);
  17. if (entity == null)
  18. {
  19. result = "PARAM_NG";
  20. return false;
  21. }
  22. if (!this.MultiWaferSize)
  23. ;
  24. if (!this.Check<NoReadyPolicy>(str, out result) || !this.Check<NoInitCompletedPolicy>(str, out result) || !this.Check<NoOriginCompletedPolicy>(str, out result) || !this.Check<VacPolicy>(str, out result) || !this.Check<EMSPolicy>(str, out result) || !this.Check<ErrorPolicy>(str, out result) || !this.Check<BusyPolicy>(str, out result) || !this.Check<HoldPolicy>(str, out result) || !this.Check<RemovePolicy>(str, out result) || !this.Check<MaintenancePolicy>(str, out result) || !this.Check<LinkPolicy>(str, out result) || !this.Check<ArmExtendPolicy>(str, out result) || !this.Check<PowerDownPolicy>(str, out result))
  25. return false;
  26. WaferSize _wafersize;
  27. if (Enum.TryParse(args[0], out _wafersize))
  28. {
  29. entity.Align(_wafersize, out result);
  30. }
  31. else
  32. {
  33. entity.Align(WaferSize.WS0, out result);
  34. }
  35. return true;
  36. }
  37. public bool? Monitor(out string result, params string[] args)
  38. {
  39. result = string.Empty;
  40. string str = "CoolingBuffer1";
  41. BufferServerModule entity = (BufferServerModule)this.GetEntity(str);
  42. if (entity == null)
  43. {
  44. result = "PARAM_NG";
  45. return new bool?(false);
  46. }
  47. if (entity.Error)
  48. {
  49. this.flag1 = ErrorCheckList1.VAC | ErrorCheckList1.STALL | ErrorCheckList1.LIMIT | ErrorCheckList1.POSITION | ErrorCheckList1.EMS | ErrorCheckList1.COMM | ErrorCheckList1.COMM2 | ErrorCheckList1.CLAMPON | ErrorCheckList1.CLAMPOF;
  50. this.flag2 = ErrorCheckList2.COMMAND | ErrorCheckList2.CLAMP_S;
  51. this.flag3 = ErrorCheckList3.WAFLOST | ErrorCheckList3.ALIGNNG | ErrorCheckList3.HARDWARE | ErrorCheckList3.INTERNAL;
  52. return new bool?(this.CheckError(str, out result));
  53. }
  54. return !entity.Busy ? new bool?(true) : new bool?();
  55. }
  56. }
  57. }