SystemFacilitiesViewModel.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. using Aitex.Core.RT.DataCenter;
  2. using Aitex.Core.RT.Log;
  3. using Aitex.Core.UI.Dialog;
  4. using Aitex.Core.UI.MVVM;
  5. using Aitex.Core.Util;
  6. using Aitex.Core.Utilities;
  7. using MECF.Framework.Common.CommonData;
  8. using MECF.Framework.Common.DataCenter;
  9. using MECF.Framework.Common.Equipment;
  10. using MECF.Framework.Common.OperationCenter;
  11. using MECF.Framework.Common.RecipeCenter;
  12. using MECF.Framework.Common.Utilities;
  13. using PunkHPX8_Core;
  14. using PunkHPX8_MainPages.PMs;
  15. using PunkHPX8_Themes.UserControls;
  16. using Prism.Mvvm;
  17. using System;
  18. using System.Collections.Generic;
  19. using System.Collections.ObjectModel;
  20. using System.ComponentModel;
  21. using System.Linq;
  22. using System.Reflection;
  23. using System.Text;
  24. using System.Threading.Tasks;
  25. using System.Timers;
  26. using System.Windows;
  27. using System.Windows.Input;
  28. using System.Windows.Threading;
  29. namespace PunkHPX8_MainPages.ViewModels
  30. {
  31. public class SystemFacilitiesViewModel : BindableBase
  32. {
  33. #region 常量
  34. private const string FACILITIES = "Facilities";
  35. private const string FACILITIES_DATA = "Facilities_Data";
  36. private const string N2_ENABLE = "N2Enable";
  37. private const string CDA_ENABLE = "CDAEnable";
  38. private const string EXTERNAL_CDA_ENABLE = "ExternalCDAEnable";
  39. private const string DI_WATER_ENABLE = "DiWaterEnable";
  40. private const string HOUSE_CHILLED_WATER_ENABLE="HouseChilledWaterEnable";
  41. private const string VPW_DI_ENABLE = "VpwDiEnable";
  42. private const string DI_REPLEN_ENABLE = "DiReplenEnable";
  43. private const string DI_FILL_ENABLE = "DiFillEnable";
  44. private const string SRD_DI_ENABLE = "SrdDiwEnable";
  45. private const string SAMPLE_STATION_ENABLE = "SampleStationEnable";
  46. private const string FILTER_PURGE_ENABLE = "FilterPurgeEnable";
  47. private const string N2_BLANKET_PRESSURE_VALUE = "N2BlanketPressure";
  48. private const string N2_OVERFLOW_PRESSURE_VALUE = "N2OverflowPressure";
  49. private const string CLAMSHELL_CYLINDER_PRESSURE_VALUE = "ClamshellCylinderPressure";
  50. private const string TILT_CYLINDER_PRESSURE_VALUE = "TiltCylinderPressure";
  51. private const string FFU_PLATECELL_PRESSURE_ERROR = "FFUPlateCellPressureError";
  52. private const string FFU_CORRIDOR_PRESSURE_ERROR = "FFUCorridorPressureError";
  53. private const string FFU_PLATECELL_PRESSURE_PRESSURE = "FFUPlateCellPressure";
  54. private const string FFU_CORRIDOR_PRESSURE = "FFUCorridorPressure";
  55. #endregion
  56. #region 内部变量
  57. private CommonLimitData _nitrogen1AData = new CommonLimitData();
  58. private CommonLimitData _nitrogen1BData = new CommonLimitData();
  59. private CommonLimitData _nitrogen2AData = new CommonLimitData();
  60. private CommonLimitData _nitrogen2BData = new CommonLimitData();
  61. private CommonLimitData _cda1Data = new CommonLimitData();
  62. private CommonLimitData _cda2Data = new CommonLimitData();
  63. private CommonLimitData _extendCdaData = new CommonLimitData();
  64. private CommonLimitData _systemVacuumData = new CommonLimitData();
  65. private CommonLimitData _systemExhaust1Data = new CommonLimitData();
  66. private CommonLimitData _systemExhaust2Data = new CommonLimitData();
  67. private CommonLimitData _diWaterPressureData = new CommonLimitData();
  68. private CommonLimitData _diWaterReturnFlowData = new CommonLimitData();
  69. private CommonLimitData _houseChilledWaterFlowData = new CommonLimitData();
  70. private bool _nitrogenOn;
  71. private bool _cdaOn;
  72. private bool _extendCdaOn;
  73. private bool _diWaterPressureOn;
  74. private bool _houseChilledWaterFlowOn;
  75. private bool _vpwDiWEnable;
  76. private bool _diFillEnable;
  77. private bool _diReplenEnable;
  78. private bool _srdDiWEnable;
  79. private bool _sampleStationEnable;
  80. private bool _filterPurgeEnable;
  81. private bool _plateCellFFUPressureError;
  82. private bool _corridorFFUPressureError;
  83. private double _n2BlanketPressure;
  84. private double _n2OverflowPressure;
  85. private double _clamshellCylinderPressure;
  86. private double _tiltCylinderPressure;
  87. private double _plateCellFFUPressure;
  88. private double _corridorFFUPressure;
  89. private int _allStatus;
  90. /// <summary>
  91. /// 定时器
  92. /// </summary>
  93. DispatcherTimer _timer;
  94. /// <summary>
  95. /// 查询后台数据集合
  96. /// </summary>
  97. private List<string> _rtDataKeys = new List<string>();
  98. /// <summary>
  99. /// rt查询key数值字典
  100. /// </summary>
  101. private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
  102. #region Home
  103. #endregion
  104. #endregion
  105. #region 属性
  106. public CommonLimitData Nitrogen1AData{ get { return _nitrogen1AData; } set { SetProperty(ref _nitrogen1AData, value); } }
  107. public CommonLimitData Nitrogen1BData { get { return _nitrogen1BData; } set { SetProperty(ref _nitrogen1BData, value); }}
  108. public CommonLimitData Nitrogen2AData { get { return _nitrogen2AData; } set { SetProperty(ref _nitrogen2AData, value); } }
  109. public CommonLimitData Nitrogen2BData { get { return _nitrogen2BData; } set { SetProperty(ref _nitrogen2BData, value); } }
  110. public CommonLimitData SystemVacuumData { get { return _systemVacuumData; } set { SetProperty(ref _systemVacuumData, value); } }
  111. public CommonLimitData Cda1Data { get { return _cda1Data; }set { SetProperty(ref _cda1Data, value); } }
  112. public CommonLimitData Cda2Data{ get { return _cda2Data; } set { SetProperty(ref _cda2Data, value); }}
  113. public CommonLimitData ExtendCdaData{ get { return _extendCdaData; } set { SetProperty(ref _extendCdaData, value); }}
  114. public CommonLimitData SystemExhaust1Data { get { return _systemExhaust1Data; } set { SetProperty(ref _systemExhaust1Data, value); } }
  115. public CommonLimitData SystemExhaust2Data { get { return _systemExhaust2Data; } set { SetProperty(ref _systemExhaust2Data, value); } }
  116. public CommonLimitData DiWaterPressureData { get { return _diWaterPressureData; } set { SetProperty(ref _diWaterPressureData, value); }}
  117. public CommonLimitData DiWaterReturnFlowData { get { return _diWaterReturnFlowData; } set { SetProperty(ref _diWaterReturnFlowData, value); }}
  118. public CommonLimitData HouseChilledWaterFlowData{ get { return _houseChilledWaterFlowData; } set { SetProperty(ref _houseChilledWaterFlowData, value); }}
  119. public bool NitrogenOn { get { return _nitrogenOn; } set { SetProperty(ref _nitrogenOn, value); }}
  120. public bool CdaOn { get { return _cdaOn; } set { SetProperty(ref _cdaOn, value); } }
  121. public bool ExtendCdaOn { get { return _extendCdaOn; } set { SetProperty(ref _extendCdaOn, value); } }
  122. public bool DiWaterPressureOn{ get { return _diWaterPressureOn; } set { SetProperty(ref _diWaterPressureOn, value); } }
  123. public bool HouseChilledWaterFlowOn { get { return _houseChilledWaterFlowOn; } set { SetProperty(ref _houseChilledWaterFlowOn, value); } }
  124. public bool DiFillEnable{ get { return _diFillEnable; } set { SetProperty(ref _diFillEnable, value); }}
  125. public bool DiReplenEnable{get { return _diReplenEnable; }set { SetProperty(ref _diReplenEnable, value); } }
  126. public bool SrdDiWEnable { get { return _srdDiWEnable; } set { SetProperty(ref _srdDiWEnable, value); } }
  127. public bool SampleStationEnable { get { return _sampleStationEnable; } set { SetProperty(ref _sampleStationEnable, value); } }
  128. public bool FilterPurgeEnable{ get { return _filterPurgeEnable; } set { SetProperty(ref _filterPurgeEnable, value);} }
  129. public double N2BlanketPressure { get { return _n2BlanketPressure; } set { SetProperty(ref _n2BlanketPressure, value); } }
  130. public double N2OverflowPressure { get { return _n2OverflowPressure; } set { SetProperty(ref _n2OverflowPressure, value); } }
  131. public double ClamshellCylinderPressure { get { return _clamshellCylinderPressure; } set { SetProperty(ref _clamshellCylinderPressure, value); } }
  132. public double TiltCylinderPressure { get { return _tiltCylinderPressure; } set { SetProperty(ref _tiltCylinderPressure, value); } }
  133. public int AllStatus { get { return _allStatus; } set { SetProperty(ref _allStatus, value); } }
  134. #region FFU
  135. public bool PlateCellFFUPressureError { get { return _plateCellFFUPressureError; } set { SetProperty(ref _plateCellFFUPressureError, value); } }
  136. public bool CorridorFFUPressureError { get { return _corridorFFUPressureError; } set { SetProperty(ref _corridorFFUPressureError, value); } }
  137. public double PlateCellFFUPressure { get { return _plateCellFFUPressure; } set { SetProperty(ref _plateCellFFUPressure, value); } }
  138. public double CorridorFFUPressure { get { return _corridorFFUPressure; } set { SetProperty(ref _corridorFFUPressure, value); } }
  139. #endregion
  140. #region Other Module
  141. public bool VpwDiWEnable { get { return _vpwDiWEnable; } set { SetProperty(ref _vpwDiWEnable, value); } }
  142. #endregion
  143. #endregion
  144. #region 指令
  145. public ICommand NitrogenOnCommand{get;private set;}
  146. public ICommand NitrogenOffCommand{ get;private set;}
  147. public ICommand CDAOnCommand { get; private set; }
  148. public ICommand CDAOffCommand { get; private set; }
  149. public ICommand ExternalCDAOnCommand { get;private set; }
  150. public ICommand ExternalCDAOffCommand { get;private set; }
  151. public ICommand DiWaterPressureOnCommand { get; private set; }
  152. public ICommand DiWaterPressureOffCommand { get; private set; }
  153. public ICommand HouseChilledWaferFlowOnCommand { get; private set; }
  154. public ICommand HouseChilledWaferFlowOffCommand { get; private set; }
  155. public ICommand VpwDiwEnableCommand { get; private set; }
  156. public ICommand VpwDiwDisableCommand { get; private set; }
  157. public ICommand DiwFillEnableCommand { get; private set; }
  158. public ICommand DiwFillDisableCommand { get; private set; }
  159. public ICommand DiwReplenEnableCommand { get; private set; }
  160. public ICommand DiwReplenDisableCommand { get; private set; }
  161. public ICommand SrdDiwEnableCommand { get; private set; }
  162. public ICommand SrdDiwDisableCommand { get; private set; }
  163. public ICommand SampleStationEnableCommand { get; private set; }
  164. public ICommand SampleStationDisableCommand { get; private set; }
  165. public ICommand FilterPurgeEnableCommand { get; private set; }
  166. public ICommand FilterPurgeDisableCommand { get; private set; }
  167. public ICommand AllOnCommand { get; private set; }
  168. public ICommand AllOffCommand { get; private set; }
  169. #endregion
  170. /// <summary>
  171. /// 构造函数
  172. /// </summary>
  173. public SystemFacilitiesViewModel()
  174. {
  175. NitrogenOnCommand = new DelegateCommand<object>(NitrogenOnAction);
  176. NitrogenOffCommand = new DelegateCommand<object>(NitrogenOffAction);
  177. CDAOnCommand=new DelegateCommand<object>(CDAOnAction);
  178. CDAOffCommand=new DelegateCommand<object>(CDAOffAction);
  179. ExternalCDAOnCommand = new DelegateCommand<object>(ExternalCDAOnAction);
  180. ExternalCDAOffCommand = new DelegateCommand<object>(ExternalCDAOffAction);
  181. DiWaterPressureOnCommand = new DelegateCommand<object>(DiWaterOnAction);
  182. DiWaterPressureOffCommand = new DelegateCommand<object>(DiWaterOffAction);
  183. HouseChilledWaferFlowOnCommand = new DelegateCommand<object>(HouseChilledWaterOnAction);
  184. HouseChilledWaferFlowOffCommand = new DelegateCommand<object>(HouseChilledWaterOffAction);
  185. VpwDiwEnableCommand = new DelegateCommand<object>(VpwDiwEnableAction);
  186. VpwDiwDisableCommand = new DelegateCommand<object>(VpwDiwDisableAction);
  187. DiwFillEnableCommand = new DelegateCommand<object>(DiwFillEnableAction);
  188. DiwFillDisableCommand=new DelegateCommand<object>(DiwFillDisableAction);
  189. DiwReplenEnableCommand = new DelegateCommand<object>(DiwReplenEnableAction);
  190. DiwReplenDisableCommand = new DelegateCommand<object>(DiwReplenDisableAction);
  191. SrdDiwEnableCommand = new DelegateCommand<object>(SrdDiEnableAction);
  192. SrdDiwDisableCommand = new DelegateCommand<object>(SrdDiDisableAction);
  193. SampleStationEnableCommand = new DelegateCommand<object>(SampleStationEnableAction);
  194. SampleStationDisableCommand = new DelegateCommand<object>(SampleStationDisableAction);
  195. FilterPurgeEnableCommand = new DelegateCommand<object>(FilterPurgeEnableAction);
  196. FilterPurgeDisableCommand = new DelegateCommand<object>(FilterPurgeDisableAction);
  197. AllOnCommand = new DelegateCommand<object>(AllOnAction);
  198. AllOffCommand = new DelegateCommand<object>(AllOffAction);
  199. }
  200. /// <summary>
  201. /// 加载数据
  202. /// </summary>
  203. public void LoadData(string systemName)
  204. {
  205. InitialKeys();
  206. if (_timer == null)
  207. {
  208. _timer = new DispatcherTimer();
  209. _timer.Interval = TimeSpan.FromMilliseconds(200) ;
  210. _timer.Tick += Timer_Tick; ;
  211. }
  212. _timer.Start();
  213. }
  214. /// <summary>
  215. /// 定时器执行
  216. /// </summary>
  217. /// <param name="sender"></param>
  218. /// <param name="e"></param>
  219. /// <exception cref="NotImplementedException"></exception>
  220. private void Timer_Tick(object sender, EventArgs e)
  221. {
  222. if (_rtDataKeys.Count != 0)
  223. {
  224. _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  225. if (_rtDataValueDic != null)
  226. {
  227. List<CommonLimitData> facilitiesDatas = CommonFunction.GetValue<List<CommonLimitData>>(_rtDataValueDic, $"System.{FACILITIES}.{FACILITIES_DATA}");
  228. if (facilitiesDatas != null)
  229. {
  230. Cda1Data = facilitiesDatas[0];
  231. Cda2Data = facilitiesDatas[1];
  232. Nitrogen1AData = facilitiesDatas[2];
  233. Nitrogen1BData = facilitiesDatas[3];
  234. Nitrogen2AData = facilitiesDatas[4];
  235. Nitrogen2BData = facilitiesDatas[5];
  236. DiWaterPressureData = facilitiesDatas[6];
  237. HouseChilledWaterFlowData = facilitiesDatas[7];
  238. ExtendCdaData = facilitiesDatas[8];
  239. SystemVacuumData = facilitiesDatas[9];
  240. SystemExhaust1Data = facilitiesDatas[10];
  241. SystemExhaust2Data = facilitiesDatas[11];
  242. DiWaterReturnFlowData = facilitiesDatas[12];
  243. }
  244. NitrogenOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{N2_ENABLE}");
  245. CdaOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{CDA_ENABLE}");
  246. ExtendCdaOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{EXTERNAL_CDA_ENABLE}");
  247. DiWaterPressureOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{DI_WATER_ENABLE}");
  248. HouseChilledWaterFlowOn = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{HOUSE_CHILLED_WATER_ENABLE}");
  249. VpwDiWEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"VPWMain1.DiwEnable");
  250. DiFillEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{DI_FILL_ENABLE}");
  251. DiReplenEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{DI_REPLEN_ENABLE}");
  252. SrdDiWEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{SRD_DI_ENABLE}");
  253. SampleStationEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{SAMPLE_STATION_ENABLE}");
  254. FilterPurgeEnable = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{FILTER_PURGE_ENABLE}");
  255. N2BlanketPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{N2_BLANKET_PRESSURE_VALUE}");
  256. N2OverflowPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{N2_OVERFLOW_PRESSURE_VALUE}");
  257. ClamshellCylinderPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{CLAMSHELL_CYLINDER_PRESSURE_VALUE}");
  258. TiltCylinderPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{TILT_CYLINDER_PRESSURE_VALUE}");
  259. PlateCellFFUPressureError = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_PLATECELL_PRESSURE_ERROR}");
  260. CorridorFFUPressureError = CommonFunction.GetValue<bool>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE_ERROR}");
  261. PlateCellFFUPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_PLATECELL_PRESSURE_PRESSURE}");
  262. CorridorFFUPressure = CommonFunction.GetValue<double>(_rtDataValueDic, $"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE}");
  263. AllStatus = (NitrogenOn && ExtendCdaOn && CdaOn && DiWaterPressureOn && HouseChilledWaterFlowOn && VpwDiWEnable && DiFillEnable && DiReplenEnable && SrdDiWEnable && SampleStationEnable && FilterPurgeEnable) ? 1 :
  264. (!NitrogenOn && !CdaOn && !ExtendCdaOn && !DiWaterPressureOn && !HouseChilledWaterFlowOn && !VpwDiWEnable && !DiFillEnable && !DiReplenEnable && !SrdDiWEnable && !SampleStationEnable && !FilterPurgeEnable) ? 0 : -1;
  265. }
  266. }
  267. }
  268. /// <summary>
  269. /// 隐藏
  270. /// </summary>
  271. public void Hide()
  272. {
  273. if (_timer != null)
  274. {
  275. _timer.Stop();
  276. }
  277. }
  278. /// <summary>
  279. /// 初始化Keys
  280. /// </summary>
  281. private void InitialKeys()
  282. {
  283. _rtDataKeys.Clear();
  284. _rtDataKeys.Add($"System.{FACILITIES}.{FACILITIES_DATA}");
  285. _rtDataKeys.Add($"System.{FACILITIES}.{N2_ENABLE}");
  286. _rtDataKeys.Add($"System.{FACILITIES}.{CDA_ENABLE}");
  287. _rtDataKeys.Add($"System.{FACILITIES}.{EXTERNAL_CDA_ENABLE}");
  288. _rtDataKeys.Add($"System.{FACILITIES}.{DI_WATER_ENABLE}");
  289. _rtDataKeys.Add($"System.{FACILITIES}.{HOUSE_CHILLED_WATER_ENABLE}");
  290. _rtDataKeys.Add($"System.{FACILITIES}.{VPW_DI_ENABLE}");
  291. _rtDataKeys.Add($"System.{FACILITIES}.{DI_FILL_ENABLE}");
  292. _rtDataKeys.Add($"System.{FACILITIES}.{DI_REPLEN_ENABLE}");
  293. _rtDataKeys.Add($"System.{FACILITIES}.{SRD_DI_ENABLE}");
  294. _rtDataKeys.Add($"System.{FACILITIES}.{SAMPLE_STATION_ENABLE}");
  295. _rtDataKeys.Add($"System.{FACILITIES}.{FILTER_PURGE_ENABLE}");
  296. _rtDataKeys.Add($"System.{FACILITIES}.{N2_BLANKET_PRESSURE_VALUE}");
  297. _rtDataKeys.Add($"System.{FACILITIES}.{N2_OVERFLOW_PRESSURE_VALUE}");
  298. _rtDataKeys.Add($"System.{FACILITIES}.{CLAMSHELL_CYLINDER_PRESSURE_VALUE}");
  299. _rtDataKeys.Add($"System.{FACILITIES}.{TILT_CYLINDER_PRESSURE_VALUE}");
  300. _rtDataKeys.Add($"System.{FACILITIES}.{FFU_PLATECELL_PRESSURE_ERROR}");
  301. _rtDataKeys.Add($"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE_ERROR}");
  302. _rtDataKeys.Add($"System.{FACILITIES}.{FFU_PLATECELL_PRESSURE_PRESSURE}");
  303. _rtDataKeys.Add($"System.{FACILITIES}.{FFU_CORRIDOR_PRESSURE}");
  304. _rtDataKeys.Add($"VPWMain1.DiwEnable");
  305. }
  306. #region 指令Action
  307. /// <summary>
  308. /// Loader Home
  309. /// </summary>
  310. /// <param name="param"></param>
  311. private void HomeLoaderAction(object param)
  312. {
  313. InvokeClient.Instance.Service.DoOperation($"{ModuleName.Loader1}.Common.HomeAll");
  314. }
  315. /// <summary>
  316. /// EFEM Home
  317. /// </summary>
  318. /// <param name="param"></param>
  319. private void HomeEfemAction(object param)
  320. {
  321. InvokeClient.Instance.Service.DoOperation($"{ModuleName.EFEM}.Home");
  322. }
  323. /// <summary>
  324. /// Loader Transporter Home
  325. /// </summary>
  326. /// <param name="param"></param>
  327. private void HomeSRDsAction(object param)
  328. {
  329. InvokeClient.Instance.Service.DoOperation($"{ModuleName.SRD1}.HomeAll");
  330. InvokeClient.Instance.Service.DoOperation($"{ModuleName.SRD2}.HomeAll");
  331. }
  332. /// <summary>
  333. /// N2 Enable
  334. /// </summary>
  335. /// <param name="param"></param>
  336. private void NitrogenOnAction(object param)
  337. {
  338. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.N2Enable");
  339. }
  340. /// <summary>
  341. /// N2 Disable
  342. /// </summary>
  343. /// <param name="param"></param>
  344. private void NitrogenOffAction(object param)
  345. {
  346. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.N2Disable");
  347. }
  348. /// <summary>
  349. /// CDA Enable
  350. /// </summary>
  351. /// <param name="param"></param>
  352. private void CDAOnAction(object param)
  353. {
  354. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.CDAEnable");
  355. }
  356. /// <summary>
  357. /// CDA Disable
  358. /// </summary>
  359. /// <param name="param"></param>
  360. private void CDAOffAction(object param)
  361. {
  362. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.CDADisable");
  363. }
  364. /// <summary>
  365. /// External CDA Enable
  366. /// </summary>
  367. /// <param name="param"></param>
  368. private void ExternalCDAOnAction(object param)
  369. {
  370. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.ExternalCDAEnable");
  371. }
  372. /// <summary>
  373. /// External CDA Disable
  374. /// </summary>
  375. /// <param name="param"></param>
  376. private void ExternalCDAOffAction(object param)
  377. {
  378. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.ExternalCDADisable");
  379. }
  380. /// <summary>
  381. /// DI Water Enable
  382. /// </summary>
  383. /// <param name="param"></param>
  384. private void DiWaterOnAction(object param)
  385. {
  386. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiWaterEnable");
  387. }
  388. /// <summary>
  389. /// DI Water Disable
  390. /// </summary>
  391. /// <param name="param"></param>
  392. private void DiWaterOffAction(object param)
  393. {
  394. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiWaterDisable");
  395. }
  396. /// <summary>
  397. /// House Chilled Water Enable
  398. /// </summary>
  399. /// <param name="param"></param>
  400. private void HouseChilledWaterOnAction(object param)
  401. {
  402. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.HouseChilledWaterEnable");
  403. }
  404. /// <summary>
  405. /// House Chilled Water Disable
  406. /// </summary>
  407. /// <param name="param"></param>
  408. private void HouseChilledWaterOffAction(object param)
  409. {
  410. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.HouseChilledWaterDisable");
  411. }
  412. /// <summary>
  413. /// VPW DI Enable
  414. /// </summary>
  415. /// <param name="param"></param>
  416. private void VpwDiwEnableAction(object param)
  417. {
  418. InvokeClient.Instance.Service.DoOperation($"VPWMain1.DiwEnable");
  419. }
  420. /// <summary>
  421. /// VPW DI Disable
  422. /// </summary>
  423. /// <param name="param"></param>
  424. private void VpwDiwDisableAction(object param)
  425. {
  426. InvokeClient.Instance.Service.DoOperation($"VPWMain1.DiwDisable");
  427. }
  428. /// <summary>
  429. /// DI Fill Enable
  430. /// </summary>
  431. /// <param name="param"></param>
  432. private void DiwFillEnableAction(object param)
  433. {
  434. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiFillEnable");
  435. }
  436. /// <summary>
  437. /// DI Fill Disable
  438. /// </summary>
  439. /// <param name="param"></param>
  440. private void DiwFillDisableAction(object param)
  441. {
  442. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiFillDisable");
  443. }
  444. /// <summary>
  445. /// DI Replen Enable
  446. /// </summary>
  447. /// <param name="param"></param>
  448. private void DiwReplenEnableAction(object param)
  449. {
  450. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiReplenEnable");
  451. }
  452. /// <summary>
  453. /// DI Replen Disable
  454. /// </summary>
  455. /// <param name="param"></param>
  456. private void DiwReplenDisableAction(object param)
  457. {
  458. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.DiReplenDisable");
  459. }
  460. /// <summary>
  461. /// Srd diw Enable
  462. /// </summary>
  463. /// <param name="param"></param>
  464. private void SrdDiEnableAction(object param)
  465. {
  466. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.SrdDiwEnable");
  467. }
  468. /// <summary>
  469. /// Srd diw Disable
  470. /// </summary>
  471. /// <param name="param"></param>
  472. private void SrdDiDisableAction(object param)
  473. {
  474. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.SrdDiwDisable");
  475. }
  476. /// <summary>
  477. /// Filter Purge Enable
  478. /// </summary>
  479. /// <param name="param"></param>
  480. private void FilterPurgeEnableAction(object param)
  481. {
  482. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.FilterPurgeEnable");
  483. }
  484. /// <summary>
  485. /// Filter Purge Disable
  486. /// </summary>
  487. /// <param name="param"></param>
  488. private void FilterPurgeDisableAction(object param)
  489. {
  490. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.FilterPurgeDisable");
  491. }
  492. /// <summary>
  493. /// Filter Purge Enable
  494. /// </summary>
  495. /// <param name="param"></param>
  496. private void SampleStationEnableAction(object param)
  497. {
  498. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.SampleStationEnable");
  499. }
  500. /// <summary>
  501. /// Filter Purge Disable
  502. /// </summary>
  503. /// <param name="param"></param>
  504. private void SampleStationDisableAction(object param)
  505. {
  506. InvokeClient.Instance.Service.DoOperation($"System.{FACILITIES}.SampleStationDisable");
  507. }
  508. /// <summary>
  509. /// All On
  510. /// </summary>
  511. /// <param name="param"></param>
  512. private void AllOnAction(object param)
  513. {
  514. NitrogenOnAction(param);
  515. CDAOnAction(param);
  516. //ExternalCDAOnAction(param);
  517. DiWaterOnAction(param);
  518. HouseChilledWaterOnAction(param);
  519. VpwDiwEnableAction(param);
  520. DiwFillEnableAction(param);
  521. DiwReplenEnableAction(param);
  522. SrdDiEnableAction(param);
  523. SampleStationEnableAction(param);
  524. FilterPurgeEnableAction(param);
  525. }
  526. /// <summary>
  527. /// All Off
  528. /// </summary>
  529. /// <param name="param"></param>
  530. private void AllOffAction(object param)
  531. {
  532. NitrogenOffAction(param);
  533. CDAOffAction(param);
  534. //ExternalCDAOffAction(param);
  535. DiWaterOffAction(param);
  536. HouseChilledWaterOffAction(param);
  537. VpwDiwDisableAction(param);
  538. DiwFillDisableAction(param);
  539. DiwReplenDisableAction(param);
  540. SrdDiDisableAction(param);
  541. SampleStationDisableAction(param);
  542. FilterPurgeDisableAction(param);
  543. }
  544. #endregion
  545. }
  546. }