RobotConvertor.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Aitex.Core.RT.Log;
  2. using MECF.Framework.Common.Equipment;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot.HineAutomation
  9. {
  10. public class RobotConvertor
  11. {
  12. //position number = 01 through 15
  13. public static Dictionary<ModuleName, int> TeachThetaAxisAddressPosition = new Dictionary<ModuleName, int>()
  14. {
  15. {ModuleName.Cassette, 6},//4 inch = 4,6 inch = 6, 8 inch = 8
  16. {ModuleName.PM, 1},
  17. {ModuleName.Cooling, 2},
  18. {ModuleName.TMRobot, 0},
  19. };
  20. //position number = 01 through 99
  21. public static Dictionary<ModuleName, int> TeachZAxisAddressPosition = new Dictionary<ModuleName, int>()
  22. {
  23. {ModuleName.Cassette, -1},
  24. {ModuleName.PM, 1},
  25. {ModuleName.Cooling, 1},
  26. };
  27. public static int Chamber2ThetaAxisPosition(ModuleName chamber)
  28. {
  29. if (!TeachThetaAxisAddressPosition.ContainsKey(chamber))
  30. {
  31. LOG.Error($"not define TeachThetaAxisAddressPosition config {chamber}");
  32. return 0;
  33. }
  34. return TeachThetaAxisAddressPosition[chamber];
  35. }
  36. public static int ChamberSlot2ZAxisPosition(ModuleName chamber, int slot)
  37. {
  38. if (!TeachZAxisAddressPosition.ContainsKey(chamber))
  39. {
  40. LOG.Error($"not define TeachZAxisAddressPosition config {chamber}");
  41. return 0;
  42. }
  43. int sslot = TeachZAxisAddressPosition[chamber];
  44. if (sslot == -1)
  45. {
  46. sslot = slot + 1;
  47. }
  48. return sslot;
  49. }
  50. }
  51. }