IoMfc.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  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.OperationCenter;
  7. using Aitex.Core.RT.SCCore;
  8. using Aitex.Core.RT.Tolerance;
  9. using Aitex.Core.Util;
  10. using MECF.Framework.Common.DBCore;
  11. using SorterRT.Modules;
  12. using System;
  13. using System.Diagnostics;
  14. using System.Xml;
  15. namespace VirgoRT.Devices.IODevices
  16. {
  17. //will be upgrade later
  18. public class MfcBase1 : BaseDevice, IDevice
  19. {
  20. public virtual double SetPoint { get; set; }
  21. public virtual double FeedBack { get; set; }
  22. public virtual bool IsOutOfTolerance { get; }
  23. public virtual double Scale { set; get; }
  24. public virtual string DisplayName { set; get; }
  25. private float _percent10Calculate;
  26. private float _percent20Calculate;
  27. private float _percent30Calculate;
  28. private float _percent40Calculate;
  29. private float _percent50Calculate;
  30. private float _percent60Calculate;
  31. private float _percent70Calculate;
  32. private float _percent80Calculate;
  33. private float _percent90Calculate;
  34. private float _percent100Calculate;
  35. private float _verificationCalculate;
  36. private float _verificationSetpoint;
  37. private string _verificationResult = "";
  38. public MfcBase1()
  39. {
  40. }
  41. public virtual bool Initialize()
  42. {
  43. DATA.Subscribe($"{Module}.{Name}.VerificationResult", () => _verificationResult);
  44. return true;
  45. }
  46. public virtual void Monitor()
  47. {
  48. }
  49. public virtual void Reset()
  50. {
  51. }
  52. public virtual void Terminate()
  53. {
  54. }
  55. public virtual void Ramp(int time)
  56. {
  57. }
  58. public virtual void Ramp(double target, int time)
  59. {
  60. }
  61. public virtual void StopRamp()
  62. {
  63. }
  64. public virtual void SetVerificationResult(float setpoint, float calculateFlow, bool saveResult, double time, double deviation, bool result)
  65. {
  66. //ten points
  67. var delta = Scale / 10;
  68. _verificationResult += $"{setpoint},{calculateFlow},{time},{deviation},{result};";
  69. if (delta - 0.1 < setpoint && delta + 0.1 > setpoint)
  70. {
  71. _percent10Calculate = calculateFlow;
  72. }
  73. else if (2 * delta - 0.1 < setpoint && 2 * delta + 0.1 > setpoint)
  74. {
  75. _percent20Calculate = calculateFlow;
  76. }
  77. else if (3 * delta - 0.1 < setpoint && 3 * delta + 0.1 > setpoint)
  78. {
  79. _percent30Calculate = calculateFlow;
  80. }
  81. else if (4 * delta - 0.1 < setpoint && 4 * delta + 0.1 > setpoint)
  82. {
  83. _percent40Calculate = calculateFlow;
  84. }
  85. else if (5 * delta - 0.1 < setpoint && 5 * delta + 0.1 > setpoint)
  86. {
  87. _percent50Calculate = calculateFlow;
  88. }
  89. else if (6 * delta - 0.1 < setpoint && 6 * delta + 0.1 > setpoint)
  90. {
  91. _percent60Calculate = calculateFlow;
  92. }
  93. else if (7 * delta - 0.1 < setpoint && 7 * delta + 0.1 > setpoint)
  94. {
  95. _percent70Calculate = calculateFlow;
  96. }
  97. else if (8 * delta - 0.1 < setpoint && 8 * delta + 0.1 > setpoint)
  98. {
  99. _percent80Calculate = calculateFlow;
  100. }
  101. else if (9 * delta - 0.1 < setpoint && 9 * delta + 0.1 > setpoint)
  102. {
  103. _percent90Calculate = calculateFlow;
  104. }
  105. else if (10 * delta - 0.1 < setpoint && 10 * delta + 0.1 > setpoint)
  106. {
  107. _percent100Calculate = calculateFlow;
  108. }
  109. else
  110. {
  111. _verificationCalculate = calculateFlow;
  112. _verificationSetpoint = setpoint;
  113. }
  114. if (saveResult)
  115. {
  116. SaveVerificationData();
  117. }
  118. }
  119. private void SaveVerificationData()
  120. {
  121. var delta = (float)(Scale / 10);
  122. MFCVerificationData data = new MFCVerificationData()
  123. {
  124. Module = Module,
  125. Name = DisplayName,
  126. Percent10Setpoint = delta,
  127. Percent10Calculate = _percent10Calculate,
  128. Percent20Setpoint = delta * 2,
  129. Percent20Calculate = _percent20Calculate,
  130. Percent30Setpoint = delta * 3,
  131. Percent30Calculate = _percent30Calculate,
  132. Percent40Setpoint = delta * 4,
  133. Percent40Calculate = _percent40Calculate,
  134. Percent50Setpoint = delta * 5,
  135. Percent50Calculate = _percent50Calculate,
  136. Percent60Setpoint = delta * 6,
  137. Percent60Calculate = _percent60Calculate,
  138. Percent70Setpoint = delta * 7,
  139. Percent70Calculate = _percent70Calculate,
  140. Percent80Setpoint = delta * 8,
  141. Percent80Calculate = _percent80Calculate,
  142. Percent90Setpoint = delta * 9,
  143. Percent90Calculate = _percent90Calculate,
  144. Percent100Setpoint = delta * 10,
  145. Percent100Calculate = _percent100Calculate,
  146. Setpoint = _verificationSetpoint,
  147. Calculate = _verificationCalculate,
  148. };
  149. MFCVerificationDataRecorder.Add(data);
  150. }
  151. public void ResetVerificationData()
  152. {
  153. _percent10Calculate = 0;
  154. _percent20Calculate = 0;
  155. _percent30Calculate = 0;
  156. _percent40Calculate = 0;
  157. _percent50Calculate = 0;
  158. _percent60Calculate = 0;
  159. _percent70Calculate = 0;
  160. _percent80Calculate = 0;
  161. _percent90Calculate = 0;
  162. _percent100Calculate = 0;
  163. _verificationCalculate = 0;
  164. _verificationSetpoint = 0;
  165. _verificationResult = "";
  166. }
  167. }
  168. public class IoMfc : MfcBase1
  169. {
  170. public string Unit
  171. {
  172. get; set;
  173. }
  174. [Subscription(AITMfcDataPropertyName.Scale)]
  175. public override double Scale
  176. {
  177. get
  178. {
  179. if (_scN2Scale == null || _scScaleFactor == null)
  180. return 0;
  181. return _scN2Scale.IntValue * _scScaleFactor.DoubleValue;
  182. }
  183. }
  184. [Subscription(AITMfcDataPropertyName.SetPoint)]
  185. public override double SetPoint
  186. {
  187. get
  188. {
  189. if (_aoFlow != null)
  190. {
  191. byte[] high = BitConverter.GetBytes(_aoFlow.Buffer[_aoFlow.Index]);
  192. byte[] low = BitConverter.GetBytes(_aoFlow.Buffer[_aoFlow.Index + 1]);
  193. float flow = BitConverter.ToSingle(new[] { high[0], high[1], low[0], low[1] }, 0);
  194. return flow * Scale / RtInstance.ANALOG_TRANS_RANGE;
  195. }
  196. return 0;
  197. }
  198. set
  199. {
  200. if (_aoFlow != null)
  201. {
  202. byte[] flow = BitConverter.GetBytes((float)(value * RtInstance.ANALOG_TRANS_RANGE / Scale));
  203. _aoFlow.Buffer[_aoFlow.Index] = BitConverter.ToInt16(flow, 0);
  204. _aoFlow.Buffer[_aoFlow.Index + 1] = BitConverter.ToInt16(flow, 2);
  205. }
  206. }
  207. }
  208. [Subscription(AITMfcDataPropertyName.DefaultSetPoint)]
  209. public double DefaultSetPoint
  210. {
  211. get
  212. {
  213. if (_scDefaultSetPoint != null)
  214. return _scDefaultSetPoint.IntValue;
  215. return 0;
  216. }
  217. }
  218. [Subscription(AITMfcDataPropertyName.FeedBack)]
  219. public override double FeedBack
  220. {
  221. get
  222. {
  223. if (_aiFlow != null)
  224. {
  225. byte[] high = BitConverter.GetBytes(_aiFlow.Buffer[_aiFlow.Index]);
  226. byte[] low = BitConverter.GetBytes(_aiFlow.Buffer[_aiFlow.Index + 1]);
  227. float flow = BitConverter.ToSingle(new[] { high[0], high[1], low[0], low[1] }, 0);
  228. return (_scRegulationFactor != null && _scRegulationFactor.IntValue > 0) ? flow * Scale / RtInstance.ANALOG_TRANS_RANGE / _scRegulationFactor.IntValue
  229. : flow * Scale / RtInstance.ANALOG_TRANS_RANGE;
  230. }
  231. return 0;
  232. }
  233. }
  234. [Subscription(AITMfcDataPropertyName.IsOutOfTolerance)]
  235. public override bool IsOutOfTolerance
  236. {
  237. get
  238. {
  239. return _alarmChecker.Result;
  240. }
  241. }
  242. [Subscription(AITMfcDataPropertyName.IsEnableAlarm)]
  243. public bool EnableAlarm
  244. {
  245. get
  246. {
  247. if (_scEnableAlarm != null)
  248. return _scEnableAlarm.BoolValue;
  249. return false;
  250. }
  251. }
  252. [Subscription(AITMfcDataPropertyName.AlarmRange)]
  253. public double AlarmRange
  254. {
  255. get
  256. {
  257. if (_scAlarmRange != null)
  258. return _scAlarmRange.IntValue;
  259. return 0;
  260. }
  261. }
  262. [Subscription(AITMfcDataPropertyName.AlarmTime)]
  263. public double AlarmTime
  264. {
  265. get
  266. {
  267. if (_scAlarmTime != null)
  268. return _scAlarmTime.IntValue;
  269. return 0;
  270. }
  271. }
  272. public double WarningRange
  273. {
  274. get
  275. {
  276. if (_scWarningRange != null)
  277. return _scWarningRange.IntValue;
  278. return 0;
  279. }
  280. }
  281. public double WarningTime
  282. {
  283. get
  284. {
  285. if (_scWarningTime != null)
  286. return _scWarningTime.IntValue;
  287. return 0;
  288. }
  289. }
  290. [Subscription(AITMfcDataPropertyName.PressureAlarm)]
  291. public bool PressureAlarm
  292. {
  293. get { return _diPressureAlarm != null ? _diPressureAlarm.Value : true; }
  294. }
  295. [Subscription(AITMfcDataPropertyName.MfcAlarm)]
  296. public bool MfcAlarm
  297. {
  298. get
  299. {
  300. return _bMfcAlarm;
  301. }
  302. }
  303. [Subscription(AITMfcDataPropertyName.IsEnable)]
  304. public bool Enable
  305. {
  306. get
  307. {
  308. if (_scEnable != null)
  309. return _scEnable.BoolValue;
  310. return false;
  311. }
  312. }
  313. [Subscription(AITMfcDataPropertyName.IsOffline)]
  314. public bool IsOffline
  315. {
  316. get
  317. {
  318. if (_diOffline != null)
  319. return _diOffline.Value;
  320. return false;
  321. }
  322. }
  323. public override string DisplayName
  324. {
  325. get
  326. {
  327. if (_scGasName != null)
  328. return _scGasName.StringValue;
  329. return Display;
  330. }
  331. }
  332. private DeviceTimer rampTimer = new DeviceTimer();
  333. private double rampTarget;
  334. private double rampInitValue;
  335. private int rampTime;
  336. private bool _bMfcAlarm = false;
  337. private ToleranceChecker _alarmChecker = new ToleranceChecker();
  338. private ToleranceChecker _warningChecker = new ToleranceChecker();
  339. private AIAccessor _aiFlow;
  340. private AOAccessor _aoFlow;
  341. private AOAccessor _aoRange;
  342. private DIAccessor _diOffline;
  343. private DIAccessor _diPressureAlarm;
  344. private SCConfigItem _scGasName;
  345. private SCConfigItem _scEnable;
  346. private SCConfigItem _scN2Scale;
  347. private SCConfigItem _scScaleFactor;
  348. private SCConfigItem _scAlarmRange;
  349. private SCConfigItem _scEnableAlarm;
  350. private SCConfigItem _scAlarmTime;
  351. private SCConfigItem _scDefaultSetPoint;
  352. private SCConfigItem _scRegulationFactor;
  353. private SCConfigItem _scWarningRange;
  354. private SCConfigItem _scWarningTime;
  355. private R_TRIG _trigOffline = new R_TRIG();
  356. private R_TRIG _trigPressureAlarm = new R_TRIG();
  357. private string _uniqueName;
  358. private string GasFlowOutOfTolerance = "GasFlowOutOfTolerance";
  359. private float _recipeAlarmRange;
  360. private float _recipeWarningRange;
  361. private int _recipeIgnoreTimeMS;
  362. private ToleranceChecker _recipeAlarmChecker = new ToleranceChecker();
  363. private ToleranceChecker _recipeWarningChecker = new ToleranceChecker();
  364. private DeviceTimer _recipeIgnoreTimer = new DeviceTimer();
  365. public IoMfc(string module, XmlElement node, string ioModule = "")
  366. {
  367. Unit = node.GetAttribute("unit");
  368. base.Module = module;
  369. base.Name = node.GetAttribute("id");
  370. base.Display = node.GetAttribute("display");
  371. base.DeviceID = node.GetAttribute("schematicId");
  372. _aoRange = ParseAoNode("aoRange", node, ioModule);
  373. _diOffline = ParseDiNode("diOffline", node, ioModule);
  374. _aiFlow = ParseAiNode("aiFlow", node, ioModule);
  375. _aoFlow = ParseAoNode("aoFlow", node, ioModule);
  376. _diPressureAlarm = ParseDiNode("diPressureAlarm", node, ioModule);
  377. _scGasName = SC.GetConfigItem($"{Module}.{Name}.GasName");
  378. _scEnable = SC.GetConfigItem($"{Module}.{Name}.Enable");
  379. _scN2Scale = SC.GetConfigItem($"{Module}.{Name}.MfcN2Scale");
  380. _scScaleFactor = SC.GetConfigItem($"{Module}.{Name}.MfcScaleFactor");
  381. _scAlarmRange = SC.GetConfigItem($"{Module}.{Name}.MfcAlarmRange");
  382. _scEnableAlarm = SC.GetConfigItem($"{Module}.{Name}.MfcEnableAlarm");
  383. _scAlarmTime = SC.GetConfigItem($"{Module}.{Name}.MfcAlarmTime");
  384. _scDefaultSetPoint = SC.GetConfigItem($"{Module}.{Name}.DefaultSetPoint");
  385. _scRegulationFactor = SC.GetConfigItem($"{Module}.{Name}.FlowRegulationFactor");
  386. _scWarningRange = SC.GetConfigItem($"{Module}.{Name}.MfcWarningRange");
  387. _scWarningTime = SC.GetConfigItem($"{Module}.{Name}.MfcWarningTime");
  388. _uniqueName = $"{Module}.{Name}";
  389. if (_scGasName != null)
  390. Display = _scGasName.StringValue;
  391. #if DEBUG
  392. Debug.Assert(!string.IsNullOrWhiteSpace(_scGasName.StringValue));
  393. Debug.Assert(null != _scN2Scale);
  394. Debug.Assert(null != _aoFlow);
  395. Debug.Assert(null != _aiFlow);
  396. #endif
  397. }
  398. public override bool Initialize()
  399. {
  400. EV.Subscribe(new EventItem("Event", GasFlowOutOfTolerance, "Gas Flow Out Of Tolerance", EventLevel.Alarm, EventType.HostNotification));
  401. DATA.Subscribe($"{Module}.{Name}", () =>
  402. {
  403. AITMfcData data = new AITMfcData
  404. {
  405. Type = "MFC",
  406. UniqueName = _uniqueName,
  407. DeviceName = Name,
  408. DeviceSchematicId = DeviceID,
  409. DisplayName = DisplayName,
  410. FeedBack = FeedBack,
  411. SetPoint = SetPoint,
  412. Scale = Scale,
  413. IsOffline = IsOffline,
  414. };
  415. return data;
  416. }, SubscriptionAttribute.FLAG.IgnoreSaveDB);
  417. OP.Subscribe($"{Module}.{Name}.{AITMfcOperation.Ramp}", (name, args) =>
  418. {
  419. double target = (double)args[0];
  420. target = Math.Min(target, Scale);
  421. target = Math.Max(target, 0);
  422. Ramp(target, 0);
  423. EV.PostInfoLog(Module, $"Ramp to {target}{Unit}");
  424. return true;
  425. });
  426. DEVICE.Register($"{Module}.{Name}.{AITMfcOperation.Ramp}", (out string reason, int time, object[] param) =>
  427. {
  428. double target = Convert.ToDouble((string)param[0]);
  429. target = Math.Min(target, Scale);
  430. target = Math.Max(target, 0);
  431. Ramp(target, time);
  432. reason = $"{Display} ramp to {target}{Unit}";
  433. return true;
  434. });
  435. //@AAA use recipe
  436. DEVICE.Register($"{Module}.{Name}", (out string reason, int time, object[] param) =>
  437. {
  438. double target = Convert.ToDouble((string)param[0]);
  439. target = Math.Min(target, Scale);
  440. target = Math.Max(target, 0);
  441. Ramp(target, time);
  442. reason = $"{Display} ramp to {target}{Unit}";
  443. return true;
  444. });
  445. OP.Subscribe($"{Module}.{Name}.SetRecipeTolerance", (out string reason, int time, object[] param) =>
  446. {
  447. reason = string.Empty;
  448. _recipeIgnoreTimer.Start(0);
  449. _recipeIgnoreTimeMS = Convert.ToInt32(param[0]) * 1000;
  450. _recipeWarningRange = Convert.ToSingle(param[1]);
  451. _recipeAlarmRange = Convert.ToSingle(param[2]);
  452. _recipeAlarmChecker.RST = true;
  453. _recipeWarningChecker.RST = true;
  454. _alarmChecker.RST = true;
  455. _warningChecker.RST = true;
  456. return true;
  457. });
  458. return base.Initialize();
  459. }
  460. public override void Monitor()
  461. {
  462. if (Enable)
  463. {
  464. Ramping();
  465. CheckTolerance();
  466. if (_aoRange != null)
  467. _aoRange.Value = (short)Scale;
  468. _trigOffline.CLK = IsOffline;
  469. if (_trigOffline.Q)
  470. {
  471. EV.PostAlarmLog(Module, string.Format("{0} is offline", DisplayName));
  472. _bMfcAlarm = true;
  473. }
  474. _trigPressureAlarm.CLK = PressureAlarm == false;
  475. if (_trigPressureAlarm.Q)
  476. EV.PostAlarmLog(Module, $"{Name}, {DisplayName} Pressure Alarm");
  477. if (PressureAlarm)
  478. {
  479. _trigPressureAlarm.RST = true;
  480. }
  481. }
  482. }
  483. public override void Reset()
  484. {
  485. _bMfcAlarm = false;
  486. _trigPressureAlarm.RST = true;
  487. _trigOffline.RST = true;
  488. _alarmChecker.RST = true;
  489. _warningChecker.RST = true;
  490. _recipeWarningChecker.RST = true;
  491. _recipeAlarmChecker.RST = true;
  492. }
  493. public override void Terminate()
  494. {
  495. Ramp(DefaultSetPoint, 0);
  496. }
  497. public override void Ramp(int time)
  498. {
  499. Ramp(DefaultSetPoint, time);
  500. }
  501. public override void Ramp(double target, int time)
  502. {
  503. target = Math.Max(0, target);
  504. target = Math.Min(Scale, target);
  505. rampInitValue = SetPoint; //ramp 初始值取当前设定值,而非实际读取值。零漂问题
  506. rampTime = time;
  507. rampTarget = target;
  508. rampTimer.Start(rampTime);
  509. }
  510. public override void StopRamp()
  511. {
  512. Ramp(SetPoint, 0);
  513. }
  514. private void Ramping()
  515. {
  516. if (rampTimer.IsTimeout() || rampTime == 0)
  517. {
  518. SetPoint = rampTarget;
  519. }
  520. else
  521. {
  522. SetPoint = rampInitValue + (rampTarget - rampInitValue) * rampTimer.GetElapseTime() / rampTime;
  523. }
  524. }
  525. private void CheckTolerance()
  526. {
  527. if (!Enable)
  528. return;
  529. if (Math.Abs(SetPoint) < 0.01)
  530. return;
  531. double alarmRange = _scAlarmRange.IntValue;
  532. double alarmTime = _scAlarmTime.IntValue;
  533. ToleranceChecker alarmChecker = _alarmChecker;
  534. if ((_recipeAlarmRange > 0) && (_recipeAlarmRange / 100.0 * SetPoint < _scAlarmRange.IntValue))
  535. {
  536. alarmRange = _recipeAlarmRange / 100.0 * SetPoint;
  537. alarmChecker = _recipeAlarmChecker;
  538. _alarmChecker.RST = true;
  539. }
  540. else
  541. {
  542. if (!EnableAlarm || Math.Abs(alarmRange)<0.01)
  543. {
  544. alarmChecker = null;
  545. }
  546. _recipeAlarmChecker.RST = true;
  547. }
  548. if (_recipeIgnoreTimer.GetElapseTime() > _recipeIgnoreTimeMS && alarmChecker!=null)
  549. {
  550. alarmChecker.Monitor(FeedBack, SetPoint - Math.Abs(alarmRange), SetPoint + Math.Abs(alarmRange), alarmTime);
  551. if (alarmChecker.Trig)
  552. {
  553. EV.PostAlarmLog(Module, $" flow={FeedBack}, setpoint={SetPoint}, out of tolerance({SetPoint - Math.Abs(alarmRange)},{SetPoint + Math.Abs(alarmRange)}) in {alarmTime:0} seconds");
  554. EV.Notify(GasFlowOutOfTolerance);
  555. }
  556. }
  557. double warningRange = _scWarningRange.IntValue;
  558. double warningTime = _scWarningTime.IntValue;
  559. ToleranceChecker warningChecker = _warningChecker;
  560. if ((_recipeWarningRange > 0) && (_recipeWarningRange / 100.0 * SetPoint < _scWarningRange.IntValue))
  561. {
  562. warningRange = _recipeWarningRange / 100.0 * SetPoint;
  563. warningChecker = _recipeWarningChecker;
  564. _warningChecker.RST = true;
  565. }
  566. else
  567. {
  568. if (!EnableAlarm || Math.Abs(warningRange) < 0.01)
  569. {
  570. warningChecker = null;
  571. }
  572. _recipeWarningChecker.RST = true;
  573. }
  574. if (_recipeIgnoreTimer.GetElapseTime() > _recipeIgnoreTimeMS && warningChecker!=null)
  575. {
  576. warningChecker.Monitor(FeedBack, SetPoint - Math.Abs(warningRange), SetPoint + Math.Abs(warningRange), warningTime);
  577. if (warningChecker.Trig)
  578. {
  579. EV.PostWarningLog(Module, $" flow={FeedBack}, setpoint={SetPoint}, out of tolerance({SetPoint - Math.Abs(warningRange)},{SetPoint + Math.Abs(warningRange)}) in {warningTime:0} seconds");
  580. }
  581. }
  582. }
  583. }
  584. }