1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813 |
- using Aitex.Common.Util;
- using Aitex.Core.UI.MVVM;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.OperationCenter;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Data;
- using System.IO;
- using System.Reflection;
- using System.Text;
- using System.Windows;
- using System.Xml;
- using System.Linq;
- using System.Xml.Schema;
- using System.Xml.Serialization;
- using Aitex.Core.RT.SCCore;
- using System.Threading.Tasks;
- using System.Windows.Documents;
- using Aitex.Core.RT.ConfigCenter;
- namespace MECF.Framework.Common.Utilities
- {
- //单选属性
- [Serializable]
- public class SelectionProperty : ViewModelBase
- {
- private string _Name;
- [XmlAttribute("Name")]
- public string Name
- {
- get { return _Name; }
- set { _Name = value; this.InvokePropertyChanged(nameof(Name)); }
- }
- private string _Display;
- [XmlAttribute("Display")]
- public string Display
- {
- get
- {
- return string.IsNullOrEmpty(_Display) ? Name : _Display;
- }
- set
- {
- _Display = value;
- this.InvokePropertyChanged(nameof(Display));
- }
- }
- private string _CurrentValue;
- [XmlAttribute("CurrentValue")]
- public string CurrentValue
- {
- get { return _CurrentValue; }
- set { _CurrentValue = value; this.InvokePropertyChanged(nameof(CurrentValue)); }
- }
- private ObservableCollection<string> _Values = new ObservableCollection<string>();
- [XmlArray("Values")]
- [XmlArrayItem("string")]
- public ObservableCollection<string> Values
- {
- get { return _Values; }
- set { _Values = value; this.InvokePropertyChanged(nameof(Values)); }
- }
- }
- public class ParameterManager
- {
- //private static string _ConfigPathName = @"c:\Track\Parameter.txt";
- //private static string _ConfigPathName = PathManager.GetCfgDir().Replace("UI", "RT") + "Parameter.xml";
- private static volatile Parameter instance;
- private static object locker = new Object();
- private static string _blockNumber = "4Block";
- public static string BlockNumber
- {
- get => _blockNumber;
- set
- {
- _blockNumber = value;
- }
- }
- //public static bool IsInitialize { get; set; } = false;
- private static bool _isInitialize;
- public static bool IsInitialize
- {
- get => _isInitialize;
- set
- {
- _isInitialize = value;
- }
- }
- public static List<SCConfigItem> ConfigItemList { get; set; }
- public static void InitializeBlock()
- {
- if (ConfigItemList == null || ConfigItemList.Count == 0)
- {
- ConfigItemList = SC.IsEnable ? SC.GetItemList() : QueryDataClient.Instance.Service.GetConfigItemList();
- }
- int[] blockNumbers = new int[] { 6, 30, 30, 6 };
- switch (instance.NumberOfBlocks)
- {
- case 2:
- blockNumbers = new int[] { 6, 30 };
- break;
- case 3:
- blockNumbers = new int[] { 6, 30, 6 };
- break;
- case 4:
- blockNumbers = new int[] { 6, 30, 30, 6 };
- break;
- default:
- break;
- }
- for (int i = 0; i < instance.NumberOfBlocks; i++)
- {
- ParameterManager.Instance.Blocks[i].Modules.Clear();
- for (int j = 0; j < blockNumbers[i]; j++)
- {
- ParameterManager.Instance.Blocks[i].Modules.Add(CreateDeviceModule(i + 1, j));
- }
- ParameterManager.Instance.Blocks[i].UseModuleNumber = ParameterManager.Instance.Blocks[i].Modules.ToList().Where(x => x.NameList.CurrentValue != "Reserved").Count();
- }
- CreateDispense();
- // CreateDispenseDrainDefault();
- }
- /// <summary>
- /// 需要特别注意3block的block3==4block的block4
- /// </summary>
- /// <param name="noId"></param>
- /// <returns></returns>
- private static DeviceModule CreateDeviceModule(int blockId, int moduleId)
- {
- string propertyStr = "System.SetUp.Block";// GetPropertyStr();
- string noId = $"{blockId}.{moduleId}";
- if (instance.NumberOfBlocks == 3 && blockId == 3)
- {
- noId = $"{blockId + 1}.{moduleId}";
- }
- var moduleName = SC.IsEnable ? SC.GetStringValue($"{propertyStr}{noId}.Name") : (string)QueryDataClient.Instance.Service.GetConfig(($"{propertyStr}{noId}.Name"));
- string parameter = ConfigItemList.Where(x => x.PathName == ($"{propertyStr}{noId}.Name")).FirstOrDefault()?.Parameter;
- DeviceModule deviceModule = new DeviceModule($"{blockId}-{moduleId}", moduleId.ToString(), moduleName);
- deviceModule.NameList.CurrentValue = moduleName;
- deviceModule.ParameterName = moduleName;
- if (parameter != null && parameter != "")
- {
- var listStr = parameter.Split(';');
- foreach (var item in listStr)
- {
- deviceModule.NameList.Values.Add(item);
- }
- }
- deviceModule.IsLinkModule = IsLinkModule(blockId, moduleId);
- //SetSCToModule(ref deviceModule);
- return deviceModule;
- }
- public static bool IsLinkModule(int blockId, int moduleId)
- {
- if (blockId == 2 && (moduleId == 7 || moduleId == 8))
- {
- return true;
- }
- return false;
- }
- public Dictionary<string, string> GetScValue(string root)
- {
- Dictionary<string, string> result = new Dictionary<string, string>();
- for (int i = 0; i < instance.NumberOfBlocks; i++)
- {
- foreach (var block in Instance.Blocks)
- {
- block.GetScValue($"{root}Block{block.ID}.");
- }
- }
- //result[$"{root}.StartSlot"] = StartSlot.ToString();
- //for (int i = 0; i < 6; i++)
- //{
- // //result.Join()
- // //ArmAxisList.Add(new ArmAxis());
- //}
- return result;
- }
- public static ObservableCollection<string> GetArmAccessModule(string str)
- {
- if (string.IsNullOrEmpty(str)) return null;
- ObservableCollection<string> strList = new ObservableCollection<string>();
- if (BlockNumber == "3Block")
- {
- if (str.Contains("4-"))
- {
- str = str.Replace("4-", "3-");
- }
- }
- var strlist = str.Split(';');
- foreach (var item in strlist)
- {
- strList.Add(item);
- }
- return strList;
- }
- public static string[] COTDispenseNozzleStrs = new string[] { "Resist1", "Resist2" , "Resist3","Resist4", "Resist5", "Resist6", "Resist7", "Resist8",
- "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",
- "TANK Press","","Back Rinse1","Back Rinse2","Solvent Bath","","Auto Damper","Back Rinse1+2","Drain Case Clean","EXH Duct Clean"};
- public static string[] DEVDispenseNozzleStrs = new string[] { "DEV Solution1", "DEV Solution2" , "DEV Solution3", "DEV Solution4", "", "", "",
- "DEV Nozzle1 Air Vent","DEV Nozzle2 Air Vent","","","Rinse1","Rinse2","Filter1 Vent","Filter2 Vent","Filter3 Vent","Filter4 Vent",
- "Tank Press","AD Promoter","Back Rinse1","Water Shield","Exhaust","Auto Damper","N2 Blow","Nozzle1 Rinse","Nozzle2 Rinse",
- "PDD Nozzle1","PDD Nozzle2","N2 Splay(DEV)","N3 Splay(Rinse)","Bypass"};
- public static string[] ADHDispenseNozzleStrs = new string[] { "HMDS" };
- public static void CreateDispense()
- {
- ParameterManager.Instance.SpinerDeviceModule.Clear();
- ParameterManager.Instance.DispenseDeviceModule.Clear();
- if (ParameterManager.Instance.Blocks[1] != null)
- {
- ParameterManager.Instance.Blocks[1].Modules.ToList().ForEach(x =>
- {
- if (IsSpinModule(x.Name)) ParameterManager.Instance.SpinerDeviceModule.Add(x);
- });
- ParameterManager.Instance.Blocks[1].Modules.ToList().ForEach(x =>
- {
- if (IsSpinModule(x.Name) || IsADHModule(x.Name)) ParameterManager.Instance.DispenseDeviceModule.Add(x);
- });
- }
- if (ParameterManager.Instance.NumberOfBlocks > 2 && ParameterManager.Instance.Blocks[2] != null)
- {
- ParameterManager.Instance.Blocks[2].Modules.ToList().ForEach(x =>
- {
- if (IsSpinModule(x.Name)) ParameterManager.Instance.SpinerDeviceModule.Add(x);
- });
- ParameterManager.Instance.Blocks[2].Modules.ToList().ForEach(x =>
- {
- if (IsSpinModule(x.Name) || IsADHModule(x.Name)) ParameterManager.Instance.DispenseDeviceModule.Add(x);
- });
- }
- }
- public static bool IsSpinModule(string moduleName)
- {
- bool isSpin = false;
- string[] spinMdules = new string[] { "COT", "BCT", "TCT", "DEV", "NTD" };
- if (spinMdules.Contains(moduleName))
- {
- isSpin = true;
- }
- return isSpin;
- }
- public static bool IsUNCModule(string moduleName)
- {
- bool isSpin = false;
- string[] spinMdules = new string[] { "UNC" };
- if (spinMdules.Contains(moduleName))
- {
- isSpin = true;
- }
- return isSpin;
- }
- public static bool IsADHModule(string moduleName)
- {
- bool ret = false;
- string[] spinMdules = new string[] { "ADH" };
- if (spinMdules.Contains(moduleName))
- {
- ret = true;
- }
- return ret;
- }
- public static Parameter Instance
- {
- get
- {
- lock (locker)
- {
- if (instance == null)
- {
- instance = new Parameter(BlockNumber);
- InitializeBlock();
- }
- return instance;
- }
- }
- }
- }
- [Serializable]
- public class Parameter
- {
- public enum EunmTransferOrder
- {
- ByTop = 0,
- ByBottom,
- BySlot
- }
- public Parameter() { InitParameter(); }
- public Dictionary<string, Dictionary<string, DispenseConfig>> ModuleDispenseConfigList { get; set; } = new Dictionary<string, Dictionary<string, DispenseConfig>>();
- public ObservableCollection<DeviceModule> SpinerDeviceModule { get; set; } = new ObservableCollection<DeviceModule>();
- public ObservableCollection<DeviceModule> DispenseDeviceModule { get; set; } = new ObservableCollection<DeviceModule>();
- public Parameter(string blockNumber)
- {
- _NumberOfBlocks = BlockStrToInt(blockNumber);
- CreateBlocks();
- InitParameter();
- }
- private static int BlockStrToInt(string blockNumber)
- {
- var number = 4;
- switch (blockNumber)
- {
- case "4Block":
- number = 4;
- break;
- case "3Block":
- number = 3;
- break;
- case "2Block":
- number = 2;
- break;
- default:
- break;
- }
- return number;
- }
- [XmlArray("Blocks")]
- [XmlArrayItem("DeviceBlock")]
- public ObservableCollection<DeviceBlock> Blocks { get; set; } = new ObservableCollection<DeviceBlock>();
- private int _NumberOfBlocks;
- [XmlAttribute("_NumberOfBlocks")]
- public int NumberOfBlocks
- {
- get { return _NumberOfBlocks; }
- set
- {
- if (value < 1 || value > 4) throw new Exception("value should between 1 and 4");
- if (_NumberOfBlocks != value)
- {
- _NumberOfBlocks = value;
- CreateBlocks();
- InitParameter();
- }
- }
- }
- public void CreateBlocks()
- {
- Blocks.Clear();
- switch (NumberOfBlocks)
- {
- case 2:
- Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
- Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
- break;
- case 3:
- Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
- Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
- Blocks.Add(new DeviceBlock(3) { Name = "IFB" });
- break;
- case 4:
- Blocks.Add(new DeviceBlock(1) { Name = "CSB" });
- Blocks.Add(new DeviceBlock(2) { Name = "PRB1" });
- Blocks.Add(new DeviceBlock(3) { Name = "PRB2" });
- Blocks.Add(new DeviceBlock(4) { Name = "IFB" });
- break;
- default:
- break;
- }
- }
- public void InitParameter()
- {
- GetMonitorEditData();
- //NumberOfBlocks = 1;
- //InitSystemParameter();
- //InitTransferOutOrInOrder();
- GetDataCollection();
- }
- private void GetMonitorEditData()
- {
- string strFileMonitorEdit = SC.IsEnable ? SC.GetStringValue("System.SetUp.MonitorEdit") : (string)QueryDataClient.Instance.Service.GetConfig("System.SetUp.MonitorEdit");
- if (strFileMonitorEdit != null && strFileMonitorEdit != "")
- {
- MonitorData.Clear();
- string[] listMonitorEdit = strFileMonitorEdit.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
- for (int i = 0; i < listMonitorEdit.Length; i++)
- {
- MonitorData.Add(new MonitorEditData(listMonitorEdit[i]));
- }
- }
- }
- private void GetDataCollection()
- {
- DataCollection.Clear();
- DataCollection.Add(new DataCollecion()
- {
- MouleName = "Coater",
- MeasureData = new ObservableCollection<string>(new List<string>() { "Spin rotation speed", "Solvent bath flow" })
- });
- }
- //public void SaveMonitorEditData()
- //{
- // if (MonitorData != null && MonitorData.Count > 0)
- // {
- // InvokeClient.Instance.Service.DoOperation("SetConfig", new object[] { "Save", "MonitorEdit", MonitorEdittDataToString(MonitorData) });
- // }
- //}
- //private string MonitorEdittDataToString(ObservableCollection<MonitorEditData> monitorData)
- //{
- // StringBuilder stringBuilder = new StringBuilder();
- // foreach (var item in monitorData)
- // {
- // stringBuilder.AppendLine($"{item.ToString()}");
- // }
- // return stringBuilder.ToString();
- //}
- [XmlArray("SystemParameter")]
- [XmlArrayItem("SelectionProperty")]
- public ObservableCollection<SelectionProperty> SystemParameter { get; set; } = new ObservableCollection<SelectionProperty>();
- //public void InitSystemParameter()
- //{
- // SystemParameter.Add(new SelectionProperty() { Name = "WaferExistInRCV", Values = { "OK", "Cancel" }, CurrentValue = "OK" });
- // SystemParameter.Add(new SelectionProperty() { Name = "DesignationOfLotEndForJob", Values = { "All Lot", "Last Lot" }, CurrentValue = "All Lot" });
- // SystemParameter.Add(new SelectionProperty() { Name = "DefaultScreenForRunButton", Values = { "Lot Start", "Job Start", "Wafer Flow Recipe Registrtation" }, CurrentValue = "Lot Start" });
- // SystemParameter.Add(new SelectionProperty() { Name = "CupWashingAlarm", Values = { "Valid", "Invalid" }, CurrentValue = "Valid" });
- // SystemParameter.Add(new SelectionProperty() { Name = "EISInitializeCondition", Values = { "Unconditionally", "ConfigrmARMSignal" }, CurrentValue = "Unconditionally" });
- //}
- [XmlArray("TransferOutOrInOrder")]
- [XmlArrayItem("SelectionProperty")]
- public ObservableCollection<SelectionProperty> TransferOutOrInOrder { get; set; } = new ObservableCollection<SelectionProperty>();
- //private void InitTransferOutOrInOrder()
- //{
- // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Sender-TransferOutOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
- // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Reciver-TransferInOrder", Values = { "Top", "Bottom", "Slot Correspondence" }, CurrentValue = "" });
- // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "UniCass-TransferOutOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
- // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "PickUp-TransferInOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
- // TransferOutOrInOrder.Add(new SelectionProperty() { Name = "Reject-TransferInOrder", Values = { "Top", "Bottom" }, CurrentValue = "" });
- //}
- public ObservableCollection<MonitorEditData> MonitorData { get; set; } = new ObservableCollection<MonitorEditData>();
- public ObservableCollection<DataCollecion> DataCollection { get; set; } = new ObservableCollection<DataCollecion>();
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- foreach (var item in Blocks)
- {
- if (NumberOfBlocks == 3 && item.ID == "3")
- {
- result.AddRange(item.GetScValue($"{root}Block4."));
- }
- else
- {
- result.AddRange(item.GetScValue($"{root}Block{item.ID}."));
- }
- }
- foreach (var item in Blocks)
- {
- item.UseModuleNumber = item.Modules.ToList().Where(x => x.NameList.CurrentValue != "Reserved").Count();
- }
- return result;
- }
- }
- [Serializable]
- public class DeviceBlock
- {
- [XmlElement("ID")]
- public string ID { get; set; }
- [XmlElement("Name")]
- public string Name { get; set; }
- [XmlElement("BlockID")]
- public SelectionProperty BlockID { get; set; } = new SelectionProperty() { Name = "BlockID", Values = { "Cassette Block", "Proccess Block", "Interface Block" }, CurrentValue = "" };
- public ObservableCollection<string> ModuleIDs { get; set; } = new ObservableCollection<string>();
- public ObservableCollection<string> TransferArmCanAccessModules { get; set; } = new ObservableCollection<string>();
- public ObservableCollection<string> TransferArmAccessModules { get; set; } = new ObservableCollection<string>();
- //public ModuleArm ModuleArm { get; set; }
- [XmlArray("Modules")]
- [XmlArrayItem("DeviceModule")]
- public ObservableCollection<DeviceModule> Modules { get; set; } = new ObservableCollection<DeviceModule>();
- private int _NumberOfModules;
- [XmlAttribute("_NumberOfModules")]
- public int NumberOfModules
- {
- get { return _NumberOfModules; }
- set
- {
- if (value < 0 || value > 32) throw new Exception("value should between 0 and 32");
- _NumberOfModules = value;
- // SetModules();
- }
- }
- public int UseModuleNumber { get; set; }
- //private void SetModules()
- //{
- // int count = NumberOfModules - Modules.Count;
- // if (count > 0)
- // {
- // for (int i = 0; i < count; i++)
- // {
- // string id = (Modules.Count + 1).ToString();
- // Modules.Add(new DeviceModule(id, BlockID.CurrentValue));
- // }
- // }
- // else if (count < 0)
- // {
- // for (int i = 0; i < (-count); i++)
- // {
- // Modules.RemoveAt(Modules.Count - 1);
- // }
- // }
- //}
- public DeviceBlock()
- {
- }
- public DeviceBlock(int id)
- {
- ID = id.ToString();
- }
- public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();
- public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- foreach (var item in Modules)
- {
- result.AddRange(item.GetScValue($"{root}{item.ModuleID}."));
- }
- result.AddRange(AccessHomePosition.GetScValue($"{root}AccessHomePosition."));
- result.AddRange(WaferCheckPosition.GetScValue($"{root}WaferCheckPosition."));
- return result;
- }
- }
- [Serializable]
- public class DeviceModule
- {
- [XmlElement("ID")]
- public string ID { get; set; }
- [XmlElement("Name")]
- public string Name { get; set; }
- public string ParentID { get; set; }
- [XmlAttribute("ModuleID")]
- public string ModuleID { get; set; }
- [XmlAttribute("ParameterName")]
- public string ParameterName { get; set; }
- public SelectionProperty NameList { get; set; } = new SelectionProperty() { Name = "NameList", Values = { }, CurrentValue = "CPL" };
- public SelectionProperty SYNEXC { get; set; } = new SelectionProperty() { Name = "SYNCEXC", Values = { "Invalid", "1-2", "2-3", "1-2&2-3" }, CurrentValue = "" };
- [XmlAttribute("MateriCount")]
- public int MaterialCount { get; set; }
- [XmlAttribute("StartSlot")]
- public int StartSlot { get; set; }
- public SelectionProperty AGVConnect { get; set; } = new SelectionProperty() { Name = "AGVConnect", Values = { "Connect", "Disconnect" } };
- public SpinerModule ModuleSpiner { get; set; } = new SpinerModule();
- public ObservableCollection<SelectionProperty> TransferArmPosition { get; set; } = new ObservableCollection<SelectionProperty>();
- public ObservableCollection<ArmAxis> ArmAxisList { get; set; } = new ObservableCollection<ArmAxis>();
- public SelectionProperty MappingType { get; set; } = new SelectionProperty() { Name = "Arm Up", Values = { "Arm Up", "Arm Receive", "Cassette Down" } };
- public int WaferThickness { get; set; }
- public int PositiveTolerance { get; set; }
- public int NegativeTolerance { get; set; }
- public int FirstSlotposition { get; set; }
- public SelectionProperty SlotEditingType { get; set; } = new SelectionProperty() { Name = "Fix", Values = { "Fix", "Option" } };
- public int SlotPitch { get; set; }
- public int MappingStartPosition { get; set; }
- public int MappingEndPosition { get; set; }
- public int SlotNo { get; set; }
- public bool IsLinkModule { get; set; } = false;
- public bool IsSelected { get; set; }
- public TransferArmPosition ParameterTransferArmPosition { get; set; } = new TransferArmPosition();
- public TransferArmPosition LinkParameterTransferArmPosition { get; set; } = new TransferArmPosition();
- public MonitorEditData MonitorEidtData { get; set; }
- public DeviceModule() { }
- public DeviceModule(string id, string moduleID, string name)
- {
- ID = id;
- ModuleID = moduleID;
- Name = name;
- for (int i = 0; i < 6; i++)
- {
- ArmAxisList.Add(new ArmAxis());
- }
- //NameList.CurrentValue = name;
- }
- public void Save()
- {
- }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}Name"] = NameList.CurrentValue;
- result[$"{root}SYNEXC"] = SYNEXC.CurrentValue;
- result[$"{root}MaterialCount"] = MaterialCount;
- result[$"{root}StartSlot"] = StartSlot;
- result[$"{root}AGVConnect"] = AGVConnect.CurrentValue;
- if (ParameterManager.IsUNCModule(Name))
- {
- result[$"{root}MappingType"] = MappingType.CurrentValue;
- result[$"{root}WaferThickness"] = WaferThickness;
- result[$"{root}PositiveTolerance"] = PositiveTolerance;
- result[$"{root}NegativeTolerance"] = NegativeTolerance;
- result[$"{root}FirstSlotposition"] = FirstSlotposition;
- result[$"{root}SlotEditingType"] = SlotEditingType.CurrentValue;
- result[$"{root}SlotPitch"] = SlotPitch;
- result[$"{root}MappingStartPosition"] = MappingStartPosition;
- result[$"{root}MappingEndPosition"] = MappingEndPosition;
- }
- if (ModuleID == "0" && ArmAxisList != null && ArmAxisList.Count == 6)
- {
- result.AddRange(ArmAxisList[0].GetScValue($"{root}X1axis."));
- result.AddRange(ArmAxisList[1].GetScValue($"{root}X2axis."));
- result.AddRange(ArmAxisList[2].GetScValue($"{root}X3axis."));
- result.AddRange(ArmAxisList[3].GetScValue($"{root}Yaxis."));
- result.AddRange(ArmAxisList[4].GetScValue($"{root}Zaxis."));
- result.AddRange(ArmAxisList[5].GetScValue($"{root}Raxis."));
- }
- if (ParameterManager.IsSpinModule(Name))
- {
- result.AddRange(ModuleSpiner.GetScValue(root));
- }
- if (ModuleID != "0")
- {
- result.AddRange(ParameterTransferArmPosition.GetScValue($"{root}TransferArmPosition."));
- }
- if (IsLinkModule)
- {
- result.AddRange(LinkParameterTransferArmPosition.GetScValue($"{root}LinkTransferArmPosition."));
- }
- if (NameList.CurrentValue == "COT" || NameList.CurrentValue == "DEV" || NameList.CurrentValue == "ADH")
- {
- if (ParameterManager.Instance.ModuleDispenseConfigList.ContainsKey(ID))
- result[$"{root}DispenseConfig"] = DispenseConfigListToString(ParameterManager.Instance.ModuleDispenseConfigList[ID]);
- }
- return result;
- }
- private string DispenseConfigListToString(Dictionary<string, DispenseConfig> dispenseConfigList)
- {
- StringBuilder stringBuilder = new StringBuilder();
- foreach (var item in dispenseConfigList.Keys)
- {
- stringBuilder.AppendLine($"{item}:{dispenseConfigList[item].ToString()}");
- }
- return stringBuilder.ToString();
- }
- }
- public class ArmAxis
- {
- public int SpeedInitial { get; set; }
- public int SpeedMovementbetweenmod { get; set; }
- public int SpeedReceive { get; set; }
- public int SpeedSend { get; set; }
- public int SpeedMapping { get; set; }
- public int SpeedMaintenance { get; set; }
- public int SpeedInching { get; set; }
- public string MultiMovementbetweenmod { get; set; }
- public double PassMovementbetweenmod { get; set; }
- public double PassReceive { get; set; }
- public double PassSpeedSend { get; set; }
- public double PassSpeedMapping { get; set; }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}SpeedInitial"] = SpeedInitial;
- result[$"{root}SpeedMovementbetweenmod"] = SpeedMovementbetweenmod;
- result[$"{root}SpeedReceive"] = SpeedReceive;
- result[$"{root}SpeedSend"] = SpeedSend;
- result[$"{root}SpeedMapping"] = SpeedMapping;
- result[$"{root}SpeedMaintenance"] = SpeedMaintenance;
- result[$"{root}SpeedInching"] = SpeedInching;
- result[$"{root}MultiMovementbetweenmod"] = MultiMovementbetweenmod;
- result[$"{root}PassMovementbetweenmod"] = PassMovementbetweenmod;
- result[$"{root}PassReceive"] = PassReceive;
- result[$"{root}PassSpeedSend"] = PassSpeedSend;
- result[$"{root}PassSpeedMapping"] = PassSpeedMapping;
- return result;
- }
- }
- public class ModuleArm
- {
- //public DataTable TransferArmControlData { get; set; } = new DataTable("TransferArmControlData");
- //public ObservableCollection<TransferArmInteraction> TransferArmInteraction { get; set; } = new ObservableCollection<TransferArmInteraction>();
- }
- public class SpinerModule
- {
- public string ArmCount { get; set; }
- public string ShakeArmNo { get; set; }
- //public string RinseNozzleSpec { get; set; }
- public string UpperLimitSpinSpeed { get; set; }
- public string UpperLimitAcceleration { get; set; }
- public string SpinOutSpeed { get; set; }
- public string SpinOutTime { get; set; }
- public string Unit { get; set; }
- public NozzleChanger NozzleChanger { get; set; } = new NozzleChanger();
- public NozzleArmInformat NozzleArmInformat1 { get; set; } = new NozzleArmInformat();
- public NozzleArmInformat NozzleArmInformat2 { get; set; } = new NozzleArmInformat();
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}ArmCount"] = ArmCount;
- result[$"{root}ShakeArmNo"] = ShakeArmNo;
- result[$"{root}UpperLimitSpinSpeed"] = UpperLimitSpinSpeed;
- result[$"{root}UpperLimitAcceleration"] = UpperLimitAcceleration;
- result[$"{root}SpinOutSpeed"] = SpinOutSpeed;
- result[$"{root}SpinOutTime"] = SpinOutTime;
- // result[$"{root}Unit"] = Unit;
- result.AddRange(NozzleChanger.GetScValue($"{root}NozzleChanger."));
- result.AddRange(NozzleArmInformat1.GetScValue($"{root}NozzleArmInformat1."));
- result.AddRange(NozzleArmInformat2.GetScValue($"{root}NozzleArmInformat2."));
- return result;
- }
- }
- public class NozzleChanger : ICloneable
- {
- public string IsNozzleChangerEnable { get; set; }
- public string MotorPulseRate { get; set; }
- public string MaxSpeed { get; set; }
- public string MoveSpeed { get; set; }
- public void SetNozzleChangerDataList(string value)
- {
- NozzleChangerData.Clear();
- var strList = value.Split(';');
- for (int i = 0; i < strList.Length; i++)
- {
- var NozzleChangerStrList = strList[i].Split(',');
- NozzleChangerData.Add(new NozzleChangerData()
- {
- ID = (i + 1).ToString(),
- IsNozzleChangerEnable = NozzleChangerStrList[0],
- Position = NozzleChangerStrList[1],
- NozzleSensorNo = NozzleChangerStrList[2],
- NozzleOffSet = NozzleChangerStrList[3]
- });
- }
- }
- public string NozzleChangerDataToString()
- {
- StringBuilder stringBuilder = new StringBuilder();
- foreach (var item in NozzleChangerData)
- {
- stringBuilder.Append(item.ToString());
- stringBuilder.Append(";");
- }
- if (stringBuilder.Length > 0) stringBuilder.Remove(stringBuilder.Length - 1, 1);
- return stringBuilder.ToString();
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new NozzleChanger()
- {
- IsNozzleChangerEnable = this.IsNozzleChangerEnable,
- MotorPulseRate = this.MotorPulseRate,
- MaxSpeed = this.MaxSpeed,
- MoveSpeed = this.MoveSpeed,
- NozzleChangerData = new ObservableCollection<NozzleChangerData>(this.NozzleChangerData.Select(x => x.DeepClone()).Cast<NozzleChangerData>())
- };
- }
- public ObservableCollection<NozzleChangerData> NozzleChangerData { get; set; } = new ObservableCollection<NozzleChangerData>();
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}IsNozzleChangerEnable"] = IsNozzleChangerEnable;
- result[$"{root}MotorPulseRate"] = MotorPulseRate;
- result[$"{root}MaxSpeed"] = MaxSpeed;
- result[$"{root}MoveSpeed"] = MoveSpeed;
- result[$"{root}Data"] = NozzleChangerDataToString();
- return result;
- }
- }
- public class NozzleChangerData : ICloneable
- {
- public string ID { get; set; }
- public string IsNozzleChangerEnable { get; set; }
- public string Position { get; set; }
- public string NozzleSensorNo { get; set; }
- public string NozzleOffSet { get; set; }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new NozzleChangerData()
- {
- ID = this.ID,
- IsNozzleChangerEnable = this.IsNozzleChangerEnable,
- Position = this.Position,
- NozzleSensorNo = this.NozzleSensorNo,
- NozzleOffSet = this.NozzleOffSet
- };
- }
- public override string ToString()
- {
- string rst = $"{IsNozzleChangerEnable},{Position},{NozzleSensorNo},{NozzleOffSet}";
- return rst.ToString();
- }
- }
- public class NozzleArmInformat : ICloneable
- {
- public string IsNozzleArmEnable { get; set; }
- public string ArmDriveFormat { get; set; }
- public string NozzleForm { get; set; }
- public string MotorPulsesRate { get; set; }
- public string StartPosition { get; set; }
- public string EndPosition { get; set; }
- public string StartCupPosition { get; set; }
- public string EndCupPosition { get; set; }
- public string MaintenaceSpeed { get; set; } = "0";
- public TransferArmRecipePositionData Home { get; set; }
- public TransferArmRecipePositionData DmyDisp { get; set; }
- public TransferArmRecipePositionData Standby { get; set; }
- public TransferArmRecipePositionData Maintenace1 { get; set; }
- public TransferArmRecipePositionData Maintenace2 { get; set; }
- public TransferArmRecipePositionData Maintenace3 { get; set; }
- public TransferArmRecipePositionData Begin { get; set; }
- public TransferArmRecipePositionData Center { get; set; }
- public TransferArmRecipePositionData Center2 { get; set; }
- public TransferArmRecipePositionData End { get; set; }
- public TransferArmRecipePositionData Dispense1 { get; set; }
- public TransferArmRecipePositionData Dispense2 { get; set; }
- public TransferArmRecipePositionData Dispense3 { get; set; }
- public TransferArmRecipePositionData Dispense4 { get; set; }
- public TransferArmRecipePositionData Dispense5 { get; set; }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}IsNozzleArmEnable"] = IsNozzleArmEnable;
- result[$"{root}ArmDriveFormat"] = ArmDriveFormat;
- result[$"{root}NozzleForm"] = NozzleForm;
- result[$"{root}MotorPulsesRate"] = MotorPulsesRate;
- result[$"{root}StartPosition"] = double.Parse(StartPosition).ToString("f2");
- result[$"{root}EndPosition"] = double.Parse(EndPosition).ToString("f2");
- result[$"{root}StartCupPosition"] = double.Parse(StartCupPosition).ToString("f2");
- result[$"{root}EndCupPosition"] = double.Parse(EndCupPosition).ToString("f2");
- result[$"{root}MaintenaceSpeed"] = double.Parse(MaintenaceSpeed).ToString("f2");
- if (Home != null) result[$"{root}Home"] = Home.ToString();
- if (DmyDisp != null) result[$"{root}DmyDisp"] = DmyDisp.ToString();
- if (Standby != null) result[$"{root}Standby"] = Standby.ToString();
- if (Maintenace1 != null) result[$"{root}Maintenace1"] = Maintenace1.ToString();
- if (Maintenace2 != null) result[$"{root}Maintenace2"] = Maintenace2.ToString();
- if (Maintenace3 != null) result[$"{root}Maintenace3"] = Maintenace3.ToString();
- if (Begin != null) result[$"{root}Begin"] = Begin.ToString();
- if (Center != null) result[$"{root}Center"] = Center.ToString();
- if (Center2 != null) result[$"{root}Center2"] = Center2.ToString();
- if (End != null) result[$"{root}End"] = End.ToString();
- if (Dispense1 != null) result[$"{root}Dispense1"] = Dispense1.ToString();
- if (Dispense2 != null) result[$"{root}Dispense2"] = Dispense2.ToString();
- if (Dispense3 != null) result[$"{root}Dispense3"] = Dispense3.ToString();
- if (Dispense4 != null) result[$"{root}Dispense4"] = Dispense4.ToString();
- if (Dispense5 != null) result[$"{root}Dispense5"] = Dispense5.ToString();
- return result;
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new NozzleArmInformat()
- {
- IsNozzleArmEnable = this.IsNozzleArmEnable,
- ArmDriveFormat = this.ArmDriveFormat,
- NozzleForm = this.NozzleForm,
- MotorPulsesRate = this.MotorPulsesRate,
- StartPosition = this.StartPosition,
- EndPosition = this.EndPosition,
- StartCupPosition = this.StartCupPosition,
- EndCupPosition = this.EndCupPosition,
- MaintenaceSpeed = this.MaintenaceSpeed,
- Home = (TransferArmRecipePositionData)this.Home.Clone(),
- DmyDisp = (TransferArmRecipePositionData)this.DmyDisp.Clone(),
- Standby = (TransferArmRecipePositionData)this.Standby.Clone(),
- Maintenace1 = (TransferArmRecipePositionData)this.Maintenace1.Clone(),
- Maintenace2 = (TransferArmRecipePositionData)this.Maintenace2.Clone(),
- Maintenace3 = (TransferArmRecipePositionData)this.Maintenace3.Clone(),
- Begin = (TransferArmRecipePositionData)this.Begin.Clone(),
- Center = (TransferArmRecipePositionData)this.Center.Clone(),
- Center2 = (TransferArmRecipePositionData)this.Center2.Clone(),
- End = (TransferArmRecipePositionData)this.End.Clone(),
- Dispense1 = (TransferArmRecipePositionData)this.Dispense1.Clone(),
- Dispense2 = (TransferArmRecipePositionData)this.Dispense2.Clone(),
- Dispense3 = (TransferArmRecipePositionData)this.Dispense3.Clone(),
- Dispense4 = (TransferArmRecipePositionData)this.Dispense4.Clone(),
- Dispense5 = (TransferArmRecipePositionData)this.Dispense5.Clone(),
- };
- }
- }
- public class TransferArmInteraction
- {
- public string AxisName { get; set; }
- public ObservableCollection<TransferArmInteractionData> TransferArmInteractionData { get; set; } = new ObservableCollection<TransferArmInteractionData>();
- }
- public class TransferArmInteractionData
- {
- public string TranserAxisName { get; set; }
- public string From { get; set; }
- public string To { get; set; }
- }
- public class TransferArmRecipePositionData : ICloneable
- {
- public TransferArmRecipePositionData()
- { }
- public TransferArmRecipePositionData(string value)
- {
- if (!(value == null || value == ""))
- {
- var strList = value.Split(';');
- Acceleration = double.Parse(strList[0]).ToString("f2");
- Deceleration = double.Parse(strList[1]).ToString("f2");
- TopSpeed = double.Parse(strList[2]).ToString("f2");
- Position = double.Parse(strList[3]).ToString("f2");
- HeightPositionSelection = strList[4];
- if (strList.Length == 7)
- RRCCenter = strList[5];
- List<string> offsetList = strList[strList.Length - 1].Split(',').ToList();
- Nozzle1Offset = double.Parse(offsetList[0]).ToString("f2");
- Nozzle2Offset = double.Parse(offsetList[1]).ToString("f2");
- Nozzle3Offset = double.Parse(offsetList[2]).ToString("f2");
- Nozzle4Offset = double.Parse(offsetList[3]).ToString("f2");
- Nozzle5Offset = double.Parse(offsetList[4]).ToString("f2");
- Nozzle6Offset = double.Parse(offsetList[5]).ToString("f2");
- Nozzle7Offset = double.Parse(offsetList[6]).ToString("f2");
- Nozzle8Offset = double.Parse(offsetList[7]).ToString("f2");
- }
- }
- public string Acceleration { get; set; }
- public string Deceleration { get; set; }
- public string TopSpeed { get; set; }
- public string Position { get; set; }
- public string HeightPositionSelection { get; set; }
- public string Nozzle1Offset { get; set; }
- public string Nozzle2Offset { get; set; }
- public string Nozzle3Offset { get; set; }
- public string Nozzle4Offset { get; set; }
- public string Nozzle5Offset { get; set; }
- public string Nozzle6Offset { get; set; }
- public string Nozzle7Offset { get; set; }
- public string Nozzle8Offset { get; set; }
- public string Units { get; set; }
- public string RRCCenter { get; set; }
- public override string ToString()
- {
- string rtn = $"{Acceleration};{Deceleration};{TopSpeed};{Position};{HeightPositionSelection};{RRCCenter};" +
- $"{Nozzle1Offset},{Nozzle2Offset},{Nozzle3Offset},{Nozzle4Offset}," +
- $"{Nozzle5Offset},{Nozzle6Offset},{Nozzle7Offset},{Nozzle8Offset}";
- return rtn.ToString();
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- }
- public class DispenseConfig
- {
- public string Name { get; set; }
- public bool IsChecked { get; set; }
- public string DummyDispense { get; set; }
- public string DispenseMechanismName { get; set; }
- public string DispenseMechanismData { get; set; }
- public string FlowAmountSensor { get; set; }
- public FlowPumpData FlowPumpData { get; set; } = new FlowPumpData();
- public FlowSensorData FlowSensorData { get; set; } = new FlowSensorData();
- public string AutoSupplySystemSupply { get; set; }
- public AutoSupplySystem AutoSupplySystem { get; set; } = new AutoSupplySystem();
- public string AutoSupplySystemDrain { get; set; }
- public DispenseDrainData DispenseDrain { get; set; } = new DispenseDrainData();
- public DispenseConfig(string value)
- {
- CreateDispenseConfig(value);
- }
- public DispenseConfig()
- {
- CreateDispenseConfig("");
- }
- public void CreateDispenseConfig(string value)
- {
- if (value == null || value == "")
- {
- this.IsChecked = false;
- this.DummyDispense = "Yes";
- this.FlowAmountSensor = "-";
- this.DispenseMechanismName = "No Conn";
- this.AutoSupplySystemSupply = "-";
- this.AutoSupplySystemDrain = "-";
- this.FlowPumpData = new FlowPumpData();
- this.FlowSensorData = new FlowSensorData();
- }
- else
- {
- string[] listStr = value.Split(',');
- if (listStr.Length == 12)
- {
- Name = listStr[0];
- IsChecked = bool.Parse(listStr[1]);
- DummyDispense = listStr[2];
- DispenseMechanismName = listStr[3];
- DispenseMechanismData = listStr[4];
- FlowAmountSensor = listStr[5];
- FlowPumpData = new FlowPumpData(listStr[6]);
- FlowSensorData = new FlowSensorData(listStr[7]);
- AutoSupplySystemSupply = listStr[8];
- //AutoSupplySystem = new AutoSupplySystem(listStr[9]);
- if (listStr[10] == "Drain pump")
- {
- AutoSupplySystemDrain = "Drain Pump";
- }
- else
- {
- AutoSupplySystemDrain = listStr[10];
- }
- //DispenseDrain = new DispenseDrainData(listStr[11]);
- }
- else
- {
- Name = listStr[0];
- IsChecked = bool.Parse(listStr[1]);
- DummyDispense = listStr[2];
- DispenseMechanismName = listStr[3];
- DispenseMechanismData = listStr[4];
- FlowAmountSensor = listStr[5];
- FlowPumpData = new FlowPumpData(listStr[6]);
- FlowSensorData = new FlowSensorData(listStr[7]);
- AutoSupplySystemSupply = listStr[8];
- if (listStr[9] == "Drain pump")
- {
- AutoSupplySystemDrain = "Drain Pump";
- }
- else
- {
- AutoSupplySystemDrain = listStr[9];
- }
- // DispenseDrain = new DispenseDrainData(listStr[10]);
- }
- }
- }
- public override string ToString()
- {
- string[] rtn = new string[]
- {
- Name,
- IsChecked.ToString(),
- DummyDispense,
- DispenseMechanismName,
- DispenseMechanismData,
- FlowAmountSensor,
- FlowPumpData.ToString(),
- FlowSensorData.ToString(),
- AutoSupplySystemSupply,
- // AutoSupplySystem.ToString(),
- AutoSupplySystemDrain
- // , DispenseDrain.ToString()
- };
- return String.Join(",", rtn);
- }
- }
- public class FlowPumpData : ICloneable
- {
- public string PumpCapacity { get; set; }
- public string PassOperation { get; set; }
- public string PluseCount { get; set; }
- public string SpareReload { get; set; }
- public string DispenseWorkControlMethod { get; set; }
- public string AlarmValue { get; set; }
- public string StopValue { get; set; }
- public string Calibration { get; set; }
- public FlowPumpData()
- {
- PumpCapacity = "8.0";
- PassOperation = "Off";
- PluseCount = "0";
- SpareReload = "0";
- DispenseWorkControlMethod = "Total Dispense Count";
- AlarmValue = "1000";
- StopValue = "1000";
- Calibration = "1.00";
- }
- public FlowPumpData(string value)
- {
- var rtn = value.Split('/');
- PumpCapacity = rtn[0];
- PassOperation = rtn[1];
- PluseCount = rtn[2];
- SpareReload = rtn[3];
- DispenseWorkControlMethod = rtn[4];
- AlarmValue = rtn[5];
- StopValue = rtn[6];
- Calibration = rtn[7];
- }
- public override string ToString()
- {
- string[] strList = new string[]
- {
- PumpCapacity,PassOperation,PluseCount,SpareReload,DispenseWorkControlMethod,
- AlarmValue,StopValue,Calibration
- };
- return String.Join("/", strList);
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new FlowPumpData()
- {
- PumpCapacity = this.PumpCapacity,
- PassOperation = this.PassOperation,
- PluseCount = this.PassOperation,
- SpareReload = this.SpareReload,
- DispenseWorkControlMethod = this.DispenseWorkControlMethod,
- AlarmValue = this.AlarmValue,
- StopValue = this.StopValue,
- Calibration = this.Calibration
- };
- }
- }
- public class FlowSensorData : ICloneable
- {
- public string LiquidType { get; set; }
- public string SamplingCompleteDelayTime { get; set; }
- public string CheckTiming { get; set; }
- public string DummyDispenseFlowMonitoring { get; set; }
- public string ReferenceValue { get; set; }
- public string Calibration { get; set; }
- public string AlarmRangeUpper { get; set; }
- public string AlarmRangeLower { get; set; }
- public string StopRangeUpper { get; set; }
- public string StopRangeLower { get; set; }
- public string DispenseTime { get; set; }
- public string N2Time { get; set; }
- public string N2Value { get; set; }
- public FlowSensorData()
- {
- LiquidType = "";
- SamplingCompleteDelayTime = "1.0";
- CheckTiming = "None";
- DummyDispenseFlowMonitoring = "Yes";
- ReferenceValue = "0";
- Calibration = "1.00";
- AlarmRangeUpper = "50.00";
- AlarmRangeLower = "50.00";
- StopRangeUpper = "50.00";
- StopRangeLower = "50.00";
- DispenseTime = "5.0";
- N2Time = "10.0";
- N2Value = "10";
- }
- public FlowSensorData(string value)
- {
- var rtn = value.Split('/');
- LiquidType = rtn[0];
- SamplingCompleteDelayTime = double.Parse(rtn[1]).ToString("F1");
- CheckTiming = rtn[2];
- DummyDispenseFlowMonitoring = rtn[3];
- ReferenceValue = rtn[4];
- Calibration = rtn[5];
- AlarmRangeUpper = rtn[6];
- AlarmRangeLower = rtn[7];
- StopRangeUpper = rtn[8];
- StopRangeLower = rtn[9];
- if (rtn.Length > 10)
- {
- DispenseTime = double.Parse(rtn[10]).ToString("F1"); ;
- N2Time = double.Parse(rtn[11]).ToString("F1"); ;
- }
- else
- {
- DispenseTime = "5.0";
- N2Time = "10.0";
- }
- if (rtn.Length > 12)
- {
- N2Value = double.Parse(rtn[12]).ToString("F1"); ;
- }
- else
- {
- N2Value = "10";
- }
- }
- public override string ToString()
- {
- string[] strList = new string[]
- {
- LiquidType,SamplingCompleteDelayTime,CheckTiming,DummyDispenseFlowMonitoring,
- ReferenceValue,Calibration,AlarmRangeUpper,AlarmRangeLower,StopRangeUpper,StopRangeLower,DispenseTime,N2Time,N2Value
- };
- return String.Join("/", strList);
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new FlowSensorData()
- {
- LiquidType = this.LiquidType,
- SamplingCompleteDelayTime = this.SamplingCompleteDelayTime,
- CheckTiming = this.CheckTiming,
- DummyDispenseFlowMonitoring = this.DummyDispenseFlowMonitoring,
- ReferenceValue = this.ReferenceValue,
- Calibration = this.Calibration,
- AlarmRangeUpper = this.AlarmRangeUpper,
- AlarmRangeLower = this.AlarmRangeLower,
- StopRangeUpper = this.StopRangeUpper,
- StopRangeLower = this.StopRangeLower,
- DispenseTime = this.DispenseTime,
- N2Time = this.N2Time,
- N2Value = this.N2Value
- };
- }
- }
- public class AutoSupplySystem : ICloneable
- {
- public string Name { get; set; }
- public string Mode { get; set; }
- public string LiquidSupplySource { get; set; }
- public string SupplyTime { get; set; }
- public string VacuumTime { get; set; }
- public string WaitingTime { get; set; }
- public string SupplyDelayTime { get; set; }
- public string PurgeTime { get; set; }
- public string LERecoverTime { get; set; }
- public string LESensor { get; set; }
- public string BubblingTime { get; set; }
- public string DrainTime { get; set; }
- public AutoSupplySystem()
- {
- Name = "Solvent(1)";
- Mode = "Auto";
- LiquidSupplySource = "Invalid";
- SupplyTime = "1.0";
- VacuumTime = "0.0";
- WaitingTime = "0.0";
- SupplyDelayTime = "0.0";
- PurgeTime = "99";
- LERecoverTime = "0.0";
- LESensor = "0";
- BubblingTime = "0.0";
- DrainTime = "0.0";
- }
- public AutoSupplySystem(string value)
- {
- var rtn = value.Split('/');
- Name = rtn[0];
- Mode = rtn[1];
- LiquidSupplySource = rtn[2];
- SupplyTime = double.Parse(rtn[3]).ToString("F1");
- VacuumTime = double.Parse(rtn[4]).ToString("F1");
- WaitingTime = double.Parse(rtn[5]).ToString("F1");
- SupplyDelayTime = double.Parse(rtn[6]).ToString("F1");
- PurgeTime = double.Parse(rtn[7]).ToString("F1");
- LERecoverTime = double.Parse(rtn[8]).ToString("F1");
- LESensor = rtn[9];
- BubblingTime = double.Parse(rtn[10]).ToString("F1");
- DrainTime = double.Parse(rtn[11]).ToString("F1");
- }
- public override string ToString()
- {
- string[] strList = new string[]
- {
- Name,Mode,LiquidSupplySource,SupplyTime,VacuumTime,WaitingTime,SupplyDelayTime,
- PurgeTime,LERecoverTime,LESensor,BubblingTime,DrainTime
- };
- return String.Join("/", strList);
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new AutoSupplySystem()
- {
- Name = this.Name,
- Mode = this.Mode,
- LiquidSupplySource = this.LiquidSupplySource,
- SupplyTime = this.SupplyTime,
- VacuumTime = this.VacuumTime,
- WaitingTime = this.WaitingTime,
- SupplyDelayTime = this.SupplyDelayTime,
- PurgeTime = this.PurgeTime,
- LERecoverTime = this.LERecoverTime,
- LESensor = this.LESensor,
- BubblingTime = this.BubblingTime,
- DrainTime = this.DrainTime,
- };
- }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
- keyValuePairs.Add($"{root}Mode", Mode);
- keyValuePairs.Add($"{root}LiquidSupplySource", LiquidSupplySource);
- keyValuePairs.Add($"{root}SupplyTime", SupplyTime);
- keyValuePairs.Add($"{root}VacuumTime", VacuumTime);
- keyValuePairs.Add($"{root}WaitingTime", WaitingTime);
- keyValuePairs.Add($"{root}SupplyDelayTime", SupplyDelayTime);
- keyValuePairs.Add($"{root}PurgeTime", PurgeTime);
- keyValuePairs.Add($"{root}LERecoverTime", LERecoverTime);
- keyValuePairs.Add($"{root}LESensor", LESensor);
- keyValuePairs.Add($"{root}BubblingTime", BubblingTime);
- keyValuePairs.Add($"{root}DrainTime", DrainTime);
- return keyValuePairs;
- }
- }
- public class DispenseDrainData : ICloneable
- {
- public string Name { get; set; }
- public string AutoDrainMode { get; set; }
- public string LiquidSupplySource { get; set; }
- public string DrainingTime { get; set; }
- public DispenseDrainData()
- {
- Name = "NMP";
- AutoDrainMode = "Auto";
- LiquidSupplySource = "Invalid";
- DrainingTime = "60.0";
- }
- public DispenseDrainData(string value)
- {
- var rtn = value.Split('/');
- Name = rtn[0];
- AutoDrainMode = rtn[1];
- LiquidSupplySource = rtn[2];
- DrainingTime = double.Parse(rtn[3]).ToString("F1");
- }
- public override string ToString()
- {
- string[] strList = new string[]
- {
- Name,AutoDrainMode,LiquidSupplySource,DrainingTime
- };
- return String.Join("/", strList);
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- public object DeepClone()
- {
- return new DispenseDrainData()
- {
- Name = this.Name,
- AutoDrainMode = this.AutoDrainMode,
- LiquidSupplySource = this.LiquidSupplySource,
- DrainingTime = this.DrainingTime
- };
- }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> keyValuePairs = new Dictionary<string, object>();
- keyValuePairs.Add($"{root}Name", Name);
- keyValuePairs.Add($"{root}AutoDrainMode", AutoDrainMode);
- keyValuePairs.Add($"{root}LiquidSupplySource", LiquidSupplySource);
- keyValuePairs.Add($"{root}DrainingTime", DrainingTime);
- return keyValuePairs;
- }
- }
- public class MonitorEditData : ICloneable
- {
- public string IsValid { get; set; }
- public string Module { get; set; }
- public string MeasDateName { get; set; }
- public string RecipeName { get; set; }
- public string TempControlForm { get; set; }
- public string ControllerName { get; set; }
- public string Node { get; set; }
- public string PortNo { get; set; }
- public string ChannelNo { get; set; }
- public string AzbilPortNo { get; set; }
- public string AzbilChannelNo { get; set; }
- public string TunForm { get; set; }
- public string TunDestNode { get; set; }
- public string TunDestSensorID { get; set; }
- public string ControlForm { get; set; }
- public string InitialData { get; set; }
- public string OverTemp { get; set; }
- public string SettlingDetermineTime { get; set; }
- public string SettlingTimeOut { get; set; }
- public string UsePointOffset { get; set; }
- public string StartMonitorForm { get; set; }
- public string StartInvalidTime { get; set; }
- public string ProcessMonitorForm { get; set; }
- public string ProcessDeterminationTime { get; set; }
- public string ProcessValue { get; set; }
- public string PIDSetForm { get; set; }
- public string PIDPParam { get; set; }
- public string PIDIParam { get; set; }
- public string PIDDParam { get; set; }
- public string OffsetSetForm { get; set; }
- public string OffsetVal { get; set; }
- public string AConstantSetForm { get; set; }
- public string AConstantVal { get; set; }
- public string RangeMinimum { get; set; }
- public string RangeMaximum { get; set; }
- public string UsePointCtrlSettleTime { get; set; }
- public string UsePointCtrlSourceBand { get; set; }
- public string UsePointCtrlLearnBand { get; set; }
- public string UsePointUseBand { get; set; }
- public MonitorEditData()
- {
- CreateMonitorEditData();
- }
- public MonitorEditData(string data)
- {
- CreateMonitorEditData(data);
- }
- private void CreateMonitorEditData()
- {
- CreateMonitorEditData("");
- }
- private void CreateMonitorEditData(string data)
- {
- if (data == "")
- {
- IsValid = "Valid";
- Module = "";
- MeasDateName = "Cup Temperature";
- RecipeName = "Local";
- TempControlForm = "Temp Control ON";
- ControllerName = "THC Controller";
- PortNo = "0";
- ChannelNo = "0";
- AzbilPortNo = "0";
- AzbilChannelNo = "0";
- TunForm = "No Sync";
- TunDestNode = "";
- TunDestSensorID = "2";
- ControlForm = "Standard";
- InitialData = "23.00";
- OverTemp = "180.00";
- SettlingDetermineTime = "5.0";
- SettlingTimeOut = "600.0";
- UsePointOffset = "0.00";
- StartMonitorForm = "Normal";
- StartInvalidTime = "0.0";
- ProcessMonitorForm = "Monitor";
- ProcessDeterminationTime = "0.0";
- ProcessValue = "0.0";
- PIDSetForm = "Manual Setting";
- PIDPParam = "1.00";
- PIDIParam = "25.00";
- PIDDParam = "5.00";
- OffsetSetForm = "Set";
- OffsetVal = "0.00";
- AConstantSetForm = "Set";
- AConstantVal = "0.00";
- RangeMinimum = "50.0";
- RangeMaximum = "200.0";
- UsePointCtrlSettleTime = "0.0";
- UsePointCtrlSourceBand = "0.00";
- UsePointCtrlLearnBand = "0.00";
- UsePointUseBand = "0.00";
- }
- else
- {
- int index = 0;
- var rtn = data.Split('/');
- IsValid = rtn[index++];
- Module = rtn[index++];
- MeasDateName = rtn[index++];
- RecipeName = rtn[index++];
- TempControlForm = rtn[index++];
- ControllerName = rtn[index++];
- if (ControllerName == "TCH Controller") ControllerName = "THC Controller";
- PortNo = rtn[index++];
- ChannelNo = rtn[index++];
- TunForm = rtn[index++];
- TunDestNode = rtn[index++];
- TunDestSensorID = rtn[index++];
- ControlForm = rtn[index++];
- InitialData = rtn[index++];
- OverTemp = rtn[index++];
- SettlingDetermineTime = rtn[index++];
- SettlingTimeOut = rtn[index++];
- UsePointOffset = rtn[index++];
- StartMonitorForm = rtn[index++];
- StartInvalidTime = rtn[index++];
- ProcessMonitorForm = rtn[index++];
- ProcessDeterminationTime = rtn[index++];
- ProcessValue = rtn[index++];
- PIDSetForm = rtn[index++];
- PIDPParam = rtn[index++];
- PIDIParam = rtn[index++];
- PIDDParam = rtn[index++];
- OffsetSetForm = rtn[index++];
- OffsetVal = rtn[index++];
- AConstantSetForm = rtn[index++];
- AConstantVal = rtn[index++];
- RangeMinimum = rtn[index++];
- RangeMaximum = rtn[index++];
- UsePointCtrlSettleTime = rtn[index++];
- UsePointCtrlSourceBand = rtn[index++];
- UsePointCtrlLearnBand = rtn[index++];
- UsePointUseBand = rtn[index++];
- if (rtn.Length > index)
- {
- AzbilPortNo = rtn[index++];
- AzbilChannelNo = rtn[index++];
- }
- }
- }
- public override string ToString()
- {
- string[] strList = new string[]
- {
- IsValid,Module,MeasDateName,RecipeName,TempControlForm, ControllerName,PortNo,ChannelNo,TunForm,TunDestNode,TunDestSensorID,ControlForm,
- InitialData,OverTemp,SettlingDetermineTime,SettlingTimeOut,UsePointOffset,StartMonitorForm,StartInvalidTime,ProcessMonitorForm,
- ProcessDeterminationTime,ProcessValue,PIDSetForm, PIDPParam,PIDIParam,PIDDParam,OffsetSetForm,OffsetVal,AConstantSetForm,
- AConstantVal,RangeMinimum,RangeMaximum,UsePointCtrlSettleTime,UsePointCtrlSourceBand,UsePointCtrlLearnBand,UsePointUseBand,AzbilPortNo,AzbilChannelNo
- };
- return String.Join("/", strList);
- }
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- }
- public class DataCollecion
- {
- public string MouleName { get; set; }
- public ObservableCollection<string> MeasureData { get; set; } = new ObservableCollection<string>();
- }
- public class SystemParameter
- {
- public string WaferExistInRCV { get; set; }
- public string AutomaticRegistrationEditor { get; set; }
- public string DesignationOfLotEnd { get; set; }
- public string DefaultScreenForRunButton { get; set; }
- public string CupWashingAlarm { get; set; }
- public string EISInitializeCondition { get; set; }
- }
- public class TransferArmPosition
- {
- public string TransferMode { get; set; }
- public double StartOffset { get; set; }
- public double EndOffset { get; set; }
- public int SlowSpeedRate { get; set; }
- public TransferArmPosition()
- {
- PincetteList.Clear();
- PincetteList.Add("pincette1", new Pincette());
- PincetteList.Add("pincette2", new Pincette());
- PincetteList.Add("pincette3", new Pincette());
- }
- public Dictionary<string, Pincette> PincetteList { get; set; } = new Dictionary<string, Pincette>();
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}Zaxis.TransferMode"] = TransferMode;
- result[$"{root}Zaxis.StartOffset"] = StartOffset;
- result[$"{root}Zaxis.EndOffset"] = EndOffset;
- result[$"{root}Zaxis.SlowSpeedRate"] = SlowSpeedRate;
- result.AddRange(PincetteList["pincette1"].GetScValue($"{root}pincette1."));
- result.AddRange(PincetteList["pincette2"].GetScValue($"{root}pincette2."));
- result.AddRange(PincetteList["pincette3"].GetScValue($"{root}pincette3."));
- return result;
- }
- public object[] GetSetParmeters(string moduleName, string blade)
- {
- List<object> list = new List<object>();
- list.Add("SetSTN");
- list.Add(moduleName);
- list.Add(blade);
- list.Add(PincetteList["pincette1"].XaxisSend);
- list.Add(PincetteList["pincette1"].XaxisReceive);
- list.Add(PincetteList["pincette1"].YaxisSend);
- list.Add(PincetteList["pincette1"].YaxisReceive);
- list.Add(PincetteList["pincette1"].ZaxisSend);
- list.Add(PincetteList["pincette1"].ZaxisReceive);
- list.Add(PincetteList["pincette1"].StrokeZaxisSend);
- list.Add(PincetteList["pincette1"].StrokeZaxisReceive);
- list.Add((StartOffset + EndOffset) / 2);
- list.Add(Math.Abs((StartOffset + EndOffset) / 2 - StartOffset));
- return list.ToArray();
- }
- }
- public class Pincette
- {
- public double XaxisReceive { get; set; }
- public double XaxisSend { get; set; }
- public double YaxisReceive { get; set; }
- public double YaxisSend { get; set; }
- public double ZaxisReceive { get; set; }
- public double ZaxisSend { get; set; }
- public double RaxisReceive { get; set; }
- public double RaxisSend { get; set; }
- public double StrokeZaxisReceive { get; set; }
- public double StrokeZaxisSend { get; set; }
- public int ZaxisReceivePer { get; set; }
- public int ZaxisSendPer { get; set; }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result[$"{root}XaxisReceive"] = XaxisReceive;
- result[$"{root}XaxisSend"] = XaxisSend;
- result[$"{root}YaxisReceive"] = YaxisReceive;
- result[$"{root}YaxisSend"] = YaxisSend;
- result[$"{root}ZaxisReceive"] = ZaxisReceive;
- result[$"{root}ZaxisSend"] = ZaxisSend;
- result[$"{root}RaxisReceive"] = RaxisReceive;
- result[$"{root}RaxisSend"] = RaxisSend;
- result[$"{root}StrokeZaxisReceive"] = StrokeZaxisReceive;
- result[$"{root}StrokeZaxisSend"] = StrokeZaxisSend;
- result[$"{root}ZaxisReceivePer"] = ZaxisReceivePer;
- result[$"{root}ZaxisSendPer"] = ZaxisSendPer;
- return result;
- }
- }
- public class ArmPosition
- {
- public int X1 { get; set; }
- public int X2 { get; set; }
- public int X3 { get; set; }
- public Dictionary<string, object> GetScValue(string root)
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- result.Add($"{root}X1", X1);
- result.Add($"{root}X2", X2);
- result.Add($"{root}X3", X3);
- return result;
- }
- }
- }
|