PMAux.cs 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.DataCenter;
  3. using Aitex.Core.RT.Device;
  4. using Aitex.Core.RT.Event;
  5. using Aitex.Core.RT.IOCore;
  6. using Aitex.Core.RT.Log;
  7. using Aitex.Core.RT.OperationCenter;
  8. using Aitex.Core.RT.SCCore;
  9. using Aitex.Core.Util;
  10. using Aitex.Core.Utilities;
  11. using FurnaceRT.Devices;
  12. using FurnaceRT.Extraction;
  13. using MECF.Framework.Common.DataCenter;
  14. using MECF.Framework.Common.Equipment;
  15. using MECF.Framework.Common.Event;
  16. using MECF.Framework.Common.OperationCenter;
  17. using System;
  18. using System.Collections;
  19. using System.Collections.Generic;
  20. using System.Diagnostics;
  21. using System.Linq;
  22. using System.Security.Cryptography;
  23. namespace FurnaceRT.Equipments.PMs
  24. {
  25. public partial class PMModule
  26. {
  27. private Dictionary<int, List<AITAuxData>> _auxDic;
  28. private int _currentAuxTable = 1;
  29. private string _currentTableName = "";
  30. private bool _isF2ClnOn;
  31. private bool _isHFClnOn;
  32. private bool _isDEPOOn;
  33. private bool _isHTR1Enable;
  34. private bool _isHTR2Enable;
  35. private bool _isHTR3Enable;
  36. private bool _isCEXHOn;
  37. private bool _isDPROn;
  38. private string _toolType;
  39. private Dictionary<string, float> _auxScaleDic;
  40. private Stopwatch _initTimer = new Stopwatch();
  41. private List<string> _auxNames = new List<string>();
  42. public bool IsHTR1Enable
  43. {
  44. get
  45. {
  46. return _isHTR1Enable;
  47. }
  48. set
  49. {
  50. _isHTR1Enable = value;
  51. SC.SetItemValue($"PM1.IsHTR1Enable", value);
  52. TrigHTR1SWON?.SetTrigger(value, out _);
  53. //_HTR1Group.ForEach(x => x.SetEnable(value));
  54. }
  55. }
  56. public bool IsHTR2Enable
  57. {
  58. get
  59. {
  60. return _isHTR2Enable;
  61. }
  62. set
  63. {
  64. _isHTR2Enable = value;
  65. SC.SetItemValue($"PM1.IsHTR2Enable", value);
  66. TrigHTR2SWON?.SetTrigger(value, out _);
  67. _HTR2Group.ForEach(x => x.SetEnable(value));
  68. }
  69. }
  70. public bool IsHTR3Enable
  71. {
  72. get
  73. {
  74. return _isHTR3Enable;
  75. }
  76. set
  77. {
  78. _isHTR3Enable = value;
  79. SC.SetItemValue($"PM1.IsHTR3Enable", value);
  80. TrigHTR3SWON?.SetTrigger(value, out _);
  81. TrigForlineHeaterOn.SetTrigger(value, out _);
  82. }
  83. }
  84. public bool IsF2ClnOn
  85. {
  86. get
  87. {
  88. return _isF2ClnOn;
  89. }
  90. set
  91. {
  92. _isF2ClnOn = value;
  93. SC.SetItemValue($"PM1.IsF2ClnOn", value);
  94. TrigF2CleanSwitchB?.SetTrigger(value, out _);
  95. }
  96. }
  97. public bool IsHFClnOn
  98. {
  99. get
  100. {
  101. return _isHFClnOn;
  102. }
  103. set
  104. {
  105. _isHFClnOn = value;
  106. SC.SetItemValue($"PM1.IsHFClnOn", value);
  107. TrigHFCleanSwitchB?.SetTrigger(value, out _);
  108. }
  109. }
  110. public bool IsDEPOOn
  111. {
  112. get
  113. {
  114. return _isDEPOOn;
  115. }
  116. set
  117. {
  118. _isDEPOOn = value;
  119. SC.SetItemValue($"PM1.IsDEPOOn", value);
  120. TrigDEPOSW?.SetTrigger(value, out _);
  121. }
  122. }
  123. public bool IsCREFOn
  124. {
  125. get
  126. {
  127. return _isCREFOn;
  128. }
  129. set
  130. {
  131. _isCREFOn = value;
  132. TrigCREFON?.SetTrigger(value, out _);
  133. }
  134. }
  135. private bool _isCREFOn;
  136. public bool IsSIREFOn
  137. {
  138. get
  139. {
  140. return _isSIREFOn;
  141. }
  142. set
  143. {
  144. _isSIREFOn = value;
  145. TrigSIREFON?.SetTrigger(value, out _);
  146. }
  147. }
  148. private bool _isSIREFOn;
  149. public bool IsCEXHOn
  150. {
  151. get
  152. {
  153. return _isCEXHOn;
  154. }
  155. set
  156. {
  157. _isCEXHOn = value;
  158. TrigCEXHON?.SetTrigger(value, out _);
  159. }
  160. }
  161. public bool IsDPROn
  162. {
  163. get
  164. {
  165. return _isDPROn;
  166. }
  167. set
  168. {
  169. _isDPROn = value;
  170. SC.SetItemValue($"PM1.IsDPROn", value);
  171. TrigDPRON?.SetTrigger(value, out _);
  172. }
  173. }
  174. private void InitAUX()
  175. {
  176. if (SC.ContainsItem("Minics.EnableMinics") && SC.GetValue<bool>("Minics.EnableMinics"))
  177. {
  178. if (SC.ContainsItem("Minics.PreConfigName"))
  179. _currentTableName = SC.GetStringValue("Minics.PreConfigName");
  180. DATA.Subscribe($"{Module}.CurrentAuxData", () => GetMinicsCurrentAuxData());
  181. return;
  182. }
  183. GetAuxNames();
  184. IsHFClnOn = SC.GetValue<bool>($"PM1.IsHFClnOn");
  185. IsF2ClnOn = SC.GetValue<bool>($"PM1.IsF2ClnOn");
  186. _toolType = (string)SC.GetStringValue("System.SetUp.ToolType");
  187. _auxDic = new Dictionary<int, List<AITAuxData>>();
  188. for (int table = 1; table < 5; table++)
  189. {
  190. List<AITAuxData> auxs = new List<AITAuxData>();
  191. for (int index = 1; index < 256; index++)
  192. {
  193. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.Set"))
  194. continue;
  195. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningLowLimit"))
  196. continue;
  197. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningHighLimit"))
  198. continue;
  199. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmLowLimit"))
  200. continue;
  201. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmHighLimit"))
  202. continue;
  203. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.{index}.Display"))
  204. continue;
  205. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.{index}.AI"))
  206. continue;
  207. if (!SC.ContainsItem($"PM1.RecipeEditParameter.AUX.{index}.Unit"))
  208. continue;
  209. AITAuxData aux = new AITAuxData()
  210. {
  211. DisplayName = SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Display"),
  212. DisplayNameConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.{index}.Display"),
  213. IOName = SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI"),
  214. AO = IO.AO[$"{Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO")}"],
  215. AISV = IO.AI[$"{Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI").Replace("PV", "SV")}"],
  216. AOAlarmHigher = IO.AO[$"{Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO").Replace("SV", "AlarmHigher")}"],
  217. AOAlarmLower = IO.AO[$"{Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO").Replace("SV", "AlarmLower")}"],
  218. Unit = SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Unit"),
  219. UnitConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.{index}.Unit"),
  220. SetPoint = (float)SC.GetValue<double>($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.Set"),
  221. SetPointConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.Set"),
  222. WarningLowLimit = (float)SC.GetValue<double>($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningLowLimit"),
  223. WarningLowLimitConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningLowLimit"),
  224. WarningHighLimit = (float)SC.GetValue<double>($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningHighLimit"),
  225. WarningHighLimitConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.WarningHighLimit"),
  226. AlarmLowLimit = (float)SC.GetValue<double>($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmLowLimit"),
  227. AlarmLowLimitConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmLowLimit"),
  228. AlarmHighLimit = (float)SC.GetValue<double>($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmHighLimit"),
  229. AlarmHighLimitConfig = SC.GetConfigItem($"PM1.RecipeEditParameter.AUX.Table{table}.{index}.AlarmHighLimit"),
  230. WarningLowLimitTrig = new R_TRIG(),
  231. WarningHighLimitTrig = new R_TRIG(),
  232. AlarmLowLimitTrig = new R_TRIG(),
  233. AlarmHighLimitTrig = new R_TRIG(),
  234. Index = index,
  235. WarningLowLimitEvent = SubscribeAlarm(new AlarmEventItem()
  236. {
  237. EventEnum = $"{Name}.WarningLowLimit.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI")}",
  238. Description = $"{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Display")} Low Limit",
  239. Solution = "No information available. Press[Clear] to delete alarm message.",
  240. Explaination = "No information available.",
  241. AutoRecovery = false,
  242. Level = EventLevel.Warning,
  243. Action = EventAction.Clear,
  244. Category = "TubeAlarm",
  245. }, () => { ResetAUXTrig(); return true; }),
  246. WarningHighLimitEvent = SubscribeAlarm(new AlarmEventItem()
  247. {
  248. EventEnum = $"{Name}.WarningHighLimit.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI")}",
  249. Description = $"{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Display")} High Limit",
  250. Solution = "No information available. Press[Clear] to delete alarm message.",
  251. Explaination = "No information available.",
  252. AutoRecovery = false,
  253. Level = EventLevel.Warning,
  254. Action = EventAction.Clear,
  255. Category = "TubeAlarm",
  256. }, () => { ResetAUXTrig(); return true; }),
  257. AlarmLowLimitEvent = SubscribeAlarm(new AlarmEventItem()
  258. {
  259. EventEnum = $"{Name}.AlarmLowLimit.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI")}",
  260. Description = $"{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Display")} Low Limit",
  261. Solution = "No information available. Press[Clear] to delete alarm message.",
  262. Explaination = "No information available.",
  263. AutoRecovery = false,
  264. Level = EventLevel.Alarm,
  265. Action = EventAction.Clear,
  266. Category = "TubeAlarm",
  267. }, () => { ResetAUXTrig(); return true; }),
  268. AlarmHighLimitEvent = SubscribeAlarm(new AlarmEventItem()
  269. {
  270. EventEnum = $"{Name}.AlarmHighLimit.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI")}",
  271. Description = $"{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.Display")} High Limit",
  272. Solution = "No information available. Press[Clear] to delete alarm message.",
  273. Explaination = "No information available.",
  274. AutoRecovery = false,
  275. Level = EventLevel.Alarm,
  276. Action = EventAction.Clear,
  277. Category = "TubeAlarm",
  278. }, () => { ResetAUXTrig(); return true; }),
  279. };
  280. if (SC.ContainsItem($"PM1.RecipeEditParameter.AUX.{index}.IsInstalled") && SC.GetValue<bool>($"PM1.RecipeEditParameter.AUX.{index}.IsInstalled") == false)
  281. {
  282. aux.IsInstalled = false;
  283. }
  284. else
  285. {
  286. aux.IsInstalled = true;
  287. }
  288. if (SC.GetStringValue("System.SetUp.ToolType") == "ELK")
  289. {
  290. if (index <= 96)
  291. {
  292. if (aux.DisplayName.Length > 5)
  293. aux.Module = aux.DisplayName.Substring(0, 5).Replace("Unit", "GasLine");
  294. aux.IOName = $"{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AI")}";
  295. aux.AO = IO.AO[$"{aux.Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO")}"];
  296. aux.AISV = null;
  297. aux.AOAlarmHigher = IO.AO[$"{aux.Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO").Replace("SV", "AlarmHigherPoint")}"];
  298. aux.AOAlarmLower = IO.AO[$"{aux.Module}.{SC.GetStringValue($"PM1.RecipeEditParameter.AUX.{index}.AO").Replace("SV", "AlarmLowerPoint")}"];
  299. }
  300. }
  301. else
  302. {
  303. //需求: aux只需要gasline heater,Foline heater的alarm 不需要报警(序号68之后都是Foline heater)
  304. if (index >= 68)
  305. {
  306. aux.WarningLowLimitEvent = new AlarmEventItem();
  307. aux.WarningHighLimitEvent = new AlarmEventItem();
  308. aux.AlarmLowLimitEvent = new AlarmEventItem();
  309. aux.AlarmHighLimitEvent = new AlarmEventItem();
  310. }
  311. }
  312. auxs.Add(aux);
  313. }
  314. if (auxs.Any())
  315. _auxDic.Add(table, auxs);
  316. }
  317. _auxScaleDic = new Dictionary<string, float>()
  318. {
  319. { "AI_ForelineHeater1TempPV", 1},
  320. { "AI_ForelineHeater2TempPV", 1},
  321. { "AI_ForelineHeater3TempPV", 1},
  322. { "AI_ForelineHeater4TempPV", 1},
  323. { "AI_ForelineHeater5TempPV", 1},
  324. { "AI_ForelineHeater6TempPV", 1},
  325. { "AI_ForelineHeater7TempPV", 1},
  326. { "AI_ForelineHeater8TempPV", 1},
  327. { "AI_ForelineHeater9TempPV", 1},
  328. { "AI_ForelineHeater10TempPV", 1},
  329. { "AI_ForelineHeater11TempPV", 1},
  330. { "AI_ForelineHeater12TempPV", 1},
  331. { "AI_CapHeaterTempPV", 1},
  332. { "AI_APCExternalHeaterTempPV", 1},
  333. { "AI_APCRingHeaterTempPV", 1},
  334. { "AI_GaslineHeater1PV", 1},
  335. { "AI_GaslineHeater2PV", 1},
  336. { "AI_GaslineHeater3PV", 1},
  337. { "AI_GaslineHeater4PV", 1},
  338. { "AI_GaslineHeater5PV", 1},
  339. { "AI_GaslineHeater6PV", 1},
  340. { "AI_GaslineHeater7PV", 1},
  341. { "AI_GaslineHeater8PV", 1},
  342. { "AI_GaslineHeater9PV", 1},
  343. { "AI_GaslineHeater10PV", 1},
  344. { "AI_GaslineHeater11PV", 1},
  345. { "AI_GaslineHeater12PV", 1},
  346. { "AI_GaslineHeater13PV", 1},
  347. { "AI_GaslineHeater14PV", 1},
  348. { "AI_GaslineHeater15PV", 1},
  349. { "AI_GaslineHeater16PV", 1},
  350. { "AI_GaslineHeater17PV", 1},
  351. { "AI_GaslineHeater18PV", 1},
  352. { "AI_GaslineHeater19PV", 1},
  353. { "AI_GaslineHeater20PV", 1},
  354. { "AI_GaslineHeater21PV", 1},
  355. { "AI_GaslineHeater22PV", 1},
  356. { "AI_GaslineHeater23PV", 1},
  357. { "AI_GaslineHeater24PV", 1},
  358. { "AI_GaslineHeater25PV", 1},
  359. { "AI_GaslineHeater26PV", 1},
  360. { "AI_GaslineHeater27PV", 1},
  361. { "AI_GaslineHeater28PV", 1},
  362. { "AI_GaslineHeater29PV", 1},
  363. { "AI_GaslineHeater30PV", 1},
  364. { "AI_GaslineHeater31PV", 1},
  365. { "AI_GaslineHeater32PV", 1},
  366. { "AI_GaslineHeater33PV", 1},
  367. { "AI_GaslineHeater34PV", 1},
  368. { "AI_GaslineHeater35PV", 1},
  369. { "AI_GaslineHeater36PV", 1},
  370. { "AI_GaslineHeater37PV", 1},
  371. { "AI_GaslineHeater38PV", 1},
  372. { "AI_GaslineHeater39PV", 1},
  373. { "AI_GaslineHeater40PV", 1},
  374. { "AI_GaslineHeater44PV", 1},
  375. { "AI_GaslineHeater45PV", 1},
  376. { "AI_GaslineHeater49PV", 1},
  377. { "AI_GaslineHeater50PV", 1},
  378. { "AI_GaslineHeater51PV", 1},
  379. { "AI_GaslineHeater52PV", 1},
  380. { "AI_GaslineHeater53PV", 1},
  381. { "AI_GaslineHeater54PV", 1},
  382. { "AI_GaslineHeater55PV", 1},
  383. { "AI_GaslineHeater56PV", 1},
  384. { "AI_GaslineHeater57PV", 1},
  385. { "AI_GaslineHeater58PV", 1},
  386. { "AI_GaslineHeater59PV", 1},
  387. { "AI_GaslineHeater60PV", 1},
  388. { "AI_GaslineHeater61PV", 1},
  389. { "AI_GaslineHeater62PV", 1},
  390. { "AI_GaslineHeater63PV", 1},
  391. { "AI_GaslineHeater64PV", 1},
  392. };
  393. DATA.Subscribe($"{Module}.CurrentAuxData", () => GetCurrentAuxData());
  394. _initTimer.Start();
  395. }
  396. private void GetAuxNames()
  397. {
  398. for (int i = 52; i < 63; i++)
  399. {
  400. _auxNames.Add($"Gasline heater{i} PV");
  401. }
  402. }
  403. private void ResetAUXTrig()
  404. {
  405. if (_auxDic != null && _auxDic.ContainsKey(_currentAuxTable))
  406. {
  407. foreach (var item in _auxDic[_currentAuxTable])
  408. {
  409. if (item == null)
  410. continue;
  411. item.WarningLowLimitTrig.RST = true;
  412. item.WarningHighLimitTrig.RST = true;
  413. item.AlarmLowLimitTrig.RST = true;
  414. item.AlarmHighLimitTrig.RST = true;
  415. }
  416. }
  417. }
  418. private List<AITAuxData> GetMinicsCurrentAuxData()
  419. {
  420. var datas = new List<AITAuxData>();
  421. if (SC.ContainsItem("Minics.EnableMinics") && SC.GetValue<bool>("Minics.EnableMinics"))
  422. {
  423. if (Singleton<MinicsManager>.Instance.MincsHeaterBandsDict == null || Singleton<MinicsManager>.Instance.MincsHeaterBandsDict.Count == 0)
  424. return datas;
  425. int index = 1;
  426. foreach (var item in Singleton<MinicsManager>.Instance.MincsHeaterBandsDict)
  427. {
  428. var data = new AITAuxData();
  429. data.IOName = item.Value.DisplayName;
  430. data.Feedback = item.Value.TempFeedback;
  431. data.PowerValue = item.Value.Power;
  432. data.Index = index;
  433. index++;
  434. datas.Add(data);
  435. }
  436. }
  437. return datas;
  438. }
  439. private List<AITAuxData> GetCurrentAuxData()
  440. {
  441. var datas = new List<AITAuxData>();
  442. if (_auxDic != null && _auxDic.ContainsKey(_currentAuxTable))
  443. {
  444. foreach (var item in _auxDic[_currentAuxTable])
  445. {
  446. if (item == null)
  447. continue;
  448. var data = new AITAuxData();
  449. data.AlarmHighLimit = item.AlarmHighLimit;
  450. data.AlarmLowLimit = item.AlarmLowLimit;
  451. data.WarningLowLimit = item.WarningLowLimit;
  452. data.WarningHighLimit = item.WarningHighLimit;
  453. data.SetPoint = item.AISV != null ? item.AISV.FloatValue : item.SetPoint;
  454. data.DisplayName = item.DisplayName;
  455. data.IOName = item.IOName;
  456. data.Unit = item.Unit;
  457. data.Feedback = item.Feedback;
  458. data.Index = item.Index;
  459. data.IsInstalled = item.IsInstalled;
  460. datas.Add(data);
  461. }
  462. }
  463. return datas;
  464. }
  465. private void MonitorFfu()
  466. {
  467. _isCEXHOn = _fFUs != null && !_fFUs.Any(x => !x.IsEnable);
  468. }
  469. private void MonitorAux()
  470. {
  471. if (SC.ContainsItem("Minics.EnableMinics") && SC.GetValue<bool>("Minics.EnableMinics"))
  472. {
  473. if (_initTimer.IsRunning && _initTimer.ElapsedMilliseconds < 3000)
  474. {
  475. _initTimer.Stop();
  476. return;
  477. }
  478. if (IsHTR1Enable != SC.GetValue<bool>("PM1.IsHTR1Enable"))
  479. IsHTR1Enable = SC.GetValue<bool>("PM1.IsHTR1Enable");
  480. if (IsHTR2Enable != SC.GetValue<bool>("PM1.IsHTR2Enable"))
  481. IsHTR2Enable = SC.GetValue<bool>("PM1.IsHTR2Enable");
  482. if (IsHTR3Enable != SC.GetValue<bool>("PM1.IsHTR3Enable"))
  483. IsHTR3Enable = SC.GetValue<bool>("PM1.IsHTR3Enable");
  484. if (IsDEPOOn != SC.GetValue<bool>("PM1.IsDEPOOn"))
  485. IsDEPOOn = SC.GetValue<bool>("PM1.IsDEPOOn");
  486. //配方1 Prod 模式
  487. //Htr 1 on + Htr 2 on + Htr3 on + Dep on. (F2 cln Off & HF cln Off)
  488. //配方2 F2 Cln 模式
  489. //Htr 1 on + htr 2 off + htr 3 off + F2 Cln On(Dep off &HF cln Off)
  490. //配方3 HF Cln 模式(此台设备暂无HF 配置)
  491. //Htr 1 on + htr 2 on + htr 3 off + HF Cln On(Dep off &F2 cln Off)
  492. if (IsHTR1Enable && !IsHTR2Enable && !IsHTR3Enable && IsF2ClnOn)
  493. {
  494. var config2Name = SC.ContainsItem("Minics.Config2") ? SC.GetStringValue("Minics.Config2") : "";
  495. if (_currentTableName != config2Name)
  496. {
  497. Singleton<MinicsManager>.Instance.SelectMinicsConfig(config2Name);
  498. _currentTableName = config2Name;
  499. LOG.Write($"minics table switch to config2 {config2Name}");
  500. SC.SetItemValue($"Minics.PreConfigName", _currentTableName);
  501. return;
  502. }
  503. }
  504. else if (IsHTR1Enable && IsHTR2Enable && !IsHTR3Enable && IsHFClnOn)
  505. {
  506. var config3Name = SC.ContainsItem("Minics.Config3") ? SC.GetStringValue("Minics.Config3") : "";
  507. if (_currentTableName != config3Name)
  508. {
  509. Singleton<MinicsManager>.Instance.SelectMinicsConfig(config3Name);
  510. _currentTableName = config3Name;
  511. LOG.Write($"minics table switch to config3 {config3Name}");
  512. SC.SetItemValue($"Minics.PreConfigName", _currentTableName);
  513. return;
  514. }
  515. }
  516. else if (IsHTR1Enable && IsHTR2Enable && IsHTR3Enable && IsDEPOOn)
  517. {
  518. var config1Name = SC.ContainsItem("Minics.Config1") ? SC.GetStringValue("Minics.Config1") : "";
  519. if (_currentTableName != config1Name)
  520. {
  521. Singleton<MinicsManager>.Instance.SelectMinicsConfig(config1Name);
  522. _currentTableName = config1Name;
  523. LOG.Write($"minics table switch to config1 {config1Name}");
  524. SC.SetItemValue($"Minics.PreConfigName", _currentTableName);
  525. return;
  526. }
  527. }
  528. //else if (!IsHTR1Enable) {
  529. // var config1Name = SC.ContainsItem("Minics.Config1") ? SC.GetStringValue("Minics.Config1") : "";
  530. // if (_currentTableName != config1Name)
  531. // {
  532. // Singleton<MinicsManager>.Instance.SelectMinicsConfig(config1Name);
  533. // _currentTableName = config1Name;
  534. // LOG.Write($"minics table switch to config1 {config1Name}");
  535. // }
  536. //}
  537. //else if (!IsHTR2Enable)
  538. //{
  539. // var config1Name = SC.ContainsItem("Minics.Config1") ? SC.GetStringValue("Minics.Config1") : "";
  540. // if (_currentTableName != config1Name)
  541. // {
  542. // Singleton<MinicsManager>.Instance.SelectMinicsConfig(config1Name);
  543. // _currentTableName = config1Name;
  544. // LOG.Write($"minics table switch to config1 {config1Name}");
  545. // }
  546. //}
  547. //else if (!IsHTR3Enable)
  548. //{
  549. // var config1Name = SC.ContainsItem("Minics.Config1") ? SC.GetStringValue("Minics.Config1") : "";
  550. // if (_currentTableName != config1Name)
  551. // {
  552. // Singleton<MinicsManager>.Instance.SelectMinicsConfig(config1Name);
  553. // _currentTableName = config1Name;
  554. // LOG.Write($"minics table switch to config1 {config1Name}");
  555. // }
  556. //}
  557. return;
  558. }
  559. #region old
  560. if (_initTimer.IsRunning && _initTimer.ElapsedMilliseconds < 3000)
  561. {
  562. _initTimer.Stop();
  563. return;
  564. }
  565. if (IsHTR1Enable != SC.GetValue<bool>("PM1.IsHTR1Enable"))
  566. IsHTR1Enable = SC.GetValue<bool>("PM1.IsHTR1Enable");
  567. if (IsHTR2Enable != SC.GetValue<bool>("PM1.IsHTR2Enable"))
  568. IsHTR2Enable = SC.GetValue<bool>("PM1.IsHTR2Enable");
  569. if (IsHTR3Enable != SC.GetValue<bool>("PM1.IsHTR3Enable"))
  570. IsHTR3Enable = SC.GetValue<bool>("PM1.IsHTR3Enable");
  571. if (IsHTR1Enable && IsHTR2Enable && IsF2ClnOn)
  572. {
  573. if (_currentAuxTable != 2)
  574. {
  575. _currentAuxTable = 2;
  576. LOG.Write($"AUC table switch to {_currentAuxTable}");
  577. }
  578. }
  579. else if (IsHTR1Enable && IsHTR2Enable && IsHFClnOn)
  580. {
  581. if (_currentAuxTable != 3)
  582. {
  583. _currentAuxTable = 3;
  584. LOG.Write($"AUC table switch to {_currentAuxTable}");
  585. }
  586. }
  587. else if (IsHTR1Enable)
  588. {
  589. if (_currentAuxTable != 1)
  590. {
  591. _currentAuxTable = 1;
  592. LOG.Write($"AUC table switch to {_currentAuxTable}");
  593. }
  594. }
  595. if (TrigGasLine1PowerOn != null && IsHTR1Enable != TrigGasLine1PowerOn.Value)
  596. {
  597. TrigGasLine1PowerOn?.SetTrigger(IsHTR1Enable, out _);
  598. }
  599. if (TrigGasLine2PowerOn != null && IsHTR1Enable != TrigGasLine2PowerOn.Value)
  600. {
  601. TrigGasLine2PowerOn?.SetTrigger(IsHTR1Enable, out _);
  602. }
  603. if (TrigGasLine3PowerOn != null && IsHTR1Enable != TrigGasLine3PowerOn.Value)
  604. {
  605. TrigGasLine3PowerOn?.SetTrigger(IsHTR1Enable, out _);
  606. }
  607. if (TrigGasLine4PowerOn != null)
  608. {
  609. if (IsF2ClnOn || IsHTR2Enable)
  610. {
  611. TrigGasLine4PowerOn?.SetTrigger(true, out _);
  612. }
  613. else
  614. {
  615. TrigGasLine4PowerOn?.SetTrigger(false, out _);
  616. }
  617. }
  618. if (TrigGasLine6PowerOn != null)
  619. {
  620. if (IsF2ClnOn || IsHTR2Enable)
  621. {
  622. TrigGasLine6PowerOn?.SetTrigger(true, out _);
  623. }
  624. else
  625. {
  626. TrigGasLine6PowerOn?.SetTrigger(false, out _);
  627. }
  628. }
  629. if (TrigGasLine7PowerOn != null)
  630. {
  631. if (IsF2ClnOn || IsHTR2Enable)
  632. {
  633. TrigGasLine7PowerOn?.SetTrigger(true, out _);
  634. }
  635. else
  636. {
  637. TrigGasLine7PowerOn?.SetTrigger(false, out _);
  638. }
  639. }
  640. if (IsHTR1Enable || IsHTR2Enable || IsHTR3Enable)
  641. {
  642. if (IsHTR1Enable && IsF2ClnOn)
  643. {
  644. if (TrigGasLine1RecipeChange != null && TrigGasLine1RecipeChange.AOValue != 2)
  645. TrigGasLine1RecipeChange.SetAOTrigger(2, out _);
  646. if (TrigGasLine2RecipeChange != null && TrigGasLine2RecipeChange.AOValue != 2)
  647. TrigGasLine2RecipeChange.SetAOTrigger(2, out _);
  648. if (TrigGasLine3RecipeChange != null && TrigGasLine3RecipeChange.AOValue != 2)
  649. TrigGasLine3RecipeChange.SetAOTrigger(2, out _);
  650. if (TrigGasLine4RecipeChange != null && TrigGasLine4RecipeChange.AOValue != 2)
  651. TrigGasLine4RecipeChange.SetAOTrigger(2, out _);
  652. if (TrigGasLine6RecipeChange != null && TrigGasLine6RecipeChange.AOValue != 2)
  653. TrigGasLine6RecipeChange.SetAOTrigger(2, out _);
  654. if (TrigGasLine7RecipeChange != null && TrigGasLine7RecipeChange.AOValue != 2)
  655. TrigGasLine7RecipeChange.SetAOTrigger(2, out _);
  656. }
  657. else
  658. {
  659. if (TrigGasLine1RecipeChange != null && TrigGasLine1RecipeChange.AOValue != 1)
  660. {
  661. TrigGasLine1RecipeChange?.SetAOTrigger(1, out _);
  662. }
  663. if (TrigGasLine2RecipeChange != null && TrigGasLine2RecipeChange.AOValue != 1)
  664. {
  665. TrigGasLine2RecipeChange?.SetAOTrigger(1, out _);
  666. }
  667. if (TrigGasLine3RecipeChange != null && TrigGasLine3RecipeChange.AOValue != 1)
  668. {
  669. TrigGasLine3RecipeChange?.SetAOTrigger(1, out _);
  670. }
  671. if (TrigGasLine4RecipeChange != null && TrigGasLine4RecipeChange.AOValue != 1)
  672. {
  673. TrigGasLine4RecipeChange?.SetAOTrigger(1, out _);
  674. }
  675. if (TrigGasLine6RecipeChange != null && TrigGasLine6RecipeChange.AOValue != 1)
  676. {
  677. TrigGasLine6RecipeChange?.SetAOTrigger(1, out _);
  678. }
  679. if (TrigGasLine7RecipeChange != null && TrigGasLine7RecipeChange.AOValue != 1)
  680. {
  681. TrigGasLine7RecipeChange?.SetAOTrigger(1, out _);
  682. }
  683. }
  684. }
  685. else
  686. {
  687. if (TrigGasLine1RecipeChange != null && TrigGasLine1RecipeChange.AOValue != 0)
  688. TrigGasLine1RecipeChange.SetAOTrigger(0, out _);
  689. if (TrigGasLine2RecipeChange != null && TrigGasLine2RecipeChange.AOValue != 0)
  690. TrigGasLine2RecipeChange.SetAOTrigger(0, out _);
  691. if (TrigGasLine3RecipeChange != null && TrigGasLine3RecipeChange.AOValue != 0)
  692. TrigGasLine3RecipeChange.SetAOTrigger(0, out _);
  693. if (TrigGasLine4RecipeChange != null && TrigGasLine4RecipeChange.AOValue != 0)
  694. TrigGasLine4RecipeChange.SetAOTrigger(0, out _);
  695. if (TrigGasLine6RecipeChange != null && TrigGasLine6RecipeChange.AOValue != 0)
  696. TrigGasLine6RecipeChange.SetAOTrigger(0, out _);
  697. if (TrigGasLine7RecipeChange != null && TrigGasLine7RecipeChange.AOValue != 0)
  698. TrigGasLine7RecipeChange.SetAOTrigger(0, out _);
  699. }
  700. if (IsHTR1Enable && IsHTR2Enable && IsF2ClnOn)
  701. {
  702. if (TrigGasLineHeaterMemoryChange != null && TrigGasLineHeaterMemoryChange.AOValue != 2)
  703. TrigGasLineHeaterMemoryChange.SetAOTrigger(2, out _);
  704. }
  705. else if (IsHTR1Enable || IsHTR2Enable)
  706. {
  707. if (IsHTR1Enable)
  708. {
  709. if (TrigGasLineHeaterMemoryChange != null && TrigGasLineHeaterMemoryChange.AOValue != 1)
  710. {
  711. TrigGasLineHeaterMemoryChange.SetAOTrigger(1, out _);
  712. }
  713. }
  714. else
  715. {
  716. if (TrigGasLineHeaterMemoryChange != null && TrigGasLineHeaterMemoryChange.AOValue != 0)
  717. {
  718. TrigGasLineHeaterMemoryChange.SetAOTrigger(0, out _);
  719. }
  720. }
  721. }
  722. else
  723. {
  724. if (TrigGasLineHeaterMemoryChange != null && TrigGasLineHeaterMemoryChange.AOValue != 0)
  725. TrigGasLineHeaterMemoryChange.SetAOTrigger(0, out _);
  726. }
  727. if (_auxDic != null && _auxDic.ContainsKey(_currentAuxTable))
  728. {
  729. if (IsProcessing)
  730. {
  731. foreach (var item in _auxDic[_currentAuxTable])
  732. {
  733. if (item == null)
  734. continue;
  735. item.AlarmHighLimit = (float)item.AlarmHighLimitConfig.DoubleValue;
  736. item.AlarmLowLimit = (float)item.AlarmLowLimitConfig.DoubleValue;
  737. item.WarningHighLimit = (float)item.WarningHighLimitConfig.DoubleValue;
  738. item.WarningLowLimit = (float)item.WarningLowLimitConfig.DoubleValue;
  739. //item.SetPoint = (float)item.SetPointConfig.DoubleValue;
  740. item.Unit = item.UnitConfig.StringValue;
  741. item.DisplayName = item.DisplayNameConfig.StringValue;
  742. if (SC.GetStringValue("System.SetUp.ToolType") == "ELK" && item.Index <= 96)
  743. {
  744. item.Feedback = IO.AI[$"{item.Module}.{item.IOName}"] != null ? IO.AI[$"{item.Module}.{item.IOName}"].FloatValue : 0;
  745. item.SetPoint = item.AO != null ? item.AO.FloatValue : 0;
  746. }
  747. else
  748. {
  749. item.Feedback = IO.AI[$"{Module}.{item.IOName}"] != null ? IO.AI[$"{Module}.{item.IOName}"].FloatValue : 0;
  750. }
  751. if (item.AO != null && Math.Abs(item.AO.FloatValue - item.SetPoint) > 0.0001 && item.SetPoint > 0 && (item.IOName.Contains("ForelineHeater") || item.IOName.Contains("SiSource") || item.IOName.Contains("CSource")))//只有ForelineHeater需要写,GasLine heater之类不写
  752. {
  753. item.AO.FloatValue = item.SetPoint;//process 过程中,不写ao
  754. }
  755. if (item.AOAlarmHigher != null && Math.Abs(item.AOAlarmHigher.FloatValue - item.AlarmHighLimit) > 0.0001)
  756. {
  757. item.AOAlarmHigher.FloatValue = item.AlarmHighLimit;//process 过程中,不写ao
  758. }
  759. if (item.AOAlarmLower != null && Math.Abs(item.AOAlarmLower.FloatValue - item.AlarmLowLimit) > 0.0001)
  760. {
  761. item.AOAlarmLower.FloatValue = item.AlarmLowLimit;//process 过程中,不写ao
  762. }
  763. }
  764. }
  765. else
  766. {
  767. foreach (var item in _auxDic[_currentAuxTable])
  768. {
  769. if (item == null)
  770. continue;
  771. item.WarningHighLimit = (float)item.WarningHighLimitConfig.DoubleValue;
  772. item.WarningLowLimit = (float)item.WarningLowLimitConfig.DoubleValue;
  773. item.SetPoint = (float)item.SetPointConfig.DoubleValue;
  774. item.Unit = item.UnitConfig.StringValue;
  775. item.DisplayName = item.DisplayNameConfig.StringValue;
  776. item.AlarmHighLimit = (float)item.AlarmHighLimitConfig.DoubleValue;
  777. item.AlarmLowLimit = (float)item.AlarmLowLimitConfig.DoubleValue;
  778. if (SC.GetStringValue("System.SetUp.ToolType") == "ELK" && item.Index <= 96)
  779. {
  780. item.Feedback = IO.AI[$"{item.Module}.{item.IOName}"] != null ? IO.AI[$"{item.Module}.{item.IOName}"].FloatValue : 0;
  781. item.SetPoint = item.AO != null ? item.AO.FloatValue : 0;
  782. }
  783. else
  784. {
  785. item.Feedback = IO.AI[$"{Module}.{item.IOName}"] != null ? IO.AI[$"{Module}.{item.IOName}"].FloatValue : 0;
  786. }
  787. //item.Feedback = IO.AI[$"{Module}.{item.IOName}"] != null ? IO.AI[$"{Module}.{item.IOName}"].FloatValue : 0;
  788. if (item.AO != null && Math.Abs(item.AO.FloatValue - (float)item.SetPointConfig.DoubleValue) > 0.0001 && item.SetPoint > 0 && (item.IOName.Contains("ForelineHeater") || item.IOName.Contains("SiSource") || item.IOName.Contains("CSource")))//只有ForelineHeater需要写,GasLine heater之类不写 ELK除了GasLine需要设置
  789. {
  790. item.AO.FloatValue = (float)item.SetPointConfig.DoubleValue;
  791. }
  792. if (item.AOAlarmHigher != null && Math.Abs(item.AOAlarmHigher.FloatValue - item.AlarmHighLimit) > 0.0001)
  793. {
  794. item.AOAlarmHigher.FloatValue = item.AlarmHighLimit;
  795. }
  796. if (item.AOAlarmLower != null && Math.Abs(item.AOAlarmLower.FloatValue - item.AlarmLowLimit) > 0.0001)
  797. {
  798. item.AOAlarmLower.FloatValue = item.AlarmLowLimit;
  799. }
  800. if (item.Feedback > item.SetPoint + item.AlarmHighLimit)
  801. {
  802. //注释AUX报警
  803. //item.AlarmHighLimitTrig.CLK = true;
  804. //if (item.AlarmHighLimitTrig.Q)
  805. //{
  806. // var reason = $"{item.DisplayName} feedback={item.Feedback}, alarm high limit is {item.SetPoint + item.AlarmHighLimit}";
  807. // item.AlarmHighLimitEvent.Set(reason);
  808. //}
  809. }
  810. else if (item.Feedback < item.SetPoint - item.AlarmLowLimit)
  811. {
  812. //注释AUX报警
  813. //item.AlarmLowLimitTrig.CLK = true;
  814. //if (item.AlarmLowLimitTrig.Q)
  815. //{
  816. // var reason = $"{item.DisplayName} feedback={item.Feedback}, alarm low limit is {item.SetPoint - item.AlarmLowLimit}";
  817. // item.AlarmLowLimitEvent.Set(reason);
  818. //}
  819. }
  820. else if (item.Feedback > item.SetPoint + item.WarningHighLimit)
  821. {
  822. //注释AUX报警
  823. //item.WarningHighLimitTrig.CLK = true;
  824. //if (item.WarningHighLimitTrig.Q)
  825. //{
  826. // var reason = $"{item.DisplayName} feedback={item.Feedback}, warning high limit is {item.SetPoint + item.WarningHighLimit}";
  827. // item.AlarmHighLimitEvent.Set(reason);
  828. //}
  829. }
  830. else if (item.Feedback < item.SetPoint - item.WarningLowLimit)
  831. {
  832. //注释AUX报警
  833. //item.WarningLowLimitTrig.CLK = true;
  834. //if (item.WarningLowLimitTrig.Q)
  835. //{
  836. // var reason = $"{item.DisplayName} feedback={item.Feedback}, warning low limit is {item.SetPoint - item.WarningLowLimit}";
  837. // item.AlarmLowLimitEvent.Set(reason);
  838. //}
  839. }
  840. }
  841. }
  842. }
  843. #endregion
  844. }
  845. private void SetAUXParameters(object[] param)
  846. {
  847. if (SC.ContainsItem("Minics.EnableMinics") && SC.GetValue<bool>("Minics.EnableMinics"))
  848. return;
  849. if (param != null && param.Length > 0 &&
  850. _auxDic != null && _auxDic.ContainsKey(_currentAuxTable))
  851. {
  852. var array = param[0].ToString().Split(';');
  853. if (array != null && array.Length > 0)
  854. {
  855. for (int i = 0; i < array.Length; i++)
  856. {
  857. var auxItems = array[i].Split(',');
  858. if (auxItems == null || auxItems.Length < 6)
  859. continue;
  860. int.TryParse(auxItems[0], out int index);
  861. float.TryParse(auxItems[1], out float set);
  862. bool.TryParse(auxItems[2], out bool isCheck);
  863. float.TryParse(auxItems[3], out float checkHigh);
  864. float.TryParse(auxItems[4], out float checkLow);
  865. var checkUnit = auxItems[5];
  866. var aux = _auxDic[_currentAuxTable].SingleOrDefault(x => x.Index == index);
  867. if (aux != null)
  868. {
  869. if (checkUnit.ToLower() == "%sv")
  870. {
  871. checkHigh = set * checkHigh;
  872. checkLow = set * checkLow;
  873. }
  874. else if (checkUnit.ToLower() == "%fs")
  875. {
  876. checkHigh = (_auxScaleDic.ContainsKey(aux.IOName) ? _auxScaleDic[aux.IOName] : 1) * checkHigh;
  877. checkLow = (_auxScaleDic.ContainsKey(aux.IOName) ? _auxScaleDic[aux.IOName] : 1) * checkLow;
  878. }
  879. if (set > 0)
  880. aux.SetPoint = set;
  881. aux.IsWait = isCheck;
  882. aux.WaitHigh = checkHigh;
  883. aux.WaitLow = checkLow;
  884. }
  885. }
  886. }
  887. }
  888. }
  889. public bool CheckAUXWaitCondition(out string reason)
  890. {
  891. reason = "";
  892. bool allFinish = true;
  893. if (_auxDic != null && _auxDic.ContainsKey(_currentAuxTable))
  894. {
  895. foreach (var item in _auxDic[_currentAuxTable])
  896. {
  897. if (item == null)
  898. continue;
  899. if (!item.IsWait || item.WaitHigh == 0 || item.WaitLow == 0)
  900. continue;
  901. if (item.Feedback < item.SetPoint - item.WaitLow || item.Feedback > item.SetPoint + item.WaitHigh)
  902. {
  903. allFinish = false;
  904. reason += $"{item.DisplayName} feedback={item.Feedback}, limit is ({item.SetPoint - item.WaitLow}, {item.SetPoint + item.WaitHigh}) \n";
  905. }
  906. }
  907. }
  908. return allFinish;
  909. }
  910. private void SetVFD(bool setValue)
  911. {
  912. if (!SC.ContainsItem("PM1.RHC.RHCVDFFrequency"))
  913. return;
  914. if (setValue)
  915. {
  916. TrigVFD?.SetAOTrigger((float)SC.GetValue<double>("PM1.RHC.RHCVDFFrequency"), out _);
  917. }
  918. else
  919. {
  920. TrigVFD?.SetAOTrigger(0, out _);
  921. }
  922. }
  923. private bool SetBWREnable(object[] param)
  924. {
  925. if (param != null && param.Length > 0)
  926. {
  927. bool.TryParse(param[0].ToString(), out bool isEnable);
  928. SetVFD(isEnable);
  929. }
  930. return true;
  931. }
  932. private bool SetF2ClnEnable(object[] param)
  933. {
  934. if (param != null && param.Length > 0)
  935. {
  936. bool.TryParse(param[0].ToString(), out bool isEnable);
  937. IsF2ClnOn = isEnable;
  938. }
  939. return true;
  940. }
  941. private bool SetHFClnEnable(object[] param)
  942. {
  943. if (param != null && param.Length > 0)
  944. {
  945. bool.TryParse(param[0].ToString(), out bool isEnable);
  946. IsHFClnOn = isEnable;
  947. }
  948. return true;
  949. }
  950. private bool SetDEPOEnable(object[] param)
  951. {
  952. if (param != null && param.Length > 0)
  953. {
  954. bool.TryParse(param[0].ToString(), out bool isEnable);
  955. IsDEPOOn = isEnable;
  956. }
  957. return true;
  958. }
  959. //private bool SetCREFEnable(object[] param)
  960. //{
  961. // if (param != null && param.Length > 0)
  962. // {
  963. // bool.TryParse(param[0].ToString(), out bool isEnable);
  964. // IsCREFOn = isEnable;
  965. // }
  966. // return true;
  967. //}
  968. //private bool SetSIREFEnable(object[] param)
  969. //{
  970. // if (param != null && param.Length > 0)
  971. // {
  972. // bool.TryParse(param[0].ToString(), out bool isEnable);
  973. // IsSIREFOn = isEnable;
  974. // }
  975. // return true;
  976. //}
  977. }
  978. }