PlcMessageShowBindingClass.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. using CCDCount.DLL;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Security.Cryptography.X509Certificates;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace CCDCountWpf
  10. {
  11. public class PlcMessageShowBindingClass : INotifyPropertyChanged
  12. {
  13. /// <summary>
  14. /// 使能完成
  15. /// </summary>
  16. private bool enableCompletion;
  17. public bool EnableCompletion
  18. {
  19. get { return enableCompletion; }
  20. set
  21. {
  22. enableCompletion = value;
  23. OnPropertyChanged("EnableCompletion");
  24. }
  25. }
  26. /// <summary>
  27. /// 归零完成
  28. /// </summary>
  29. private bool returnToZeroCompletion;
  30. public bool ReturnToZeroCompletion
  31. {
  32. get { return returnToZeroCompletion; }
  33. set
  34. {
  35. returnToZeroCompletion = value;
  36. OnPropertyChanged("ReturnToZeroCompletion");
  37. }
  38. }
  39. /// <summary>
  40. /// 停止完成
  41. /// </summary>
  42. private bool stopCompletion;
  43. public bool StopCompletion
  44. {
  45. get { return stopCompletion; }
  46. set
  47. {
  48. stopCompletion = value;
  49. OnPropertyChanged("StopCompletion");
  50. }
  51. }
  52. /// <summary>
  53. /// 速度运行
  54. /// </summary>
  55. private bool speedRunning;
  56. public bool SpeedRunning
  57. {
  58. get { return speedRunning; }
  59. set
  60. {
  61. speedRunning = value;
  62. OnPropertyChanged("SpeedRunning");
  63. }
  64. }
  65. /// <summary>
  66. /// 回零中
  67. /// </summary>
  68. private bool returnToZero;
  69. public bool ReturnToZero
  70. {
  71. get { return returnToZero; }
  72. set
  73. {
  74. returnToZero = value;
  75. OnPropertyChanged("ReturnToZero");
  76. }
  77. }
  78. /// <summary>
  79. /// 中转阀开定位完成
  80. /// </summary>
  81. private bool transferValveOpenCompletion;
  82. public bool TransferValveOpenCompletion
  83. {
  84. get { return transferValveOpenCompletion; }
  85. set
  86. {
  87. transferValveOpenCompletion = value;
  88. OnPropertyChanged("TransferValveOpenCompletion");
  89. }
  90. }
  91. /// <summary>
  92. /// 中转阀关定位完成
  93. /// </summary>
  94. private bool transferValveCloseCompletion;
  95. public bool TransferValveCloseCompletion
  96. {
  97. get { return transferValveCloseCompletion; }
  98. set
  99. {
  100. transferValveCloseCompletion = value;
  101. OnPropertyChanged("TransferValveCloseCompletion");
  102. }
  103. }
  104. /// <summary>
  105. /// 允许数据交换
  106. /// </summary>
  107. private bool allowsDataExchange;
  108. public bool AllowsDataExchange
  109. {
  110. get { return allowsDataExchange; }
  111. set
  112. {
  113. allowsDataExchange = value;
  114. OnPropertyChanged("AllowsDataExchange");
  115. }
  116. }
  117. /// <summary>
  118. /// 暂停数据交换
  119. /// </summary>
  120. private bool pauseDataExchange;
  121. public bool PauseDataExchange
  122. {
  123. get { return pauseDataExchange; }
  124. set
  125. {
  126. pauseDataExchange = value;
  127. OnPropertyChanged("PauseDataExchange");
  128. }
  129. }
  130. /// <summary>
  131. /// 缓存计数延迟完成
  132. /// </summary>
  133. private bool cacheCountDelayed;
  134. public bool CacheCountDelayed
  135. {
  136. get { return cacheCountDelayed; }
  137. set
  138. {
  139. cacheCountDelayed = value;
  140. OnPropertyChanged("CacheCountDelayed");
  141. }
  142. }
  143. /// <summary>
  144. /// 使能
  145. /// </summary>
  146. private bool enable;
  147. public bool Enable
  148. {
  149. get { return enable; }
  150. set
  151. {
  152. enable = value;
  153. OnPropertyChanged("Enable");
  154. }
  155. }
  156. /// <summary>
  157. /// 送瓶轮使能完成
  158. /// </summary>
  159. private bool bottleFeedingWheelEnableCompletion;
  160. public bool BottleFeedingWheelEnableCompletion
  161. {
  162. get { return bottleFeedingWheelEnableCompletion; }
  163. set
  164. {
  165. bottleFeedingWheelEnableCompletion = value;
  166. OnPropertyChanged("BottleFeedingWheelEnableCompletion");
  167. }
  168. }
  169. /// <summary>
  170. /// 送瓶轮停止完成
  171. /// </summary>
  172. private bool bottleFeedingWheelStopCompletion;
  173. public bool BottleFeedingWheelStopCompletion
  174. {
  175. get { return bottleFeedingWheelStopCompletion; }
  176. set
  177. {
  178. bottleFeedingWheelStopCompletion = value;
  179. OnPropertyChanged("BottleFeedingWheelStopCompletion");
  180. }
  181. }
  182. /// <summary>
  183. /// 速度模式运行速度
  184. /// </summary>
  185. private float speedModeRunningSpeed;
  186. public string SpeedModeRunningSpeed
  187. {
  188. get { return speedModeRunningSpeed.ToString("F2"); }
  189. set
  190. {
  191. if (float.TryParse(value, out float result))
  192. {
  193. speedModeRunningSpeed = result;
  194. PlcSettingMessageBus.pLCManagement.WriteSpeedModeRunningSpeed(result);
  195. OnPropertyChanged("SpeedModeRunningSpeed");
  196. }
  197. }
  198. }
  199. /// <summary>
  200. /// 点动速度
  201. /// </summary>
  202. private float jogSpeed;
  203. public string JogSpeed
  204. {
  205. get { return jogSpeed.ToString("F2"); }
  206. set
  207. {
  208. if (float.TryParse(value, out float result))
  209. {
  210. jogSpeed = result;
  211. PlcSettingMessageBus.pLCManagement.WriteJogSpeed(result);
  212. OnPropertyChanged("JogSpeed");
  213. }
  214. }
  215. }
  216. /// <summary>
  217. /// 瓶装设定值
  218. /// </summary>
  219. private ushort bottValueSet;
  220. public ushort BottValueSet
  221. {
  222. get { return bottValueSet; }
  223. set
  224. {
  225. bottValueSet = value;
  226. PlcSettingMessageBus.pLCManagement.WriteBottValueSet(value);
  227. OnPropertyChanged("BottValueSet");
  228. }
  229. }
  230. /// <summary>
  231. /// 中转阀打开速度
  232. /// </summary>
  233. private float transferValveOpeningSpeed;
  234. public string TransferValveOpeningSpeed
  235. {
  236. get { return transferValveOpeningSpeed.ToString("F2"); }
  237. set
  238. {
  239. if (float.TryParse(value, out float result))
  240. {
  241. transferValveOpeningSpeed = result;
  242. PlcSettingMessageBus.pLCManagement.WriteTransferValveOpeningSpeed(result);
  243. OnPropertyChanged("TransferValveOpeningSpeed");
  244. }
  245. }
  246. }
  247. /// <summary>
  248. /// 中转阀打开时间
  249. /// </summary>
  250. private UInt32 transferValveOpeningTime;
  251. public UInt32 TransferValveOpeningTime
  252. {
  253. get { return transferValveOpeningTime; }
  254. set
  255. {
  256. transferValveOpeningTime = value;
  257. PlcSettingMessageBus.pLCManagement.WriteTransferValveOpeningTime(value);
  258. OnPropertyChanged("TransferValveOpeningTime");
  259. }
  260. }
  261. /// <summary>
  262. /// 罐装减速值
  263. /// </summary>
  264. private ushort bottingDecelerationValue;
  265. public ushort BottingDecelerationValue
  266. {
  267. get { return bottingDecelerationValue; }
  268. set
  269. {
  270. bottingDecelerationValue = value;
  271. PlcSettingMessageBus.pLCManagement.WriteBottingDecelerationValue(value);
  272. OnPropertyChanged("BottingDecelerationValue");
  273. }
  274. }
  275. /// <summary>
  276. /// 缓存减速值
  277. /// </summary>
  278. private UInt16 cacheDecelerationValue { get; set;}
  279. public UInt16 CacheDecelerationValue
  280. {
  281. get { return cacheDecelerationValue; }
  282. set
  283. {
  284. cacheDecelerationValue = value;
  285. PlcSettingMessageBus.pLCManagement.WriteCacheDecelerationValue(value);
  286. OnPropertyChanged("CacheDecelerationValue");
  287. }
  288. }
  289. /// <summary>
  290. /// 缓存计数延迟时间
  291. /// </summary>
  292. private UInt32 cacheCountDelayTiming;
  293. public UInt32 CacheCountDelayTiming
  294. {
  295. get { return cacheCountDelayTiming; }
  296. set
  297. {
  298. cacheCountDelayTiming = value;
  299. PlcSettingMessageBus.pLCManagement.WriteCacheCountDelayTiming(value);
  300. OnPropertyChanged("CacheCountDelayTiming");
  301. }
  302. }
  303. /// <summary>
  304. /// 缓存停机值
  305. /// </summary>
  306. private ushort cacheShutdownValue;
  307. public ushort CacheShutdownValue
  308. {
  309. get { return cacheShutdownValue; }
  310. set
  311. {
  312. cacheShutdownValue = value;
  313. PlcSettingMessageBus.pLCManagement.WriteCacheShutdownValue(value);
  314. OnPropertyChanged("CacheShutdownValue");
  315. }
  316. }
  317. /// <summary>
  318. /// 罐装料筒震台高速值
  319. /// </summary>
  320. private ushort bottingMaterialCylinderVibrationTableHighSpeedValue;
  321. public ushort BottingMaterialCylinderVibrationTableHighSpeedValue
  322. {
  323. get { return bottingMaterialCylinderVibrationTableHighSpeedValue; }
  324. set
  325. {
  326. bottingMaterialCylinderVibrationTableHighSpeedValue = value;
  327. PlcSettingMessageBus.pLCManagement.WriteBottingMaterialCylinderVibrationTableHighSpeedValue(value);
  328. OnPropertyChanged("BottingMaterialCylinderVibrationTableHighSpeedValue");
  329. }
  330. }
  331. /// <summary>
  332. /// 罐装过滤震台高速值
  333. /// </summary>
  334. private ushort bottingFilterVibrationTableHighSpeedValue;
  335. public ushort BottingFilterVibrationTableHighSpeedValue
  336. {
  337. get { return bottingFilterVibrationTableHighSpeedValue; }
  338. set
  339. {
  340. bottingFilterVibrationTableHighSpeedValue = value;
  341. PlcSettingMessageBus.pLCManagement.WriteBottingFilterVibrationTableHighSpeedValue(value);
  342. OnPropertyChanged("BottingFilterVibrationTableHighSpeedValue");
  343. }
  344. }
  345. /// <summary>
  346. /// 罐装计数震台高速值
  347. /// </summary>
  348. private ushort bottingCountVibrationTableHighSpeedValue;
  349. public ushort BottingCountVibrationTableHighSpeedValue
  350. {
  351. get { return bottingCountVibrationTableHighSpeedValue; }
  352. set
  353. {
  354. bottingCountVibrationTableHighSpeedValue = value;
  355. PlcSettingMessageBus.pLCManagement.WriteBottingCountVibrationTableHighSpeedValue(value);
  356. OnPropertyChanged("BottingCountVibrationTableHighSpeedValue");
  357. }
  358. }
  359. /// <summary>
  360. /// 罐装料筒震台减速值
  361. /// </summary>
  362. private ushort bottingMaterialCylinderVibrationTableDecelerationSpeedValue;
  363. public ushort BottingMaterialCylinderVibrationTableDecelerationSpeedValue
  364. {
  365. get { return bottingMaterialCylinderVibrationTableDecelerationSpeedValue; }
  366. set
  367. {
  368. bottingMaterialCylinderVibrationTableDecelerationSpeedValue = value;
  369. PlcSettingMessageBus.pLCManagement.WriteBottingMaterialCylinderVibrationTableDecelerationSpeedValue(value);
  370. OnPropertyChanged("BottingMaterialCylinderVibrationTableDecelerationSpeedValue");
  371. }
  372. }
  373. /// <summary>
  374. /// 罐装过滤震台减速值
  375. /// </summary>
  376. private ushort bottingFilterVibrationTableDecelerationSpeedValue;
  377. public ushort BottingFilterVibrationTableDecelerationSpeedValue
  378. {
  379. get { return bottingFilterVibrationTableDecelerationSpeedValue; }
  380. set
  381. {
  382. bottingFilterVibrationTableDecelerationSpeedValue = value;
  383. PlcSettingMessageBus.pLCManagement.WriteBottingFilterVibrationTableDecelerationSpeedValue(value);
  384. OnPropertyChanged("BottingFilterVibrationTableDecelerationSpeedValue");
  385. }
  386. }
  387. /// <summary>
  388. /// 罐装计数震台减速值
  389. /// </summary>
  390. private ushort bottingCountVibrationTableDecelerationSpeedValue;
  391. public ushort BottingCountVibrationTableDecelerationSpeedValue
  392. {
  393. get { return bottingCountVibrationTableDecelerationSpeedValue; }
  394. set
  395. {
  396. bottingCountVibrationTableDecelerationSpeedValue = value;
  397. PlcSettingMessageBus.pLCManagement.WriteBottingCountVibrationTableDecelerationSpeedValue(value);
  398. OnPropertyChanged("BottingCountVibrationTableDecelerationSpeedValue");
  399. }
  400. }
  401. /// <summary>
  402. /// 缓存料筒震台高速值
  403. /// </summary>
  404. private ushort cacheMaterialCylinderVibrationTableHighSpeedValue;
  405. public ushort CacheMaterialCylinderVibrationTableHighSpeedValue
  406. {
  407. get { return cacheMaterialCylinderVibrationTableHighSpeedValue; }
  408. set
  409. {
  410. cacheMaterialCylinderVibrationTableHighSpeedValue = value;
  411. PlcSettingMessageBus.pLCManagement.WriteCacheMaterialCylinderVibrationTableHighSpeedValue(value);
  412. OnPropertyChanged("CacheMaterialCylinderVibrationTableHighSpeedValue");
  413. }
  414. }
  415. /// <summary>
  416. /// 缓存过滤震台高速值
  417. /// </summary>
  418. private ushort cacheFilterVibrationTableHighSpeedValue;
  419. public ushort CacheFilterVibrationTableHighSpeedValue
  420. {
  421. get { return cacheFilterVibrationTableHighSpeedValue; }
  422. set
  423. {
  424. cacheFilterVibrationTableHighSpeedValue = value;
  425. PlcSettingMessageBus.pLCManagement.WriteCacheFilterVibrationTableHighSpeedValue(value);
  426. OnPropertyChanged("CacheFilterVibrationTableHighSpeedValue");
  427. }
  428. }
  429. /// <summary>
  430. /// 缓存计数震台高速值
  431. /// </summary>
  432. private ushort cacheCountVibrationTableHighSpeedValue;
  433. public ushort CacheCountVibrationTableHighSpeedValue
  434. {
  435. get { return cacheCountVibrationTableHighSpeedValue; }
  436. set
  437. {
  438. cacheCountVibrationTableHighSpeedValue = value;
  439. PlcSettingMessageBus.pLCManagement.WriteCacheCountVibrationTableHighSpeedValue(value);
  440. OnPropertyChanged("CacheCountVibrationTableHighSpeedValue");
  441. }
  442. }
  443. /// <summary>
  444. /// 缓存料筒震台减速值
  445. /// </summary>
  446. private ushort cacheMaterialCylinderVibrationTableDecelerationSpeedValue;
  447. public ushort CacheMaterialCylinderVibrationTableDecelerationSpeedValue
  448. {
  449. get { return cacheMaterialCylinderVibrationTableDecelerationSpeedValue; }
  450. set
  451. {
  452. cacheMaterialCylinderVibrationTableDecelerationSpeedValue = value;
  453. PlcSettingMessageBus.pLCManagement.WriteCacheMaterialCylinderVibrationTableDecelerationSpeedValue(value);
  454. OnPropertyChanged("CacheMaterialCylinderVibrationTableDecelerationSpeedValue");
  455. }
  456. }
  457. /// <summary>
  458. /// 缓存过滤震台减速值
  459. /// </summary>
  460. private ushort cacheFilterVibrationTableDecelerationSpeedValue;
  461. public ushort CacheFilterVibrationTableDecelerationSpeedValue
  462. {
  463. get { return cacheFilterVibrationTableDecelerationSpeedValue; }
  464. set
  465. {
  466. cacheFilterVibrationTableDecelerationSpeedValue = value;
  467. PlcSettingMessageBus.pLCManagement.WriteCacheFilterVibrationTableDecelerationSpeedValue(value);
  468. OnPropertyChanged("CacheFilterVibrationTableDecelerationSpeedValue");
  469. }
  470. }
  471. /// <summary>
  472. /// 缓存计数震台减速值
  473. /// </summary>
  474. private ushort cacheCountVibrationTableDecelerationSpeedValue;
  475. public ushort CacheCountVibrationTableDecelerationSpeedValue
  476. {
  477. get { return cacheCountVibrationTableDecelerationSpeedValue; }
  478. set
  479. {
  480. cacheCountVibrationTableDecelerationSpeedValue = value;
  481. PlcSettingMessageBus.pLCManagement.WriteCacheCountVibrationTableDecelerationSpeedValue(value);
  482. OnPropertyChanged("CacheCountVibrationTableDecelerationSpeedValue");
  483. }
  484. }
  485. /// <summary>
  486. /// 阀门打开延时
  487. /// </summary>
  488. private UInt32 gateOpeningDelay;
  489. public UInt32 GateOpeningDelay
  490. {
  491. get { return gateOpeningDelay; }
  492. set
  493. {
  494. gateOpeningDelay = value;
  495. PlcSettingMessageBus.pLCManagement.WriteGateOpeningDelay(value);
  496. OnPropertyChanged("GateOpeningDelay");
  497. }
  498. }
  499. /// <summary>
  500. /// 回零偏移值
  501. /// </summary>
  502. private float returnToZeroOffsetValue;
  503. public string ReturnToZeroOffsetValue
  504. {
  505. get { return returnToZeroOffsetValue.ToString("F2"); }
  506. set
  507. {
  508. if (float.TryParse(value, out float result))
  509. {
  510. returnToZeroOffsetValue = result;
  511. PlcSettingMessageBus.pLCManagement.WriteReturnToZeroOffsetValue(result);
  512. OnPropertyChanged("ReturnToZeroOffsetValue");
  513. }
  514. }
  515. }
  516. /// <summary>
  517. /// 回零偏移速度
  518. /// </summary>
  519. private float returnToZeroOffsetSpeed;
  520. public string ReturnToZeroOffsetSpeed
  521. {
  522. get { return returnToZeroOffsetSpeed.ToString("F2"); }
  523. set
  524. {
  525. if (float.TryParse(value, out float result))
  526. {
  527. returnToZeroOffsetSpeed = result;
  528. PlcSettingMessageBus.pLCManagement.WriteReturnToZeroOffsetSpeed(result);
  529. OnPropertyChanged("ReturnToZeroOffsetSpeed");
  530. }
  531. }
  532. }
  533. /// <summary>
  534. /// 中转阀关闭速度
  535. /// </summary>
  536. private float transferValveClosingSpeed;
  537. public string TransferValveClosingSpeed
  538. {
  539. get { return transferValveClosingSpeed.ToString("F2"); }
  540. set
  541. {
  542. if (float.TryParse(value, out float result))
  543. {
  544. transferValveClosingSpeed = result;
  545. PlcSettingMessageBus.pLCManagement.WriteTransferValveClosingSpeed(result);
  546. OnPropertyChanged("TransferValveClosingSpeed");
  547. }
  548. }
  549. }
  550. /// <summary>
  551. /// 中转阀开位置
  552. /// </summary>
  553. private float transferValveOpenPosition;
  554. public string TransferValveOpenPosition
  555. {
  556. get { return transferValveOpenPosition.ToString("F2"); }
  557. set
  558. {
  559. if (float.TryParse(value, out float result))
  560. {
  561. transferValveOpenPosition = result;
  562. PlcSettingMessageBus.pLCManagement.WriteTransferValveOpenPosition(result);
  563. OnPropertyChanged("TransferValveOpenPosition");
  564. }
  565. }
  566. }
  567. /// <summary>
  568. /// 中转阀关位置
  569. /// </summary>
  570. private float transferValveClosePosition;
  571. public string TransferValveClosePosition
  572. {
  573. get { return transferValveClosePosition.ToString("F2"); }
  574. set
  575. {
  576. if (float.TryParse(value, out float result))
  577. {
  578. transferValveClosePosition = result;
  579. PlcSettingMessageBus.pLCManagement.WriteTransferValveClosePosition(result);
  580. OnPropertyChanged("TransferValveClosePosition");
  581. }
  582. }
  583. }
  584. /// <summary>
  585. /// 气阀开延时
  586. /// </summary>
  587. private UInt32 airValveOpeningDelay;
  588. public UInt32 AirValveOpeningDelay
  589. {
  590. get { return airValveOpeningDelay; }
  591. set
  592. {
  593. airValveOpeningDelay = value;
  594. PlcSettingMessageBus.pLCManagement.WriteAirValveOpeningDelay(value);
  595. OnPropertyChanged("AirValveOpeningDelay");
  596. }
  597. }
  598. /// <summary>
  599. /// 装瓶停机值
  600. /// </summary>
  601. private UInt16 bottlingShutdownValue;
  602. public UInt16 BottlingShutdownValue
  603. {
  604. get { return bottlingShutdownValue; }
  605. set
  606. {
  607. bottlingShutdownValue = value;
  608. PlcSettingMessageBus.pLCManagement.WriteBottlingShutdownValue(value);
  609. OnPropertyChanged("BottlingShutdownValue");
  610. }
  611. }
  612. /// <summary>
  613. /// 装瓶停机时间
  614. /// </summary>
  615. private UInt32 bottlingShutdownTime;
  616. public UInt32 BottlingShutdownTime
  617. {
  618. get { return bottlingShutdownTime; }
  619. set
  620. {
  621. bottlingShutdownTime = value;
  622. PlcSettingMessageBus.pLCManagement.WriteBottlingShutdownTime(value);
  623. OnPropertyChanged("BottlingShutdownTime");
  624. }
  625. }
  626. /// <summary>
  627. /// 送瓶轮运行速度
  628. /// </summary>
  629. private float bottleFeedingWheelRunningSpeed;
  630. public string BottleFeedingWheelRunningSpeed
  631. {
  632. get { return bottleFeedingWheelRunningSpeed.ToString("F2"); }
  633. set
  634. {
  635. if (float.TryParse(value, out float result))
  636. {
  637. bottleFeedingWheelRunningSpeed = result;
  638. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelRunningSpeed(result);
  639. OnPropertyChanged("BottleFeedingWheelRunningSpeed");
  640. }
  641. }
  642. }
  643. /// <summary>
  644. /// 送瓶轮点动速度
  645. /// </summary>
  646. private float bottleFeedingWheelJogRunningSpeed;
  647. public string BottleFeedingWheelJogRunningSpeed
  648. {
  649. get { return bottleFeedingWheelJogRunningSpeed.ToString("F2"); }
  650. set
  651. {
  652. if (float.TryParse(value, out float result))
  653. {
  654. bottleFeedingWheelJogRunningSpeed = result;
  655. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelJogRunningSpeed(result);
  656. OnPropertyChanged("BottleFeedingWheelJogRunningSpeed");
  657. }
  658. }
  659. }
  660. /// <summary>
  661. /// 送瓶轮回零偏移值
  662. /// </summary>
  663. private float bottleFeedingWheelReturnToZeroOffsetValue;
  664. public string BottleFeedingWheelReturnToZeroOffsetValue
  665. {
  666. get { return bottleFeedingWheelReturnToZeroOffsetValue.ToString("F2"); }
  667. set
  668. {
  669. if (float.TryParse(value, out float result))
  670. {
  671. bottleFeedingWheelReturnToZeroOffsetValue = result;
  672. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelReturnToZeroOffsetValue(result);
  673. OnPropertyChanged("BottleFeedingWheelReturnToZeroOffsetValue");
  674. }
  675. }
  676. }
  677. /// <summary>
  678. /// 送瓶轮回零速度
  679. /// </summary>
  680. private float bottleFeedingWheelReturnToZeroSpeed;
  681. public string BottleFeedingWheelReturnToZeroSpeed
  682. {
  683. get { return bottleFeedingWheelReturnToZeroSpeed.ToString("F2"); }
  684. set
  685. {
  686. if (float.TryParse(value, out float result))
  687. {
  688. bottleFeedingWheelReturnToZeroSpeed = result;
  689. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelReturnToZeroSpeed(result);
  690. OnPropertyChanged("BottleFeedingWheelReturnToZeroSpeed");
  691. }
  692. }
  693. }
  694. /// <summary>
  695. /// 送瓶轮定位长度
  696. /// </summary>
  697. private float bottleFeedingWheelPositionLength;
  698. public string BottleFeedingWheelPositionLength
  699. {
  700. get { return bottleFeedingWheelPositionLength.ToString("F2"); }
  701. set
  702. {
  703. if (float.TryParse(value, out float result))
  704. {
  705. bottleFeedingWheelPositionLength = result;
  706. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelPositionLength(result);
  707. OnPropertyChanged("BottleFeedingWheelPositionLength");
  708. }
  709. }
  710. }
  711. /// <summary>
  712. /// 送瓶轮暂停时间
  713. /// </summary>
  714. private UInt32 bottleFeedingWheelPauseTime;
  715. public UInt32 BottleFeedingWheelPauseTime
  716. {
  717. get { return bottleFeedingWheelPauseTime; }
  718. set
  719. {
  720. bottleFeedingWheelPauseTime = value;
  721. PlcSettingMessageBus.pLCManagement.WriteBottleFeedingWheelPauseTime(value);
  722. OnPropertyChanged("BottleFeedingWheelPauseTime");
  723. }
  724. }
  725. /// <summary>
  726. /// 下料延时
  727. /// </summary>
  728. private UInt32 delayBlanking;
  729. public UInt32 DelayBlanking
  730. {
  731. get { return delayBlanking; }
  732. set
  733. {
  734. delayBlanking = value;
  735. PlcSettingMessageBus.pLCManagement.WriteDelayBlanking(value);
  736. OnPropertyChanged("DelayBlanking");
  737. }
  738. }
  739. //数据绑定核心实现
  740. public event PropertyChangedEventHandler PropertyChanged;
  741. protected void OnPropertyChanged(string propertyName)
  742. {
  743. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  744. }
  745. }
  746. }