RecipeParser.cs 119 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Xml;
  4. using System.Reflection;
  5. using Aitex.Common.Util;
  6. using Aitex.Core.Common.DeviceData;
  7. using Aitex.Core.RT.Log;
  8. using Aitex.Core.RT.RecipeCenter;
  9. using Aitex.Core.RT.SCCore;
  10. using MECF.Framework.Common.Equipment;
  11. using System.IO;
  12. using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
  13. namespace FurnaceRT.Equipments.PMs.RecipeExecutions
  14. {
  15. public class RecipeParser
  16. {
  17. public static bool Parse(string recipeFile, string module, out RecipeHead recipeHead, out List<RecipeStep> recipeData, out string reason, string recipeType, int tableID = 1, RecipeHead mainHead = null)
  18. {
  19. reason = string.Empty;
  20. if (mainHead != null)
  21. recipeHead = mainHead;
  22. else
  23. recipeHead = new RecipeHead();
  24. recipeData = new List<RecipeStep>();
  25. string content = string.Empty;
  26. if (recipeType != "Process" && recipeType != "Idle" && recipeType != "Reset")
  27. {
  28. if (!File.Exists($"{PathManager.GetRecipeDir()}\\{SC.GetStringValue("System.Recipe.SupportedChamberType")}\\{SC.GetStringValue($"System.Recipe.Supported{recipeType}Type")}\\{recipeFile}.rcp"))
  29. return true;
  30. }
  31. content = RecipeFileManager.Instance.LoadRecipe($"{SC.GetStringValue("System.Recipe.SupportedChamberType")}\\{SC.GetStringValue($"System.Recipe.Supported{recipeType}Type")}", recipeFile, false);
  32. if (string.IsNullOrEmpty(content))
  33. {
  34. reason = $"{recipeFile} is not a valid recipe file";
  35. return false;
  36. }
  37. try
  38. {
  39. //获取工艺程序文件中允许的命令字符串列表
  40. //目的:如果工艺程序文件中含有规定之外的命令,则被禁止执行
  41. HashSet<string> recipeAllowedCommands = new HashSet<string>();
  42. XmlDocument rcpFormatDoc = new XmlDocument();
  43. string recipeSchema = PathManager.GetCfgDir() + $@"\Recipe\Furnace\Process\{SC.GetStringValue("System.SetUp.ToolType")}\RecipeFormat.xml";
  44. rcpFormatDoc.Load(recipeSchema);
  45. XmlNodeList rcpItemNodeList = rcpFormatDoc.SelectNodes("/Aitex/TableRecipeFormat/Catalog/Group/Step");
  46. foreach (XmlElement item in rcpItemNodeList)
  47. recipeAllowedCommands.Add(item.Attributes["ControlName"].Value);
  48. recipeAllowedCommands.Add("Temperature.ControlMode");
  49. recipeAllowedCommands.Add("Temperature.Correct");
  50. recipeAllowedCommands.Add("Temperature.PID");
  51. recipeAllowedCommands.Add("ConditionCheck");
  52. recipeAllowedCommands.Add("EventSetting");
  53. recipeAllowedCommands.Add("FilmThickFormula");
  54. recipeAllowedCommands.Add("FilmThickCoefficientA");
  55. recipeAllowedCommands.Add("FilmThickCoefficientB");
  56. recipeAllowedCommands.Add("AlarmTableIndex");
  57. recipeAllowedCommands.Add("RFSwitch");
  58. recipeAllowedCommands.Add("RFSetpoint");
  59. recipeAllowedCommands.Add("ForwardPowerAlarmWatchTable");
  60. recipeAllowedCommands.Add("PrAlarmWatchTable");
  61. recipeAllowedCommands.Add("PIAlarmWatchTable");
  62. recipeAllowedCommands.Add("C1Setpoint");
  63. recipeAllowedCommands.Add("C2Setpoint");
  64. recipeAllowedCommands.Add("C1AlarmWatchTable");
  65. recipeAllowedCommands.Add("C2AlarmWatchTable");
  66. recipeAllowedCommands.Add("VppAlarmWatchTable");
  67. recipeAllowedCommands.Add("VdcAlarmWatchTable");
  68. recipeAllowedCommands.Add("PressureSonserValue");
  69. recipeAllowedCommands.Add("PressureValveAngle");
  70. recipeAllowedCommands.Add("PressureSettingVG");
  71. recipeAllowedCommands.Add("PressCommand");
  72. recipeAllowedCommands.Add("PressValue");
  73. recipeAllowedCommands.Add("PressureAlarmTableNo");
  74. recipeAllowedCommands.Add("AbortRecipeTableIndex");
  75. recipeAllowedCommands.Add("AlarmConditionTable");
  76. recipeAllowedCommands.Add("LoaderCommand");
  77. recipeAllowedCommands.Add("LoaderValue");
  78. for (int i = 1; i < 11; i++)
  79. {
  80. recipeAllowedCommands.Add($"AlarmAction.{i}");
  81. recipeAllowedCommands.Add($"AlarmDetails.{i}");
  82. }
  83. for (int i = 1; i < 60; i++)
  84. {
  85. recipeAllowedCommands.Add($"MFC{i}.Flow.Set");
  86. recipeAllowedCommands.Add($"MFC{i}.Flow.SetUnit");
  87. recipeAllowedCommands.Add($"MFC{i}.Flow.Ramprate");
  88. recipeAllowedCommands.Add($"MFC{i}.Flow.RamprateUnit");
  89. recipeAllowedCommands.Add($"MFC{i}.Flow.Check");
  90. recipeAllowedCommands.Add($"MFC{i}.Flow.High");
  91. recipeAllowedCommands.Add($"MFC{i}.Flow.Low");
  92. recipeAllowedCommands.Add($"MFC{i}.Flow.Unit");
  93. }
  94. for (int i = 1; i < 200; i++)
  95. {
  96. recipeAllowedCommands.Add($"AUX.{i}.Set");
  97. recipeAllowedCommands.Add($"AUX.{i}.Check");
  98. recipeAllowedCommands.Add($"AUX.{i}.High");
  99. recipeAllowedCommands.Add($"AUX.{i}.Low");
  100. recipeAllowedCommands.Add($"AUX.{i}.CheckUnit");
  101. }
  102. recipeAllowedCommands.Add("HeaterU.ZoneName");
  103. recipeAllowedCommands.Add("HeaterU.Set");
  104. recipeAllowedCommands.Add("HeaterU.SetUnit");
  105. recipeAllowedCommands.Add("HeaterU.Ramprate");
  106. recipeAllowedCommands.Add("HeaterU.RamprateUnit");
  107. recipeAllowedCommands.Add("HeaterU.Check");
  108. recipeAllowedCommands.Add("HeaterU.High");
  109. recipeAllowedCommands.Add("HeaterU.Low");
  110. recipeAllowedCommands.Add("HeaterU.Unit");
  111. recipeAllowedCommands.Add("HeaterCU.ZoneName");
  112. recipeAllowedCommands.Add("HeaterCU.Set");
  113. recipeAllowedCommands.Add("HeaterCU.SetUnit");
  114. recipeAllowedCommands.Add("HeaterCU.Ramprate");
  115. recipeAllowedCommands.Add("HeaterCU.RamprateUnit");
  116. recipeAllowedCommands.Add("HeaterCU.Check");
  117. recipeAllowedCommands.Add("HeaterCU.High");
  118. recipeAllowedCommands.Add("HeaterCU.Low");
  119. recipeAllowedCommands.Add("HeaterCU.Unit");
  120. recipeAllowedCommands.Add("HeaterC.ZoneName");
  121. recipeAllowedCommands.Add("HeaterC.Set");
  122. recipeAllowedCommands.Add("HeaterC.SetUnit");
  123. recipeAllowedCommands.Add("HeaterC.Ramprate");
  124. recipeAllowedCommands.Add("HeaterC.RamprateUnit");
  125. recipeAllowedCommands.Add("HeaterC.Check");
  126. recipeAllowedCommands.Add("HeaterC.High");
  127. recipeAllowedCommands.Add("HeaterC.Low");
  128. recipeAllowedCommands.Add("HeaterC.Unit");
  129. recipeAllowedCommands.Add("HeaterCL.ZoneName");
  130. recipeAllowedCommands.Add("HeaterCL.Set");
  131. recipeAllowedCommands.Add("HeaterCL.SetUnit");
  132. recipeAllowedCommands.Add("HeaterCL.Ramprate");
  133. recipeAllowedCommands.Add("HeaterCL.RamprateUnit");
  134. recipeAllowedCommands.Add("HeaterCL.Check");
  135. recipeAllowedCommands.Add("HeaterCL.High");
  136. recipeAllowedCommands.Add("HeaterCL.Low");
  137. recipeAllowedCommands.Add("HeaterCL.Unit");
  138. recipeAllowedCommands.Add("HeaterL.ZoneName");
  139. recipeAllowedCommands.Add("HeaterL.Set");
  140. recipeAllowedCommands.Add("HeaterL.SetUnit");
  141. recipeAllowedCommands.Add("HeaterL.Ramprate");
  142. recipeAllowedCommands.Add("HeaterL.RamprateUnit");
  143. recipeAllowedCommands.Add("HeaterL.Check");
  144. recipeAllowedCommands.Add("HeaterL.High");
  145. recipeAllowedCommands.Add("HeaterL.Low");
  146. recipeAllowedCommands.Add("HeaterL.Unit");
  147. recipeAllowedCommands.Add("Loader.Command");
  148. recipeAllowedCommands.Add("Loader.Speed1");
  149. recipeAllowedCommands.Add("Loader.Speed2");
  150. recipeAllowedCommands.Add("Loader.Speed3");
  151. recipeAllowedCommands.Add("Loader.RPM");
  152. recipeAllowedCommands.Add("Press.Command");
  153. recipeAllowedCommands.Add("Press.PID");
  154. recipeAllowedCommands.Add("Press.Set");
  155. recipeAllowedCommands.Add("Press.SlowVacSet");
  156. recipeAllowedCommands.Add("Press.ValveAngleSet");
  157. recipeAllowedCommands.Add("Press.IsWait");
  158. recipeAllowedCommands.Add("Press.LowWait");
  159. recipeAllowedCommands.Add("Press.HighWait");
  160. recipeAllowedCommands.Add("Press.WaitUnit");
  161. recipeAllowedCommands.Add("Press.WaitPress");
  162. //获取工艺程序文件中所有步的内容
  163. XmlDocument rcpDataDoc = new XmlDocument();
  164. rcpDataDoc.LoadXml(content);
  165. XmlNode nodeModule = null;
  166. if (recipeType == "Process" || recipeType == "Idle" || recipeType == "Reset")
  167. nodeModule = rcpDataDoc.SelectSingleNode($"/Aitex/TableRecipeData/Module[@Name='{module}']");
  168. else
  169. nodeModule = rcpDataDoc.SelectSingleNode($"/Aitex/TableRecipeData/Tables/Table[@Index='{tableID}']");
  170. if (nodeModule == null)
  171. {
  172. reason = $"Recipe file does not contains step content for {module}";
  173. return false;
  174. }
  175. XmlElement nodeConfig = nodeModule.SelectSingleNode($"Config") as XmlElement;
  176. if (nodeConfig != null)
  177. {
  178. if (mainHead == null)
  179. {
  180. recipeHead.SubRecipe = nodeConfig.HasAttribute("Combination.SubRecipe") ? nodeConfig.Attributes["Combination.SubRecipe"].Value : "";
  181. recipeHead.AlarmRecipe = nodeConfig.HasAttribute("Combination.AlarmRecipe") ? nodeConfig.Attributes["Combination.AlarmRecipe"].Value : "";
  182. recipeHead.AlarmCondition = nodeConfig.HasAttribute("Combination.AlarmCondition") ? nodeConfig.Attributes["Combination.AlarmCondition"].Value : "";
  183. recipeHead.LeakCheck = nodeConfig.HasAttribute("Combination.LeakCheck") ? nodeConfig.Attributes["Combination.LeakCheck"].Value : "";
  184. recipeHead.AbortRecipe = nodeConfig.HasAttribute("Combination.AbortRecipe") ? nodeConfig.Attributes["Combination.AbortRecipe"].Value : "";
  185. recipeHead.PressApcPID = nodeConfig.HasAttribute("Combination.PressAPCPID") ? nodeConfig.Attributes["Combination.PressAPCPID"].Value : "";
  186. recipeHead.TempCorrect = nodeConfig.HasAttribute("Combination.TempCorrection") ? nodeConfig.Attributes["Combination.TempCorrection"].Value : "";
  187. recipeHead.TempPID = nodeConfig.HasAttribute("Combination.TempPID") ? nodeConfig.Attributes["Combination.TempPID"].Value : "";
  188. recipeHead.ProfileCondition = nodeConfig.HasAttribute("Combination.ProfileCondition") ? nodeConfig.Attributes["Combination.ProfileCondition"].Value : "";
  189. if (nodeConfig.HasAttribute("N2PurgeMode"))
  190. {
  191. recipeHead.IsN2PurgeMode = nodeConfig.Attributes["N2PurgeMode"].Value.Replace(" ", "").ToLower() == "n2purge";
  192. recipeHead.N2PurgeModeStr = nodeConfig.Attributes["N2PurgeMode"].Value;
  193. }
  194. else
  195. {
  196. recipeHead.IsN2PurgeMode = false;
  197. }
  198. if (string.IsNullOrEmpty(recipeHead.AbortRecipe))
  199. recipeHead.AbortRecipe = SC.GetStringValue("System.Recipe.Abort Recipe");
  200. }
  201. }
  202. else
  203. {
  204. if (mainHead == null)
  205. {
  206. recipeHead.SubRecipe = "";
  207. recipeHead.AlarmRecipe = "";
  208. recipeHead.AlarmCondition = "";
  209. recipeHead.LeakCheck = "";
  210. recipeHead.AbortRecipe = "";
  211. recipeHead.PressApcPID = "";
  212. recipeHead.TempCorrect = "";
  213. recipeHead.TempPID = "";
  214. recipeHead.ProfileCondition = "";
  215. if (recipeType == "Sub")
  216. recipeHead.AbortRecipe = SC.GetStringValue("System.Recipe.Abort Recipe");
  217. }
  218. }
  219. XmlNodeList stepNodeList = nodeModule.SelectNodes($"Step");
  220. string strLoopEndStep, strJumpStep;
  221. strLoopEndStep = strJumpStep = string.Empty;
  222. for (int i = 0; i < stepNodeList.Count; i++)
  223. {
  224. var recipeStep = new RecipeStep();
  225. recipeStep.RecipeType = recipeType;
  226. recipeData.Add(recipeStep);
  227. XmlElement stepNode = stepNodeList[i] as XmlElement;
  228. Dictionary<string, string> dic = new Dictionary<string, string>();
  229. //遍历Step节点
  230. foreach (XmlAttribute att in stepNode.Attributes)
  231. {
  232. if (recipeAllowedCommands.Contains(att.Name))
  233. {
  234. dic.Add(att.Name, att.Value);
  235. }
  236. }
  237. //遍历Step子节点中所有的attribute属性节点
  238. foreach (XmlElement subStepNode in stepNode.ChildNodes)
  239. {
  240. foreach (XmlAttribute att in subStepNode.Attributes)
  241. {
  242. if (recipeAllowedCommands.Contains(att.Name))
  243. {
  244. dic.Add(att.Name, att.Value);
  245. }
  246. }
  247. //遍历Step子节点的子节点中所有的attribute属性节点
  248. foreach (XmlElement subsubStepNode in subStepNode.ChildNodes)
  249. {
  250. foreach (XmlAttribute att in subsubStepNode.Attributes)
  251. {
  252. if (recipeAllowedCommands.Contains(att.Name))
  253. {
  254. dic.Add(att.Name, att.Value);
  255. }
  256. }
  257. }
  258. }
  259. recipeStep.StepName = dic["Name"];
  260. if (dic["Name"] == strLoopEndStep)
  261. {
  262. recipeStep.IsLoopEndStep = true;
  263. strLoopEndStep = string.Empty;
  264. }
  265. recipeStep.IsJumpStep = false;
  266. if (dic.ContainsKey("Command"))
  267. {
  268. string commandStr = dic["Command"];
  269. if (commandStr.Contains("CallSystemRecipe"))
  270. {
  271. }
  272. else if (commandStr.ToUpper().StartsWith("CALL"))
  273. {
  274. int subTableID = 0;
  275. var subPara = commandStr.Replace("CALL", "").Replace("[", "").Replace("]", "").Split('*');
  276. if (subPara != null && subPara.Length > 1)
  277. {
  278. int.TryParse(subPara[0], out int loopCount);
  279. var tablePara = subPara[1].Split(':');
  280. if (tablePara != null && tablePara.Length > 1)
  281. {
  282. int.TryParse(tablePara[0], out subTableID);
  283. if (subTableID > 0)
  284. {
  285. recipeStep.IsCallSubStep = true;
  286. recipeStep.SubRecipeLoopCount = loopCount;
  287. }
  288. }
  289. recipeStep.SubRecipeTableInfo = subPara[1];
  290. }
  291. //sub需要修改table id
  292. List<RecipeStep> subRecipeData = null;
  293. if (recipeStep.IsCallSubStep && !Parse(recipeHead.SubRecipe, module, out var head, out subRecipeData, out reason, "Sub", subTableID, recipeHead))
  294. {
  295. return false;
  296. }
  297. if (subRecipeData == null || subRecipeData.Count == 0)
  298. {
  299. reason = $"Sub Recipe {commandStr.Replace("CallSubRecipe:", string.Empty)} is empty";
  300. return false;
  301. }
  302. recipeStep.SubRecipeSteps = subRecipeData;
  303. }
  304. else if (commandStr.ToUpper().StartsWith("LOOP"))
  305. {
  306. recipeStep.IsLoopEndStep = true;
  307. var loopPara = commandStr.Replace("LOOP", "").Replace("[", "").Replace("]", "").Split('*');
  308. if (loopPara != null && loopPara.Length > 1)
  309. {
  310. int.TryParse(loopPara[0], out int loopCount);
  311. recipeStep.LoopCount = loopCount + 1;//加1是因为第一次从正常的start-》end的执行算是一次循环,所以要额外加1
  312. int loopStartStep = -1;
  313. for (int index = 0; index < recipeData.Count; index++)
  314. {
  315. if (recipeData[index].StepName == loopPara[1])
  316. {
  317. loopStartStep = index;
  318. break;
  319. }
  320. }
  321. if (loopStartStep < 0)
  322. {
  323. reason = $"Recipe file does not contains LOOP step {loopPara[1]}";
  324. return false;
  325. }
  326. if (loopPara[1] != null)
  327. {
  328. if (loopStartStep < 0 ||
  329. (recipeType == "Process" && loopStartStep == 0))//Process recipe的standby不参与循环
  330. recipeStep.IsLoopEndStep = false;
  331. else
  332. {
  333. recipeStep.LoopStartStep = loopStartStep;
  334. if (recipeData.Count > loopStartStep)
  335. {
  336. recipeData[loopStartStep].IsLoopStartStep = true;
  337. recipeData[loopStartStep].LoopCount = loopCount + 1;
  338. recipeStep.LoopEndStep = recipeType == "Process" ? i + 1 : i;//Process recipe包含standby,从0开始;其他recipe不包含standby
  339. }
  340. }
  341. }
  342. }
  343. }
  344. else if (commandStr.ToUpper().StartsWith("JUMP"))
  345. {
  346. var jumpPara = commandStr.Replace("Jump:", string.Empty).Replace("[", "").Replace("]", "");//JumpStepNo
  347. if (jumpPara != null)
  348. {
  349. //int.TryParse(jumpPara[0], out int jumpStepNo);
  350. //recipeStep.JumpStepNo = recipeType == "Process" ? jumpStepNo : jumpStepNo - 1;//Process recipe包含standby,从0开始;其他recipe不包含standby
  351. recipeStep.IsJumpStep = true;
  352. recipeStep.JumpStepName = jumpPara;
  353. }
  354. }
  355. }
  356. if (dic.ContainsKey("AbortRecipeTableIndex"))
  357. {
  358. if (dic["AbortRecipeTableIndex"].ToLower() != "none")
  359. {
  360. //格式 1:name
  361. var abortPara = dic["AbortRecipeTableIndex"].Split(':');
  362. int abortTableID = 0;
  363. if (abortPara.Length > 1)
  364. {
  365. int.TryParse(abortPara[0], out abortTableID);
  366. List<RecipeStep> abortRecipeData = null;
  367. if (!Parse(recipeHead.AbortRecipe, module, out var head, out abortRecipeData, out reason, "Abort", abortTableID))
  368. {
  369. return false;
  370. }
  371. if (abortRecipeData == null || abortRecipeData.Count == 0)
  372. {
  373. reason = $"Abort Recipe {recipeHead.AbortRecipe}--{dic["AbortRecipeTableIndex"]} is empty";
  374. return false;
  375. }
  376. recipeStep.AbortRecipeSteps = abortRecipeData;
  377. recipeStep.AbortRecipeTableInfo = dic["AbortRecipeTableIndex"];
  378. }
  379. }
  380. else
  381. {
  382. recipeStep.AbortRecipeSteps = null;
  383. }
  384. }
  385. if (dic.ContainsKey("EventSetting"))
  386. {
  387. string eventSettingStr = dic["EventSetting"];
  388. if (eventSettingStr.ToLower() == "start")
  389. {
  390. recipeStep.IsTimeMeasurementStartStep = true;
  391. }
  392. else if (eventSettingStr.ToLower() == "stop")
  393. {
  394. recipeStep.IsTimeMeasurementStopStep = true;
  395. }
  396. }
  397. if (dic.ContainsKey("FilmThickFormula"))
  398. {
  399. recipeStep.FilmThickFormula = dic["FilmThickFormula"];
  400. }
  401. if (dic.ContainsKey("FilmThickCoefficientA"))
  402. {
  403. recipeStep.FilmThickCoefficientA = float.Parse(dic["FilmThickCoefficientA"]);
  404. }
  405. if (dic.ContainsKey("FilmThickCoefficientB"))
  406. {
  407. recipeStep.FilmThickCoefficientB = float.Parse(dic["FilmThickCoefficientB"]);
  408. }
  409. if (dic.ContainsKey("AlarmConditionTable"))
  410. {
  411. recipeStep.AlarmConditionTable = dic["AlarmConditionTable"];
  412. }
  413. for (int j = 1; j < 11; j++)
  414. {
  415. string tempType = "Ignore Alarm";
  416. string tempDetails = "";
  417. if (dic.ContainsKey($"AlarmAction.{j}"))
  418. {
  419. tempType = dic[$"AlarmAction.{j}"];
  420. }
  421. if (dic.ContainsKey($"AlarmDetails.{j}"))
  422. {
  423. tempDetails = dic[$"AlarmDetails.{j}"];
  424. }
  425. recipeStep.AlarmActionSets.Add(j, new AlarmActions()
  426. {
  427. ProcessingType = tempType,
  428. ProcessingDetails = tempDetails
  429. });
  430. }
  431. //if(dic.ContainsKey("Loop"))
  432. //{
  433. // string loopStr = dic["Loop"];
  434. // recipeStep.IsLoopStartStep = System.Text.RegularExpressions.Regex.Match(loopStr, @"Loop\x20\d+\s*$").Success;
  435. // recipeStep.IsLoopEndStep = System.Text.RegularExpressions.Regex.Match(loopStr, @"Loop End$").Success;
  436. // if (recipeStep.IsLoopStartStep)
  437. // recipeStep.LoopCount = Convert.ToInt32(loopStr.Replace("Loop", string.Empty));
  438. // else
  439. // recipeStep.LoopCount = 0;
  440. //}
  441. //recipe time
  442. if (dic["Name"].ToLower() == "standby")
  443. {
  444. if (DateTime.TryParse(dic["Time"], out DateTime time))
  445. {
  446. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600 + time.Millisecond / 1000.0;
  447. }
  448. else if (float.TryParse(dic["Time"], out float timeInSec))
  449. {
  450. recipeStep.StepTime = timeInSec;
  451. recipeStep.EndBy = EnumEndByCondition.ByTime;
  452. }
  453. else
  454. {
  455. recipeStep.StepTime = 0;
  456. recipeStep.EndBy = EnumEndByCondition.ByStandbyFactor;
  457. }
  458. }
  459. else
  460. {
  461. if (System.Text.RegularExpressions.Regex.Match(dic["Time"], @"[a-zA-Z]").Success)
  462. {
  463. if (SC.ContainsItem($"{module}.RecipeEditParameter.StepTime.{dic["Time"]}"))
  464. {
  465. var time = DateTime.Parse(SC.GetStringValue($"{module}.RecipeEditParameter.StepTime.{dic["Time"]}"));
  466. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600;
  467. }
  468. else
  469. {
  470. reason = $"Configuration does not contains step time config {dic["Time"]}";
  471. return false;
  472. }
  473. }
  474. else
  475. {
  476. if (DateTime.TryParse(dic["Time"], out DateTime time))
  477. {
  478. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600 + time.Millisecond / 1000.0;
  479. }
  480. else if (float.TryParse(dic["Time"], out float timeInSec))
  481. {
  482. recipeStep.StepTime = timeInSec;
  483. }
  484. else
  485. {
  486. reason = $"Step time {dic["Time"]} is invalid";
  487. return false;
  488. }
  489. }
  490. if (dic["ConditionCheck"].ToLower() == "none")
  491. {
  492. recipeStep.EndBy = EnumEndByCondition.ByTime;
  493. }
  494. else
  495. {
  496. recipeStep.EndBy = EnumEndByCondition.ByStandbyFactor;
  497. }
  498. }
  499. //ReplaceControlName(ref dic, "GasLineMFC1.Flow", "MFC1.SetParameters");
  500. //ReplaceControlName(ref dic, "GasLineMFC2.Flow", "MFC2.SetParameters");
  501. //ReplaceControlName(ref dic, "GasLineMFC3.Flow", "MFC3.SetParameters");
  502. //ReplaceControlName(ref dic, "GasLineMFC4.Flow", "MFC4.SetParameters");
  503. //ReplaceControlName(ref dic, "GasLineMFC5.Flow", "MFC5.SetParameters");
  504. //ReplaceControlName(ref dic, "GasLineMFC6.Flow", "MFC6.SetParameters");
  505. //ReplaceControlName(ref dic, "GasLineMFC7.Flow", "MFC7.SetParameters");
  506. //ReplaceControlName(ref dic, "GasLineMFC8.Flow", "MFC8.SetParameters");
  507. //ReplaceControlName(ref dic, "GasLineMFC9.Flow", "MFC9.SetParameters");
  508. //ReplaceControlName(ref dic, "GasLineMFC10.Flow", "MFC10.SetParameters");
  509. //ReplaceControlName(ref dic, "GasLineMFC11.Flow", "MFC11.SetParameters");
  510. //ReplaceControlName(ref dic, "GasLineMFC12.Flow", "MFC12.SetParameters");
  511. //ReplaceControlName(ref dic, "GasLineMFC51.Flow", "MFC51.SetParameters");
  512. AddParameter(ref dic, "MFC1.SetParameters", new string[8] { "MFC1.Flow.Set", "MFC1.Flow.Ramprate", "MFC1.Flow.SetUnit", "MFC1.Flow.RamprateUnit", "MFC1.Flow.Check", "MFC1.Flow.High", "MFC1.Flow.Low", "MFC1.Flow.Unit" });
  513. AddParameter(ref dic, "MFC2.SetParameters", new string[8] { "MFC2.Flow.Set", "MFC2.Flow.Ramprate", "MFC2.Flow.SetUnit", "MFC2.Flow.RamprateUnit", "MFC2.Flow.Check", "MFC2.Flow.High", "MFC2.Flow.Low", "MFC2.Flow.Unit" });
  514. AddParameter(ref dic, "MFC3.SetParameters", new string[8] { "MFC3.Flow.Set", "MFC3.Flow.Ramprate", "MFC3.Flow.SetUnit", "MFC3.Flow.RamprateUnit", "MFC3.Flow.Check", "MFC3.Flow.High", "MFC3.Flow.Low", "MFC3.Flow.Unit" });
  515. AddParameter(ref dic, "MFC4.SetParameters", new string[8] { "MFC4.Flow.Set", "MFC4.Flow.Ramprate", "MFC4.Flow.SetUnit", "MFC4.Flow.RamprateUnit", "MFC4.Flow.Check", "MFC4.Flow.High", "MFC4.Flow.Low", "MFC4.Flow.Unit" });
  516. AddParameter(ref dic, "MFC5.SetParameters", new string[8] { "MFC5.Flow.Set", "MFC5.Flow.Ramprate", "MFC5.Flow.SetUnit", "MFC5.Flow.RamprateUnit", "MFC5.Flow.Check", "MFC5.Flow.High", "MFC5.Flow.Low", "MFC5.Flow.Unit" });
  517. AddParameter(ref dic, "MFC6.SetParameters", new string[8] { "MFC6.Flow.Set", "MFC6.Flow.Ramprate", "MFC6.Flow.SetUnit", "MFC6.Flow.RamprateUnit", "MFC6.Flow.Check", "MFC6.Flow.High", "MFC6.Flow.Low", "MFC6.Flow.Unit" });
  518. AddParameter(ref dic, "MFC7.SetParameters", new string[8] { "MFC7.Flow.Set", "MFC7.Flow.Ramprate", "MFC7.Flow.SetUnit", "MFC7.Flow.RamprateUnit", "MFC7.Flow.Check", "MFC7.Flow.High", "MFC7.Flow.Low", "MFC7.Flow.Unit" });
  519. AddParameter(ref dic, "MFC8.SetParameters", new string[8] { "MFC8.Flow.Set", "MFC8.Flow.Ramprate", "MFC8.Flow.SetUnit", "MFC8.Flow.RamprateUnit", "MFC8.Flow.Check", "MFC8.Flow.High", "MFC8.Flow.Low", "MFC8.Flow.Unit" });
  520. AddParameter(ref dic, "MFC9.SetParameters", new string[8] { "MFC9.Flow.Set", "MFC9.Flow.Ramprate", "MFC9.Flow.SetUnit", "MFC9.Flow.RamprateUnit", "MFC9.Flow.Check", "MFC9.Flow.High", "MFC9.Flow.Low", "MFC9.Flow.Unit" });
  521. AddParameter(ref dic, "MFC10.SetParameters", new string[8] { "MFC10.Flow.Set", "MFC10.Flow.Ramprate", "MFC10.Flow.SetUnit", "MFC10.Flow.RamprateUnit", "MFC10.Flow.Check", "MFC10.Flow.High", "MFC10.Flow.Low", "MFC10.Flow.Unit" });
  522. AddParameter(ref dic, "MFC11.SetParameters", new string[8] { "MFC11.Flow.Set", "MFC11.Flow.Ramprate", "MFC11.Flow.SetUnit", "MFC11.Flow.RamprateUnit", "MFC11.Flow.Check", "MFC11.Flow.High", "MFC11.Flow.Low", "MFC11.Flow.Unit" });
  523. AddParameter(ref dic, "MFC12.SetParameters", new string[8] { "MFC12.Flow.Set", "MFC12.Flow.Ramprate", "MFC12.Flow.SetUnit", "MFC12.Flow.RamprateUnit", "MFC12.Flow.Check", "MFC12.Flow.High", "MFC12.Flow.Low", "MFC12.Flow.Unit" });
  524. AddParameter(ref dic, "MFC13.SetParameters", new string[8] { "MFC13.Flow.Set", "MFC13.Flow.Ramprate", "MFC13.Flow.SetUnit", "MFC13.Flow.RamprateUnit", "MFC13.Flow.Check", "MFC13.Flow.High", "MFC13.Flow.Low", "MFC13.Flow.Unit" });
  525. AddParameter(ref dic, "MFC14.SetParameters", new string[8] { "MFC14.Flow.Set", "MFC14.Flow.Ramprate", "MFC14.Flow.SetUnit", "MFC14.Flow.RamprateUnit", "MFC14.Flow.Check", "MFC14.Flow.High", "MFC14.Flow.Low", "MFC14.Flow.Unit" });
  526. AddParameter(ref dic, "MFC15.SetParameters", new string[8] { "MFC15.Flow.Set", "MFC15.Flow.Ramprate", "MFC15.Flow.SetUnit", "MFC15.Flow.RamprateUnit", "MFC15.Flow.Check", "MFC15.Flow.High", "MFC15.Flow.Low", "MFC15.Flow.Unit" });
  527. AddParameter(ref dic, "MFC16.SetParameters", new string[8] { "MFC16.Flow.Set", "MFC16.Flow.Ramprate", "MFC16.Flow.SetUnit", "MFC16.Flow.RamprateUnit", "MFC16.Flow.Check", "MFC16.Flow.High", "MFC16.Flow.Low", "MFC16.Flow.Unit" });
  528. AddParameter(ref dic, "MFC17.SetParameters", new string[8] { "MFC17.Flow.Set", "MFC17.Flow.Ramprate", "MFC17.Flow.SetUnit", "MFC17.Flow.RamprateUnit", "MFC17.Flow.Check", "MFC17.Flow.High", "MFC17.Flow.Low", "MFC17.Flow.Unit" });
  529. AddParameter(ref dic, "MFC31.SetParameters", new string[8] { "MFC31.Flow.Set", "MFC31.Flow.Ramprate", "MFC31.Flow.SetUnit", "MFC31.Flow.RamprateUnit", "MFC31.Flow.Check", "MFC31.Flow.High", "MFC31.Flow.Low", "MFC31.Flow.Unit" });
  530. AddParameter(ref dic, "MFC32.SetParameters", new string[8] { "MFC32.Flow.Set", "MFC32.Flow.Ramprate", "MFC32.Flow.SetUnit", "MFC32.Flow.RamprateUnit", "MFC32.Flow.Check", "MFC32.Flow.High", "MFC32.Flow.Low", "MFC32.Flow.Unit" });
  531. //AddParameter(ref dic, "MFC51.SetParameters", new string[8] { "MFC51.Flow.Set", "MFC51.Flow.Ramprate", "MFC51.Flow.SetUnit", "MFC51.Flow.RamprateUnit", "MFC51.Flow.Check", "MFC51.Flow.High", "MFC51.Flow.Low", "MFC51.Flow.Unit" });
  532. ReplaceControlName(ref dic, "MFM57Flow", "MFM57.SetParameters");
  533. ReplaceControlName(ref dic, "MFM1Flow", "MFM1.SetParameters");
  534. ReplaceControlName(ref dic, "MFM6Flow", "MFM6.SetParameters");
  535. ReplaceControlName(ref dic, "MFM7Flow", "MFM7.SetParameters");
  536. ReplaceControlName(ref dic, "MFM8Flow", "MFM8.SetParameters");
  537. ReplaceControlName(ref dic, "MFM9Flow", "MFM9.SetParameters");
  538. ReplaceControlName(ref dic, "MFM11Flow", "MFM11.SetParameters");
  539. ReplaceControlName(ref dic, "MFM12Flow", "MFM12.SetParameters");
  540. ReplaceControlName(ref dic, "MFM13Flow", "MFM13.SetParameters");
  541. ReplaceControlName(ref dic, "MFM16Flow", "MFM16.SetParameters");
  542. ReplaceControlName(ref dic, "ConditionCheck", "SetConditionCheck");
  543. ReplaceControlName(ref dic, "Command", "SetCommand");
  544. if (dic.ContainsKey("AlarmConditionTable"))
  545. ReplaceControlName(ref dic, "AlarmConditionTable", "SetAlarmConditionTable");
  546. //ReplaceControlName(ref dic, "Heater2", "ZoneU.SetParameters");
  547. //ReplaceControlName(ref dic, "Heater4", "ZoneCU.SetParameters");
  548. //ReplaceControlName(ref dic, "Heater6", "ZoneC.SetParameters");
  549. //ReplaceControlName(ref dic, "Heater8", "ZoneCL.SetParameters");
  550. //ReplaceControlName(ref dic, "Heater10", "ZoneL.SetParameters");
  551. var controlMode = dic["Temperature.ControlMode"];
  552. var correct = dic["Temperature.Correct"];
  553. var PID = dic["Temperature.PID"];
  554. //AddParameter(ref dic, "ZoneU.SetParameters", controlMode, correct, PID);
  555. //AddParameter(ref dic, "ZoneCU.SetParameters", controlMode, correct, PID);
  556. //AddParameter(ref dic, "ZoneC.SetParameters", controlMode, correct, PID);
  557. //AddParameter(ref dic, "ZoneCL.SetParameters", controlMode, correct, PID);
  558. //AddParameter(ref dic, "ZoneL.SetParameters", controlMode, correct, PID);
  559. AddParameter(ref dic, "HeaterU.SetParameters", new string[9] { "HeaterU.ZoneName", "HeaterU.Set", "HeaterU.SetUnit", "HeaterU.Ramprate", "HeaterU.RamprateUnit", "HeaterU.Check", "HeaterU.High", "HeaterU.Low", "HeaterU.Unit" });
  560. AddParameterValue(ref dic, "HeaterU.SetParameters", new string[8] { controlMode, correct, PID, recipeHead.TempCorrect, recipeHead.TempPID, recipeHead.ProfileCondition, dic["ValveAV91"], dic["BWR"] });
  561. AddParameter(ref dic, "HeaterCU.SetParameters", new string[9] { "HeaterCU.ZoneName", "HeaterCU.Set", "HeaterCU.SetUnit", "HeaterCU.Ramprate", "HeaterCU.RamprateUnit", "HeaterCU.Check", "HeaterCU.High", "HeaterCU.Low", "HeaterCU.Unit" });
  562. AddParameterValue(ref dic, "HeaterCU.SetParameters", new string[8] { controlMode, correct, PID, recipeHead.TempCorrect, recipeHead.TempPID, recipeHead.ProfileCondition, dic["ValveAV91"], dic["BWR"] });
  563. AddParameter(ref dic, "HeaterC.SetParameters", new string[9] { "HeaterC.ZoneName", "HeaterC.Set", "HeaterC.SetUnit", "HeaterC.Ramprate", "HeaterC.RamprateUnit", "HeaterC.Check", "HeaterC.High", "HeaterC.Low", "HeaterC.Unit" });
  564. AddParameterValue(ref dic, "HeaterC.SetParameters", new string[8] { controlMode, correct, PID, recipeHead.TempCorrect, recipeHead.TempPID, recipeHead.ProfileCondition, dic["ValveAV91"], dic["BWR"] });
  565. AddParameter(ref dic, "HeaterCL.SetParameters", new string[9] { "HeaterCL.ZoneName", "HeaterCL.Set", "HeaterCL.SetUnit", "HeaterCL.Ramprate", "HeaterCL.RamprateUnit", "HeaterCL.Check", "HeaterCL.High", "HeaterCL.Low", "HeaterCL.Unit" });
  566. AddParameterValue(ref dic, "HeaterCL.SetParameters", new string[8] { controlMode, correct, PID, recipeHead.TempCorrect, recipeHead.TempPID, recipeHead.ProfileCondition, dic["ValveAV91"], dic["BWR"] });
  567. AddParameter(ref dic, "HeaterL.SetParameters", new string[9] { "HeaterL.ZoneName", "HeaterL.Set", "HeaterL.SetUnit", "HeaterL.Ramprate", "HeaterL.RamprateUnit", "HeaterL.Check", "HeaterL.High", "HeaterL.Low", "HeaterL.Unit" });
  568. AddParameterValue(ref dic, "HeaterL.SetParameters", new string[8] { controlMode, correct, PID, recipeHead.TempCorrect, recipeHead.TempPID, recipeHead.ProfileCondition, dic["ValveAV91"], dic["BWR"] });
  569. AddParameter(ref dic, "APC.SetParameters", new string[10] { "Press.Command", "Press.PID", "Press.Set", "Press.SlowVacSet", "Press.ValveAngleSet", "Press.IsWait", "Press.LowWait", "Press.HighWait", "Press.WaitUnit", "Press.WaitPress" });//APC
  570. AddParameterValue(ref dic, "APC.SetParameters", new string[2] { recipeHead.PressApcPID, dic["ValveAV71"] });//APC
  571. AddParameter(ref dic, "SetBoatMotion", new string[5] { "Loader.Command", "Loader.Speed1", "Loader.Speed2", "Loader.Speed3", "Loader.RPM" });//Boat
  572. List<string> auxCommands = new List<string>();
  573. for (int k = 1; k < 200; k++)
  574. {
  575. if (!dic.ContainsKey($"AUX.{k}.Set"))
  576. continue;
  577. auxCommands.Add($"{k},{dic[$"AUX.{k}.Set"]},{dic[$"AUX.{k}.Check"]},{dic[$"AUX.{k}.High"]},{dic[$"AUX.{k}.Low"]},{dic[$"AUX.{k}.CheckUnit"]}");
  578. dic.Remove($"AUX.{k}.Set");
  579. dic.Remove($"AUX.{k}.Check");
  580. dic.Remove($"AUX.{k}.High");
  581. dic.Remove($"AUX.{k}.Low");
  582. dic.Remove($"AUX.{k}.CheckUnit");
  583. }
  584. dic.Add("AUX.SetParameters", string.Join(";", auxCommands));
  585. //ReplaceControlName(ref dic, "RFSwitch", "RfPower.SetParameters");
  586. //AddParameter(ref dic, "RfPower.SetParameters", dic["RFSetpoint"], dic["ForwardPowerAlarmWatchTable"], dic["PrAlarmWatchTable"], dic["PIAlarmWatchTable"]);
  587. //ReplaceControlName(ref dic, "C1Setpoint", "RfMatch.SetParameters");
  588. //AddParameter(ref dic, "RfMatch.SetParameters", dic["C2Setpoint"], dic["C1AlarmWatchTable"], dic["C2AlarmWatchTable"], dic["VppAlarmWatchTable"]);
  589. AddValveParameter(ref dic, "SetValves", new string[159] {
  590. "ValveAV1",
  591. "ValveAV2",
  592. "ValveAV3",
  593. "ValveAV4",
  594. "ValveAV5",
  595. "ValveAV6",
  596. "ValveAV7",
  597. "ValveAV8",
  598. "ValveAV9",
  599. "ValveAV10",
  600. "ValveAV11",
  601. "ValveAV12",
  602. "ValveAV13",
  603. "ValveAV14",
  604. "ValveAV15",
  605. "ValveAV16",
  606. "ValveAV17",
  607. "ValveAV18",
  608. "ValveAV19",
  609. "ValveAV20",
  610. "ValveAV21",
  611. "ValveAV22",
  612. "ValveAV23",
  613. "ValveAV24",
  614. "ValveAV25",
  615. "ValveAV26",
  616. "ValveAV27",
  617. "ValveAV28",
  618. "ValveAV29",
  619. "ValveAV30",
  620. "ValveAV31",
  621. "ValveAV32",
  622. "ValveAV33",
  623. "ValveAV34",
  624. "ValveAV35",
  625. "ValveAV36",
  626. "ValveAV37",
  627. "ValveAV38",
  628. "ValveAV39",
  629. "ValveAV40",
  630. "ValveAV41",
  631. "ValveAV42",
  632. "ValveAV43",
  633. "ValveAV44",
  634. "ValveAV45",
  635. "ValveAV46",
  636. "ValveAV47",
  637. "ValveAV48",
  638. "ValveAV49",
  639. "ValveAV50",
  640. "ValveAV51",
  641. "ValveAV52",
  642. "ValveAV53",
  643. "ValveAV54",
  644. "ValveAV55",
  645. "ValveAV56",
  646. "ValveAV57",
  647. "ValveAV58",
  648. "ValveAV59",
  649. "ValveAV60",
  650. "ValveAV61",
  651. "ValveAV62",
  652. "ValveAV63",
  653. "ValveAV64",
  654. "ValveAV65",
  655. "ValveAV66",
  656. "ValveAV67",
  657. "ValveAV68",
  658. "ValveAV69",
  659. "ValveAV70",
  660. "ValveAV71",
  661. "ValveAV72",
  662. "ValveAV73",
  663. "ValveAV74",
  664. "ValveAV75",
  665. "ValveAV76",
  666. "ValveAV77",
  667. "ValveAV78",
  668. "ValveAV79",
  669. "ValveAV80",
  670. "ValveAV81",
  671. "ValveAV82",
  672. "ValveAV83",
  673. "ValveAV84",
  674. "ValveAV85",
  675. "ValveAV86",
  676. "ValveAV87",
  677. "ValveAV88",
  678. "ValveAV89",
  679. "ValveAV90",
  680. "ValveAV91",
  681. "ValveAV92",
  682. "ValveAV93",
  683. "ValveAV94",
  684. "ValveAV95",
  685. "ValveAV96",
  686. "ValveAV97",
  687. "ValveAV98",
  688. "ValveAV99",
  689. "ValveAV100",
  690. "ValveAV101",
  691. "ValveAV102",
  692. "ValveAV103",
  693. "ValveAV104",
  694. "ValveAV105",
  695. "ValveAV106",
  696. "ValveAV107",
  697. "ValveAV108",
  698. "ValveAV109",
  699. "ValveAV110",
  700. "ValveAV111",
  701. "ValveAV112",
  702. "ValveAV113",
  703. "ValveAV114",
  704. "ValveAV115",
  705. "ValveAV116",
  706. "ValveAV117",
  707. "ValveAV118",
  708. "ValveAV119",
  709. "ValveAV120",
  710. "ValveAV121",
  711. "ValveAV122",
  712. "ValveAV123",
  713. "ValveAV124",
  714. "ValveAV125",
  715. "ValveAV126",
  716. "ValveAV127",
  717. "ValveAV128",
  718. "ValveAV129",
  719. "ValveAV130",
  720. "ValveAV131",
  721. "ValveAV132",
  722. "ValveAV133",
  723. "ValveAV134",
  724. "ValveAV135",
  725. "ValveAV136",
  726. "DPR",
  727. "AGV",
  728. "AGV2",
  729. "MBP",
  730. "MBP1",
  731. "MBP2",
  732. "DP",
  733. "BWR",
  734. "F2Cln",
  735. "HFCln",
  736. "CEXH",
  737. "DEPO",
  738. "HTR1",
  739. "HTR2",
  740. "HTR3",
  741. "DP1",
  742. "DP2",
  743. "HMNT",
  744. "CMNT",
  745. "HREF",
  746. "CREF",
  747. "HZERO",
  748. "CZERO"
  749. });
  750. //dic.Remove("SetValves");
  751. //dic.Remove("HeaterU.SetParameters");
  752. //dic.Remove("HeaterCU.SetParameters");
  753. //dic.Remove("HeaterC.SetParameters");
  754. //dic.Remove("HeaterCL.SetParameters");
  755. //dic.Remove("HeaterL.SetParameters");
  756. //dic.Remove("MFC1.SetParameters");
  757. //dic.Remove("MFC2.SetParameters");
  758. //dic.Remove("MFC3.SetParameters");
  759. //dic.Remove("MFC4.SetParameters");
  760. //dic.Remove("MFC5.SetParameters");
  761. //dic.Remove("MFC6.SetParameters");
  762. //dic.Remove("MFC7.SetParameters");
  763. //dic.Remove("MFC8.SetParameters");
  764. //dic.Remove("MFC9.SetParameters");
  765. //dic.Remove("MFC10.SetParameters");
  766. //dic.Remove("MFC11.SetParameters");
  767. //dic.Remove("MFC12.SetParameters");
  768. //ReplaceControlNameForValve(ref dic, "ValveAV1");
  769. //ReplaceControlNameForValve(ref dic, "ValveAV2");
  770. //ReplaceControlNameForValve(ref dic, "ValveAV3");
  771. //ReplaceControlNameForValve(ref dic, "ValveAV4");
  772. //ReplaceControlNameForValve(ref dic, "ValveAV5");
  773. //ReplaceControlNameForValve(ref dic, "ValveAV6");
  774. //ReplaceControlNameForValve(ref dic, "ValveAV7");
  775. //ReplaceControlNameForValve(ref dic, "ValveAV8");
  776. //ReplaceControlNameForValve(ref dic, "ValveAV9");
  777. //ReplaceControlNameForValve(ref dic, "ValveAV10");
  778. //ReplaceControlNameForValve(ref dic, "ValveAV11");
  779. //ReplaceControlNameForValve(ref dic, "ValveAV12");
  780. //ReplaceControlNameForValve(ref dic, "ValveAV13");
  781. //ReplaceControlNameForValve(ref dic, "ValveAV14");
  782. //ReplaceControlNameForValve(ref dic, "ValveAV15");
  783. //ReplaceControlNameForValve(ref dic, "ValveAV16");
  784. //ReplaceControlNameForValve(ref dic, "ValveAV17");
  785. //ReplaceControlNameForValve(ref dic, "ValveAV18");
  786. //ReplaceControlNameForValve(ref dic, "ValveAV19");
  787. //ReplaceControlNameForValve(ref dic, "ValveAV20");
  788. //ReplaceControlNameForValve(ref dic, "ValveAV21");
  789. //ReplaceControlNameForValve(ref dic, "ValveAV22");
  790. //ReplaceControlNameForValve(ref dic, "ValveAV23");
  791. //ReplaceControlNameForValve(ref dic, "ValveAV24");
  792. //ReplaceControlNameForValve(ref dic, "ValveAV25");
  793. //ReplaceControlNameForValve(ref dic, "ValveAV26");
  794. //ReplaceControlNameForValve(ref dic, "ValveAV27");
  795. //ReplaceControlNameForValve(ref dic, "ValveAV28");
  796. //ReplaceControlNameForValve(ref dic, "ValveAV29");
  797. //ReplaceControlNameForValve(ref dic, "ValveAV30");
  798. //ReplaceControlNameForValve(ref dic, "ValveAV31");
  799. //ReplaceControlNameForValve(ref dic, "ValveAV32");
  800. //ReplaceControlNameForValve(ref dic, "ValveAV33");
  801. //ReplaceControlNameForValve(ref dic, "ValveAV34");
  802. //ReplaceControlNameForValve(ref dic, "ValveAV35");
  803. //ReplaceControlNameForValve(ref dic, "ValveAV36");
  804. //ReplaceControlNameForValve(ref dic, "ValveAV37");
  805. //ReplaceControlNameForValve(ref dic, "ValveAV38");
  806. //ReplaceControlNameForValve(ref dic, "ValveAV39");
  807. //ReplaceControlNameForValve(ref dic, "ValveAV52");
  808. ////ReplaceControlNameForValve(ref dic, "ValveAV54");
  809. ////ReplaceControlNameForValve(ref dic, "ValveAV56");
  810. ////ReplaceControlNameForValve(ref dic, "ValveAV57");
  811. ////ReplaceControlNameForValve(ref dic, "ValveAV58");
  812. ////ReplaceControlNameForValve(ref dic, "ValveAV59");
  813. //ReplaceControlNameForValve(ref dic, "ValveAV60");
  814. ////ReplaceControlNameForValve(ref dic, "ValveAV65");
  815. ////ReplaceControlNameForValve(ref dic, "ValveAV66");
  816. ////ReplaceControlNameForValve(ref dic, "ValveAV68");
  817. //ReplaceControlNameForValve(ref dic, "ValveAV71");
  818. //ReplaceControlNameForValve(ref dic, "ValveAV72");
  819. //ReplaceControlNameForValve(ref dic, "ValveAV73");
  820. //ReplaceControlNameForValve(ref dic, "ValveAV74");
  821. //ReplaceControlNameForValve(ref dic, "ValveAV75");
  822. //ReplaceControlNameForValve(ref dic, "ValveAV77");
  823. //ReplaceControlNameForValve(ref dic, "ValveAV81");
  824. //ReplaceControlNameForValve(ref dic, "ValveAV82");
  825. //ReplaceControlNameForValve(ref dic, "ValveAV83");
  826. //ReplaceControlNameForValve(ref dic, "ValveAV91");
  827. dic.Remove("StepNo");
  828. dic.Remove("Name");
  829. dic.Remove("EndBy");
  830. dic.Remove("Time");
  831. dic.Remove("ZAxisPosition");
  832. dic.Remove("ZAxisSpeed");
  833. dic.Remove("RotatePosition");
  834. dic.Remove("RotateSpeed");
  835. dic.Remove("RotateDirection");
  836. dic.Remove("Heater1");
  837. dic.Remove("Heater2");
  838. dic.Remove("Heater3");
  839. dic.Remove("Heater4");
  840. dic.Remove("Heater5");
  841. dic.Remove("ValveAV54");
  842. dic.Remove("ValveAV56");
  843. dic.Remove("ValveAV57");
  844. dic.Remove("ValveAV58");
  845. dic.Remove("ValveAV59");
  846. dic.Remove("ValveAV65");
  847. dic.Remove("ValveAV66");
  848. dic.Remove("ValveAV68");
  849. dic.Remove("ExternalOn");
  850. dic.Remove("ExternalOff");
  851. dic.Remove("ExternalSensor");
  852. dic.Remove("TempStabilize");
  853. dic.Remove("FinishAutoProfile");
  854. dic.Remove("ReachTempWait");
  855. dic.Remove("ReachTemp");
  856. dic.Remove("TempUpper");
  857. dic.Remove("TempLower");
  858. dic.Remove("ReachPressureWait");
  859. dic.Remove("ReachPressure");
  860. dic.Remove("PressureUpper");
  861. dic.Remove("PressureLower");
  862. dic.Remove("PressureStabilize");
  863. dic.Remove("External.Out1");
  864. dic.Remove("External.Out2");
  865. dic.Remove("External.Out3");
  866. dic.Remove("External.Out4");
  867. dic.Remove("External.Out5");
  868. dic.Remove("External.Out6");
  869. dic.Remove("RFSwitch");
  870. dic.Remove("RFSetpoint");
  871. dic.Remove("ForwardPowerAlarmWatchTable");
  872. dic.Remove("PrAlarmWatchTable");
  873. dic.Remove("PIAlarmWatchTable");
  874. dic.Remove("C1Setpoint");
  875. dic.Remove("C2Setpoint");
  876. dic.Remove("C1AlarmWatchTable");
  877. dic.Remove("C2AlarmWatchTable");
  878. dic.Remove("VppAlarmWatchTable");
  879. dic.Remove("VdcAlarmWatchTable");
  880. dic.Remove("AbortRecipeTableIndex");
  881. dic.Remove("Temperature.ControlMode");
  882. dic.Remove("Temperature.Correct");
  883. dic.Remove("Temperature.PID");
  884. dic.Remove("Temperature.Profile");
  885. dic.Remove("Temperature.Stabilize");
  886. dic.Remove("Temperature.TempReadyCond");
  887. dic.Remove("FilmThickFormula");
  888. dic.Remove("FilmThickCoefficientA");
  889. dic.Remove("FilmThickCoefficientB");
  890. dic.Remove("APC.SetPressure");
  891. dic.Remove("PressureSettingVG");
  892. dic.Remove("PressureSonserValue");
  893. dic.Remove("PressureValveAngle");
  894. dic.Remove("PressureAlarmTableNo");
  895. dic.Remove("EventSetting");
  896. dic.Remove("AlarmTableIndex");
  897. dic.Remove("AlarmDetails.1");
  898. dic.Remove("AlarmAction.1");
  899. dic.Remove("AlarmDetails.2");
  900. dic.Remove("AlarmAction.2");
  901. dic.Remove("AlarmDetails.3");
  902. dic.Remove("AlarmAction.3");
  903. dic.Remove("AlarmDetails.4");
  904. dic.Remove("AlarmAction.4");
  905. dic.Remove("AlarmDetails.5");
  906. dic.Remove("AlarmAction.5");
  907. dic.Remove("AlarmDetails.6");
  908. dic.Remove("AlarmAction.6");
  909. dic.Remove("AlarmDetails.7");
  910. dic.Remove("AlarmAction.7");
  911. dic.Remove("AlarmDetails.8");
  912. dic.Remove("AlarmAction.8");
  913. dic.Remove("AlarmDetails.9");
  914. dic.Remove("AlarmAction.9");
  915. dic.Remove("AlarmDetails.10");
  916. dic.Remove("AlarmAction.10");
  917. //List<string> mfcCheckInstall = new List<string>()
  918. //{
  919. // "MfcN1",
  920. // "MfcN2",
  921. // "MfcN3",
  922. // "MfcH1",
  923. // "MfcJ1",
  924. // "MfcXN1",
  925. //};
  926. //foreach(var mfc in mfcCheckInstall)
  927. //{
  928. // if (!SC.GetValue<bool>($"PM1.MFC.{mfc}.IsMFCInstalled"))
  929. // dic.Remove($"{mfc}.SetParameters");
  930. //}
  931. foreach (string key in dic.Keys)
  932. recipeStep.RecipeCommands.Add(key, dic[key]);
  933. }
  934. for (int i = 0; i < recipeData.Count; i++)
  935. {
  936. if (recipeData[i].IsJumpStep)
  937. {
  938. bool findJumpStep = false;
  939. for (int j = 0; j < recipeData.Count; j++)
  940. {
  941. if (recipeData[j].StepName == recipeData[i].JumpStepName)
  942. {
  943. recipeData[i].JumpStepNo = j;
  944. findJumpStep = true;
  945. break;
  946. }
  947. }
  948. if (!findJumpStep)
  949. {
  950. reason = $"Recipe file does not contains jump step {recipeData[i].JumpStepName}";
  951. return false;
  952. }
  953. }
  954. }
  955. }
  956. catch (Exception ex)
  957. {
  958. LOG.Write(ex);
  959. reason = $"Recipe file content not valid, {recipeFile}, {ex.Message}";
  960. return false;
  961. }
  962. return true;
  963. }
  964. public static bool LayoutRecipeParse(string recipeFile, string module, out RecipeLayoutEntityNormal layoutRecipeDataNormal, out RecipeLayoutEntityExpert layoutRecipeDataExpert, out string reason)
  965. {
  966. reason = string.Empty;
  967. layoutRecipeDataNormal = new RecipeLayoutEntityNormal();
  968. layoutRecipeDataExpert = new RecipeLayoutEntityExpert();
  969. string content = RecipeFileManager.Instance.LoadRecipe($"{SC.GetStringValue("System.Recipe.SupportedChamberType")}\\{SC.GetStringValue("System.Recipe.SupportedLayoutType")}", recipeFile, false);
  970. if (string.IsNullOrEmpty(content))
  971. {
  972. reason = $"{recipeFile} is not a valid recipe file";
  973. return false;
  974. }
  975. try
  976. {
  977. XmlDocument rcpDataDoc = new XmlDocument();
  978. rcpDataDoc.LoadXml(content);
  979. XmlNode nodeModule;
  980. nodeModule = rcpDataDoc.SelectSingleNode("/Aitex/TableRecipeData/Module/Step[@Name='Normal']");
  981. if (nodeModule == null)
  982. {
  983. //reason = "Recipe file does not contains step content for Normal";
  984. return false;
  985. }
  986. else
  987. {
  988. Type t = layoutRecipeDataNormal.GetType();
  989. foreach (FieldInfo pi in t.GetFields())
  990. {
  991. XmlElement stepNode = nodeModule as XmlElement;
  992. //遍历Step节点
  993. foreach (XmlAttribute att in stepNode.Attributes)
  994. {
  995. if (pi.Name == att.Name)
  996. {
  997. pi.SetValue(layoutRecipeDataNormal, att.Value);
  998. }
  999. }
  1000. }
  1001. }
  1002. nodeModule = rcpDataDoc.SelectSingleNode("/Aitex/TableRecipeData/Module/Step[@Name='Expert']");
  1003. if (nodeModule == null)
  1004. {
  1005. //reason = "Recipe file does not contains step content for Expert";
  1006. return false;
  1007. }
  1008. else
  1009. {
  1010. XmlElement stepNode = nodeModule as XmlElement;
  1011. string strName = "";
  1012. //遍历Step节点
  1013. foreach (XmlAttribute att in stepNode.Attributes)
  1014. {
  1015. if (att.Name != "Name")
  1016. {
  1017. layoutRecipeDataExpert.Items.Add(att.Value);
  1018. }
  1019. else
  1020. {
  1021. strName = att.Value;
  1022. }
  1023. }
  1024. layoutRecipeDataExpert.Name = strName;
  1025. }
  1026. }
  1027. catch (Exception ex)
  1028. {
  1029. LOG.Write(ex);
  1030. reason = $"Recipe file content not valid, {recipeFile}, {ex.Message}";
  1031. return false;
  1032. }
  1033. return true;
  1034. }
  1035. private static void ReplaceControlName(ref Dictionary<string, string> dic, string from, string to)
  1036. {
  1037. if (dic.ContainsKey(from))
  1038. {
  1039. dic.Add(to, dic[from]);
  1040. dic.Remove(from);
  1041. }
  1042. }
  1043. private static void ReplaceControlName(ref Dictionary<string, string> dic, string from, string to1, string to2)
  1044. {
  1045. dic.Add(to1, dic[from]);
  1046. dic.Add(to2, dic[from]);
  1047. dic.Remove(from);
  1048. }
  1049. private static void ReplaceControlNameForValve(ref Dictionary<string, string> dic, string key)
  1050. {
  1051. switch (dic[key].ToLower())
  1052. {
  1053. case "open":
  1054. dic[key] = "true";
  1055. break;
  1056. case "close":
  1057. dic[key] = "false";
  1058. break;
  1059. case "continue":
  1060. dic[key] = "Continue";
  1061. break;
  1062. }
  1063. //dic[key] = dic[key].ToLower() == "open" ? "true" : "false";
  1064. }
  1065. private static void AddValveParameter(ref Dictionary<string, string> dic, string to, string[] param)
  1066. {
  1067. if (param != null && param.Length > 0)
  1068. {
  1069. foreach (var item in param)
  1070. {
  1071. if (!string.IsNullOrEmpty(item) && dic.ContainsKey(item))
  1072. {
  1073. if (!dic.ContainsKey(to))
  1074. dic.Add(to, "");
  1075. var set = "";
  1076. switch (dic[item].ToLower())
  1077. {
  1078. case "open":
  1079. set = "true";
  1080. break;
  1081. case "close":
  1082. set = "false";
  1083. break;
  1084. case "continue":
  1085. set = "Continue";
  1086. break;
  1087. }
  1088. var value = $"{dic[to]};{item},{set}";
  1089. dic[to] = string.IsNullOrEmpty(dic[to]) ? $"{item},{set}" : value;
  1090. dic.Remove(item);
  1091. }
  1092. }
  1093. }
  1094. }
  1095. private static void AddParameter(ref Dictionary<string, string> dic, string to, string from1, string from2, string from3, string from4 = null)
  1096. {
  1097. var value = $"{dic[to]};{from1};{from2};{from3}";
  1098. if (!string.IsNullOrEmpty(from4))
  1099. value = $"{value};{from4}";
  1100. dic[to] = value;
  1101. }
  1102. private static void AddParameter(ref Dictionary<string, string> dic, string to, string[] param)
  1103. {
  1104. if (param != null && param.Length > 0)
  1105. {
  1106. foreach (var item in param)
  1107. {
  1108. if (!string.IsNullOrEmpty(item) && dic.ContainsKey(item))
  1109. {
  1110. if (!dic.ContainsKey(to))
  1111. dic.Add(to, "");
  1112. var value = $"{dic[to]};{dic[item]}";
  1113. dic[to] = string.IsNullOrEmpty(dic[to]) ? dic[item] : value;
  1114. dic.Remove(item);
  1115. }
  1116. }
  1117. }
  1118. }
  1119. private static void AddParameterValue(ref Dictionary<string, string> dic, string to, string[] param)
  1120. {
  1121. if (!dic.ContainsKey(to))
  1122. dic.Add(to, "");
  1123. if (param != null && param.Length > 0)
  1124. {
  1125. foreach (var item in param)
  1126. {
  1127. var value = $"{dic[to]};{item}";
  1128. dic[to] = string.IsNullOrEmpty(dic[to]) ? item : value;
  1129. }
  1130. }
  1131. }
  1132. public static bool ParseTables(string recipeFile, string module, out Dictionary<int, List<RecipeStep>> recipeDatas, out string reason, string recipeType)
  1133. {
  1134. reason = string.Empty;
  1135. recipeDatas = new Dictionary<int, List<RecipeStep>>();
  1136. string content = string.Empty;
  1137. if (recipeType != "Process" && recipeType != "Idle" && recipeType != "Reset")
  1138. {
  1139. if (!File.Exists($"{PathManager.GetRecipeDir()}\\{SC.GetStringValue("System.Recipe.SupportedChamberType")}\\{SC.GetStringValue($"System.Recipe.Supported{recipeType}Type")}\\{recipeFile}.rcp"))
  1140. return true;
  1141. }
  1142. content = RecipeFileManager.Instance.LoadRecipe($"{SC.GetStringValue("System.Recipe.SupportedChamberType")}\\{SC.GetStringValue($"System.Recipe.Supported{recipeType}Type")}", recipeFile, false);
  1143. if (string.IsNullOrEmpty(content))
  1144. {
  1145. reason = $"{recipeFile} is not a valid recipe file";
  1146. return false;
  1147. }
  1148. try
  1149. {
  1150. //获取工艺程序文件中允许的命令字符串列表
  1151. //目的:如果工艺程序文件中含有规定之外的命令,则被禁止执行
  1152. HashSet<string> recipeAllowedCommands = new HashSet<string>();
  1153. XmlDocument rcpFormatDoc = new XmlDocument();
  1154. string recipeSchema = PathManager.GetCfgDir() + $@"\Recipe\Furnace\Process\{SC.GetStringValue("System.SetUp.ToolType")}\RecipeFormat.xml";
  1155. rcpFormatDoc.Load(recipeSchema);
  1156. XmlNodeList rcpItemNodeList = rcpFormatDoc.SelectNodes("/Aitex/TableRecipeFormat/Catalog/Group/Step");
  1157. foreach (XmlElement item in rcpItemNodeList)
  1158. recipeAllowedCommands.Add(item.Attributes["ControlName"].Value);
  1159. recipeAllowedCommands.Add("Temperature.ControlMode");
  1160. recipeAllowedCommands.Add("Temperature.Correct");
  1161. recipeAllowedCommands.Add("Temperature.PID");
  1162. recipeAllowedCommands.Add("ConditionCheck");
  1163. recipeAllowedCommands.Add("EventSetting");
  1164. recipeAllowedCommands.Add("FilmThickFormula");
  1165. recipeAllowedCommands.Add("FilmThickCoefficientA");
  1166. recipeAllowedCommands.Add("FilmThickCoefficientB");
  1167. recipeAllowedCommands.Add("AlarmTableIndex");
  1168. recipeAllowedCommands.Add("RFSwitch");
  1169. recipeAllowedCommands.Add("RFSetpoint");
  1170. recipeAllowedCommands.Add("ForwardPowerAlarmWatchTable");
  1171. recipeAllowedCommands.Add("PrAlarmWatchTable");
  1172. recipeAllowedCommands.Add("PIAlarmWatchTable");
  1173. recipeAllowedCommands.Add("C1Setpoint");
  1174. recipeAllowedCommands.Add("C2Setpoint");
  1175. recipeAllowedCommands.Add("C1AlarmWatchTable");
  1176. recipeAllowedCommands.Add("C2AlarmWatchTable");
  1177. recipeAllowedCommands.Add("VppAlarmWatchTable");
  1178. recipeAllowedCommands.Add("VdcAlarmWatchTable");
  1179. recipeAllowedCommands.Add("PressureSonserValue");
  1180. recipeAllowedCommands.Add("PressureValveAngle");
  1181. recipeAllowedCommands.Add("PressureSettingVG");
  1182. recipeAllowedCommands.Add("PressCommand");
  1183. recipeAllowedCommands.Add("PressValue");
  1184. recipeAllowedCommands.Add("PressureAlarmTableNo");
  1185. recipeAllowedCommands.Add("AbortRecipeTableIndex");
  1186. recipeAllowedCommands.Add("AlarmConditionTable");
  1187. recipeAllowedCommands.Add("LoaderCommand");
  1188. recipeAllowedCommands.Add("LoaderValue");
  1189. for (int i = 1; i < 11; i++)
  1190. {
  1191. recipeAllowedCommands.Add($"AlarmAction.{i}");
  1192. recipeAllowedCommands.Add($"AlarmDetails.{i}");
  1193. }
  1194. for (int i = 1; i < 60; i++)
  1195. {
  1196. recipeAllowedCommands.Add($"MFC{i}.Flow.Set");
  1197. recipeAllowedCommands.Add($"MFC{i}.Flow.SetUnit");
  1198. recipeAllowedCommands.Add($"MFC{i}.Flow.Ramprate");
  1199. recipeAllowedCommands.Add($"MFC{i}.Flow.RamprateUnit");
  1200. recipeAllowedCommands.Add($"MFC{i}.Flow.Check");
  1201. recipeAllowedCommands.Add($"MFC{i}.Flow.High");
  1202. recipeAllowedCommands.Add($"MFC{i}.Flow.Low");
  1203. recipeAllowedCommands.Add($"MFC{i}.Flow.Unit");
  1204. }
  1205. for (int i = 1; i < 200; i++)
  1206. {
  1207. recipeAllowedCommands.Add($"AUX.{i}.Set");
  1208. recipeAllowedCommands.Add($"AUX.{i}.Check");
  1209. recipeAllowedCommands.Add($"AUX.{i}.High");
  1210. recipeAllowedCommands.Add($"AUX.{i}.Low");
  1211. recipeAllowedCommands.Add($"AUX.{i}.CheckUnit");
  1212. }
  1213. recipeAllowedCommands.Add("HeaterU.ZoneName");
  1214. recipeAllowedCommands.Add("HeaterU.Set");
  1215. recipeAllowedCommands.Add("HeaterU.SetUnit");
  1216. recipeAllowedCommands.Add("HeaterU.Ramprate");
  1217. recipeAllowedCommands.Add("HeaterU.RamprateUnit");
  1218. recipeAllowedCommands.Add("HeaterU.Check");
  1219. recipeAllowedCommands.Add("HeaterU.High");
  1220. recipeAllowedCommands.Add("HeaterU.Low");
  1221. recipeAllowedCommands.Add("HeaterU.Unit");
  1222. recipeAllowedCommands.Add("HeaterCU.ZoneName");
  1223. recipeAllowedCommands.Add("HeaterCU.Set");
  1224. recipeAllowedCommands.Add("HeaterCU.SetUnit");
  1225. recipeAllowedCommands.Add("HeaterCU.Ramprate");
  1226. recipeAllowedCommands.Add("HeaterCU.RamprateUnit");
  1227. recipeAllowedCommands.Add("HeaterCU.Check");
  1228. recipeAllowedCommands.Add("HeaterCU.High");
  1229. recipeAllowedCommands.Add("HeaterCU.Low");
  1230. recipeAllowedCommands.Add("HeaterCU.Unit");
  1231. recipeAllowedCommands.Add("HeaterC.ZoneName");
  1232. recipeAllowedCommands.Add("HeaterC.Set");
  1233. recipeAllowedCommands.Add("HeaterC.SetUnit");
  1234. recipeAllowedCommands.Add("HeaterC.Ramprate");
  1235. recipeAllowedCommands.Add("HeaterC.RamprateUnit");
  1236. recipeAllowedCommands.Add("HeaterC.Check");
  1237. recipeAllowedCommands.Add("HeaterC.High");
  1238. recipeAllowedCommands.Add("HeaterC.Low");
  1239. recipeAllowedCommands.Add("HeaterC.Unit");
  1240. recipeAllowedCommands.Add("HeaterCL.ZoneName");
  1241. recipeAllowedCommands.Add("HeaterCL.Set");
  1242. recipeAllowedCommands.Add("HeaterCL.SetUnit");
  1243. recipeAllowedCommands.Add("HeaterCL.Ramprate");
  1244. recipeAllowedCommands.Add("HeaterCL.RamprateUnit");
  1245. recipeAllowedCommands.Add("HeaterCL.Check");
  1246. recipeAllowedCommands.Add("HeaterCL.High");
  1247. recipeAllowedCommands.Add("HeaterCL.Low");
  1248. recipeAllowedCommands.Add("HeaterCL.Unit");
  1249. recipeAllowedCommands.Add("HeaterL.ZoneName");
  1250. recipeAllowedCommands.Add("HeaterL.Set");
  1251. recipeAllowedCommands.Add("HeaterL.SetUnit");
  1252. recipeAllowedCommands.Add("HeaterL.Ramprate");
  1253. recipeAllowedCommands.Add("HeaterL.RamprateUnit");
  1254. recipeAllowedCommands.Add("HeaterL.Check");
  1255. recipeAllowedCommands.Add("HeaterL.High");
  1256. recipeAllowedCommands.Add("HeaterL.Low");
  1257. recipeAllowedCommands.Add("HeaterL.Unit");
  1258. recipeAllowedCommands.Add("Loader.Command");
  1259. recipeAllowedCommands.Add("Loader.Speed1");
  1260. recipeAllowedCommands.Add("Loader.Speed2");
  1261. recipeAllowedCommands.Add("Loader.Speed3");
  1262. recipeAllowedCommands.Add("Loader.RPM");
  1263. recipeAllowedCommands.Add("Press.Command");
  1264. recipeAllowedCommands.Add("Press.PID");
  1265. recipeAllowedCommands.Add("Press.Set");
  1266. recipeAllowedCommands.Add("Press.SlowVacSet");
  1267. recipeAllowedCommands.Add("Press.ValveAngleSet");
  1268. recipeAllowedCommands.Add("Press.IsWait");
  1269. recipeAllowedCommands.Add("Press.LowWait");
  1270. recipeAllowedCommands.Add("Press.HighWait");
  1271. recipeAllowedCommands.Add("Press.WaitUnit");
  1272. recipeAllowedCommands.Add("Press.WaitPress");
  1273. //获取工艺程序文件中所有步的内容
  1274. XmlDocument rcpDataDoc = new XmlDocument();
  1275. rcpDataDoc.LoadXml(content);
  1276. XmlNodeList tablesNodeList = rcpDataDoc.SelectNodes("//Tables/Table");
  1277. if (tablesNodeList == null || tablesNodeList.Count == 0)
  1278. {
  1279. reason = "No Table nodes found.";
  1280. return false;
  1281. }
  1282. for (int x = 0; x < tablesNodeList.Count; x++)
  1283. {
  1284. XmlNode tableNode = tablesNodeList[x];
  1285. // 获取当前 Table 下的所有 Step 节点
  1286. XmlNodeList stepNodes = tableNode.SelectNodes("Step");
  1287. #region
  1288. string strLoopEndStep, strJumpStep;
  1289. strLoopEndStep = strJumpStep = string.Empty;
  1290. var recipeData = new List<RecipeStep>();
  1291. for (int i = 0; i < stepNodes.Count; i++)
  1292. {
  1293. var recipeStep = new RecipeStep();
  1294. recipeStep.RecipeType = recipeType;
  1295. recipeData.Add(recipeStep);
  1296. XmlElement stepNode = stepNodes[i] as XmlElement;
  1297. Dictionary<string, string> dic = new Dictionary<string, string>();
  1298. //遍历Step节点
  1299. foreach (XmlAttribute att in stepNode.Attributes)
  1300. {
  1301. if (recipeAllowedCommands.Contains(att.Name))
  1302. {
  1303. dic.Add(att.Name, att.Value);
  1304. }
  1305. }
  1306. //遍历Step子节点中所有的attribute属性节点
  1307. foreach (XmlElement subStepNode in stepNode.ChildNodes)
  1308. {
  1309. foreach (XmlAttribute att in subStepNode.Attributes)
  1310. {
  1311. if (recipeAllowedCommands.Contains(att.Name))
  1312. {
  1313. dic.Add(att.Name, att.Value);
  1314. }
  1315. }
  1316. //遍历Step子节点的子节点中所有的attribute属性节点
  1317. foreach (XmlElement subsubStepNode in subStepNode.ChildNodes)
  1318. {
  1319. foreach (XmlAttribute att in subsubStepNode.Attributes)
  1320. {
  1321. if (recipeAllowedCommands.Contains(att.Name))
  1322. {
  1323. dic.Add(att.Name, att.Value);
  1324. }
  1325. }
  1326. }
  1327. }
  1328. recipeStep.StepName = dic["Name"];
  1329. if (dic["Name"] == strLoopEndStep)
  1330. {
  1331. recipeStep.IsLoopEndStep = true;
  1332. strLoopEndStep = string.Empty;
  1333. }
  1334. recipeStep.IsJumpStep = false;
  1335. if (dic.ContainsKey("Command"))
  1336. {
  1337. string commandStr = dic["Command"];
  1338. if (commandStr.Contains("CallSystemRecipe"))
  1339. {
  1340. }
  1341. else if (commandStr.ToUpper().StartsWith("CALL"))
  1342. {
  1343. int subTableID = 0;
  1344. var subPara = commandStr.Replace("CALL", "").Replace("[", "").Replace("]", "").Split('*');
  1345. if (subPara != null && subPara.Length > 1)
  1346. {
  1347. int.TryParse(subPara[0], out int loopCount);
  1348. var tablePara = subPara[1].Split(':');
  1349. if (tablePara != null && tablePara.Length > 1)
  1350. {
  1351. int.TryParse(tablePara[0], out subTableID);
  1352. if (subTableID > 0)
  1353. {
  1354. recipeStep.IsCallSubStep = true;
  1355. recipeStep.SubRecipeLoopCount = loopCount;
  1356. }
  1357. }
  1358. recipeStep.SubRecipeTableInfo = subPara[1];
  1359. }
  1360. }
  1361. else if (commandStr.ToUpper().StartsWith("LOOP"))
  1362. {
  1363. recipeStep.IsLoopEndStep = true;
  1364. var loopPara = commandStr.Replace("LOOP", "").Replace("[", "").Replace("]", "").Split('*');
  1365. if (loopPara != null && loopPara.Length > 1)
  1366. {
  1367. int.TryParse(loopPara[0], out int loopCount);
  1368. recipeStep.LoopCount = loopCount + 1;//加1是因为第一次从正常的start-》end的执行算是一次循环,所以要额外加1
  1369. int loopStartStep = -1;
  1370. for (int index = 0; index < recipeData.Count; index++)
  1371. {
  1372. if (recipeData[index].StepName == loopPara[1])
  1373. {
  1374. loopStartStep = index;
  1375. break;
  1376. }
  1377. }
  1378. if (loopStartStep < 0)
  1379. {
  1380. reason = $"Recipe file does not contains LOOP step {loopPara[1]}";
  1381. return false;
  1382. }
  1383. if (loopPara[1] != null)
  1384. {
  1385. if (loopStartStep < 0 ||
  1386. (recipeType == "Process" && loopStartStep == 0))//Process recipe的standby不参与循环
  1387. recipeStep.IsLoopEndStep = false;
  1388. else
  1389. {
  1390. recipeStep.LoopStartStep = loopStartStep;
  1391. if (recipeData.Count > loopStartStep)
  1392. {
  1393. recipeData[loopStartStep].IsLoopStartStep = true;
  1394. recipeData[loopStartStep].LoopCount = loopCount + 1;
  1395. recipeStep.LoopEndStep = recipeType == "Process" ? i + 1 : i;//Process recipe包含standby,从0开始;其他recipe不包含standby
  1396. }
  1397. }
  1398. }
  1399. }
  1400. }
  1401. else if (commandStr.ToUpper().StartsWith("JUMP"))
  1402. {
  1403. var jumpPara = commandStr.Replace("Jump:", string.Empty).Replace("[", "").Replace("]", "");//JumpStepNo
  1404. if (jumpPara != null)
  1405. {
  1406. //int.TryParse(jumpPara[0], out int jumpStepNo);
  1407. //recipeStep.JumpStepNo = recipeType == "Process" ? jumpStepNo : jumpStepNo - 1;//Process recipe包含standby,从0开始;其他recipe不包含standby
  1408. recipeStep.IsJumpStep = true;
  1409. recipeStep.JumpStepName = jumpPara;
  1410. }
  1411. }
  1412. }
  1413. if (dic.ContainsKey("AbortRecipeTableIndex"))
  1414. {
  1415. if (dic["AbortRecipeTableIndex"].ToLower() != "none")
  1416. {
  1417. recipeStep.AbortRecipeTableInfo = dic["AbortRecipeTableIndex"];
  1418. }
  1419. recipeStep.AbortRecipeSteps = null;
  1420. }
  1421. if (dic.ContainsKey("EventSetting"))
  1422. {
  1423. string eventSettingStr = dic["EventSetting"];
  1424. if (eventSettingStr.ToLower() == "start")
  1425. {
  1426. recipeStep.IsTimeMeasurementStartStep = true;
  1427. }
  1428. else if (eventSettingStr.ToLower() == "stop")
  1429. {
  1430. recipeStep.IsTimeMeasurementStopStep = true;
  1431. }
  1432. }
  1433. if (dic.ContainsKey("FilmThickFormula"))
  1434. {
  1435. recipeStep.FilmThickFormula = dic["FilmThickFormula"];
  1436. }
  1437. if (dic.ContainsKey("FilmThickCoefficientA"))
  1438. {
  1439. recipeStep.FilmThickCoefficientA = float.Parse(dic["FilmThickCoefficientA"]);
  1440. }
  1441. if (dic.ContainsKey("FilmThickCoefficientB"))
  1442. {
  1443. recipeStep.FilmThickCoefficientB = float.Parse(dic["FilmThickCoefficientB"]);
  1444. }
  1445. if (dic.ContainsKey("AlarmConditionTable"))
  1446. {
  1447. recipeStep.AlarmConditionTable = dic["AlarmConditionTable"];
  1448. }
  1449. for (int j = 1; j < 11; j++)
  1450. {
  1451. string tempType = "Ignore Alarm";
  1452. string tempDetails = "";
  1453. if (dic.ContainsKey($"AlarmAction.{j}"))
  1454. {
  1455. tempType = dic[$"AlarmAction.{j}"];
  1456. }
  1457. if (dic.ContainsKey($"AlarmDetails.{j}"))
  1458. {
  1459. tempDetails = dic[$"AlarmDetails.{j}"];
  1460. }
  1461. recipeStep.AlarmActionSets.Add(j, new AlarmActions()
  1462. {
  1463. ProcessingType = tempType,
  1464. ProcessingDetails = tempDetails
  1465. });
  1466. }
  1467. //if(dic.ContainsKey("Loop"))
  1468. //{
  1469. // string loopStr = dic["Loop"];
  1470. // recipeStep.IsLoopStartStep = System.Text.RegularExpressions.Regex.Match(loopStr, @"Loop\x20\d+\s*$").Success;
  1471. // recipeStep.IsLoopEndStep = System.Text.RegularExpressions.Regex.Match(loopStr, @"Loop End$").Success;
  1472. // if (recipeStep.IsLoopStartStep)
  1473. // recipeStep.LoopCount = Convert.ToInt32(loopStr.Replace("Loop", string.Empty));
  1474. // else
  1475. // recipeStep.LoopCount = 0;
  1476. //}
  1477. //recipe time
  1478. if (dic["Name"].ToLower() == "standby")
  1479. {
  1480. if (DateTime.TryParse(dic["Time"], out DateTime time))
  1481. {
  1482. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600 + time.Millisecond / 1000.0;
  1483. }
  1484. else if (float.TryParse(dic["Time"], out float timeInSec))
  1485. {
  1486. recipeStep.StepTime = timeInSec;
  1487. recipeStep.EndBy = EnumEndByCondition.ByTime;
  1488. }
  1489. else
  1490. {
  1491. recipeStep.StepTime = 0;
  1492. recipeStep.EndBy = EnumEndByCondition.ByStandbyFactor;
  1493. }
  1494. }
  1495. else
  1496. {
  1497. if (System.Text.RegularExpressions.Regex.Match(dic["Time"], @"[a-zA-Z]").Success)
  1498. {
  1499. if (SC.ContainsItem($"{module}.RecipeEditParameter.StepTime.{dic["Time"]}"))
  1500. {
  1501. var time = DateTime.Parse(SC.GetStringValue($"{module}.RecipeEditParameter.StepTime.{dic["Time"]}"));
  1502. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600;
  1503. }
  1504. else
  1505. {
  1506. reason = $"Configuration does not contains step time config {dic["Time"]}";
  1507. return false;
  1508. }
  1509. }
  1510. else
  1511. {
  1512. if (DateTime.TryParse(dic["Time"], out DateTime time))
  1513. {
  1514. recipeStep.StepTime = time.Second + time.Minute * 60 + time.Hour * 3600 + time.Millisecond / 1000.0;
  1515. }
  1516. else if (float.TryParse(dic["Time"], out float timeInSec))
  1517. {
  1518. recipeStep.StepTime = timeInSec;
  1519. }
  1520. else
  1521. {
  1522. reason = $"Step time {dic["Time"]} is invalid";
  1523. return false;
  1524. }
  1525. }
  1526. if (dic["ConditionCheck"].ToLower() == "none")
  1527. {
  1528. recipeStep.EndBy = EnumEndByCondition.ByTime;
  1529. }
  1530. else
  1531. {
  1532. recipeStep.EndBy = EnumEndByCondition.ByStandbyFactor;
  1533. }
  1534. }
  1535. //ReplaceControlName(ref dic, "GasLineMFC1.Flow", "MFC1.SetParameters");
  1536. //ReplaceControlName(ref dic, "GasLineMFC2.Flow", "MFC2.SetParameters");
  1537. //ReplaceControlName(ref dic, "GasLineMFC3.Flow", "MFC3.SetParameters");
  1538. //ReplaceControlName(ref dic, "GasLineMFC4.Flow", "MFC4.SetParameters");
  1539. //ReplaceControlName(ref dic, "GasLineMFC5.Flow", "MFC5.SetParameters");
  1540. //ReplaceControlName(ref dic, "GasLineMFC6.Flow", "MFC6.SetParameters");
  1541. //ReplaceControlName(ref dic, "GasLineMFC7.Flow", "MFC7.SetParameters");
  1542. //ReplaceControlName(ref dic, "GasLineMFC8.Flow", "MFC8.SetParameters");
  1543. //ReplaceControlName(ref dic, "GasLineMFC9.Flow", "MFC9.SetParameters");
  1544. //ReplaceControlName(ref dic, "GasLineMFC10.Flow", "MFC10.SetParameters");
  1545. //ReplaceControlName(ref dic, "GasLineMFC11.Flow", "MFC11.SetParameters");
  1546. //ReplaceControlName(ref dic, "GasLineMFC12.Flow", "MFC12.SetParameters");
  1547. //ReplaceControlName(ref dic, "GasLineMFC51.Flow", "MFC51.SetParameters");
  1548. AddParameter(ref dic, "MFC1.SetParameters", new string[8] { "MFC1.Flow.Set", "MFC1.Flow.Ramprate", "MFC1.Flow.SetUnit", "MFC1.Flow.RamprateUnit", "MFC1.Flow.Check", "MFC1.Flow.High", "MFC1.Flow.Low", "MFC1.Flow.Unit" });
  1549. AddParameter(ref dic, "MFC2.SetParameters", new string[8] { "MFC2.Flow.Set", "MFC2.Flow.Ramprate", "MFC2.Flow.SetUnit", "MFC2.Flow.RamprateUnit", "MFC2.Flow.Check", "MFC2.Flow.High", "MFC2.Flow.Low", "MFC2.Flow.Unit" });
  1550. AddParameter(ref dic, "MFC3.SetParameters", new string[8] { "MFC3.Flow.Set", "MFC3.Flow.Ramprate", "MFC3.Flow.SetUnit", "MFC3.Flow.RamprateUnit", "MFC3.Flow.Check", "MFC3.Flow.High", "MFC3.Flow.Low", "MFC3.Flow.Unit" });
  1551. AddParameter(ref dic, "MFC4.SetParameters", new string[8] { "MFC4.Flow.Set", "MFC4.Flow.Ramprate", "MFC4.Flow.SetUnit", "MFC4.Flow.RamprateUnit", "MFC4.Flow.Check", "MFC4.Flow.High", "MFC4.Flow.Low", "MFC4.Flow.Unit" });
  1552. AddParameter(ref dic, "MFC5.SetParameters", new string[8] { "MFC5.Flow.Set", "MFC5.Flow.Ramprate", "MFC5.Flow.SetUnit", "MFC5.Flow.RamprateUnit", "MFC5.Flow.Check", "MFC5.Flow.High", "MFC5.Flow.Low", "MFC5.Flow.Unit" });
  1553. AddParameter(ref dic, "MFC6.SetParameters", new string[8] { "MFC6.Flow.Set", "MFC6.Flow.Ramprate", "MFC6.Flow.SetUnit", "MFC6.Flow.RamprateUnit", "MFC6.Flow.Check", "MFC6.Flow.High", "MFC6.Flow.Low", "MFC6.Flow.Unit" });
  1554. AddParameter(ref dic, "MFC7.SetParameters", new string[8] { "MFC7.Flow.Set", "MFC7.Flow.Ramprate", "MFC7.Flow.SetUnit", "MFC7.Flow.RamprateUnit", "MFC7.Flow.Check", "MFC7.Flow.High", "MFC7.Flow.Low", "MFC7.Flow.Unit" });
  1555. AddParameter(ref dic, "MFC8.SetParameters", new string[8] { "MFC8.Flow.Set", "MFC8.Flow.Ramprate", "MFC8.Flow.SetUnit", "MFC8.Flow.RamprateUnit", "MFC8.Flow.Check", "MFC8.Flow.High", "MFC8.Flow.Low", "MFC8.Flow.Unit" });
  1556. AddParameter(ref dic, "MFC9.SetParameters", new string[8] { "MFC9.Flow.Set", "MFC9.Flow.Ramprate", "MFC9.Flow.SetUnit", "MFC9.Flow.RamprateUnit", "MFC9.Flow.Check", "MFC9.Flow.High", "MFC9.Flow.Low", "MFC9.Flow.Unit" });
  1557. AddParameter(ref dic, "MFC10.SetParameters", new string[8] { "MFC10.Flow.Set", "MFC10.Flow.Ramprate", "MFC10.Flow.SetUnit", "MFC10.Flow.RamprateUnit", "MFC10.Flow.Check", "MFC10.Flow.High", "MFC10.Flow.Low", "MFC10.Flow.Unit" });
  1558. AddParameter(ref dic, "MFC11.SetParameters", new string[8] { "MFC11.Flow.Set", "MFC11.Flow.Ramprate", "MFC11.Flow.SetUnit", "MFC11.Flow.RamprateUnit", "MFC11.Flow.Check", "MFC11.Flow.High", "MFC11.Flow.Low", "MFC11.Flow.Unit" });
  1559. AddParameter(ref dic, "MFC12.SetParameters", new string[8] { "MFC12.Flow.Set", "MFC12.Flow.Ramprate", "MFC12.Flow.SetUnit", "MFC12.Flow.RamprateUnit", "MFC12.Flow.Check", "MFC12.Flow.High", "MFC12.Flow.Low", "MFC12.Flow.Unit" });
  1560. AddParameter(ref dic, "MFC13.SetParameters", new string[8] { "MFC13.Flow.Set", "MFC13.Flow.Ramprate", "MFC13.Flow.SetUnit", "MFC13.Flow.RamprateUnit", "MFC13.Flow.Check", "MFC13.Flow.High", "MFC13.Flow.Low", "MFC13.Flow.Unit" });
  1561. AddParameter(ref dic, "MFC14.SetParameters", new string[8] { "MFC14.Flow.Set", "MFC14.Flow.Ramprate", "MFC14.Flow.SetUnit", "MFC14.Flow.RamprateUnit", "MFC14.Flow.Check", "MFC14.Flow.High", "MFC14.Flow.Low", "MFC14.Flow.Unit" });
  1562. AddParameter(ref dic, "MFC15.SetParameters", new string[8] { "MFC15.Flow.Set", "MFC15.Flow.Ramprate", "MFC15.Flow.SetUnit", "MFC15.Flow.RamprateUnit", "MFC15.Flow.Check", "MFC15.Flow.High", "MFC15.Flow.Low", "MFC15.Flow.Unit" });
  1563. AddParameter(ref dic, "MFC16.SetParameters", new string[8] { "MFC16.Flow.Set", "MFC16.Flow.Ramprate", "MFC16.Flow.SetUnit", "MFC16.Flow.RamprateUnit", "MFC16.Flow.Check", "MFC16.Flow.High", "MFC16.Flow.Low", "MFC16.Flow.Unit" });
  1564. AddParameter(ref dic, "MFC17.SetParameters", new string[8] { "MFC17.Flow.Set", "MFC17.Flow.Ramprate", "MFC17.Flow.SetUnit", "MFC17.Flow.RamprateUnit", "MFC17.Flow.Check", "MFC17.Flow.High", "MFC17.Flow.Low", "MFC17.Flow.Unit" });
  1565. AddParameter(ref dic, "MFC31.SetParameters", new string[8] { "MFC31.Flow.Set", "MFC31.Flow.Ramprate", "MFC31.Flow.SetUnit", "MFC31.Flow.RamprateUnit", "MFC31.Flow.Check", "MFC31.Flow.High", "MFC31.Flow.Low", "MFC31.Flow.Unit" });
  1566. AddParameter(ref dic, "MFC32.SetParameters", new string[8] { "MFC32.Flow.Set", "MFC32.Flow.Ramprate", "MFC32.Flow.SetUnit", "MFC32.Flow.RamprateUnit", "MFC32.Flow.Check", "MFC32.Flow.High", "MFC32.Flow.Low", "MFC32.Flow.Unit" });
  1567. //AddParameter(ref dic, "MFC51.SetParameters", new string[8] { "MFC51.Flow.Set", "MFC51.Flow.Ramprate", "MFC51.Flow.SetUnit", "MFC51.Flow.RamprateUnit", "MFC51.Flow.Check", "MFC51.Flow.High", "MFC51.Flow.Low", "MFC51.Flow.Unit" });
  1568. ReplaceControlName(ref dic, "MFM57Flow", "MFM57.SetParameters");
  1569. ReplaceControlName(ref dic, "MFM1Flow", "MFM1.SetParameters");
  1570. ReplaceControlName(ref dic, "MFM6Flow", "MFM6.SetParameters");
  1571. ReplaceControlName(ref dic, "MFM7Flow", "MFM7.SetParameters");
  1572. ReplaceControlName(ref dic, "MFM8Flow", "MFM8.SetParameters");
  1573. ReplaceControlName(ref dic, "MFM9Flow", "MFM9.SetParameters");
  1574. ReplaceControlName(ref dic, "MFM11Flow", "MFM11.SetParameters");
  1575. ReplaceControlName(ref dic, "MFM12Flow", "MFM12.SetParameters");
  1576. ReplaceControlName(ref dic, "MFM13Flow", "MFM13.SetParameters");
  1577. ReplaceControlName(ref dic, "MFM16Flow", "MFM16.SetParameters");
  1578. ReplaceControlName(ref dic, "ConditionCheck", "SetConditionCheck");
  1579. ReplaceControlName(ref dic, "Command", "SetCommand");
  1580. if (dic.ContainsKey("AlarmConditionTable"))
  1581. ReplaceControlName(ref dic, "AlarmConditionTable", "SetAlarmConditionTable");
  1582. //ReplaceControlName(ref dic, "Heater2", "ZoneU.SetParameters");
  1583. //ReplaceControlName(ref dic, "Heater4", "ZoneCU.SetParameters");
  1584. //ReplaceControlName(ref dic, "Heater6", "ZoneC.SetParameters");
  1585. //ReplaceControlName(ref dic, "Heater8", "ZoneCL.SetParameters");
  1586. //ReplaceControlName(ref dic, "Heater10", "ZoneL.SetParameters");
  1587. var controlMode = dic["Temperature.ControlMode"];
  1588. var correct = dic["Temperature.Correct"];
  1589. var PID = dic["Temperature.PID"];
  1590. //AddParameter(ref dic, "ZoneU.SetParameters", controlMode, correct, PID);
  1591. //AddParameter(ref dic, "ZoneCU.SetParameters", controlMode, correct, PID);
  1592. //AddParameter(ref dic, "ZoneC.SetParameters", controlMode, correct, PID);
  1593. //AddParameter(ref dic, "ZoneCL.SetParameters", controlMode, correct, PID);
  1594. //AddParameter(ref dic, "ZoneL.SetParameters", controlMode, correct, PID);
  1595. AddParameter(ref dic, "HeaterU.SetParameters", new string[9] { "HeaterU.ZoneName", "HeaterU.Set", "HeaterU.SetUnit", "HeaterU.Ramprate", "HeaterU.RamprateUnit", "HeaterU.Check", "HeaterU.High", "HeaterU.Low", "HeaterU.Unit" });
  1596. AddParameterValue(ref dic, "HeaterU.SetParameters", new string[8] { controlMode, correct, PID, "", "", "", dic["ValveAV91"], dic["BWR"] });
  1597. AddParameter(ref dic, "HeaterCU.SetParameters", new string[9] { "HeaterCU.ZoneName", "HeaterCU.Set", "HeaterCU.SetUnit", "HeaterCU.Ramprate", "HeaterCU.RamprateUnit", "HeaterCU.Check", "HeaterCU.High", "HeaterCU.Low", "HeaterCU.Unit" });
  1598. AddParameterValue(ref dic, "HeaterCU.SetParameters", new string[8] { controlMode, correct, PID, "", "", "", dic["ValveAV91"], dic["BWR"] });
  1599. AddParameter(ref dic, "HeaterC.SetParameters", new string[9] { "HeaterC.ZoneName", "HeaterC.Set", "HeaterC.SetUnit", "HeaterC.Ramprate", "HeaterC.RamprateUnit", "HeaterC.Check", "HeaterC.High", "HeaterC.Low", "HeaterC.Unit" });
  1600. AddParameterValue(ref dic, "HeaterC.SetParameters", new string[8] { controlMode, correct, PID, "", "", "", dic["ValveAV91"], dic["BWR"] });
  1601. AddParameter(ref dic, "HeaterCL.SetParameters", new string[9] { "HeaterCL.ZoneName", "HeaterCL.Set", "HeaterCL.SetUnit", "HeaterCL.Ramprate", "HeaterCL.RamprateUnit", "HeaterCL.Check", "HeaterCL.High", "HeaterCL.Low", "HeaterCL.Unit" });
  1602. AddParameterValue(ref dic, "HeaterCL.SetParameters", new string[8] { controlMode, correct, PID, "", "", "", dic["ValveAV91"], dic["BWR"] });
  1603. AddParameter(ref dic, "HeaterL.SetParameters", new string[9] { "HeaterL.ZoneName", "HeaterL.Set", "HeaterL.SetUnit", "HeaterL.Ramprate", "HeaterL.RamprateUnit", "HeaterL.Check", "HeaterL.High", "HeaterL.Low", "HeaterL.Unit" });
  1604. AddParameterValue(ref dic, "HeaterL.SetParameters", new string[8] { controlMode, correct, PID, "", "", "", dic["ValveAV91"], dic["BWR"] });
  1605. AddParameter(ref dic, "APC.SetParameters", new string[10] { "Press.Command", "Press.PID", "Press.Set", "Press.SlowVacSet", "Press.ValveAngleSet", "Press.IsWait", "Press.LowWait", "Press.HighWait", "Press.WaitUnit", "Press.WaitPress" });//APC
  1606. AddParameterValue(ref dic, "APC.SetParameters", new string[2] { "", dic["ValveAV71"] });//APC
  1607. AddParameter(ref dic, "SetBoatMotion", new string[5] { "Loader.Command", "Loader.Speed1", "Loader.Speed2", "Loader.Speed3", "Loader.RPM" });//Boat
  1608. List<string> auxCommands = new List<string>();
  1609. for (int k = 1; k < 200; k++)
  1610. {
  1611. if (!dic.ContainsKey($"AUX.{k}.Set"))
  1612. continue;
  1613. auxCommands.Add($"{k},{dic[$"AUX.{k}.Set"]},{dic[$"AUX.{k}.Check"]},{dic[$"AUX.{k}.High"]},{dic[$"AUX.{k}.Low"]},{dic[$"AUX.{k}.CheckUnit"]}");
  1614. dic.Remove($"AUX.{k}.Set");
  1615. dic.Remove($"AUX.{k}.Check");
  1616. dic.Remove($"AUX.{k}.High");
  1617. dic.Remove($"AUX.{k}.Low");
  1618. dic.Remove($"AUX.{k}.CheckUnit");
  1619. }
  1620. dic.Add("AUX.SetParameters", string.Join(";", auxCommands));
  1621. //ReplaceControlName(ref dic, "RFSwitch", "RfPower.SetParameters");
  1622. //AddParameter(ref dic, "RfPower.SetParameters", dic["RFSetpoint"], dic["ForwardPowerAlarmWatchTable"], dic["PrAlarmWatchTable"], dic["PIAlarmWatchTable"]);
  1623. //ReplaceControlName(ref dic, "C1Setpoint", "RfMatch.SetParameters");
  1624. //AddParameter(ref dic, "RfMatch.SetParameters", dic["C2Setpoint"], dic["C1AlarmWatchTable"], dic["C2AlarmWatchTable"], dic["VppAlarmWatchTable"]);
  1625. AddValveParameter(ref dic, "SetValves", new string[159] {
  1626. "ValveAV1",
  1627. "ValveAV2",
  1628. "ValveAV3",
  1629. "ValveAV4",
  1630. "ValveAV5",
  1631. "ValveAV6",
  1632. "ValveAV7",
  1633. "ValveAV8",
  1634. "ValveAV9",
  1635. "ValveAV10",
  1636. "ValveAV11",
  1637. "ValveAV12",
  1638. "ValveAV13",
  1639. "ValveAV14",
  1640. "ValveAV15",
  1641. "ValveAV16",
  1642. "ValveAV17",
  1643. "ValveAV18",
  1644. "ValveAV19",
  1645. "ValveAV20",
  1646. "ValveAV21",
  1647. "ValveAV22",
  1648. "ValveAV23",
  1649. "ValveAV24",
  1650. "ValveAV25",
  1651. "ValveAV26",
  1652. "ValveAV27",
  1653. "ValveAV28",
  1654. "ValveAV29",
  1655. "ValveAV30",
  1656. "ValveAV31",
  1657. "ValveAV32",
  1658. "ValveAV33",
  1659. "ValveAV34",
  1660. "ValveAV35",
  1661. "ValveAV36",
  1662. "ValveAV37",
  1663. "ValveAV38",
  1664. "ValveAV39",
  1665. "ValveAV40",
  1666. "ValveAV41",
  1667. "ValveAV42",
  1668. "ValveAV43",
  1669. "ValveAV44",
  1670. "ValveAV45",
  1671. "ValveAV46",
  1672. "ValveAV47",
  1673. "ValveAV48",
  1674. "ValveAV49",
  1675. "ValveAV50",
  1676. "ValveAV51",
  1677. "ValveAV52",
  1678. "ValveAV53",
  1679. "ValveAV54",
  1680. "ValveAV55",
  1681. "ValveAV56",
  1682. "ValveAV57",
  1683. "ValveAV58",
  1684. "ValveAV59",
  1685. "ValveAV60",
  1686. "ValveAV61",
  1687. "ValveAV62",
  1688. "ValveAV63",
  1689. "ValveAV64",
  1690. "ValveAV65",
  1691. "ValveAV66",
  1692. "ValveAV67",
  1693. "ValveAV68",
  1694. "ValveAV69",
  1695. "ValveAV70",
  1696. "ValveAV71",
  1697. "ValveAV72",
  1698. "ValveAV73",
  1699. "ValveAV74",
  1700. "ValveAV75",
  1701. "ValveAV76",
  1702. "ValveAV77",
  1703. "ValveAV78",
  1704. "ValveAV79",
  1705. "ValveAV80",
  1706. "ValveAV81",
  1707. "ValveAV82",
  1708. "ValveAV83",
  1709. "ValveAV84",
  1710. "ValveAV85",
  1711. "ValveAV86",
  1712. "ValveAV87",
  1713. "ValveAV88",
  1714. "ValveAV89",
  1715. "ValveAV90",
  1716. "ValveAV91",
  1717. "ValveAV92",
  1718. "ValveAV93",
  1719. "ValveAV94",
  1720. "ValveAV95",
  1721. "ValveAV96",
  1722. "ValveAV97",
  1723. "ValveAV98",
  1724. "ValveAV99",
  1725. "ValveAV100",
  1726. "ValveAV101",
  1727. "ValveAV102",
  1728. "ValveAV103",
  1729. "ValveAV104",
  1730. "ValveAV105",
  1731. "ValveAV106",
  1732. "ValveAV107",
  1733. "ValveAV108",
  1734. "ValveAV109",
  1735. "ValveAV110",
  1736. "ValveAV111",
  1737. "ValveAV112",
  1738. "ValveAV113",
  1739. "ValveAV114",
  1740. "ValveAV115",
  1741. "ValveAV116",
  1742. "ValveAV117",
  1743. "ValveAV118",
  1744. "ValveAV119",
  1745. "ValveAV120",
  1746. "ValveAV121",
  1747. "ValveAV122",
  1748. "ValveAV123",
  1749. "ValveAV124",
  1750. "ValveAV125",
  1751. "ValveAV126",
  1752. "ValveAV127",
  1753. "ValveAV128",
  1754. "ValveAV129",
  1755. "ValveAV130",
  1756. "ValveAV131",
  1757. "ValveAV132",
  1758. "ValveAV133",
  1759. "ValveAV134",
  1760. "ValveAV135",
  1761. "ValveAV136",
  1762. "DPR",
  1763. "AGV",
  1764. "AGV2",
  1765. "MBP",
  1766. "MBP1",
  1767. "MBP2",
  1768. "DP",
  1769. "BWR",
  1770. "F2Cln",
  1771. "HFCln",
  1772. "CEXH",
  1773. "DEPO",
  1774. "HTR1",
  1775. "HTR2",
  1776. "HTR3",
  1777. "DP1",
  1778. "DP2",
  1779. "HMNT",
  1780. "CMNT",
  1781. "HREF",
  1782. "CREF",
  1783. "HZERO",
  1784. "CZERO"
  1785. });
  1786. //dic.Remove("SetValves");
  1787. //dic.Remove("HeaterU.SetParameters");
  1788. //dic.Remove("HeaterCU.SetParameters");
  1789. //dic.Remove("HeaterC.SetParameters");
  1790. //dic.Remove("HeaterCL.SetParameters");
  1791. //dic.Remove("HeaterL.SetParameters");
  1792. //dic.Remove("MFC1.SetParameters");
  1793. //dic.Remove("MFC2.SetParameters");
  1794. //dic.Remove("MFC3.SetParameters");
  1795. //dic.Remove("MFC4.SetParameters");
  1796. //dic.Remove("MFC5.SetParameters");
  1797. //dic.Remove("MFC6.SetParameters");
  1798. //dic.Remove("MFC7.SetParameters");
  1799. //dic.Remove("MFC8.SetParameters");
  1800. //dic.Remove("MFC9.SetParameters");
  1801. //dic.Remove("MFC10.SetParameters");
  1802. //dic.Remove("MFC11.SetParameters");
  1803. //dic.Remove("MFC12.SetParameters");
  1804. //ReplaceControlNameForValve(ref dic, "ValveAV1");
  1805. //ReplaceControlNameForValve(ref dic, "ValveAV2");
  1806. //ReplaceControlNameForValve(ref dic, "ValveAV3");
  1807. //ReplaceControlNameForValve(ref dic, "ValveAV4");
  1808. //ReplaceControlNameForValve(ref dic, "ValveAV5");
  1809. //ReplaceControlNameForValve(ref dic, "ValveAV6");
  1810. //ReplaceControlNameForValve(ref dic, "ValveAV7");
  1811. //ReplaceControlNameForValve(ref dic, "ValveAV8");
  1812. //ReplaceControlNameForValve(ref dic, "ValveAV9");
  1813. //ReplaceControlNameForValve(ref dic, "ValveAV10");
  1814. //ReplaceControlNameForValve(ref dic, "ValveAV11");
  1815. //ReplaceControlNameForValve(ref dic, "ValveAV12");
  1816. //ReplaceControlNameForValve(ref dic, "ValveAV13");
  1817. //ReplaceControlNameForValve(ref dic, "ValveAV14");
  1818. //ReplaceControlNameForValve(ref dic, "ValveAV15");
  1819. //ReplaceControlNameForValve(ref dic, "ValveAV16");
  1820. //ReplaceControlNameForValve(ref dic, "ValveAV17");
  1821. //ReplaceControlNameForValve(ref dic, "ValveAV18");
  1822. //ReplaceControlNameForValve(ref dic, "ValveAV19");
  1823. //ReplaceControlNameForValve(ref dic, "ValveAV20");
  1824. //ReplaceControlNameForValve(ref dic, "ValveAV21");
  1825. //ReplaceControlNameForValve(ref dic, "ValveAV22");
  1826. //ReplaceControlNameForValve(ref dic, "ValveAV23");
  1827. //ReplaceControlNameForValve(ref dic, "ValveAV24");
  1828. //ReplaceControlNameForValve(ref dic, "ValveAV25");
  1829. //ReplaceControlNameForValve(ref dic, "ValveAV26");
  1830. //ReplaceControlNameForValve(ref dic, "ValveAV27");
  1831. //ReplaceControlNameForValve(ref dic, "ValveAV28");
  1832. //ReplaceControlNameForValve(ref dic, "ValveAV29");
  1833. //ReplaceControlNameForValve(ref dic, "ValveAV30");
  1834. //ReplaceControlNameForValve(ref dic, "ValveAV31");
  1835. //ReplaceControlNameForValve(ref dic, "ValveAV32");
  1836. //ReplaceControlNameForValve(ref dic, "ValveAV33");
  1837. //ReplaceControlNameForValve(ref dic, "ValveAV34");
  1838. //ReplaceControlNameForValve(ref dic, "ValveAV35");
  1839. //ReplaceControlNameForValve(ref dic, "ValveAV36");
  1840. //ReplaceControlNameForValve(ref dic, "ValveAV37");
  1841. //ReplaceControlNameForValve(ref dic, "ValveAV38");
  1842. //ReplaceControlNameForValve(ref dic, "ValveAV39");
  1843. //ReplaceControlNameForValve(ref dic, "ValveAV52");
  1844. ////ReplaceControlNameForValve(ref dic, "ValveAV54");
  1845. ////ReplaceControlNameForValve(ref dic, "ValveAV56");
  1846. ////ReplaceControlNameForValve(ref dic, "ValveAV57");
  1847. ////ReplaceControlNameForValve(ref dic, "ValveAV58");
  1848. ////ReplaceControlNameForValve(ref dic, "ValveAV59");
  1849. //ReplaceControlNameForValve(ref dic, "ValveAV60");
  1850. ////ReplaceControlNameForValve(ref dic, "ValveAV65");
  1851. ////ReplaceControlNameForValve(ref dic, "ValveAV66");
  1852. ////ReplaceControlNameForValve(ref dic, "ValveAV68");
  1853. //ReplaceControlNameForValve(ref dic, "ValveAV71");
  1854. //ReplaceControlNameForValve(ref dic, "ValveAV72");
  1855. //ReplaceControlNameForValve(ref dic, "ValveAV73");
  1856. //ReplaceControlNameForValve(ref dic, "ValveAV74");
  1857. //ReplaceControlNameForValve(ref dic, "ValveAV75");
  1858. //ReplaceControlNameForValve(ref dic, "ValveAV77");
  1859. //ReplaceControlNameForValve(ref dic, "ValveAV81");
  1860. //ReplaceControlNameForValve(ref dic, "ValveAV82");
  1861. //ReplaceControlNameForValve(ref dic, "ValveAV83");
  1862. //ReplaceControlNameForValve(ref dic, "ValveAV91");
  1863. dic.Remove("StepNo");
  1864. dic.Remove("Name");
  1865. dic.Remove("EndBy");
  1866. dic.Remove("Time");
  1867. dic.Remove("ZAxisPosition");
  1868. dic.Remove("ZAxisSpeed");
  1869. dic.Remove("RotatePosition");
  1870. dic.Remove("RotateSpeed");
  1871. dic.Remove("RotateDirection");
  1872. dic.Remove("Heater1");
  1873. dic.Remove("Heater2");
  1874. dic.Remove("Heater3");
  1875. dic.Remove("Heater4");
  1876. dic.Remove("Heater5");
  1877. dic.Remove("ValveAV54");
  1878. dic.Remove("ValveAV56");
  1879. dic.Remove("ValveAV57");
  1880. dic.Remove("ValveAV58");
  1881. dic.Remove("ValveAV59");
  1882. dic.Remove("ValveAV65");
  1883. dic.Remove("ValveAV66");
  1884. dic.Remove("ValveAV68");
  1885. dic.Remove("ExternalOn");
  1886. dic.Remove("ExternalOff");
  1887. dic.Remove("ExternalSensor");
  1888. dic.Remove("TempStabilize");
  1889. dic.Remove("FinishAutoProfile");
  1890. dic.Remove("ReachTempWait");
  1891. dic.Remove("ReachTemp");
  1892. dic.Remove("TempUpper");
  1893. dic.Remove("TempLower");
  1894. dic.Remove("ReachPressureWait");
  1895. dic.Remove("ReachPressure");
  1896. dic.Remove("PressureUpper");
  1897. dic.Remove("PressureLower");
  1898. dic.Remove("PressureStabilize");
  1899. dic.Remove("External.Out1");
  1900. dic.Remove("External.Out2");
  1901. dic.Remove("External.Out3");
  1902. dic.Remove("External.Out4");
  1903. dic.Remove("External.Out5");
  1904. dic.Remove("External.Out6");
  1905. dic.Remove("RFSwitch");
  1906. dic.Remove("RFSetpoint");
  1907. dic.Remove("ForwardPowerAlarmWatchTable");
  1908. dic.Remove("PrAlarmWatchTable");
  1909. dic.Remove("PIAlarmWatchTable");
  1910. dic.Remove("C1Setpoint");
  1911. dic.Remove("C2Setpoint");
  1912. dic.Remove("C1AlarmWatchTable");
  1913. dic.Remove("C2AlarmWatchTable");
  1914. dic.Remove("VppAlarmWatchTable");
  1915. dic.Remove("VdcAlarmWatchTable");
  1916. dic.Remove("AbortRecipeTableIndex");
  1917. dic.Remove("Temperature.ControlMode");
  1918. dic.Remove("Temperature.Correct");
  1919. dic.Remove("Temperature.PID");
  1920. dic.Remove("Temperature.Profile");
  1921. dic.Remove("Temperature.Stabilize");
  1922. dic.Remove("Temperature.TempReadyCond");
  1923. dic.Remove("FilmThickFormula");
  1924. dic.Remove("FilmThickCoefficientA");
  1925. dic.Remove("FilmThickCoefficientB");
  1926. dic.Remove("APC.SetPressure");
  1927. dic.Remove("PressureSettingVG");
  1928. dic.Remove("PressureSonserValue");
  1929. dic.Remove("PressureValveAngle");
  1930. dic.Remove("PressureAlarmTableNo");
  1931. dic.Remove("EventSetting");
  1932. dic.Remove("AlarmTableIndex");
  1933. dic.Remove("AlarmDetails.1");
  1934. dic.Remove("AlarmAction.1");
  1935. dic.Remove("AlarmDetails.2");
  1936. dic.Remove("AlarmAction.2");
  1937. dic.Remove("AlarmDetails.3");
  1938. dic.Remove("AlarmAction.3");
  1939. dic.Remove("AlarmDetails.4");
  1940. dic.Remove("AlarmAction.4");
  1941. dic.Remove("AlarmDetails.5");
  1942. dic.Remove("AlarmAction.5");
  1943. dic.Remove("AlarmDetails.6");
  1944. dic.Remove("AlarmAction.6");
  1945. dic.Remove("AlarmDetails.7");
  1946. dic.Remove("AlarmAction.7");
  1947. dic.Remove("AlarmDetails.8");
  1948. dic.Remove("AlarmAction.8");
  1949. dic.Remove("AlarmDetails.9");
  1950. dic.Remove("AlarmAction.9");
  1951. dic.Remove("AlarmDetails.10");
  1952. dic.Remove("AlarmAction.10");
  1953. //List<string> mfcCheckInstall = new List<string>()
  1954. //{
  1955. // "MfcN1",
  1956. // "MfcN2",
  1957. // "MfcN3",
  1958. // "MfcH1",
  1959. // "MfcJ1",
  1960. // "MfcXN1",
  1961. //};
  1962. //foreach(var mfc in mfcCheckInstall)
  1963. //{
  1964. // if (!SC.GetValue<bool>($"PM1.MFC.{mfc}.IsMFCInstalled"))
  1965. // dic.Remove($"{mfc}.SetParameters");
  1966. //}
  1967. foreach (string key in dic.Keys)
  1968. recipeStep.RecipeCommands.Add(key, dic[key]);
  1969. }
  1970. for (int i = 0; i < recipeData.Count; i++)
  1971. {
  1972. if (recipeData[i].IsJumpStep)
  1973. {
  1974. bool findJumpStep = false;
  1975. for (int j = 0; j < recipeData.Count; j++)
  1976. {
  1977. if (recipeData[j].StepName == recipeData[i].JumpStepName)
  1978. {
  1979. recipeData[i].JumpStepNo = j;
  1980. findJumpStep = true;
  1981. break;
  1982. }
  1983. }
  1984. if (!findJumpStep)
  1985. {
  1986. reason = $"Recipe file does not contains jump step {recipeData[i].JumpStepName}";
  1987. return false;
  1988. }
  1989. }
  1990. }
  1991. #endregion
  1992. recipeDatas.Add(x + 1, recipeData);
  1993. }
  1994. }
  1995. catch (Exception ex)
  1996. {
  1997. LOG.Write(ex);
  1998. reason = $"Recipe file content not valid, {recipeFile}, {ex.Message}";
  1999. return false;
  2000. }
  2001. return true;
  2002. }
  2003. }
  2004. }