ParameterManager.cs 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813
  1. using Aitex.Common.Util;
  2. using Aitex.Core.UI.MVVM;
  3. using MECF.Framework.Common.DataCenter;
  4. using MECF.Framework.Common.OperationCenter;
  5. using System;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. using System.Collections.ObjectModel;
  9. using System.Data;
  10. using System.IO;
  11. using System.Reflection;
  12. using System.Text;
  13. using System.Windows;
  14. using System.Xml;
  15. using System.Linq;
  16. using System.Xml.Schema;
  17. using System.Xml.Serialization;
  18. using Aitex.Core.RT.SCCore;
  19. using System.Threading.Tasks;
  20. using System.Windows.Documents;
  21. using Aitex.Core.RT.ConfigCenter;
  22. namespace MECF.Framework.Common.Utilities
  23. {
  24. //单选属性
  25. [Serializable]
  26. public class SelectionProperty : ViewModelBase
  27. {
  28. private string _Name;
  29. [XmlAttribute("Name")]
  30. public string Name
  31. {
  32. get { return _Name; }
  33. set { _Name = value; this.InvokePropertyChanged(nameof(Name)); }
  34. }
  35. private string _Display;
  36. [XmlAttribute("Display")]
  37. public string Display
  38. {
  39. get
  40. {
  41. return string.IsNullOrEmpty(_Display) ? Name : _Display;
  42. }
  43. set
  44. {
  45. _Display = value;
  46. this.InvokePropertyChanged(nameof(Display));
  47. }
  48. }
  49. private string _CurrentValue;
  50. [XmlAttribute("CurrentValue")]
  51. public string CurrentValue
  52. {
  53. get { return _CurrentValue; }
  54. set { _CurrentValue = value; this.InvokePropertyChanged(nameof(CurrentValue)); }
  55. }
  56. private ObservableCollection<string> _Values = new ObservableCollection<string>();
  57. [XmlArray("Values")]
  58. [XmlArrayItem("string")]
  59. public ObservableCollection<string> Values
  60. {
  61. get { return _Values; }
  62. set { _Values = value; this.InvokePropertyChanged(nameof(Values)); }
  63. }
  64. }
  65. public class ParameterManager
  66. {
  67. //private static string _ConfigPathName = @"c:\Track\Parameter.txt";
  68. //private static string _ConfigPathName = PathManager.GetCfgDir().Replace("UI", "RT") + "Parameter.xml";
  69. private static volatile Parameter instance;
  70. private static object locker = new Object();
  71. private static string _blockNumber = "4Block";
  72. public static string BlockNumber
  73. {
  74. get => _blockNumber;
  75. set
  76. {
  77. _blockNumber = value;
  78. }
  79. }
  80. //public static bool IsInitialize { get; set; } = false;
  81. private static bool _isInitialize;
  82. public static bool IsInitialize
  83. {
  84. get => _isInitialize;
  85. set
  86. {
  87. _isInitialize = value;
  88. }
  89. }
  90. public static List<SCConfigItem> ConfigItemList { get; set; }
  91. public static void InitializeBlock()
  92. {
  93. if (ConfigItemList == null || ConfigItemList.Count == 0)
  94. {
  95. ConfigItemList = SC.IsEnable ? SC.GetItemList() : QueryDataClient.Instance.Service.GetConfigItemList();
  96. }
  97. int[] blockNumbers = new int[] { 6, 30, 30, 6 };
  98. switch (instance.NumberOfBlocks)
  99. {
  100. case 2:
  101. blockNumbers = new int[] { 6, 30 };
  102. break;
  103. case 3:
  104. blockNumbers = new int[] { 6, 30, 6 };
  105. break;
  106. case 4:
  107. blockNumbers = new int[] { 6, 30, 30, 6 };
  108. break;
  109. default:
  110. break;
  111. }
  112. for (int i = 0; i < instance.NumberOfBlocks; i++)
  113. {
  114. ParameterManager.Instance.Blocks[i].Modules.Clear();
  115. for (int j = 0; j < blockNumbers[i]; j++)
  116. {
  117. ParameterManager.Instance.Blocks[i].Modules.Add(CreateDeviceModule(i + 1, j));
  118. }
  119. ParameterManager.Instance.Blocks[i].UseModuleNumber = ParameterManager.Instance.Blocks[i].Modules.ToList().Where(x => x.NameList.CurrentValue != "Reserved").Count();
  120. }
  121. CreateDispense();
  122. // CreateDispenseDrainDefault();
  123. }
  124. /// <summary>
  125. /// 需要特别注意3block的block3==4block的block4
  126. /// </summary>
  127. /// <param name="noId"></param>
  128. /// <returns></returns>
  129. private static DeviceModule CreateDeviceModule(int blockId, int moduleId)
  130. {
  131. string propertyStr = "System.SetUp.Block";// GetPropertyStr();
  132. string noId = $"{blockId}.{moduleId}";
  133. if (instance.NumberOfBlocks == 3 && blockId == 3)
  134. {
  135. noId = $"{blockId + 1}.{moduleId}";
  136. }
  137. var moduleName = SC.IsEnable ? SC.GetStringValue($"{propertyStr}{noId}.Name") : (string)QueryDataClient.Instance.Service.GetConfig(($"{propertyStr}{noId}.Name"));
  138. string parameter = ConfigItemList.Where(x => x.PathName == ($"{propertyStr}{noId}.Name")).FirstOrDefault()?.Parameter;
  139. DeviceModule deviceModule = new DeviceModule($"{blockId}-{moduleId}", moduleId.ToString(), moduleName);
  140. deviceModule.NameList.CurrentValue = moduleName;
  141. deviceModule.ParameterName = moduleName;
  142. if (parameter != null && parameter != "")
  143. {
  144. var listStr = parameter.Split(';');
  145. foreach (var item in listStr)
  146. {
  147. deviceModule.NameList.Values.Add(item);
  148. }
  149. }
  150. deviceModule.IsLinkModule = IsLinkModule(blockId, moduleId);
  151. //SetSCToModule(ref deviceModule);
  152. return deviceModule;
  153. }
  154. public static bool IsLinkModule(int blockId, int moduleId)
  155. {
  156. if (blockId == 2 && (moduleId == 7 || moduleId == 8))
  157. {
  158. return true;
  159. }
  160. return false;
  161. }
  162. public Dictionary<string, string> GetScValue(string root)
  163. {
  164. Dictionary<string, string> result = new Dictionary<string, string>();
  165. for (int i = 0; i < instance.NumberOfBlocks; i++)
  166. {
  167. foreach (var block in Instance.Blocks)
  168. {
  169. block.GetScValue($"{root}Block{block.ID}.");
  170. }
  171. }
  172. //result[$"{root}.StartSlot"] = StartSlot.ToString();
  173. //for (int i = 0; i < 6; i++)
  174. //{
  175. // //result.Join()
  176. // //ArmAxisList.Add(new ArmAxis());
  177. //}
  178. return result;
  179. }
  180. public static ObservableCollection<string> GetArmAccessModule(string str)
  181. {
  182. if (string.IsNullOrEmpty(str)) return null;
  183. ObservableCollection<string> strList = new ObservableCollection<string>();
  184. if (BlockNumber == "3Block")
  185. {
  186. if (str.Contains("4-"))
  187. {
  188. str = str.Replace("4-", "3-");
  189. }
  190. }
  191. var strlist = str.Split(';');
  192. foreach (var item in strlist)
  193. {
  194. strList.Add(item);
  195. }
  196. return strList;
  197. }
  198. public static string[] COTDispenseNozzleStrs = new string[] { "Resist1", "Resist2" , "Resist3","Resist4", "Resist5", "Resist6", "Resist7", "Resist8",
  199. "RRC1","RRC2","Test1","Test2","E.B.R.1","E.B.R.2","R1 Filter Air Vent","R2 Filter Air Vent","R3 Filter Air Vent","R4 Filter Air Vent",
  200. "TANK Press","","Back Rinse1","Back Rinse2","Solvent Bath","","Auto Damper","Back Rinse1+2","Drain Case Clean","EXH Duct Clean"};
  201. public static string[] DEVDispenseNozzleStrs = new string[] { "DEV Solution1", "DEV Solution2" , "DEV Solution3", "DEV Solution4", "", "", "",
  202. "DEV Nozzle1 Air Vent","DEV Nozzle2 Air Vent","","","Rinse1","Rinse2","Filter1 Vent","Filter2 Vent","Filter3 Vent","Filter4 Vent",
  203. "Tank Press","AD Promoter","Back Rinse1","Water Shield","Exhaust","Auto Damper","N2 Blow","Nozzle1 Rinse","Nozzle2 Rinse",
  204. "PDD Nozzle1","PDD Nozzle2","N2 Splay(DEV)","N3 Splay(Rinse)","Bypass"};
  205. public static string[] ADHDispenseNozzleStrs = new string[] { "HMDS" };
  206. public static void CreateDispense()
  207. {
  208. ParameterManager.Instance.SpinerDeviceModule.Clear();
  209. ParameterManager.Instance.DispenseDeviceModule.Clear();
  210. if (ParameterManager.Instance.Blocks[1] != null)
  211. {
  212. ParameterManager.Instance.Blocks[1].Modules.ToList().ForEach(x =>
  213. {
  214. if (IsSpinModule(x.Name)) ParameterManager.Instance.SpinerDeviceModule.Add(x);
  215. });
  216. ParameterManager.Instance.Blocks[1].Modules.ToList().ForEach(x =>
  217. {
  218. if (IsSpinModule(x.Name) || IsADHModule(x.Name)) ParameterManager.Instance.DispenseDeviceModule.Add(x);
  219. });
  220. }
  221. if (ParameterManager.Instance.NumberOfBlocks > 2 && ParameterManager.Instance.Blocks[2] != null)
  222. {
  223. ParameterManager.Instance.Blocks[2].Modules.ToList().ForEach(x =>
  224. {
  225. if (IsSpinModule(x.Name)) ParameterManager.Instance.SpinerDeviceModule.Add(x);
  226. });
  227. ParameterManager.Instance.Blocks[2].Modules.ToList().ForEach(x =>
  228. {
  229. if (IsSpinModule(x.Name) || IsADHModule(x.Name)) ParameterManager.Instance.DispenseDeviceModule.Add(x);
  230. });
  231. }
  232. }
  233. public static bool IsSpinModule(string moduleName)
  234. {
  235. bool isSpin = false;
  236. string[] spinMdules = new string[] { "COT", "BCT", "TCT", "DEV", "NTD" };
  237. if (spinMdules.Contains(moduleName))
  238. {
  239. isSpin = true;
  240. }
  241. return isSpin;
  242. }
  243. public static bool IsUNCModule(string moduleName)
  244. {
  245. bool isSpin = false;
  246. string[] spinMdules = new string[] { "UNC" };
  247. if (spinMdules.Contains(moduleName))
  248. {
  249. isSpin = true;
  250. }
  251. return isSpin;
  252. }
  253. public static bool IsADHModule(string moduleName)
  254. {
  255. bool ret = false;
  256. string[] spinMdules = new string[] { "ADH" };
  257. if (spinMdules.Contains(moduleName))
  258. {
  259. ret = true;
  260. }
  261. return ret;
  262. }
  263. public static Parameter Instance
  264. {
  265. get
  266. {
  267. lock (locker)
  268. {
  269. if (instance == null)
  270. {
  271. instance = new Parameter(BlockNumber);
  272. InitializeBlock();
  273. }
  274. return instance;
  275. }
  276. }
  277. }
  278. }
  279. [Serializable]
  280. public class Parameter
  281. {
  282. public enum EunmTransferOrder
  283. {
  284. ByTop = 0,
  285. ByBottom,
  286. BySlot
  287. }
  288. public Parameter() { InitParameter(); }
  289. public Dictionary<string, Dictionary<string, DispenseConfig>> ModuleDispenseConfigList { get; set; } = new Dictionary<string, Dictionary<string, DispenseConfig>>();
  290. public ObservableCollection<DeviceModule> SpinerDeviceModule { get; set; } = new ObservableCollection<DeviceModule>();
  291. public ObservableCollection<DeviceModule> DispenseDeviceModule { get; set; } = new ObservableCollection<DeviceModule>();
  292. public Parameter(string blockNumber)
  293. {
  294. _NumberOfBlocks = BlockStrToInt(blockNumber);
  295. CreateBlocks();
  296. InitParameter();
  297. }
  298. private static int BlockStrToInt(string blockNumber)
  299. {
  300. var number = 4;
  301. switch (blockNumber)
  302. {
  303. case "4Block":
  304. number = 4;
  305. break;
  306. case "3Block":
  307. number = 3;
  308. break;
  309. case "2Block":
  310. number = 2;
  311. break;
  312. default:
  313. break;
  314. }
  315. return number;
  316. }
  317. [XmlArray("Blocks")]
  318. [XmlArrayItem("DeviceBlock")]
  319. public ObservableCollection<DeviceBlock> Blocks { get; set; } = new ObservableCollection<DeviceBlock>();
  320. private int _NumberOfBlocks;
  321. [XmlAttribute("_NumberOfBlocks")]
  322. public int NumberOfBlocks
  323. {
  324. get { return _NumberOfBlocks; }
  325. set
  326. {
  327. if (value < 1 || value > 4) throw new Exception("value should between 1 and 4");
  328. if (_NumberOfBlocks != value)
  329. {
  330. _NumberOfBlocks = value;
  331. CreateBlocks();
  332. InitParameter();
  333. }
  334. }
  335. }
  336. public void CreateBlocks()
  337. {
  338. Blocks.Clear();
  339. switch (NumberOfBlocks)
  340. {
  341. case 2:
  342. Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
  343. Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
  344. break;
  345. case 3:
  346. Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
  347. Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
  348. Blocks.Add(new DeviceBlock(3) { Name = "IFB" });
  349. break;
  350. case 4:
  351. Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
  352. Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
  353. Blocks.Add(new DeviceBlock(3) { Name = "PRB2" });
  354. Blocks.Add(new DeviceBlock(4) { Name = "IFB" });
  355. break;
  356. default:
  357. break;
  358. }
  359. }
  360. public void InitParameter()
  361. {
  362. GetMonitorEditData();
  363. //NumberOfBlocks = 1;
  364. //InitSystemParameter();
  365. //InitTransferOutOrInOrder();
  366. GetDataCollection();
  367. }
  368. private void GetMonitorEditData()
  369. {
  370. string strFileMonitorEdit = SC.IsEnable ? SC.GetStringValue("System.SetUp.MonitorEdit") : (string)QueryDataClient.Instance.Service.GetConfig("System.SetUp.MonitorEdit");
  371. if (strFileMonitorEdit != null && strFileMonitorEdit != "")
  372. {
  373. MonitorData.Clear();
  374. string[] listMonitorEdit = strFileMonitorEdit.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
  375. for (int i = 0; i < listMonitorEdit.Length; i++)
  376. {
  377. MonitorData.Add(new MonitorEditData(listMonitorEdit[i]));
  378. }
  379. }
  380. }
  381. private void GetDataCollection()
  382. {
  383. DataCollection.Clear();
  384. DataCollection.Add(new DataCollecion()
  385. {
  386. MouleName = "Coater",
  387. MeasureData = new ObservableCollection<string>(new List<string>() { "Spin rotation speed", "Solvent bath flow" })
  388. });
  389. }
  390. //public void SaveMonitorEditData()
  391. //{
  392. // if (MonitorData != null && MonitorData.Count > 0)
  393. // {
  394. // InvokeClient.Instance.Service.DoOperation("SetConfig", new object[] { "Save", "MonitorEdit", MonitorEdittDataToString(MonitorData) });
  395. // }
  396. //}
  397. //private string MonitorEdittDataToString(ObservableCollection<MonitorEditData> monitorData)
  398. //{
  399. // StringBuilder stringBuilder = new StringBuilder();
  400. // foreach (var item in monitorData)
  401. // {
  402. // stringBuilder.AppendLine($"{item.ToString()}");
  403. // }
  404. // return stringBuilder.ToString();
  405. //}
  406. [XmlArray("SystemParameter")]
  407. [XmlArrayItem("SelectionProperty")]
  408. public ObservableCollection<SelectionProperty> SystemParameter { get; set; } = new ObservableCollection<SelectionProperty>();
  409. //public void InitSystemParameter()
  410. //{
  411. // SystemParameter.Add(new SelectionProperty() { Name = "WaferExistInRCV", Values = { "OK", "Cancel" }, CurrentValue = "OK" });
  412. // SystemParameter.Add(new SelectionProperty() { Name = "DesignationOfLotEndForJob", Values = { "All Lot", "Last Lot" }, CurrentValue = "All Lot" });
  413. // SystemParameter.Add(new SelectionProperty() { Name = "DefaultScreenForRunButton", Values = { "Lot Start", "Job Start", "Wafer Flow Recipe Registrtation" }, CurrentValue = "Lot Start" });
  414. // SystemParameter.Add(new SelectionProperty() { Name = "CupWashingAlarm", Values = { "Valid", "Invalid" }, CurrentValue = "Valid" });
  415. // SystemParameter.Add(new SelectionProperty() { Name = "EISInitializeCondition", Values = { "Unconditionally", "ConfigrmARMSignal" }, CurrentValue = "Unconditionally" });
  416. //}
  417. [XmlArray("TransferOutOrInOrder")]
  418. [XmlArrayItem("SelectionProperty")]
  419. public ObservableCollection<SelectionProperty> TransferOutOrInOrder { get; set; } = new ObservableCollection<SelectionProperty>();
  420. //private void InitTransferOutOrInOrder()
  421. //{
  422. // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Sender-TransferOutOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
  423. // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Reciver-TransferInOrder", Values = { "Top", "Bottom", "Slot Correspondence" }, CurrentValue = "" });
  424. // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "UniCass-TransferOutOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
  425. // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "PickUp-TransferInOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
  426. // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Reject-TransferInOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
  427. //}
  428. public ObservableCollection<MonitorEditData> MonitorData { get; set; } = new ObservableCollection<MonitorEditData>();
  429. public ObservableCollection<DataCollecion> DataCollection { get; set; } = new ObservableCollection<DataCollecion>();
  430. public Dictionary<string, object> GetScValue(string root)
  431. {
  432. Dictionary<string, object> result = new Dictionary<string, object>();
  433. foreach (var item in Blocks)
  434. {
  435. if (NumberOfBlocks == 3 && item.ID == "3")
  436. {
  437. result.AddRange(item.GetScValue($"{root}Block4."));
  438. }
  439. else
  440. {
  441. result.AddRange(item.GetScValue($"{root}Block{item.ID}."));
  442. }
  443. }
  444. foreach (var item in Blocks)
  445. {
  446. item.UseModuleNumber = item.Modules.ToList().Where(x => x.NameList.CurrentValue != "Reserved").Count();
  447. }
  448. return result;
  449. }
  450. }
  451. [Serializable]
  452. public class DeviceBlock
  453. {
  454. [XmlElement("ID")]
  455. public string ID { get; set; }
  456. [XmlElement("Name")]
  457. public string Name { get; set; }
  458. [XmlElement("BlockID")]
  459. public SelectionProperty BlockID { get; set; } = new SelectionProperty() { Name = "BlockID", Values = { "Cassette Block", "Proccess Block", "Interface Block" }, CurrentValue = "" };
  460. public ObservableCollection<string> ModuleIDs { get; set; } = new ObservableCollection<string>();
  461. public ObservableCollection<string> TransferArmCanAccessModules { get; set; } = new ObservableCollection<string>();
  462. public ObservableCollection<string> TransferArmAccessModules { get; set; } = new ObservableCollection<string>();
  463. //public ModuleArm ModuleArm { get; set; }
  464. [XmlArray("Modules")]
  465. [XmlArrayItem("DeviceModule")]
  466. public ObservableCollection<DeviceModule> Modules { get; set; } = new ObservableCollection<DeviceModule>();
  467. private int _NumberOfModules;
  468. [XmlAttribute("_NumberOfModules")]
  469. public int NumberOfModules
  470. {
  471. get { return _NumberOfModules; }
  472. set
  473. {
  474. if (value < 0 || value > 32) throw new Exception("value should between 0 and 32");
  475. _NumberOfModules = value;
  476. // SetModules();
  477. }
  478. }
  479. public int UseModuleNumber { get; set; }
  480. //private void SetModules()
  481. //{
  482. // int count = NumberOfModules - Modules.Count;
  483. // if (count > 0)
  484. // {
  485. // for (int i = 0; i < count; i++)
  486. // {
  487. // string id = (Modules.Count + 1).ToString();
  488. // Modules.Add(new DeviceModule(id, BlockID.CurrentValue));
  489. // }
  490. // }
  491. // else if (count < 0)
  492. // {
  493. // for (int i = 0; i < (-count); i++)
  494. // {
  495. // Modules.RemoveAt(Modules.Count - 1);
  496. // }
  497. // }
  498. //}
  499. public DeviceBlock()
  500. {
  501. }
  502. public DeviceBlock(int id)
  503. {
  504. ID = id.ToString();
  505. }
  506. public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();
  507. public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();
  508. public Dictionary<string, object> GetScValue(string root)
  509. {
  510. Dictionary<string, object> result = new Dictionary<string, object>();
  511. foreach (var item in Modules)
  512. {
  513. result.AddRange(item.GetScValue($"{root}{item.ModuleID}."));
  514. }
  515. result.AddRange(AccessHomePosition.GetScValue($"{root}AccessHomePosition."));
  516. result.AddRange(WaferCheckPosition.GetScValue($"{root}WaferCheckPosition."));
  517. return result;
  518. }
  519. }
  520. [Serializable]
  521. public class DeviceModule
  522. {
  523. [XmlElement("ID")]
  524. public string ID { get; set; }
  525. [XmlElement("Name")]
  526. public string Name { get; set; }
  527. public string ParentID { get; set; }
  528. [XmlAttribute("ModuleID")]
  529. public string ModuleID { get; set; }
  530. [XmlAttribute("ParameterName")]
  531. public string ParameterName { get; set; }
  532. public SelectionProperty NameList { get; set; } = new SelectionProperty() { Name = "NameList", Values = { }, CurrentValue = "CPL" };
  533. public SelectionProperty SYNEXC { get; set; } = new SelectionProperty() { Name = "SYNCEXC", Values = { "Invalid", "1-2", "2-3", "1-2&2-3" }, CurrentValue = "" };
  534. [XmlAttribute("MateriCount")]
  535. public int MaterialCount { get; set; }
  536. [XmlAttribute("StartSlot")]
  537. public int StartSlot { get; set; }
  538. public SelectionProperty AGVConnect { get; set; } = new SelectionProperty() { Name = "AGVConnect", Values = { "Connect", "Disconnect" } };
  539. public SpinerModule ModuleSpiner { get; set; } = new SpinerModule();
  540. public ObservableCollection<SelectionProperty> TransferArmPosition { get; set; } = new ObservableCollection<SelectionProperty>();
  541. public ObservableCollection<ArmAxis> ArmAxisList { get; set; } = new ObservableCollection<ArmAxis>();
  542. public SelectionProperty MappingType { get; set; } = new SelectionProperty() { Name = "Arm Up", Values = { "Arm Up", "Arm Receive", "Cassette Down" } };
  543. public int WaferThickness { get; set; }
  544. public int PositiveTolerance { get; set; }
  545. public int NegativeTolerance { get; set; }
  546. public int FirstSlotposition { get; set; }
  547. public SelectionProperty SlotEditingType { get; set; } = new SelectionProperty() { Name = "Fix", Values = { "Fix", "Option" } };
  548. public int SlotPitch { get; set; }
  549. public int MappingStartPosition { get; set; }
  550. public int MappingEndPosition { get; set; }
  551. public int SlotNo { get; set; }
  552. public bool IsLinkModule { get; set; } = false;
  553. public bool IsSelected { get; set; }
  554. public TransferArmPosition ParameterTransferArmPosition { get; set; } = new TransferArmPosition();
  555. public TransferArmPosition LinkParameterTransferArmPosition { get; set; } = new TransferArmPosition();
  556. public MonitorEditData MonitorEidtData { get; set; }
  557. public DeviceModule() { }
  558. public DeviceModule(string id, string moduleID, string name)
  559. {
  560. ID = id;
  561. ModuleID = moduleID;
  562. Name = name;
  563. for (int i = 0; i < 6; i++)
  564. {
  565. ArmAxisList.Add(new ArmAxis());
  566. }
  567. //NameList.CurrentValue = name;
  568. }
  569. public void Save()
  570. {
  571. }
  572. public Dictionary<string, object> GetScValue(string root)
  573. {
  574. Dictionary<string, object> result = new Dictionary<string, object>();
  575. result[$"{root}Name"] = NameList.CurrentValue;
  576. result[$"{root}SYNEXC"] = SYNEXC.CurrentValue;
  577. result[$"{root}MaterialCount"] = MaterialCount;
  578. result[$"{root}StartSlot"] = StartSlot;
  579. result[$"{root}AGVConnect"] = AGVConnect.CurrentValue;
  580. if (ParameterManager.IsUNCModule(Name))
  581. {
  582. result[$"{root}MappingType"] = MappingType.CurrentValue;
  583. result[$"{root}WaferThickness"] = WaferThickness;
  584. result[$"{root}PositiveTolerance"] = PositiveTolerance;
  585. result[$"{root}NegativeTolerance"] = NegativeTolerance;
  586. result[$"{root}FirstSlotposition"] = FirstSlotposition;
  587. result[$"{root}SlotEditingType"] = SlotEditingType.CurrentValue;
  588. result[$"{root}SlotPitch"] = SlotPitch;
  589. result[$"{root}MappingStartPosition"] = MappingStartPosition;
  590. result[$"{root}MappingEndPosition"] = MappingEndPosition;
  591. }
  592. if (ModuleID == "0" && ArmAxisList != null && ArmAxisList.Count == 6)
  593. {
  594. result.AddRange(ArmAxisList[0].GetScValue($"{root}X1axis."));
  595. result.AddRange(ArmAxisList[1].GetScValue($"{root}X2axis."));
  596. result.AddRange(ArmAxisList[2].GetScValue($"{root}X3axis."));
  597. result.AddRange(ArmAxisList[3].GetScValue($"{root}Yaxis."));
  598. result.AddRange(ArmAxisList[4].GetScValue($"{root}Zaxis."));
  599. result.AddRange(ArmAxisList[5].GetScValue($"{root}Raxis."));
  600. }
  601. if (ParameterManager.IsSpinModule(Name))
  602. {
  603. result.AddRange(ModuleSpiner.GetScValue(root));
  604. }
  605. if (ModuleID != "0")
  606. {
  607. result.AddRange(ParameterTransferArmPosition.GetScValue($"{root}TransferArmPosition."));
  608. }
  609. if (IsLinkModule)
  610. {
  611. result.AddRange(LinkParameterTransferArmPosition.GetScValue($"{root}LinkTransferArmPosition."));
  612. }
  613. if (NameList.CurrentValue == "COT" || NameList.CurrentValue == "DEV" || NameList.CurrentValue == "ADH")
  614. {
  615. if (ParameterManager.Instance.ModuleDispenseConfigList.ContainsKey(ID))
  616. result[$"{root}DispenseConfig"] = DispenseConfigListToString(ParameterManager.Instance.ModuleDispenseConfigList[ID]);
  617. }
  618. return result;
  619. }
  620. private string DispenseConfigListToString(Dictionary<string, DispenseConfig> dispenseConfigList)
  621. {
  622. StringBuilder stringBuilder = new StringBuilder();
  623. foreach (var item in dispenseConfigList.Keys)
  624. {
  625. stringBuilder.AppendLine($"{item}:{dispenseConfigList[item].ToString()}");
  626. }
  627. return stringBuilder.ToString();
  628. }
  629. }
  630. public class ArmAxis
  631. {
  632. public int SpeedInitial { get; set; }
  633. public int SpeedMovementbetweenmod { get; set; }
  634. public int SpeedReceive { get; set; }
  635. public int SpeedSend { get; set; }
  636. public int SpeedMapping { get; set; }
  637. public int SpeedMaintenance { get; set; }
  638. public int SpeedInching { get; set; }
  639. public string MultiMovementbetweenmod { get; set; }
  640. public double PassMovementbetweenmod { get; set; }
  641. public double PassReceive { get; set; }
  642. public double PassSpeedSend { get; set; }
  643. public double PassSpeedMapping { get; set; }
  644. public Dictionary<string, object> GetScValue(string root)
  645. {
  646. Dictionary<string, object> result = new Dictionary<string, object>();
  647. result[$"{root}SpeedInitial"] = SpeedInitial;
  648. result[$"{root}SpeedMovementbetweenmod"] = SpeedMovementbetweenmod;
  649. result[$"{root}SpeedReceive"] = SpeedReceive;
  650. result[$"{root}SpeedSend"] = SpeedSend;
  651. result[$"{root}SpeedMapping"] = SpeedMapping;
  652. result[$"{root}SpeedMaintenance"] = SpeedMaintenance;
  653. result[$"{root}SpeedInching"] = SpeedInching;
  654. result[$"{root}MultiMovementbetweenmod"] = MultiMovementbetweenmod;
  655. result[$"{root}PassMovementbetweenmod"] = PassMovementbetweenmod;
  656. result[$"{root}PassReceive"] = PassReceive;
  657. result[$"{root}PassSpeedSend"] = PassSpeedSend;
  658. result[$"{root}PassSpeedMapping"] = PassSpeedMapping;
  659. return result;
  660. }
  661. }
  662. public class ModuleArm
  663. {
  664. //public DataTable TransferArmControlData { get; set; } = new DataTable("TransferArmControlData");
  665. //public ObservableCollection<TransferArmInteraction> TransferArmInteraction { get; set; } = new ObservableCollection<TransferArmInteraction>();
  666. }
  667. public class SpinerModule
  668. {
  669. public string ArmCount { get; set; }
  670. public string ShakeArmNo { get; set; }
  671. //public string RinseNozzleSpec { get; set; }
  672. public string UpperLimitSpinSpeed { get; set; }
  673. public string UpperLimitAcceleration { get; set; }
  674. public string SpinOutSpeed { get; set; }
  675. public string SpinOutTime { get; set; }
  676. public string Unit { get; set; }
  677. public NozzleChanger NozzleChanger { get; set; } = new NozzleChanger();
  678. public NozzleArmInformat NozzleArmInformat1 { get; set; } = new NozzleArmInformat();
  679. public NozzleArmInformat NozzleArmInformat2 { get; set; } = new NozzleArmInformat();
  680. public Dictionary<string, object> GetScValue(string root)
  681. {
  682. Dictionary<string, object> result = new Dictionary<string, object>();
  683. result[$"{root}ArmCount"] = ArmCount;
  684. result[$"{root}ShakeArmNo"] = ShakeArmNo;
  685. result[$"{root}UpperLimitSpinSpeed"] = UpperLimitSpinSpeed;
  686. result[$"{root}UpperLimitAcceleration"] = UpperLimitAcceleration;
  687. result[$"{root}SpinOutSpeed"] = SpinOutSpeed;
  688. result[$"{root}SpinOutTime"] = SpinOutTime;
  689. // result[$"{root}Unit"] = Unit;
  690. result.AddRange(NozzleChanger.GetScValue($"{root}NozzleChanger."));
  691. result.AddRange(NozzleArmInformat1.GetScValue($"{root}NozzleArmInformat1."));
  692. result.AddRange(NozzleArmInformat2.GetScValue($"{root}NozzleArmInformat2."));
  693. return result;
  694. }
  695. }
  696. public class NozzleChanger : ICloneable
  697. {
  698. public string IsNozzleChangerEnable { get; set; }
  699. public string MotorPulseRate { get; set; }
  700. public string MaxSpeed { get; set; }
  701. public string MoveSpeed { get; set; }
  702. public void SetNozzleChangerDataList(string value)
  703. {
  704. NozzleChangerData.Clear();
  705. var strList = value.Split(';');
  706. for (int i = 0; i < strList.Length; i++)
  707. {
  708. var NozzleChangerStrList = strList[i].Split(',');
  709. NozzleChangerData.Add(new NozzleChangerData()
  710. {
  711. ID = (i + 1).ToString(),
  712. IsNozzleChangerEnable = NozzleChangerStrList[0],
  713. Position = NozzleChangerStrList[1],
  714. NozzleSensorNo = NozzleChangerStrList[2],
  715. NozzleOffSet = NozzleChangerStrList[3]
  716. });
  717. }
  718. }
  719. public string NozzleChangerDataToString()
  720. {
  721. StringBuilder stringBuilder = new StringBuilder();
  722. foreach (var item in NozzleChangerData)
  723. {
  724. stringBuilder.Append(item.ToString());
  725. stringBuilder.Append(";");
  726. }
  727. if (stringBuilder.Length > 0) stringBuilder.Remove(stringBuilder.Length - 1, 1);
  728. return stringBuilder.ToString();
  729. }
  730. public object Clone()
  731. {
  732. return this.MemberwiseClone();
  733. }
  734. public object DeepClone()
  735. {
  736. return new NozzleChanger()
  737. {
  738. IsNozzleChangerEnable = this.IsNozzleChangerEnable,
  739. MotorPulseRate = this.MotorPulseRate,
  740. MaxSpeed = this.MaxSpeed,
  741. MoveSpeed = this.MoveSpeed,
  742. NozzleChangerData = new ObservableCollection<NozzleChangerData>(this.NozzleChangerData.Select(x => x.DeepClone()).Cast<NozzleChangerData>())
  743. };
  744. }
  745. public ObservableCollection<NozzleChangerData> NozzleChangerData { get; set; } = new ObservableCollection<NozzleChangerData>();
  746. public Dictionary<string, object> GetScValue(string root)
  747. {
  748. Dictionary<string, object> result = new Dictionary<string, object>();
  749. result[$"{root}IsNozzleChangerEnable"] = IsNozzleChangerEnable;
  750. result[$"{root}MotorPulseRate"] = MotorPulseRate;
  751. result[$"{root}MaxSpeed"] = MaxSpeed;
  752. result[$"{root}MoveSpeed"] = MoveSpeed;
  753. result[$"{root}Data"] = NozzleChangerDataToString();
  754. return result;
  755. }
  756. }
  757. public class NozzleChangerData : ICloneable
  758. {
  759. public string ID { get; set; }
  760. public string IsNozzleChangerEnable { get; set; }
  761. public string Position { get; set; }
  762. public string NozzleSensorNo { get; set; }
  763. public string NozzleOffSet { get; set; }
  764. public object Clone()
  765. {
  766. return this.MemberwiseClone();
  767. }
  768. public object DeepClone()
  769. {
  770. return new NozzleChangerData()
  771. {
  772. ID = this.ID,
  773. IsNozzleChangerEnable = this.IsNozzleChangerEnable,
  774. Position = this.Position,
  775. NozzleSensorNo = this.NozzleSensorNo,
  776. NozzleOffSet = this.NozzleOffSet
  777. };
  778. }
  779. public override string ToString()
  780. {
  781. string rst = $"{IsNozzleChangerEnable},{Position},{NozzleSensorNo},{NozzleOffSet}";
  782. return rst.ToString();
  783. }
  784. }
  785. public class NozzleArmInformat : ICloneable
  786. {
  787. public string IsNozzleArmEnable { get; set; }
  788. public string ArmDriveFormat { get; set; }
  789. public string NozzleForm { get; set; }
  790. public string MotorPulsesRate { get; set; }
  791. public string StartPosition { get; set; }
  792. public string EndPosition { get; set; }
  793. public string StartCupPosition { get; set; }
  794. public string EndCupPosition { get; set; }
  795. public string MaintenaceSpeed { get; set; } = "0";
  796. public TransferArmRecipePositionData Home { get; set; }
  797. public TransferArmRecipePositionData DmyDisp { get; set; }
  798. public TransferArmRecipePositionData Standby { get; set; }
  799. public TransferArmRecipePositionData Maintenace1 { get; set; }
  800. public TransferArmRecipePositionData Maintenace2 { get; set; }
  801. public TransferArmRecipePositionData Maintenace3 { get; set; }
  802. public TransferArmRecipePositionData Begin { get; set; }
  803. public TransferArmRecipePositionData Center { get; set; }
  804. public TransferArmRecipePositionData Center2 { get; set; }
  805. public TransferArmRecipePositionData End { get; set; }
  806. public TransferArmRecipePositionData Dispense1 { get; set; }
  807. public TransferArmRecipePositionData Dispense2 { get; set; }
  808. public TransferArmRecipePositionData Dispense3 { get; set; }
  809. public TransferArmRecipePositionData Dispense4 { get; set; }
  810. public TransferArmRecipePositionData Dispense5 { get; set; }
  811. public Dictionary<string, object> GetScValue(string root)
  812. {
  813. Dictionary<string, object> result = new Dictionary<string, object>();
  814. result[$"{root}IsNozzleArmEnable"] = IsNozzleArmEnable;
  815. result[$"{root}ArmDriveFormat"] = ArmDriveFormat;
  816. result[$"{root}NozzleForm"] = NozzleForm;
  817. result[$"{root}MotorPulsesRate"] = MotorPulsesRate;
  818. result[$"{root}StartPosition"] = double.Parse(StartPosition).ToString("f2");
  819. result[$"{root}EndPosition"] = double.Parse(EndPosition).ToString("f2");
  820. result[$"{root}StartCupPosition"] = double.Parse(StartCupPosition).ToString("f2");
  821. result[$"{root}EndCupPosition"] = double.Parse(EndCupPosition).ToString("f2");
  822. result[$"{root}MaintenaceSpeed"] = double.Parse(MaintenaceSpeed).ToString("f2");
  823. if (Home != null) result[$"{root}Home"] = Home.ToString();
  824. if (DmyDisp != null) result[$"{root}DmyDisp"] = DmyDisp.ToString();
  825. if (Standby != null) result[$"{root}Standby"] = Standby.ToString();
  826. if (Maintenace1 != null) result[$"{root}Maintenace1"] = Maintenace1.ToString();
  827. if (Maintenace2 != null) result[$"{root}Maintenace2"] = Maintenace2.ToString();
  828. if (Maintenace3 != null) result[$"{root}Maintenace3"] = Maintenace3.ToString();
  829. if (Begin != null) result[$"{root}Begin"] = Begin.ToString();
  830. if (Center != null) result[$"{root}Center"] = Center.ToString();
  831. if (Center2 != null) result[$"{root}Center2"] = Center2.ToString();
  832. if (End != null) result[$"{root}End"] = End.ToString();
  833. if (Dispense1 != null) result[$"{root}Dispense1"] = Dispense1.ToString();
  834. if (Dispense2 != null) result[$"{root}Dispense2"] = Dispense2.ToString();
  835. if (Dispense3 != null) result[$"{root}Dispense3"] = Dispense3.ToString();
  836. if (Dispense4 != null) result[$"{root}Dispense4"] = Dispense4.ToString();
  837. if (Dispense5 != null) result[$"{root}Dispense5"] = Dispense5.ToString();
  838. return result;
  839. }
  840. public object Clone()
  841. {
  842. return this.MemberwiseClone();
  843. }
  844. public object DeepClone()
  845. {
  846. return new NozzleArmInformat()
  847. {
  848. IsNozzleArmEnable = this.IsNozzleArmEnable,
  849. ArmDriveFormat = this.ArmDriveFormat,
  850. NozzleForm = this.NozzleForm,
  851. MotorPulsesRate = this.MotorPulsesRate,
  852. StartPosition = this.StartPosition,
  853. EndPosition = this.EndPosition,
  854. StartCupPosition = this.StartCupPosition,
  855. EndCupPosition = this.EndCupPosition,
  856. MaintenaceSpeed = this.MaintenaceSpeed,
  857. Home = (TransferArmRecipePositionData)this.Home.Clone(),
  858. DmyDisp = (TransferArmRecipePositionData)this.DmyDisp.Clone(),
  859. Standby = (TransferArmRecipePositionData)this.Standby.Clone(),
  860. Maintenace1 = (TransferArmRecipePositionData)this.Maintenace1.Clone(),
  861. Maintenace2 = (TransferArmRecipePositionData)this.Maintenace2.Clone(),
  862. Maintenace3 = (TransferArmRecipePositionData)this.Maintenace3.Clone(),
  863. Begin = (TransferArmRecipePositionData)this.Begin.Clone(),
  864. Center = (TransferArmRecipePositionData)this.Center.Clone(),
  865. Center2 = (TransferArmRecipePositionData)this.Center2.Clone(),
  866. End = (TransferArmRecipePositionData)this.End.Clone(),
  867. Dispense1 = (TransferArmRecipePositionData)this.Dispense1.Clone(),
  868. Dispense2 = (TransferArmRecipePositionData)this.Dispense2.Clone(),
  869. Dispense3 = (TransferArmRecipePositionData)this.Dispense3.Clone(),
  870. Dispense4 = (TransferArmRecipePositionData)this.Dispense4.Clone(),
  871. Dispense5 = (TransferArmRecipePositionData)this.Dispense5.Clone(),
  872. };
  873. }
  874. }
  875. public class TransferArmInteraction
  876. {
  877. public string AxisName { get; set; }
  878. public ObservableCollection<TransferArmInteractionData> TransferArmInteractionData { get; set; } = new ObservableCollection<TransferArmInteractionData>();
  879. }
  880. public class TransferArmInteractionData
  881. {
  882. public string TranserAxisName { get; set; }
  883. public string From { get; set; }
  884. public string To { get; set; }
  885. }
  886. public class TransferArmRecipePositionData : ICloneable
  887. {
  888. public TransferArmRecipePositionData()
  889. { }
  890. public TransferArmRecipePositionData(string value)
  891. {
  892. if (!(value == null || value == ""))
  893. {
  894. var strList = value.Split(';');
  895. Acceleration = double.Parse(strList[0]).ToString("f2");
  896. Deceleration = double.Parse(strList[1]).ToString("f2");
  897. TopSpeed = double.Parse(strList[2]).ToString("f2");
  898. Position = double.Parse(strList[3]).ToString("f2");
  899. HeightPositionSelection = strList[4];
  900. if (strList.Length == 7)
  901. RRCCenter = strList[5];
  902. List<string> offsetList = strList[strList.Length - 1].Split(',').ToList();
  903. Nozzle1Offset = double.Parse(offsetList[0]).ToString("f2");
  904. Nozzle2Offset = double.Parse(offsetList[1]).ToString("f2");
  905. Nozzle3Offset = double.Parse(offsetList[2]).ToString("f2");
  906. Nozzle4Offset = double.Parse(offsetList[3]).ToString("f2");
  907. Nozzle5Offset = double.Parse(offsetList[4]).ToString("f2");
  908. Nozzle6Offset = double.Parse(offsetList[5]).ToString("f2");
  909. Nozzle7Offset = double.Parse(offsetList[6]).ToString("f2");
  910. Nozzle8Offset = double.Parse(offsetList[7]).ToString("f2");
  911. }
  912. }
  913. public string Acceleration { get; set; }
  914. public string Deceleration { get; set; }
  915. public string TopSpeed { get; set; }
  916. public string Position { get; set; }
  917. public string HeightPositionSelection { get; set; }
  918. public string Nozzle1Offset { get; set; }
  919. public string Nozzle2Offset { get; set; }
  920. public string Nozzle3Offset { get; set; }
  921. public string Nozzle4Offset { get; set; }
  922. public string Nozzle5Offset { get; set; }
  923. public string Nozzle6Offset { get; set; }
  924. public string Nozzle7Offset { get; set; }
  925. public string Nozzle8Offset { get; set; }
  926. public string Units { get; set; }
  927. public string RRCCenter { get; set; }
  928. public override string ToString()
  929. {
  930. string rtn = $"{Acceleration};{Deceleration};{TopSpeed};{Position};{HeightPositionSelection};{RRCCenter};" +
  931. $"{Nozzle1Offset},{Nozzle2Offset},{Nozzle3Offset},{Nozzle4Offset}," +
  932. $"{Nozzle5Offset},{Nozzle6Offset},{Nozzle7Offset},{Nozzle8Offset}";
  933. return rtn.ToString();
  934. }
  935. public object Clone()
  936. {
  937. return this.MemberwiseClone();
  938. }
  939. }
  940. public class DispenseConfig
  941. {
  942. public string Name { get; set; }
  943. public bool IsChecked { get; set; }
  944. public string DummyDispense { get; set; }
  945. public string DispenseMechanismName { get; set; }
  946. public string DispenseMechanismData { get; set; }
  947. public string FlowAmountSensor { get; set; }
  948. public FlowPumpData FlowPumpData { get; set; } = new FlowPumpData();
  949. public FlowSensorData FlowSensorData { get; set; } = new FlowSensorData();
  950. public string AutoSupplySystemSupply { get; set; }
  951. public AutoSupplySystem AutoSupplySystem { get; set; } = new AutoSupplySystem();
  952. public string AutoSupplySystemDrain { get; set; }
  953. public DispenseDrainData DispenseDrain { get; set; } = new DispenseDrainData();
  954. public DispenseConfig(string value)
  955. {
  956. CreateDispenseConfig(value);
  957. }
  958. public DispenseConfig()
  959. {
  960. CreateDispenseConfig("");
  961. }
  962. public void CreateDispenseConfig(string value)
  963. {
  964. if (value == null || value == "")
  965. {
  966. this.IsChecked = false;
  967. this.DummyDispense = "Yes";
  968. this.FlowAmountSensor = "-";
  969. this.DispenseMechanismName = "No Conn";
  970. this.AutoSupplySystemSupply = "-";
  971. this.AutoSupplySystemDrain = "-";
  972. this.FlowPumpData = new FlowPumpData();
  973. this.FlowSensorData = new FlowSensorData();
  974. }
  975. else
  976. {
  977. string[] listStr = value.Split(',');
  978. if (listStr.Length == 12)
  979. {
  980. Name = listStr[0];
  981. IsChecked = bool.Parse(listStr[1]);
  982. DummyDispense = listStr[2];
  983. DispenseMechanismName = listStr[3];
  984. DispenseMechanismData = listStr[4];
  985. FlowAmountSensor = listStr[5];
  986. FlowPumpData = new FlowPumpData(listStr[6]);
  987. FlowSensorData = new FlowSensorData(listStr[7]);
  988. AutoSupplySystemSupply = listStr[8];
  989. //AutoSupplySystem = new AutoSupplySystem(listStr[9]);
  990. if (listStr[10] == "Drain pump")
  991. {
  992. AutoSupplySystemDrain = "Drain Pump";
  993. }
  994. else
  995. {
  996. AutoSupplySystemDrain = listStr[10];
  997. }
  998. //DispenseDrain = new DispenseDrainData(listStr[11]);
  999. }
  1000. else
  1001. {
  1002. Name = listStr[0];
  1003. IsChecked = bool.Parse(listStr[1]);
  1004. DummyDispense = listStr[2];
  1005. DispenseMechanismName = listStr[3];
  1006. DispenseMechanismData = listStr[4];
  1007. FlowAmountSensor = listStr[5];
  1008. FlowPumpData = new FlowPumpData(listStr[6]);
  1009. FlowSensorData = new FlowSensorData(listStr[7]);
  1010. AutoSupplySystemSupply = listStr[8];
  1011. if (listStr[9] == "Drain pump")
  1012. {
  1013. AutoSupplySystemDrain = "Drain Pump";
  1014. }
  1015. else
  1016. {
  1017. AutoSupplySystemDrain = listStr[9];
  1018. }
  1019. // DispenseDrain = new DispenseDrainData(listStr[10]);
  1020. }
  1021. }
  1022. }
  1023. public override string ToString()
  1024. {
  1025. string[] rtn = new string[]
  1026. {
  1027. Name,
  1028. IsChecked.ToString(),
  1029. DummyDispense,
  1030. DispenseMechanismName,
  1031. DispenseMechanismData,
  1032. FlowAmountSensor,
  1033. FlowPumpData.ToString(),
  1034. FlowSensorData.ToString(),
  1035. AutoSupplySystemSupply,
  1036. // AutoSupplySystem.ToString(),
  1037. AutoSupplySystemDrain
  1038. // , DispenseDrain.ToString()
  1039. };
  1040. return String.Join(",", rtn);
  1041. }
  1042. }
  1043. public class FlowPumpData : ICloneable
  1044. {
  1045. public string PumpCapacity { get; set; }
  1046. public string PassOperation { get; set; }
  1047. public string PluseCount { get; set; }
  1048. public string SpareReload { get; set; }
  1049. public string DispenseWorkControlMethod { get; set; }
  1050. public string AlarmValue { get; set; }
  1051. public string StopValue { get; set; }
  1052. public string Calibration { get; set; }
  1053. public FlowPumpData()
  1054. {
  1055. PumpCapacity = "8.0";
  1056. PassOperation = "Off";
  1057. PluseCount = "0";
  1058. SpareReload = "0";
  1059. DispenseWorkControlMethod = "Total Dispense Count";
  1060. AlarmValue = "1000";
  1061. StopValue = "1000";
  1062. Calibration = "1.00";
  1063. }
  1064. public FlowPumpData(string value)
  1065. {
  1066. var rtn = value.Split('/');
  1067. PumpCapacity = rtn[0];
  1068. PassOperation = rtn[1];
  1069. PluseCount = rtn[2];
  1070. SpareReload = rtn[3];
  1071. DispenseWorkControlMethod = rtn[4];
  1072. AlarmValue = rtn[5];
  1073. StopValue = rtn[6];
  1074. Calibration = rtn[7];
  1075. }
  1076. public override string ToString()
  1077. {
  1078. string[] strList = new string[]
  1079. {
  1080. PumpCapacity,PassOperation,PluseCount,SpareReload,DispenseWorkControlMethod,
  1081. AlarmValue,StopValue,Calibration
  1082. };
  1083. return String.Join("/", strList);
  1084. }
  1085. public object Clone()
  1086. {
  1087. return this.MemberwiseClone();
  1088. }
  1089. public object DeepClone()
  1090. {
  1091. return new FlowPumpData()
  1092. {
  1093. PumpCapacity = this.PumpCapacity,
  1094. PassOperation = this.PassOperation,
  1095. PluseCount = this.PassOperation,
  1096. SpareReload = this.SpareReload,
  1097. DispenseWorkControlMethod = this.DispenseWorkControlMethod,
  1098. AlarmValue = this.AlarmValue,
  1099. StopValue = this.StopValue,
  1100. Calibration = this.Calibration
  1101. };
  1102. }
  1103. }
  1104. public class FlowSensorData : ICloneable
  1105. {
  1106. public string LiquidType { get; set; }
  1107. public string SamplingCompleteDelayTime { get; set; }
  1108. public string CheckTiming { get; set; }
  1109. public string DummyDispenseFlowMonitoring { get; set; }
  1110. public string ReferenceValue { get; set; }
  1111. public string Calibration { get; set; }
  1112. public string AlarmRangeUpper { get; set; }
  1113. public string AlarmRangeLower { get; set; }
  1114. public string StopRangeUpper { get; set; }
  1115. public string StopRangeLower { get; set; }
  1116. public string DispenseTime { get; set; }
  1117. public string N2Time { get; set; }
  1118. public string N2Value { get; set; }
  1119. public FlowSensorData()
  1120. {
  1121. LiquidType = "";
  1122. SamplingCompleteDelayTime = "1.0";
  1123. CheckTiming = "None";
  1124. DummyDispenseFlowMonitoring = "Yes";
  1125. ReferenceValue = "0";
  1126. Calibration = "1.00";
  1127. AlarmRangeUpper = "50.00";
  1128. AlarmRangeLower = "50.00";
  1129. StopRangeUpper = "50.00";
  1130. StopRangeLower = "50.00";
  1131. DispenseTime = "5.0";
  1132. N2Time = "10.0";
  1133. N2Value = "10";
  1134. }
  1135. public FlowSensorData(string value)
  1136. {
  1137. var rtn = value.Split('/');
  1138. LiquidType = rtn[0];
  1139. SamplingCompleteDelayTime = double.Parse(rtn[1]).ToString("F1");
  1140. CheckTiming = rtn[2];
  1141. DummyDispenseFlowMonitoring = rtn[3];
  1142. ReferenceValue = rtn[4];
  1143. Calibration = rtn[5];
  1144. AlarmRangeUpper = rtn[6];
  1145. AlarmRangeLower = rtn[7];
  1146. StopRangeUpper = rtn[8];
  1147. StopRangeLower = rtn[9];
  1148. if (rtn.Length > 10)
  1149. {
  1150. DispenseTime = double.Parse(rtn[10]).ToString("F1"); ;
  1151. N2Time = double.Parse(rtn[11]).ToString("F1"); ;
  1152. }
  1153. else
  1154. {
  1155. DispenseTime = "5.0";
  1156. N2Time = "10.0";
  1157. }
  1158. if (rtn.Length > 12)
  1159. {
  1160. N2Value = double.Parse(rtn[12]).ToString("F1"); ;
  1161. }
  1162. else
  1163. {
  1164. N2Value = "10";
  1165. }
  1166. }
  1167. public override string ToString()
  1168. {
  1169. string[] strList = new string[]
  1170. {
  1171. LiquidType,SamplingCompleteDelayTime,CheckTiming,DummyDispenseFlowMonitoring,
  1172. ReferenceValue,Calibration,AlarmRangeUpper,AlarmRangeLower,StopRangeUpper,StopRangeLower,DispenseTime,N2Time,N2Value
  1173. };
  1174. return String.Join("/", strList);
  1175. }
  1176. public object Clone()
  1177. {
  1178. return this.MemberwiseClone();
  1179. }
  1180. public object DeepClone()
  1181. {
  1182. return new FlowSensorData()
  1183. {
  1184. LiquidType = this.LiquidType,
  1185. SamplingCompleteDelayTime = this.SamplingCompleteDelayTime,
  1186. CheckTiming = this.CheckTiming,
  1187. DummyDispenseFlowMonitoring = this.DummyDispenseFlowMonitoring,
  1188. ReferenceValue = this.ReferenceValue,
  1189. Calibration = this.Calibration,
  1190. AlarmRangeUpper = this.AlarmRangeUpper,
  1191. AlarmRangeLower = this.AlarmRangeLower,
  1192. StopRangeUpper = this.StopRangeUpper,
  1193. StopRangeLower = this.StopRangeLower,
  1194. DispenseTime = this.DispenseTime,
  1195. N2Time = this.N2Time,
  1196. N2Value = this.N2Value
  1197. };
  1198. }
  1199. }
  1200. public class AutoSupplySystem : ICloneable
  1201. {
  1202. public string Name { get; set; }
  1203. public string Mode { get; set; }
  1204. public string LiquidSupplySource { get; set; }
  1205. public string SupplyTime { get; set; }
  1206. public string VacuumTime { get; set; }
  1207. public string WaitingTime { get; set; }
  1208. public string SupplyDelayTime { get; set; }
  1209. public string PurgeTime { get; set; }
  1210. public string LERecoverTime { get; set; }
  1211. public string LESensor { get; set; }
  1212. public string BubblingTime { get; set; }
  1213. public string DrainTime { get; set; }
  1214. public AutoSupplySystem()
  1215. {
  1216. Name = "Solvent(1)";
  1217. Mode = "Auto";
  1218. LiquidSupplySource = "Invalid";
  1219. SupplyTime = "1.0";
  1220. VacuumTime = "0.0";
  1221. WaitingTime = "0.0";
  1222. SupplyDelayTime = "0.0";
  1223. PurgeTime = "99";
  1224. LERecoverTime = "0.0";
  1225. LESensor = "0";
  1226. BubblingTime = "0.0";
  1227. DrainTime = "0.0";
  1228. }
  1229. public AutoSupplySystem(string value)
  1230. {
  1231. var rtn = value.Split('/');
  1232. Name = rtn[0];
  1233. Mode = rtn[1];
  1234. LiquidSupplySource = rtn[2];
  1235. SupplyTime = double.Parse(rtn[3]).ToString("F1");
  1236. VacuumTime = double.Parse(rtn[4]).ToString("F1");
  1237. WaitingTime = double.Parse(rtn[5]).ToString("F1");
  1238. SupplyDelayTime = double.Parse(rtn[6]).ToString("F1");
  1239. PurgeTime = double.Parse(rtn[7]).ToString("F1");
  1240. LERecoverTime = double.Parse(rtn[8]).ToString("F1");
  1241. LESensor = rtn[9];
  1242. BubblingTime = double.Parse(rtn[10]).ToString("F1");
  1243. DrainTime = double.Parse(rtn[11]).ToString("F1");
  1244. }
  1245. public override string ToString()
  1246. {
  1247. string[] strList = new string[]
  1248. {
  1249. Name,Mode,LiquidSupplySource,SupplyTime,VacuumTime,WaitingTime,SupplyDelayTime,
  1250. PurgeTime,LERecoverTime,LESensor,BubblingTime,DrainTime
  1251. };
  1252. return String.Join("/", strList);
  1253. }
  1254. public object Clone()
  1255. {
  1256. return this.MemberwiseClone();
  1257. }
  1258. public object DeepClone()
  1259. {
  1260. return new AutoSupplySystem()
  1261. {
  1262. Name = this.Name,
  1263. Mode = this.Mode,
  1264. LiquidSupplySource = this.LiquidSupplySource,
  1265. SupplyTime = this.SupplyTime,
  1266. VacuumTime = this.VacuumTime,
  1267. WaitingTime = this.WaitingTime,
  1268. SupplyDelayTime = this.SupplyDelayTime,
  1269. PurgeTime = this.PurgeTime,
  1270. LERecoverTime = this.LERecoverTime,
  1271. LESensor = this.LESensor,
  1272. BubblingTime = this.BubblingTime,
  1273. DrainTime = this.DrainTime,
  1274. };
  1275. }
  1276. public Dictionary<string, object> GetScValue(string root)
  1277. {
  1278. Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
  1279. keyValuePairs.Add($"{root}Mode", Mode);
  1280. keyValuePairs.Add($"{root}LiquidSupplySource", LiquidSupplySource);
  1281. keyValuePairs.Add($"{root}SupplyTime", SupplyTime);
  1282. keyValuePairs.Add($"{root}VacuumTime", VacuumTime);
  1283. keyValuePairs.Add($"{root}WaitingTime", WaitingTime);
  1284. keyValuePairs.Add($"{root}SupplyDelayTime", SupplyDelayTime);
  1285. keyValuePairs.Add($"{root}PurgeTime", PurgeTime);
  1286. keyValuePairs.Add($"{root}LERecoverTime", LERecoverTime);
  1287. keyValuePairs.Add($"{root}LESensor", LESensor);
  1288. keyValuePairs.Add($"{root}BubblingTime", BubblingTime);
  1289. keyValuePairs.Add($"{root}DrainTime", DrainTime);
  1290. return keyValuePairs;
  1291. }
  1292. }
  1293. public class DispenseDrainData : ICloneable
  1294. {
  1295. public string Name { get; set; }
  1296. public string AutoDrainMode { get; set; }
  1297. public string LiquidSupplySource { get; set; }
  1298. public string DrainingTime { get; set; }
  1299. public DispenseDrainData()
  1300. {
  1301. Name = "NMP";
  1302. AutoDrainMode = "Auto";
  1303. LiquidSupplySource = "Invalid";
  1304. DrainingTime = "60.0";
  1305. }
  1306. public DispenseDrainData(string value)
  1307. {
  1308. var rtn = value.Split('/');
  1309. Name = rtn[0];
  1310. AutoDrainMode = rtn[1];
  1311. LiquidSupplySource = rtn[2];
  1312. DrainingTime = double.Parse(rtn[3]).ToString("F1");
  1313. }
  1314. public override string ToString()
  1315. {
  1316. string[] strList = new string[]
  1317. {
  1318. Name,AutoDrainMode,LiquidSupplySource,DrainingTime
  1319. };
  1320. return String.Join("/", strList);
  1321. }
  1322. public object Clone()
  1323. {
  1324. return this.MemberwiseClone();
  1325. }
  1326. public object DeepClone()
  1327. {
  1328. return new DispenseDrainData()
  1329. {
  1330. Name = this.Name,
  1331. AutoDrainMode = this.AutoDrainMode,
  1332. LiquidSupplySource = this.LiquidSupplySource,
  1333. DrainingTime = this.DrainingTime
  1334. };
  1335. }
  1336. public Dictionary<string, object> GetScValue(string root)
  1337. {
  1338. Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
  1339. keyValuePairs.Add($"{root}Name", Name);
  1340. keyValuePairs.Add($"{root}AutoDrainMode", AutoDrainMode);
  1341. keyValuePairs.Add($"{root}LiquidSupplySource", LiquidSupplySource);
  1342. keyValuePairs.Add($"{root}DrainingTime", DrainingTime);
  1343. return keyValuePairs;
  1344. }
  1345. }
  1346. public class MonitorEditData : ICloneable
  1347. {
  1348. public string IsValid { get; set; }
  1349. public string Module { get; set; }
  1350. public string MeasDateName { get; set; }
  1351. public string RecipeName { get; set; }
  1352. public string TempControlForm { get; set; }
  1353. public string ControllerName { get; set; }
  1354. public string Node { get; set; }
  1355. public string PortNo { get; set; }
  1356. public string ChannelNo { get; set; }
  1357. public string AzbilPortNo { get; set; }
  1358. public string AzbilChannelNo { get; set; }
  1359. public string TunForm { get; set; }
  1360. public string TunDestNode { get; set; }
  1361. public string TunDestSensorID { get; set; }
  1362. public string ControlForm { get; set; }
  1363. public string InitialData { get; set; }
  1364. public string OverTemp { get; set; }
  1365. public string SettlingDetermineTime { get; set; }
  1366. public string SettlingTimeOut { get; set; }
  1367. public string UsePointOffset { get; set; }
  1368. public string StartMonitorForm { get; set; }
  1369. public string StartInvalidTime { get; set; }
  1370. public string ProcessMonitorForm { get; set; }
  1371. public string ProcessDeterminationTime { get; set; }
  1372. public string ProcessValue { get; set; }
  1373. public string PIDSetForm { get; set; }
  1374. public string PIDPParam { get; set; }
  1375. public string PIDIParam { get; set; }
  1376. public string PIDDParam { get; set; }
  1377. public string OffsetSetForm { get; set; }
  1378. public string OffsetVal { get; set; }
  1379. public string AConstantSetForm { get; set; }
  1380. public string AConstantVal { get; set; }
  1381. public string RangeMinimum { get; set; }
  1382. public string RangeMaximum { get; set; }
  1383. public string UsePointCtrlSettleTime { get; set; }
  1384. public string UsePointCtrlSourceBand { get; set; }
  1385. public string UsePointCtrlLearnBand { get; set; }
  1386. public string UsePointUseBand { get; set; }
  1387. public MonitorEditData()
  1388. {
  1389. CreateMonitorEditData();
  1390. }
  1391. public MonitorEditData(string data)
  1392. {
  1393. CreateMonitorEditData(data);
  1394. }
  1395. private void CreateMonitorEditData()
  1396. {
  1397. CreateMonitorEditData("");
  1398. }
  1399. private void CreateMonitorEditData(string data)
  1400. {
  1401. if (data == "")
  1402. {
  1403. IsValid = "Valid";
  1404. Module = "";
  1405. MeasDateName = "Cup Temperature";
  1406. RecipeName = "Local";
  1407. TempControlForm = "Temp Control ON";
  1408. ControllerName = "THC Controller";
  1409. PortNo = "0";
  1410. ChannelNo = "0";
  1411. AzbilPortNo = "0";
  1412. AzbilChannelNo = "0";
  1413. TunForm = "No Sync";
  1414. TunDestNode = "";
  1415. TunDestSensorID = "2";
  1416. ControlForm = "Standard";
  1417. InitialData = "23.00";
  1418. OverTemp = "180.00";
  1419. SettlingDetermineTime = "5.0";
  1420. SettlingTimeOut = "600.0";
  1421. UsePointOffset = "0.00";
  1422. StartMonitorForm = "Normal";
  1423. StartInvalidTime = "0.0";
  1424. ProcessMonitorForm = "Monitor";
  1425. ProcessDeterminationTime = "0.0";
  1426. ProcessValue = "0.0";
  1427. PIDSetForm = "Manual Setting";
  1428. PIDPParam = "1.00";
  1429. PIDIParam = "25.00";
  1430. PIDDParam = "5.00";
  1431. OffsetSetForm = "Set";
  1432. OffsetVal = "0.00";
  1433. AConstantSetForm = "Set";
  1434. AConstantVal = "0.00";
  1435. RangeMinimum = "50.0";
  1436. RangeMaximum = "200.0";
  1437. UsePointCtrlSettleTime = "0.0";
  1438. UsePointCtrlSourceBand = "0.00";
  1439. UsePointCtrlLearnBand = "0.00";
  1440. UsePointUseBand = "0.00";
  1441. }
  1442. else
  1443. {
  1444. int index = 0;
  1445. var rtn = data.Split('/');
  1446. IsValid = rtn[index++];
  1447. Module = rtn[index++];
  1448. MeasDateName = rtn[index++];
  1449. RecipeName = rtn[index++];
  1450. TempControlForm = rtn[index++];
  1451. ControllerName = rtn[index++];
  1452. if (ControllerName == "TCH Controller") ControllerName = "THC Controller";
  1453. PortNo = rtn[index++];
  1454. ChannelNo = rtn[index++];
  1455. TunForm = rtn[index++];
  1456. TunDestNode = rtn[index++];
  1457. TunDestSensorID = rtn[index++];
  1458. ControlForm = rtn[index++];
  1459. InitialData = rtn[index++];
  1460. OverTemp = rtn[index++];
  1461. SettlingDetermineTime = rtn[index++];
  1462. SettlingTimeOut = rtn[index++];
  1463. UsePointOffset = rtn[index++];
  1464. StartMonitorForm = rtn[index++];
  1465. StartInvalidTime = rtn[index++];
  1466. ProcessMonitorForm = rtn[index++];
  1467. ProcessDeterminationTime = rtn[index++];
  1468. ProcessValue = rtn[index++];
  1469. PIDSetForm = rtn[index++];
  1470. PIDPParam = rtn[index++];
  1471. PIDIParam = rtn[index++];
  1472. PIDDParam = rtn[index++];
  1473. OffsetSetForm = rtn[index++];
  1474. OffsetVal = rtn[index++];
  1475. AConstantSetForm = rtn[index++];
  1476. AConstantVal = rtn[index++];
  1477. RangeMinimum = rtn[index++];
  1478. RangeMaximum = rtn[index++];
  1479. UsePointCtrlSettleTime = rtn[index++];
  1480. UsePointCtrlSourceBand = rtn[index++];
  1481. UsePointCtrlLearnBand = rtn[index++];
  1482. UsePointUseBand = rtn[index++];
  1483. if (rtn.Length > index)
  1484. {
  1485. AzbilPortNo = rtn[index++];
  1486. AzbilChannelNo = rtn[index++];
  1487. }
  1488. }
  1489. }
  1490. public override string ToString()
  1491. {
  1492. string[] strList = new string[]
  1493. {
  1494. IsValid,Module,MeasDateName,RecipeName,TempControlForm, ControllerName,PortNo,ChannelNo,TunForm,TunDestNode,TunDestSensorID,ControlForm,
  1495. InitialData,OverTemp,SettlingDetermineTime,SettlingTimeOut,UsePointOffset,StartMonitorForm,StartInvalidTime,ProcessMonitorForm,
  1496. ProcessDeterminationTime,ProcessValue,PIDSetForm, PIDPParam,PIDIParam,PIDDParam,OffsetSetForm,OffsetVal,AConstantSetForm,
  1497. AConstantVal,RangeMinimum,RangeMaximum,UsePointCtrlSettleTime,UsePointCtrlSourceBand,UsePointCtrlLearnBand,UsePointUseBand,AzbilPortNo,AzbilChannelNo
  1498. };
  1499. return String.Join("/", strList);
  1500. }
  1501. public object Clone()
  1502. {
  1503. return this.MemberwiseClone();
  1504. }
  1505. }
  1506. public class DataCollecion
  1507. {
  1508. public string MouleName { get; set; }
  1509. public ObservableCollection<string> MeasureData { get; set; } = new ObservableCollection<string>();
  1510. }
  1511. public class SystemParameter
  1512. {
  1513. public string WaferExistInRCV { get; set; }
  1514. public string AutomaticRegistrationEditor { get; set; }
  1515. public string DesignationOfLotEnd { get; set; }
  1516. public string DefaultScreenForRunButton { get; set; }
  1517. public string CupWashingAlarm { get; set; }
  1518. public string EISInitializeCondition { get; set; }
  1519. }
  1520. public class TransferArmPosition
  1521. {
  1522. public string TransferMode { get; set; }
  1523. public double StartOffset { get; set; }
  1524. public double EndOffset { get; set; }
  1525. public int SlowSpeedRate { get; set; }
  1526. public TransferArmPosition()
  1527. {
  1528. PincetteList.Clear();
  1529. PincetteList.Add("pincette1", new Pincette());
  1530. PincetteList.Add("pincette2", new Pincette());
  1531. PincetteList.Add("pincette3", new Pincette());
  1532. }
  1533. public Dictionary<string, Pincette> PincetteList { get; set; } = new Dictionary<string, Pincette>();
  1534. public Dictionary<string, object> GetScValue(string root)
  1535. {
  1536. Dictionary<string, object> result = new Dictionary<string, object>();
  1537. result[$"{root}Zaxis.TransferMode"] = TransferMode;
  1538. result[$"{root}Zaxis.StartOffset"] = StartOffset;
  1539. result[$"{root}Zaxis.EndOffset"] = EndOffset;
  1540. result[$"{root}Zaxis.SlowSpeedRate"] = SlowSpeedRate;
  1541. result.AddRange(PincetteList["pincette1"].GetScValue($"{root}pincette1."));
  1542. result.AddRange(PincetteList["pincette2"].GetScValue($"{root}pincette2."));
  1543. result.AddRange(PincetteList["pincette3"].GetScValue($"{root}pincette3."));
  1544. return result;
  1545. }
  1546. public object[] GetSetParmeters(string moduleName, string blade)
  1547. {
  1548. List<object> list = new List<object>();
  1549. list.Add("SetSTN");
  1550. list.Add(moduleName);
  1551. list.Add(blade);
  1552. list.Add(PincetteList["pincette1"].XaxisSend);
  1553. list.Add(PincetteList["pincette1"].XaxisReceive);
  1554. list.Add(PincetteList["pincette1"].YaxisSend);
  1555. list.Add(PincetteList["pincette1"].YaxisReceive);
  1556. list.Add(PincetteList["pincette1"].ZaxisSend);
  1557. list.Add(PincetteList["pincette1"].ZaxisReceive);
  1558. list.Add(PincetteList["pincette1"].StrokeZaxisSend);
  1559. list.Add(PincetteList["pincette1"].StrokeZaxisReceive);
  1560. list.Add((StartOffset + EndOffset) / 2);
  1561. list.Add(Math.Abs((StartOffset + EndOffset) / 2 - StartOffset));
  1562. return list.ToArray();
  1563. }
  1564. }
  1565. public class Pincette
  1566. {
  1567. public double XaxisReceive { get; set; }
  1568. public double XaxisSend { get; set; }
  1569. public double YaxisReceive { get; set; }
  1570. public double YaxisSend { get; set; }
  1571. public double ZaxisReceive { get; set; }
  1572. public double ZaxisSend { get; set; }
  1573. public double RaxisReceive { get; set; }
  1574. public double RaxisSend { get; set; }
  1575. public double StrokeZaxisReceive { get; set; }
  1576. public double StrokeZaxisSend { get; set; }
  1577. public int ZaxisReceivePer { get; set; }
  1578. public int ZaxisSendPer { get; set; }
  1579. public Dictionary<string, object> GetScValue(string root)
  1580. {
  1581. Dictionary<string, object> result = new Dictionary<string, object>();
  1582. result[$"{root}XaxisReceive"] = XaxisReceive;
  1583. result[$"{root}XaxisSend"] = XaxisSend;
  1584. result[$"{root}YaxisReceive"] = YaxisReceive;
  1585. result[$"{root}YaxisSend"] = YaxisSend;
  1586. result[$"{root}ZaxisReceive"] = ZaxisReceive;
  1587. result[$"{root}ZaxisSend"] = ZaxisSend;
  1588. result[$"{root}RaxisReceive"] = RaxisReceive;
  1589. result[$"{root}RaxisSend"] = RaxisSend;
  1590. result[$"{root}StrokeZaxisReceive"] = StrokeZaxisReceive;
  1591. result[$"{root}StrokeZaxisSend"] = StrokeZaxisSend;
  1592. result[$"{root}ZaxisReceivePer"] = ZaxisReceivePer;
  1593. result[$"{root}ZaxisSendPer"] = ZaxisSendPer;
  1594. return result;
  1595. }
  1596. }
  1597. public class ArmPosition
  1598. {
  1599. public int X1 { get; set; }
  1600. public int X2 { get; set; }
  1601. public int X3 { get; set; }
  1602. public Dictionary<string, object> GetScValue(string root)
  1603. {
  1604. Dictionary<string, object> result = new Dictionary<string, object>();
  1605. result.Add($"{root}X1", X1);
  1606. result.Add($"{root}X2", X2);
  1607. result.Add($"{root}X3", X3);
  1608. return result;
  1609. }
  1610. }
  1611. }