OrgshTask.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using athosRT.Devices.EFEM.ABS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace athosRT.Devices.EFEM.Task
  8. {
  9. public class OrgshTask : CheckImp, ITask
  10. {
  11. public bool Execute(out string result, params string[] args)
  12. {
  13. result = string.Empty;
  14. string str = Args2Unit(args.Length != 0 ? args[0] : string.Empty);
  15. IServerModule entity = GetEntity(str);
  16. if (entity == null || str == "Aligner" && !AlignerInstalled)
  17. {
  18. result = "PARAM_NG";
  19. return false;
  20. }
  21. if (!Check<NoReadyPolicy>(str, out result)
  22. || !Check<NoInitCompletedPolicy>(str, out result)
  23. || !Check<NoOriginCompletedPolicy>(str, out result)
  24. || !Check<VacPolicy>(str, out result)
  25. || !Check<AirPolicy>(str, out result)
  26. || !Check<EMSPolicy>(str, out result)
  27. || !Check<ErrorPolicy>(str, out result)
  28. ||!Check<InitBusyPolicy>(str, out result)
  29. || !Check<HoldPolicy>(str, out result)
  30. || !Check<RemovePolicy>(str, out result)
  31. || !Check<MaintenancePolicy>(str, out result)
  32. || !Check<LinkPolicy>(str, out result)
  33. || !Check<ArmExtendPolicy>(str, out result)
  34. || !Check<PowerDownPolicy>(str, out result))
  35. return false;
  36. entity.OriginSearched = false;
  37. entity.Home(out result);
  38. return true;
  39. }
  40. public bool? Monitor(out string result, params string[] args)
  41. {
  42. result = string.Empty;
  43. string str = Args2Unit(args.Length != 0 ? args[0] : string.Empty);
  44. IServerModule entity = GetEntity(str);
  45. if (entity.Error)
  46. {
  47. flag1 = ErrorCheckList1.VAC | ErrorCheckList1.AIR | ErrorCheckList1.STALL | ErrorCheckList1.LIMIT | ErrorCheckList1.SENSOR | ErrorCheckList1.POSITION | ErrorCheckList1.EMS | ErrorCheckList1.COMM | ErrorCheckList1.COMM2 | ErrorCheckList1.VACON | ErrorCheckList1.VACOFF | ErrorCheckList1.CLAMPON | ErrorCheckList1.CLAMPOF;
  48. flag2 = ErrorCheckList2.RRTWAF | ErrorCheckList2.CRSWAF | ErrorCheckList2.THICKWAF | ErrorCheckList2.THINWAF | ErrorCheckList2.DBLWAF | ErrorCheckList2.BAOWAF | ErrorCheckList2.COMMAND | ErrorCheckList2.PODNG | ErrorCheckList2.PODMISMATCH | ErrorCheckList2.VAC_S | ErrorCheckList2.CLAMP_S | ErrorCheckList2.SAFTY | ErrorCheckList2.LOCKNG | ErrorCheckList2.UNLOCKNG | ErrorCheckList2.L_KEY_LK | ErrorCheckList2.L_KEY_UL;
  49. flag3 = ErrorCheckList3.MAP_S | ErrorCheckList3.MAP_S1 | ErrorCheckList3.MAP_S2 | ErrorCheckList3.WAFLOST | ErrorCheckList3.ALIGNNG | ErrorCheckList3.DRIVER | ErrorCheckList3.DRPOWERDOWN | ErrorCheckList3.HARDWARE | ErrorCheckList3.INTERNAL | ErrorCheckList3.E84_TIMEOUTx | ErrorCheckList3.E84_CS_VALID | ErrorCheckList3.READFAIL;
  50. return new bool?(this.CheckError(str, out result));
  51. }
  52. if (entity.Busy)
  53. return new bool?();
  54. entity.OriginSearched = true;
  55. return new bool?(true);
  56. }
  57. }
  58. }