LocalUIViewModelBase.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Aitex.Core.Util;
  7. using EfemDualUI.Controls.Parts;
  8. using MECF.Framework.Common.CommonData;
  9. using MECF.Framework.UI.Client.CenterViews.Operations.WaferAssociation;
  10. using MECF.Framework.UI.Client.ClientBase;
  11. using VTMRobotPosition = MECF.Framework.UI.Client.ClientControls.RobotControls.VTMRobotPosition;
  12. namespace EfemDualUI
  13. {
  14. public class LocalModuleUIViewModelBase : ModuleUiViewModelBase
  15. {
  16. public ModuleInfo FOUPA { get; set; }
  17. public ModuleInfo FOUPB { get; set; }
  18. public ModuleInfo FOUPC { get; set; }
  19. public ModuleInfo FOUPD { get; set; }
  20. public ModuleInfo EFEM { get; set; }
  21. public ModuleInfo Buffer { get; set; }
  22. public ModuleInfo PM1 { get; set; }
  23. public ModuleInfo PM2 { get; set; }
  24. #region Wafer info for machine
  25. public WaferInfo BufferWafer
  26. {
  27. get
  28. {
  29. if (ModuleManager.ModuleInfos["Buffer"].WaferManager.Wafers.Count > 0)
  30. return ModuleManager.ModuleInfos["Buffer"].WaferManager.Wafers[0];
  31. return null;
  32. }
  33. }
  34. public WaferInfo PM1Wafer
  35. {
  36. get
  37. {
  38. if (ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Count > 0)
  39. return ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers[0];
  40. return null;
  41. }
  42. }
  43. public WaferInfo PM2Wafer
  44. {
  45. get
  46. {
  47. if (ModuleManager.ModuleInfos["PM2"].WaferManager.Wafers.Count > 0)
  48. return ModuleManager.ModuleInfos["PM2"].WaferManager.Wafers[0];
  49. return null;
  50. }
  51. }
  52. public WaferInfo EfemRobotWafer1
  53. {
  54. get
  55. {
  56. if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count > 0)
  57. return ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  58. return null;
  59. }
  60. }
  61. public WaferInfo EfemRobotWafer2
  62. {
  63. get
  64. {
  65. if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count > 1)
  66. return ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  67. return null;
  68. }
  69. }
  70. #endregion
  71. protected void InitFOUP()
  72. {
  73. FOUPA = ModuleManager.ModuleInfos["LP1"];
  74. FOUPB = ModuleManager.ModuleInfos["LP2"];
  75. FOUPC = ModuleManager.ModuleInfos["LP3"];
  76. }
  77. protected void InitBuffer()
  78. {
  79. Buffer = ModuleManager.ModuleInfos["Buffer"];
  80. }
  81. protected void InitPM()
  82. {
  83. PM1 = ModuleManager.ModuleInfos["PM1"];
  84. PM2 = ModuleManager.ModuleInfos["PM2"];
  85. }
  86. }
  87. public class LocalUIViewModelBase : UiViewModelBase
  88. {
  89. public string SystemName { get; set; }
  90. [Subscription("EfemRobot.RobotMoveInfo")]
  91. public RobotMoveInfo EfemRobotMoveInfo { get; set; }
  92. [Subscription("TMRobot.RobotMoveInfo")]
  93. public RobotMoveInfo TmRobotMoveInfo { get; set; }
  94. public VTMRobotPosition StationPosition { get; set; }
  95. public Dictionary<string, StationPosition> EfemStationPosition
  96. {
  97. get
  98. {
  99. return new Dictionary<string, StationPosition>()
  100. {
  101. { "System", new StationPosition() {
  102. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  103. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  104. }
  105. ,{ "EfemRobot", new StationPosition() {
  106. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  107. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  108. }
  109. ,{ "LP1", new StationPosition() {
  110. StartPosition = new RobotPosition() {X= -430, Root = 81, Arm = 191, Hand = 89 }
  111. ,EndPosition = new RobotPosition() { Root = 0, Arm = 360, Hand = 0 }}
  112. }
  113. ,{ "LP2", new StationPosition() {
  114. StartPosition = new RobotPosition() {X= -235, Root = 81, Arm = 191, Hand = 89 }
  115. ,EndPosition = new RobotPosition() { Root = 0, Arm = 360, Hand = 0 }}
  116. }
  117. ,{ "LP3", new StationPosition() {
  118. StartPosition = new RobotPosition() {X= -45, Root = 81, Arm = 191, Hand = 89 }
  119. ,EndPosition = new RobotPosition() { Root = 0, Arm = 360, Hand = 0 }}
  120. }
  121. ,{ "Aligner", new StationPosition() {
  122. StartPosition = new RobotPosition() {X=-360, Root = 90, Arm = 81, Hand = 194 }
  123. ,EndPosition = new RobotPosition() { Root = 90, Arm = 360, Hand = 0 }}
  124. }
  125. ,{ "LLA", new StationPosition() {
  126. StartPosition = new RobotPosition() {X= -350, Root = 261, Arm = 191, Hand = 89 }
  127. ,EndPosition = new RobotPosition() { Root = 180, Arm = 360, Hand = 0 }}
  128. }
  129. ,{ "LLB", new StationPosition() {
  130. StartPosition = new RobotPosition() {X= -185, Root = 261, Arm = 191, Hand = 89 }
  131. ,EndPosition = new RobotPosition() { Root = 180, Arm = 360, Hand = 0 }}
  132. }
  133. };
  134. }
  135. }
  136. public ModuleInfo FOUPA { get; set; }
  137. public ModuleInfo FOUPB { get; set; }
  138. public ModuleInfo FOUPC { get; set; }
  139. public ModuleInfo FOUPD { get; set; }
  140. public ModuleInfo EFEM { get; set; }
  141. public ModuleInfo TM { get; set; }
  142. public ModuleInfo Aligner { get; set; }
  143. public ModuleInfo LLA { get; set; }
  144. public ModuleInfo LLB { get; set; }
  145. public ModuleInfo PMA { get; set; }
  146. public ModuleInfo PMB { get; set; }
  147. #region Wafer info for machine
  148. private WaferAssociationInfo _lp1WaferAssociation;
  149. public WaferAssociationInfo LP1WaferAssociation
  150. {
  151. get { return _lp1WaferAssociation; }
  152. set { _lp1WaferAssociation = value; }
  153. }
  154. private WaferAssociationInfo _lp2WaferAssociation;
  155. public WaferAssociationInfo LP2WaferAssociation
  156. {
  157. get { return _lp2WaferAssociation; }
  158. set { _lp2WaferAssociation = value; }
  159. }
  160. private WaferAssociationInfo _lp3WaferAssociation;
  161. public WaferAssociationInfo LP3WaferAssociation
  162. {
  163. get { return _lp3WaferAssociation; }
  164. set { _lp3WaferAssociation = value; }
  165. }
  166. public WaferInfo LLAWafer1
  167. {
  168. get
  169. {
  170. return null;
  171. }
  172. }
  173. public WaferInfo LLAWafer2
  174. {
  175. get
  176. {
  177. return null;
  178. }
  179. }
  180. public WaferInfo LLBWafer1
  181. {
  182. get
  183. {
  184. return null;
  185. }
  186. }
  187. public WaferInfo LLBWafer2
  188. {
  189. get
  190. {
  191. return null;
  192. }
  193. }
  194. public WaferInfo BufferWafer
  195. {
  196. get
  197. {
  198. if (ModuleManager.ModuleInfos["Buffer"].WaferManager.Wafers.Count > 0)
  199. return ModuleManager.ModuleInfos["Buffer"].WaferManager.Wafers[0];
  200. return null;
  201. }
  202. }
  203. public WaferInfo PMAWafer1
  204. {
  205. get
  206. {
  207. if (ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers.Count > 0)
  208. return ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[0];
  209. return null;
  210. }
  211. }
  212. public WaferInfo PMAWafer2
  213. {
  214. get
  215. {
  216. if (ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers.Count > 0)
  217. return ModuleManager.ModuleInfos["PMA"].WaferManager.Wafers[1];
  218. return null;
  219. }
  220. }
  221. public WaferInfo PMBWafer1
  222. {
  223. get
  224. {
  225. if (ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers.Count > 0)
  226. return ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[0];
  227. return null;
  228. }
  229. }
  230. public WaferInfo PMBWafer2
  231. {
  232. get
  233. {
  234. if (ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers.Count > 0)
  235. return ModuleManager.ModuleInfos["PMB"].WaferManager.Wafers[1];
  236. return null;
  237. }
  238. }
  239. public WaferInfo AlignerWafer
  240. {
  241. get
  242. {
  243. return ModuleManager.ModuleInfos["Aligner"].WaferManager.Wafers[0];
  244. }
  245. }
  246. public WaferInfo EfemRobotWafer1
  247. {
  248. get
  249. {
  250. if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count > 0)
  251. return ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[0];
  252. return null;
  253. }
  254. }
  255. public WaferInfo EfemRobotWafer2
  256. {
  257. get
  258. {
  259. if (ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers.Count > 1)
  260. return ModuleManager.ModuleInfos["EfemRobot"].WaferManager.Wafers[1];
  261. return null;
  262. }
  263. }
  264. public WaferInfo TMRobotWafer1
  265. {
  266. get
  267. {
  268. return ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[0];
  269. }
  270. }
  271. public WaferInfo TMRobotWafer2
  272. {
  273. get
  274. {
  275. return ModuleManager.ModuleInfos["TMRobot"].WaferManager.Wafers[1];
  276. }
  277. }
  278. #endregion
  279. protected void InitLL()
  280. {
  281. LLA = ModuleManager.ModuleInfos["LLA"];
  282. LLB = ModuleManager.ModuleInfos["LLB"];
  283. }
  284. protected void InitTM()
  285. {
  286. TM = ModuleManager.ModuleInfos["TMRobot"];
  287. }
  288. protected void InitEFEM()
  289. {
  290. EFEM = ModuleManager.ModuleInfos["EfemRobot"];
  291. }
  292. protected void InitFOUP()
  293. {
  294. FOUPA = ModuleManager.ModuleInfos["LP1"];
  295. FOUPB = ModuleManager.ModuleInfos["LP2"];
  296. FOUPC = ModuleManager.ModuleInfos["LP3"];
  297. }
  298. protected void InitAligner()
  299. {
  300. Aligner = ModuleManager.ModuleInfos["Aligner"];
  301. }
  302. protected void InitPM()
  303. {
  304. PMA = ModuleManager.ModuleInfos["PMA"];
  305. PMB = ModuleManager.ModuleInfos["PMB"];
  306. }
  307. }
  308. }