StandardHotReservoirsViewModel.cs 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
  1. using MECF.Framework.Common.CommonData.Metal;
  2. using MECF.Framework.Common.CommonData.Reservoir;
  3. using MECF.Framework.Common.DataCenter;
  4. using MECF.Framework.Common.OperationCenter;
  5. using MECF.Framework.Common.Persistent.Reservoirs;
  6. using MECF.Framework.Common.RecipeCenter;
  7. using MECF.Framework.Common.Utilities;
  8. using CyberX8_Core;
  9. using CyberX8_MainPages.PMs;
  10. using Prism.Commands;
  11. using Prism.Mvvm;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Collections.ObjectModel;
  15. using System.Windows.Input;
  16. using System.Windows.Threading;
  17. using MECF.Framework.Common.CommonData.TemperatureControl;
  18. using MECF.Framework.Common.CommonData.PowerSupplier;
  19. using MECF.Framework.Common.Device.Safety;
  20. using MECF.Framework.Common.ProcessCell;
  21. using Aitex.Core.RT.Log;
  22. namespace CyberX8_MainPages.ViewModels
  23. {
  24. public class StandardHotReservoirsViewModel : BindableBase
  25. {
  26. #region 常量
  27. private const string RESERVOIRS_DATA = "ReservoirsData";
  28. private const string RESERVOIRS = "reservoirs";
  29. private const string PERSISTENT_VALUE = "PersistentValue";
  30. private const string METALDEVICEDATA = "MetalDeviceData";
  31. private const string RESERVOIRDEVICEDATA = "ReservoirDeviceData";
  32. private const string REPLEN_PERSISTENT_VALUE = "ReplenPersistentValue";
  33. #endregion
  34. #region 内部变量
  35. #region system
  36. /// <summary>
  37. /// rt查询key
  38. /// </summary>
  39. private List<string> _rtDataKeys = new List<string>();
  40. /// <summary>
  41. /// 时钟
  42. /// </summary>
  43. DispatcherTimer _timer;
  44. /// <summary>
  45. /// rt查询数据
  46. /// </summary>
  47. private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
  48. #endregion
  49. #region Common
  50. /// <summary>
  51. /// 是否为调速泵
  52. /// </summary>
  53. private bool _isRegulatePump;
  54. /// <summary>
  55. /// 泵速
  56. /// </summary>
  57. private int _pumpSpeed;
  58. /// <summary>
  59. /// 是否配备CMM
  60. /// </summary>
  61. private bool _isCMMConfig;
  62. private double _avgLevel;
  63. /// <summary>
  64. /// Module
  65. /// </summary>
  66. private string _module;
  67. /// <summary>
  68. /// Operation Mode
  69. /// </summary>
  70. private string _operatingMode;
  71. /// <summary>
  72. /// 状态
  73. /// </summary>
  74. private string _state;
  75. /// <summary>
  76. /// Reservoirs Persistent数据
  77. /// </summary>
  78. private ReservoirsPersistentValue _reservoirsPersistent;
  79. /// <summary>
  80. /// Reservoir数据
  81. /// </summary>
  82. private StandardHotReservoirData _reservoirData;
  83. /// <summary>
  84. /// Metal数据集合
  85. /// </summary>
  86. private ObservableCollection<StandardHotMetalDeviceData> _metalDataCollection = new ObservableCollection<StandardHotMetalDeviceData>();
  87. /// <summary>
  88. /// CellModuleName集合
  89. /// </summary>
  90. private ObservableCollection<string> _cellModuleNameCollection = new ObservableCollection<string>();
  91. /// <summary>
  92. /// CellModuleSignal集合
  93. /// </summary>
  94. private ObservableCollection<bool> _cellModuleSignalPump = new ObservableCollection<bool>();
  95. /// <summary>
  96. /// Cells数量
  97. /// </summary>
  98. private int _cellsCount;
  99. /// <summary>
  100. /// 手动注水时长(秒)
  101. /// </summary>
  102. private int _manualFillSeconds;
  103. /// <summary>
  104. /// 是否正在手动注水
  105. /// </summary>
  106. private bool _isManualReplen;
  107. /// <summary>
  108. /// DIValveMaxOnTime
  109. /// </summary>
  110. private double _diValveMaxOnTime;
  111. /// <summary>
  112. /// 是否超过PH值下限
  113. /// </summary>
  114. private bool _isPHLowLimit;
  115. /// <summary>
  116. /// 是否超过PH值下限
  117. /// </summary>
  118. private bool _isPHHighLimit;
  119. /// <summary>
  120. /// TemperatureControl Module Name
  121. /// </summary>
  122. private TemperatureControllerData _temperatureControlData;
  123. /// <summary>
  124. /// PowerSupply Module Name
  125. /// </summary>
  126. private PowerSupplierData _cmmPowerSupplierData;
  127. /// <summary>
  128. /// 是否超过HighLevel
  129. /// </summary>
  130. private bool _isHighLevel;
  131. /// <summary>
  132. /// 是否超过LowLevel
  133. /// </summary>
  134. private bool _isLowLevel;
  135. /// <summary>
  136. /// 是否触发highsafety
  137. /// </summary>
  138. private bool _isHighSafety;
  139. /// <summary>
  140. /// HED Flow
  141. /// </summary>
  142. private bool _hedFlowIsOn;
  143. /// <summary>
  144. /// DiReplen是否报错
  145. /// </summary>
  146. private bool _isDiReplenFault;
  147. /// <summary>
  148. /// Safety Data
  149. /// </summary>
  150. private SafetyData _safetyData;
  151. /// <summary>
  152. /// 页面功能启用
  153. /// </summary>
  154. private bool _isEnabled;
  155. /// <summary>
  156. /// AutoMode页面功能启用
  157. /// </summary>
  158. private bool _isAutoEnabled;
  159. /// <summary>
  160. /// DosingSystem是否启用
  161. /// </summary>
  162. private bool _isDosingSystemEnabled;
  163. /// <summary>
  164. /// TC Enable状态
  165. /// </summary>
  166. private string _tcEnableStatus;
  167. /// <summary>
  168. /// 是否error状态
  169. /// </summary>
  170. private bool _isError;
  171. #endregion
  172. #region Recipe
  173. /// <summary>
  174. /// 当前的recipe
  175. /// </summary>
  176. private ResRecipe _currentRecipe;
  177. /// <summary>
  178. /// Recipe Mode
  179. /// </summary>
  180. private string _recipeMode;
  181. /// <summary>
  182. /// Selected Recipe Node
  183. /// </summary>
  184. private RecipeNode _selectedRecipeNode;
  185. /// <summary>
  186. /// Recipe Type
  187. /// </summary>
  188. private string _recipeType;
  189. /// <summary>
  190. /// Recipe Manager
  191. /// </summary>
  192. private UiRecipeManager _uiRecipeManager = new UiRecipeManager();
  193. #endregion
  194. #region CMM
  195. /// <summary>
  196. /// Flow High 状态(Warning:黄色,Error:红色)
  197. /// </summary>
  198. private string _flowHighStatus = "";
  199. /// <summary>
  200. /// Flow Low 状态(Warning:黄色,Error:红色)
  201. /// </summary>
  202. private string _flowLowStatus = "";
  203. /// <summary>
  204. /// PowerSupplier High电流状态
  205. /// </summary>
  206. private string _currentHighStatus = "";
  207. /// <summary>
  208. /// PowerSupplier Low电流状态
  209. /// </summary>
  210. private string _currentLowStatus = "";
  211. /// <summary>
  212. /// 是否低于最小电压
  213. /// </summary>
  214. private bool _isBelowMinVoltage = false;
  215. /// <summary>
  216. /// CMM Anode AHrs
  217. /// </summary>
  218. private double _reservoirCMMAnodeAHrs;
  219. /// <summary>
  220. /// CMM Cathode AHrs
  221. /// </summary>
  222. private double _reservoirCMMCathodeAHrs;
  223. /// <summary>
  224. /// CMM Anode用电量
  225. /// </summary>
  226. private double _cmmAnodeUsage;
  227. /// <summary>
  228. /// CMM Cathode用电量
  229. /// </summary>
  230. private double _cmmCathodeUsage;
  231. /// <summary>
  232. /// CMM Flow High Warning
  233. /// </summary>
  234. private double _reservoirCMMFlowHighWarning;
  235. /// <summary>
  236. /// CMM Flow High Error
  237. /// </summary>
  238. private double _reservoirCMMFlowHighError;
  239. /// <summary>
  240. /// CMM Flow Low Warning
  241. /// </summary>
  242. private double _reservoirCMMFlowLowWarning;
  243. /// <summary>
  244. /// CMM Flow Low Error
  245. /// </summary>
  246. private double _reservoirCMMFlowLowError;
  247. /// <summary>
  248. /// CMM Anode LifeTime AHrs
  249. /// </summary>
  250. private double _reservoirCMMAnodeLifeTimeAHrs;
  251. /// <summary>
  252. /// CMM Cathode LifeTime AHrs
  253. /// </summary>
  254. private double _reservoirCMMCathodeLifeTimeAHrs;
  255. /// <summary>
  256. /// HighLevel
  257. /// </summary>
  258. private double _reservoirHighLevel;
  259. /// <summary>
  260. /// LowLevel
  261. /// </summary>
  262. private double _reservoirLowLevel;
  263. /// <summary>
  264. /// CMM电量limit
  265. /// </summary>
  266. private double _cmmAnodeTotalAmpHoursWarningLimit;
  267. private double _cmmAnodeTotalAmpHoursFaultLimit;
  268. private double _cmmCathodeTotalAmpHoursWarningLimit;
  269. private double _cmmCathodeTotalAmpHoursFaultLimit;
  270. /// <summary>
  271. /// CMM电量报警灯
  272. /// </summary>
  273. private bool _isCMMAnodeTotalAmpHoursWarning;
  274. private bool _isCMMAnodeTotalAmpHoursFault;
  275. private bool _isCMMCathodeTotalAmpHoursWarning;
  276. private bool _isCMMCathodeTotalAmpHoursFault;
  277. #endregion
  278. #endregion
  279. #region 属性
  280. #region Common
  281. public double AvgLevel
  282. {
  283. get { return _avgLevel; }
  284. set { SetProperty(ref _avgLevel, value); }
  285. }
  286. /// <summary>
  287. /// Module
  288. /// </summary>
  289. public string Module
  290. {
  291. get { return _module; }
  292. set { SetProperty(ref _module, value); }
  293. }
  294. /// <summary>
  295. /// Operation Mode
  296. /// </summary>
  297. public string OperatingMode
  298. {
  299. get { return _operatingMode; }
  300. set { SetProperty(ref _operatingMode, value); }
  301. }
  302. /// <summary>
  303. /// 状态
  304. /// </summary>
  305. public string State
  306. {
  307. get { return _state; }
  308. set { SetProperty(ref _state, value); }
  309. }
  310. /// <summary>
  311. /// Reservoirs Persistent数据
  312. /// </summary>
  313. public ReservoirsPersistentValue ReservoirsPersistent
  314. {
  315. get { return _reservoirsPersistent; }
  316. set { SetProperty(ref _reservoirsPersistent, value); }
  317. }
  318. /// <summary>
  319. /// Reservoir数据
  320. /// </summary>
  321. public StandardHotReservoirData ReservoirData
  322. {
  323. get { return _reservoirData; }
  324. set { SetProperty(ref _reservoirData, value); }
  325. }
  326. /// <summary>
  327. /// Metal数据集合
  328. /// </summary>
  329. public ObservableCollection<StandardHotMetalDeviceData> MetalDataCollection
  330. {
  331. get { return _metalDataCollection; }
  332. set { SetProperty(ref _metalDataCollection, value); }
  333. }
  334. /// <summary>
  335. /// CellModuleName集合
  336. /// </summary>
  337. public ObservableCollection<string> CellModuleNameCollection
  338. {
  339. get { return _cellModuleNameCollection; }
  340. set { SetProperty(ref _cellModuleNameCollection, value); }
  341. }
  342. /// <summary>
  343. /// CellModuleSignalPump集合
  344. /// </summary>
  345. public ObservableCollection<bool> CellModuleSignalPump
  346. {
  347. get { return _cellModuleSignalPump; }
  348. set { SetProperty(ref _cellModuleSignalPump, value); }
  349. }
  350. /// <summary>
  351. /// Cells数量
  352. /// </summary>
  353. public int CellsCount
  354. {
  355. get { return _cellsCount; }
  356. set { SetProperty(ref _cellsCount, value); }
  357. }
  358. /// <summary>
  359. /// 是否超过PH值下限
  360. /// </summary>
  361. public bool IsPHLowLimit
  362. {
  363. get { return _isPHLowLimit; }
  364. set { SetProperty(ref _isPHLowLimit, value); }
  365. }
  366. /// <summary>
  367. /// 是否超过PH值下限
  368. /// </summary>
  369. public bool IsPHHighLimit
  370. {
  371. get { return _isPHHighLimit; }
  372. set { SetProperty(ref _isPHHighLimit, value); }
  373. }
  374. /// <summary>
  375. /// 手动注水时长(秒)
  376. /// </summary>
  377. public int ManualFillSeconds
  378. {
  379. get { return _manualFillSeconds; }
  380. set { SetProperty(ref _manualFillSeconds, value); }
  381. }
  382. /// <summary>
  383. /// 是否正在手动注水
  384. /// </summary>
  385. public bool IsManualReplen
  386. {
  387. get { return _isManualReplen; }
  388. set { SetProperty(ref _isManualReplen, value); }
  389. }
  390. /// <summary>
  391. /// DIValveMaxOnTime
  392. /// </summary>
  393. public double DIValveMaxOnTime
  394. {
  395. get { return _diValveMaxOnTime; }
  396. set { SetProperty(ref _diValveMaxOnTime, value);}
  397. }
  398. /// <summary>
  399. /// TemperatureControl Module Name
  400. /// </summary>
  401. public TemperatureControllerData TemperatureControlData
  402. {
  403. get { return _temperatureControlData; }
  404. set { SetProperty(ref _temperatureControlData, value); }
  405. }
  406. /// <summary>
  407. /// PowerSupply Module Name
  408. /// </summary>
  409. public PowerSupplierData CmmPowerSupplierData
  410. {
  411. get { return _cmmPowerSupplierData; }
  412. set { SetProperty(ref _cmmPowerSupplierData, value); }
  413. }
  414. /// <summary>
  415. /// 是否超过HighLevel
  416. /// </summary>
  417. public bool IsHighLevel
  418. {
  419. get { return _isHighLevel; }
  420. set { SetProperty(ref _isHighLevel, value); }
  421. }
  422. /// <summary>
  423. /// 是否超过LowLevel
  424. /// </summary>
  425. public bool IsLowLevel
  426. {
  427. get { return _isLowLevel; }
  428. set { SetProperty(ref _isLowLevel, value); }
  429. }
  430. /// <summary>
  431. /// 是否触发Highsafety
  432. /// </summary>
  433. public bool IsHighSafety
  434. {
  435. get { return _isHighSafety; }
  436. set { SetProperty(ref _isHighSafety, value); }
  437. }
  438. /// <summary>
  439. /// HED Flow
  440. /// </summary>
  441. public bool HEDFlowIsOn
  442. {
  443. get { return _hedFlowIsOn; }
  444. set { SetProperty(ref _hedFlowIsOn, value); }
  445. }
  446. /// <summary>
  447. /// DI Replen是否报错
  448. /// </summary>
  449. public bool IsDiReplenFault
  450. {
  451. get { return _isDiReplenFault; }
  452. set { SetProperty(ref _isDiReplenFault, value); }
  453. }
  454. /// <summary>
  455. /// Safety数据
  456. /// </summary>
  457. public SafetyData CommonSafetyData
  458. {
  459. get { return _safetyData; }
  460. set { SetProperty(ref _safetyData, value); }
  461. }
  462. /// <summary>
  463. /// 页面功能启用
  464. /// </summary>
  465. public bool IsEnabled
  466. {
  467. get { return _isEnabled; }
  468. set { SetProperty(ref _isEnabled, value); }
  469. }
  470. /// <summary>
  471. /// AutoMode页面功能启用
  472. /// </summary>
  473. public bool IsAutoEnabled
  474. {
  475. get { return _isAutoEnabled; }
  476. set { SetProperty(ref _isAutoEnabled, value); }
  477. }
  478. /// <summary>
  479. /// DosingSystem是否启用
  480. /// </summary>
  481. public bool IsDosingSystemEnabled
  482. {
  483. get { return _isDosingSystemEnabled; }
  484. set { SetProperty(ref _isDosingSystemEnabled, value); }
  485. }
  486. /// <summary>
  487. /// TC Enable状态
  488. /// </summary>
  489. public string TCEnableStatus
  490. {
  491. get { return _tcEnableStatus; }
  492. set { SetProperty(ref _tcEnableStatus, value); }
  493. }
  494. /// <summary>
  495. /// 是否Error
  496. /// </summary>
  497. public bool IsError
  498. {
  499. get { return _isError; }
  500. set { SetProperty(ref _isError, value); }
  501. }
  502. /// <summary>
  503. /// 是否为调速泵
  504. /// </summary>
  505. public bool IsRegulatePump
  506. {
  507. get { return _isRegulatePump; }
  508. set { SetProperty(ref _isRegulatePump, value); }
  509. }
  510. /// <summary>
  511. /// 泵速
  512. /// </summary>
  513. public int PumpSpeed
  514. {
  515. get { return _pumpSpeed; }
  516. set { SetProperty(ref _pumpSpeed, value); }
  517. }
  518. #endregion
  519. #region Recipe
  520. /// <summary>
  521. /// Recipe内容
  522. /// </summary>
  523. public ResRecipe CurrentRecipe
  524. {
  525. get { return _currentRecipe; }
  526. set { SetProperty(ref _currentRecipe, value); }
  527. }
  528. /// <summary>
  529. /// Selected Recipe Node
  530. /// </summary>
  531. public RecipeNode SelectedRecipeNode
  532. {
  533. get { return _selectedRecipeNode; }
  534. set { SetProperty(ref _selectedRecipeNode, value); }
  535. }
  536. /// <summary>
  537. /// Recipe Mode
  538. /// </summary>
  539. public string RecipeMode
  540. {
  541. get { return _recipeMode; }
  542. set { SetProperty(ref _recipeMode, value); }
  543. }
  544. /// <summary>
  545. /// Recipe Type
  546. /// </summary>
  547. public string RecipeType
  548. {
  549. get { return _recipeType; }
  550. set { SetProperty(ref _recipeType, value); }
  551. }
  552. #endregion
  553. #region CMM
  554. /// <summary>
  555. /// 是否配备CMM
  556. /// </summary>
  557. public bool IsCMMConfig
  558. {
  559. get { return _isCMMConfig; }
  560. set { SetProperty(ref _isCMMConfig, value); }
  561. }
  562. /// <summary>
  563. /// Flow High 状态(Warning:黄色,Error:红色)
  564. /// </summary>
  565. public string FlowHighStatus
  566. {
  567. get { return _flowHighStatus; }
  568. set { SetProperty(ref _flowHighStatus, value); }
  569. }
  570. /// <summary>
  571. /// Flow Low 状态(Warning:黄色,Error:红色)
  572. /// </summary>
  573. public string FlowLowStatus
  574. {
  575. get { return _flowLowStatus; }
  576. set { SetProperty(ref _flowLowStatus, value); }
  577. }
  578. /// <summary>
  579. /// PowerSupplier High电流状态
  580. /// </summary>
  581. public string CurrentHighStatus
  582. {
  583. get { return _currentHighStatus; }
  584. set { SetProperty(ref _currentHighStatus, value); }
  585. }
  586. /// <summary>
  587. /// PowerSupplier Low电流状态
  588. /// </summary>
  589. public string CurrentLowStatus
  590. {
  591. get { return _currentLowStatus; }
  592. set { SetProperty(ref _currentLowStatus, value); }
  593. }
  594. /// <summary>
  595. /// 是否低于最小电压
  596. /// </summary>
  597. public bool IsBelowMinVoltage
  598. {
  599. get { return _isBelowMinVoltage; }
  600. set { SetProperty(ref _isBelowMinVoltage, value); }
  601. }
  602. /// <summary>
  603. /// CMM Anode 用电量
  604. /// </summary>
  605. public double CMMAnodeAHrs
  606. {
  607. get { return _reservoirCMMAnodeAHrs; ; }
  608. set { SetProperty(ref _reservoirCMMAnodeAHrs, value); }
  609. }
  610. /// <summary>
  611. /// CMM Cathode 用电量
  612. /// </summary>
  613. public double CMMCathodeAHrs
  614. {
  615. get { return _reservoirCMMCathodeAHrs; ; }
  616. set { SetProperty(ref _reservoirCMMCathodeAHrs, value); }
  617. }
  618. #endregion
  619. #region Config
  620. /// <summary>
  621. /// CMM Anode LifeTime用电量
  622. /// </summary>
  623. public double CMMAnodeLifeTimeAHrs
  624. {
  625. get { return _reservoirCMMAnodeLifeTimeAHrs; ; }
  626. set { SetProperty(ref _reservoirCMMAnodeLifeTimeAHrs, value); }
  627. }
  628. /// <summary>
  629. /// CMM Cathode LifeTime用电量
  630. /// </summary>
  631. public double CMMCathodeLifeTimeAHrs
  632. {
  633. get { return _reservoirCMMCathodeLifeTimeAHrs; ; }
  634. set { SetProperty(ref _reservoirCMMCathodeLifeTimeAHrs, value); }
  635. }
  636. /// <summary>
  637. /// CMM Anode用电量
  638. /// </summary>
  639. public double CMMAnodeUsage
  640. {
  641. get { return _cmmAnodeUsage; ; }
  642. set { SetProperty(ref _cmmAnodeUsage, value); }
  643. }
  644. /// <summary>
  645. /// CMM Cathode用电量
  646. /// </summary>
  647. public double CMMCathodeUsage
  648. {
  649. get { return _cmmCathodeUsage; ; }
  650. set { SetProperty(ref _cmmCathodeUsage, value); }
  651. }
  652. /// <summary>
  653. /// CMM电量报警灯
  654. /// </summary>
  655. public bool IsCMMAnodeTotalAmpHoursWarning
  656. {
  657. get { return _isCMMAnodeTotalAmpHoursWarning; }
  658. set { SetProperty(ref _isCMMAnodeTotalAmpHoursWarning, value); }
  659. }
  660. public bool IsCMMAnodeTotalAmpHoursFault
  661. {
  662. get { return _isCMMAnodeTotalAmpHoursFault; }
  663. set { SetProperty(ref _isCMMAnodeTotalAmpHoursFault, value); }
  664. }
  665. public bool IsCMMCathodeTotalAmpHoursWarning
  666. {
  667. get { return _isCMMCathodeTotalAmpHoursWarning; }
  668. set { SetProperty(ref _isCMMCathodeTotalAmpHoursWarning, value); }
  669. }
  670. public bool IsCMMCathodeTotalAmpHoursFault
  671. {
  672. get { return _isCMMCathodeTotalAmpHoursFault; }
  673. set { SetProperty(ref _isCMMCathodeTotalAmpHoursFault, value); }
  674. }
  675. #endregion
  676. #endregion
  677. #region 命令
  678. public ICommand InitializeCommand { get; set; }
  679. public ICommand OpenDIReplenValveCommand { get; set; }
  680. public ICommand CloseDIReplenValveCommand { get; set; }
  681. public ICommand OpenCellFlow1Command { get; set; }
  682. public ICommand OpenCellBypass1Command { get; set; }
  683. public ICommand OpenCellFlow2Command { get; set; }
  684. public ICommand OpenCellBypass2Command { get; set; }
  685. public ICommand OpenClampValve1Command { get; set; }
  686. public ICommand CloseClampValve1Command { get; set; }
  687. public ICommand OpenClampValve2Command { get; set; }
  688. public ICommand CloseClampValve2Command { get; set; }
  689. public ICommand ManualDireplenCommand { get; set; }
  690. public ICommand ResetTotalCommand { get; set; }
  691. public ICommand GotoPMCounterCommand { get; set; }
  692. public ICommand JumpDosingSystemCommand { get; set; }
  693. public ICommand HedPowerOnCommand { get; set; }
  694. public ICommand HedPowerOffCommand { get; set; }
  695. public ICommand ResPowerOnCommand { get; set; }
  696. public ICommand ResPowerOffCommand { get; set; }
  697. public ICommand PumpSpeedCommand { get; set; }
  698. public ICommand DIReplenClearErrorCommand { get; set; }
  699. #endregion
  700. /// <summary>
  701. /// 构造函数
  702. /// </summary>
  703. public StandardHotReservoirsViewModel()
  704. {
  705. InitializeCommand = new DelegateCommand<object>(InitializeAction);
  706. OpenDIReplenValveCommand = new DelegateCommand<object>(OnOpenDIReplenValve);
  707. CloseDIReplenValveCommand = new DelegateCommand<object>(OnCloseDIReplenValve);
  708. OpenCellFlow1Command = new DelegateCommand<object>(OnCellFlow1);
  709. OpenCellBypass1Command = new DelegateCommand<object>(OnCellBypass1);
  710. OpenCellFlow2Command = new DelegateCommand<object>(OnCellFlow2);
  711. OpenCellBypass2Command = new DelegateCommand<object>(OnCellBypass2);
  712. OpenClampValve1Command = new DelegateCommand<object>(OnOpenClampValve1);
  713. CloseClampValve1Command = new DelegateCommand<object>(OnCloseClampValve1);
  714. OpenClampValve2Command = new DelegateCommand<object>(OnOpenClampValve2);
  715. CloseClampValve2Command = new DelegateCommand<object>(OnCloseClampValve2);
  716. ManualDireplenCommand = new DelegateCommand<object>(ManualDireplenAction);
  717. ResetTotalCommand = new DelegateCommand(ResetTotalAction);
  718. GotoPMCounterCommand = new DelegateCommand<object>(GotoPMCounterAction);
  719. JumpDosingSystemCommand = new DelegateCommand<object>(JumpDosingSystemAction);
  720. HedPowerOnCommand = new DelegateCommand<object>(HedPowerOnAction);
  721. HedPowerOffCommand = new DelegateCommand<object>(HedPowerOffAction);
  722. ResPowerOnCommand = new DelegateCommand<object>(ResPowerOnAction);
  723. ResPowerOffCommand = new DelegateCommand<object>(ResPowerOffAction);
  724. PumpSpeedCommand = new DelegateCommand<object>(PumpSpeedAction);
  725. DIReplenClearErrorCommand = new DelegateCommand<object>(DIReplenClearErrorAction);
  726. }
  727. /// <summary>
  728. /// 加载数据
  729. /// </summary>
  730. public void LoadData(string systemName)
  731. {
  732. RecipeType = "res";
  733. Module = systemName;
  734. _rtDataKeys.Clear();
  735. _rtDataKeys.Add($"{Module}.Metals");
  736. _rtDataKeys.Add($"{Module}.ReplenType");
  737. Dictionary<string,object> tmpMetals = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  738. if (tmpMetals != null)
  739. {
  740. string replenType = CommonFunction.GetValue<string>(tmpMetals, $"{Module}.ReplenType");
  741. IsDosingSystemEnabled = replenType != "" ? true : false;
  742. List<string> strMetals = CommonFunction.GetValue<List<string>>(tmpMetals, $"{Module}.Metals");
  743. CellsCount = strMetals.Count;
  744. if(strMetals!=null&& CellsCount>= 1)
  745. {
  746. CellModuleNameCollection.Clear();
  747. MetalDataCollection.Clear();
  748. CellModuleSignalPump.Clear();
  749. for (int i = 0; i < CellsCount; i++)
  750. {
  751. string metal=strMetals[i];
  752. if (!string.IsNullOrEmpty(metal))
  753. {
  754. CellModuleNameCollection.Add(metal);
  755. _rtDataKeys.Add($"{metal}.MetalData");
  756. _rtDataKeys.Add($"{metal}.IsSingalPump");
  757. }
  758. MetalDataCollection.Add(new StandardHotMetalDeviceData());
  759. CellModuleSignalPump.Add(false);
  760. }
  761. }
  762. }
  763. _rtDataKeys.Add($"{Module}.ReservoirData");
  764. _rtDataKeys.Add($"{Module}.PersistentValue");
  765. _rtDataKeys.Add($"{Module}.IsManualReplen");
  766. _rtDataKeys.Add($"{Module}.DIValveMaxOnTime");
  767. _rtDataKeys.Add($"{Module}.CurrentRecipe");
  768. _rtDataKeys.Add($"{Module}.TemperatureControllerData");
  769. _rtDataKeys.Add($"{Module}.CmmPowerSupplierData");
  770. _rtDataKeys.Add($"{Module}.FsmState");
  771. _rtDataKeys.Add($"{Module}.ReservoirAverageLevel");
  772. _rtDataKeys.Add($"{Module}.ReservoirUsage");
  773. _rtDataKeys.Add($"{Module}.PumpSpeed");
  774. _rtDataKeys.Add($"{Module}.IsRegulatePump");
  775. _rtDataKeys.Add($"{Module}.IsCMMConfig");
  776. _rtDataKeys.Add($"{Module}.IsDIReplenInFault");
  777. _rtDataKeys.Add($"{Module}.DIReplenMaxTimeOut");
  778. if (_timer == null)
  779. {
  780. _timer = new DispatcherTimer();
  781. _timer.Interval = TimeSpan.FromMilliseconds(200);
  782. _timer.Tick += Timer_Tick;
  783. }
  784. _timer.Start();
  785. //加载Config
  786. _reservoirCMMFlowHighWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighWarning"));
  787. _reservoirCMMFlowHighError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighFault"));
  788. _reservoirCMMFlowLowWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowWarning"));
  789. _reservoirCMMFlowLowError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowFault"));
  790. CMMAnodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeLifeTimeAHrs"));
  791. CMMCathodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeLifeTimeAHrs"));
  792. _reservoirHighLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.HighLevel"));
  793. _reservoirLowLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.LowLevel"));
  794. _cmmAnodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursWarningLimit"));
  795. _cmmAnodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursFaultLimit"));
  796. _cmmCathodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursWarningLimit"));
  797. _cmmCathodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursFaultLimit"));
  798. }
  799. #region 命令方法
  800. /// <summary>
  801. /// DIReplen Clear Error
  802. /// </summary>
  803. /// <param name="obj"></param>
  804. private void DIReplenClearErrorAction(object obj)
  805. {
  806. InvokeClient.Instance.Service.DoOperation($"{Module}.DIReplenClearError");
  807. }
  808. /// <summary>
  809. /// 初始化
  810. /// </summary>
  811. /// <param name="param"></param>
  812. private void InitializeAction(object param)
  813. {
  814. InvokeClient.Instance.Service.DoOperation($"{Module}.InitializeAll");
  815. }
  816. /// <summary>
  817. /// 重置TotalTime
  818. /// </summary>
  819. private void ResetTotalAction()
  820. {
  821. InvokeClient.Instance.Service.DoOperation($"{Module}.ResetTotalTime");
  822. }
  823. /// <summary>
  824. /// Cell1三向阀开启CellFlow
  825. /// </summary>
  826. /// <param name="obj"></param>
  827. private void OnCellFlow1(object param)
  828. {
  829. if(CellModuleNameCollection[0] != "")
  830. {
  831. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToFlow");
  832. }
  833. }
  834. /// <summary>
  835. /// Cell1三向阀开启CellBypass
  836. /// </summary>
  837. private void OnCellBypass1(object param)
  838. {
  839. if(CellModuleNameCollection[0] != "")
  840. {
  841. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToBypass");
  842. }
  843. }
  844. /// <summary>
  845. /// Cell2三向阀开启CellFlow
  846. /// </summary>
  847. /// <param name="obj"></param>
  848. private void OnCellFlow2(object param)
  849. {
  850. if(CellModuleNameCollection[1] != "")
  851. {
  852. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToFlow");
  853. }
  854. }
  855. /// <summary>
  856. /// Cell2三向阀开启CellBypass
  857. /// </summary>
  858. private void OnCellBypass2(object param)
  859. {
  860. if (CellModuleNameCollection[1] != "")
  861. {
  862. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToBypass");
  863. }
  864. }
  865. /// <summary>
  866. /// Cell1 Open Clamp Valve
  867. /// </summary>
  868. private void OnOpenClampValve1(object param)
  869. {
  870. if (CellModuleNameCollection[0] != "")
  871. {
  872. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOn");
  873. }
  874. }
  875. /// <summary>
  876. /// Cell1 Close Clamp Valve
  877. /// </summary>
  878. private void OnCloseClampValve1(object param)
  879. {
  880. if (CellModuleNameCollection[0] != "")
  881. {
  882. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOff");
  883. }
  884. }
  885. /// <summary>
  886. /// Cell2 Open Clamp Valve
  887. /// </summary>
  888. private void OnOpenClampValve2(object param)
  889. {
  890. if (CellModuleNameCollection[1] != "")
  891. {
  892. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOn");
  893. }
  894. }
  895. /// <summary>
  896. /// Cell2 Close Clamp Valve
  897. /// </summary>
  898. private void OnCloseClampValve2(object param)
  899. {
  900. if (CellModuleNameCollection[1] != "")
  901. {
  902. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOff");
  903. }
  904. }
  905. /// <summary>
  906. /// Open DI Replen Valve
  907. /// </summary>
  908. private void OnOpenDIReplenValve(object param)
  909. {
  910. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOn");
  911. }
  912. /// <summary>
  913. /// Close DI Replen Valve
  914. /// </summary>
  915. private void OnCloseDIReplenValve(object param)
  916. {
  917. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOff");
  918. }
  919. /// <summary>
  920. /// Manual DireplenAction
  921. /// </summary>
  922. /// <param name="param"></param>
  923. private void ManualDireplenAction(object param)
  924. {
  925. InvokeClient.Instance.Service.DoOperation($"{Module}.ManualDiReplen",ManualFillSeconds);
  926. }
  927. /// <summary>
  928. /// 进入PMCounter页面
  929. /// </summary>
  930. /// <param name="param"></param>
  931. private void GotoPMCounterAction(object param)
  932. {
  933. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"PMCounter{Module.Substring(9, 1)}");
  934. }
  935. /// <summary>
  936. /// 跳转DosingSystem
  937. /// </summary>
  938. /// <param name="param"></param>
  939. private void JumpDosingSystemAction(object param)
  940. {
  941. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"DosingSystem1");
  942. }
  943. private void HedPowerOnAction(object param)
  944. {
  945. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOn");
  946. }
  947. private void HedPowerOffAction(object param)
  948. {
  949. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOff");
  950. }
  951. private void ResPowerOnAction(object param)
  952. {
  953. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOn");
  954. }
  955. private void ResPowerOffAction(object param)
  956. {
  957. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOff");
  958. }
  959. /// <summary>
  960. /// Initialize Action
  961. /// </summary>
  962. /// <param name="param"></param>
  963. private void PumpSpeedAction(object obj)
  964. {
  965. object[] objects = (object[])obj;
  966. if (objects.Length >= 2)
  967. {
  968. InvokeClient.Instance.Service.DoOperation($"{Module}.RegulatPumpSpeed", objects[1]);
  969. }
  970. }
  971. #endregion
  972. /// <summary>
  973. /// 时钟
  974. /// </summary>
  975. /// <param name="sender"></param>
  976. /// <param name="e"></param>
  977. private void Timer_Tick(object sender, EventArgs e)
  978. {
  979. if (_rtDataKeys.Count != 0)
  980. {
  981. _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  982. if (_rtDataValueDic != null)
  983. {
  984. IsCMMConfig = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsCMMConfig");
  985. IsRegulatePump = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsRegulatePump");
  986. PumpSpeed = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.PumpSpeed");
  987. ReservoirsPersistent = CommonFunction.GetValue<ReservoirsPersistentValue>(_rtDataValueDic, $"{Module}.PersistentValue");
  988. IsManualReplen = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsManualReplen");
  989. DIValveMaxOnTime = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.DIValveMaxOnTime");
  990. CurrentRecipe = CommonFunction.GetValue<ResRecipe>(_rtDataValueDic, $"{Module}.CurrentRecipe");
  991. TemperatureControlData = CommonFunction.GetValue<TemperatureControllerData>(_rtDataValueDic, $"{Module}.TemperatureControllerData");
  992. TCEnableStatus = TemperatureControlData.ControlOperationModel == 0 ? "Disable" : "Enable";
  993. CmmPowerSupplierData = CommonFunction.GetValue<PowerSupplierData>(_rtDataValueDic, $"{Module}.CmmPowerSupplierData");
  994. State = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
  995. AvgLevel = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.ReservoirAverageLevel");
  996. ReservoirUsage reservoirUsage = CommonFunction.GetValue<ReservoirUsage>(_rtDataValueDic, $"{Module}.ReservoirUsage");
  997. if(reservoirUsage != null)
  998. {
  999. CMMAnodeUsage = reservoirUsage.CMMAnodeUsage;
  1000. CMMCathodeUsage = reservoirUsage.CMMMembranceUsage;
  1001. //CMM AnodeUsage
  1002. if (CMMAnodeUsage > _cmmAnodeTotalAmpHoursFaultLimit)
  1003. {
  1004. IsCMMAnodeTotalAmpHoursFault = true;
  1005. IsCMMAnodeTotalAmpHoursWarning = false;
  1006. }
  1007. else if(CMMAnodeUsage > _cmmAnodeTotalAmpHoursWarningLimit)
  1008. {
  1009. IsCMMAnodeTotalAmpHoursWarning = true;
  1010. IsCMMAnodeTotalAmpHoursFault = false;
  1011. }
  1012. else
  1013. {
  1014. IsCMMAnodeTotalAmpHoursWarning = false;
  1015. IsCMMAnodeTotalAmpHoursFault = false;
  1016. }
  1017. //CMM CathodeUsage
  1018. if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursFaultLimit)
  1019. {
  1020. IsCMMCathodeTotalAmpHoursFault = true;
  1021. IsCMMCathodeTotalAmpHoursWarning = false;
  1022. }
  1023. else if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursWarningLimit)
  1024. {
  1025. IsCMMCathodeTotalAmpHoursWarning = true;
  1026. IsCMMCathodeTotalAmpHoursFault = false;
  1027. }
  1028. else
  1029. {
  1030. IsCMMCathodeTotalAmpHoursWarning = false;
  1031. IsCMMCathodeTotalAmpHoursFault = false;
  1032. }
  1033. }
  1034. if ("Manual".Equals(ReservoirsPersistent.OperatingMode))
  1035. {
  1036. IsEnabled = true;
  1037. IsAutoEnabled = true;
  1038. }
  1039. else if ("Auto".Equals(ReservoirsPersistent.OperatingMode))
  1040. {
  1041. IsAutoEnabled = true;
  1042. IsEnabled = false;
  1043. }
  1044. else
  1045. {
  1046. State = "Stopped";
  1047. IsEnabled = false;
  1048. IsAutoEnabled = false;
  1049. }
  1050. for (int i = 0;i < CellsCount;i++)
  1051. {
  1052. MetalDataCollection[i] = CommonFunction.GetValue<StandardHotMetalDeviceData>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.MetalData");
  1053. CellModuleSignalPump[i] = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.IsSingalPump");
  1054. }
  1055. ReservoirData = CommonFunction.GetValue<StandardHotReservoirData>(_rtDataValueDic, $"{Module}.ReservoirData");
  1056. if (ReservoirData != null)
  1057. {
  1058. for (int i = 0; i < CellsCount; i++)
  1059. {
  1060. MetalDataCollection[i].CellPump ^= ReservoirData.RegulatePumpSignalIn; //确保管路开关正常显示
  1061. }
  1062. }
  1063. if (CurrentRecipe != null)
  1064. {
  1065. //PHLow报警灯
  1066. IsPHLowLimit = (ReservoirData != null && ReservoirData.PHValue < CurrentRecipe.PHErrorLow) ? true : false;
  1067. //PHHigh报警灯
  1068. IsPHHighLimit = (ReservoirData != null && ReservoirData.PHValue > CurrentRecipe.PHErrorHigh) ? true : false;
  1069. if(CmmPowerSupplierData != null)
  1070. {
  1071. //PowerSupply High报警灯
  1072. if (CmmPowerSupplierData.Current <= CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1073. {
  1074. CurrentHighStatus = "Normal";
  1075. }
  1076. else if (CmmPowerSupplierData.Current > CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1077. {
  1078. CurrentHighStatus = "Error";
  1079. }
  1080. else
  1081. {
  1082. CurrentHighStatus = "Warning";
  1083. }
  1084. //PowerSupply Low报警灯
  1085. if (CmmPowerSupplierData.Current >= CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1086. {
  1087. CurrentLowStatus = "Normal";
  1088. }
  1089. else if (CmmPowerSupplierData.Current < CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1090. {
  1091. CurrentLowStatus = "Error";
  1092. }
  1093. else
  1094. {
  1095. CurrentLowStatus = "Warning";
  1096. }
  1097. IsBelowMinVoltage = CmmPowerSupplierData.Voltage < CurrentRecipe.CMMMinVoltage ? true : false;
  1098. }
  1099. }
  1100. if (ReservoirData != null)
  1101. {
  1102. //CMM Flow High报警灯
  1103. if (ReservoirData.Flow <= _reservoirCMMFlowHighWarning)
  1104. {
  1105. FlowHighStatus = "Normal";
  1106. }
  1107. else if (ReservoirData.Flow > _reservoirCMMFlowHighError)
  1108. {
  1109. FlowHighStatus = "Error";
  1110. }
  1111. else
  1112. {
  1113. FlowHighStatus = "Warning";
  1114. }
  1115. //CMM Flow Low报警灯
  1116. if (ReservoirData.Flow >= _reservoirCMMFlowLowWarning)
  1117. {
  1118. FlowLowStatus = "Normal";
  1119. }
  1120. else if (ReservoirData.Flow < _reservoirCMMFlowLowError)
  1121. {
  1122. FlowLowStatus = "Error";
  1123. }
  1124. else
  1125. {
  1126. FlowLowStatus = "Warning";
  1127. }
  1128. //High Level报警灯
  1129. IsHighLevel = (ReservoirData.WaterLevel > _reservoirHighLevel) ? true : false;
  1130. //Low Level报警灯
  1131. IsLowLevel = (ReservoirData.WaterLevel < _reservoirLowLevel) ? true : false;
  1132. //HighSafety
  1133. IsHighSafety = ReservoirData.SafetyHighLevel;
  1134. //HedFlow管流
  1135. HEDFlowIsOn = (ReservoirData.HedFlow > 0) ? true : false;
  1136. //DIReplenFault
  1137. IsDiReplenFault = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsDIReplenInFault")
  1138. || CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.DIReplenMaxTimeOut");
  1139. IsError = State== "Error" ? true : false;
  1140. }
  1141. }
  1142. }
  1143. }
  1144. /// <summary>
  1145. /// 隐藏
  1146. /// </summary>
  1147. public void Hide()
  1148. {
  1149. if (_timer != null)
  1150. {
  1151. _timer.Stop();
  1152. }
  1153. }
  1154. }
  1155. }