终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DebugViewModel.cs 8.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. using BPASmartClient.Helper;
  2. using FryPot_DosingSystem.Control;
  3. using Microsoft.Toolkit.Mvvm.ComponentModel;
  4. using Microsoft.Toolkit.Mvvm.Input;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Collections.ObjectModel;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace FryPot_DosingSystem.ViewModel
  12. {
  13. internal class DebugViewModel : ObservableObject
  14. {
  15. public ObservableCollection<ushort> LineOneRollerCode { get; set; } = new ObservableCollection<ushort>() { 101,102,103,104,105,106,107,108,401,402,403,404,405,406,407,408};
  16. public ObservableCollection<ushort> LineTwoRollerCode { get; set; } = new ObservableCollection<ushort>() {201,202,203,204,205,206,207,208,501,502,503,504,505,506,507,508 };
  17. public ObservableCollection<ushort> LineThreeRollerCode { get; set; } = new ObservableCollection<ushort>() { 301,302,303,304,305,306,307,308};
  18. //滚筒线1绑定命令
  19. public RelayCommand RollerLineRunning { get; set; }
  20. public RelayCommand EightWorkLoc { get; set; }
  21. public RelayCommand FryPotInputArrive { get; set; }
  22. public RelayCommand FryPotEmptyRollerArrive { get; set; }
  23. public RelayCommand LineOneTaskExit { get; set; }
  24. public RelayCommand AGVLOneArrive { get; set; }
  25. public RelayCommand AGVFryPotDownArrive { get; set; }
  26. public RelayCommand AGVFryPotUpArrive { get; set; }
  27. public RelayCommand AGVFryPotGetEmptyRoller { get; set; }
  28. //滚筒线2绑定命令
  29. public RelayCommand RollerLineTwoRunning { get; set; }
  30. //public RelayCommand EightWorkLoc { get; set; }
  31. public RelayCommand FryPotTwoInputArrive { get; set; }
  32. public RelayCommand FryPotTwoEmptyRollerArrive { get; set; }
  33. public RelayCommand LineTwoTaskExit { get; set; }
  34. public RelayCommand AGVLTwoArrive { get; set; }
  35. public RelayCommand AGVFryPotTwoDownArrive { get; set; }
  36. public RelayCommand AGVFryPotTwoUpArrive { get; set; }
  37. public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; }
  38. //滚筒线3绑定命令
  39. public RelayCommand RollerLineThreeRunning { get; set; }
  40. //public RelayCommand EightWorkLoc { get; set; }
  41. public RelayCommand FryPotThreeInputArrive { get; set; }
  42. public RelayCommand FryPotThreeEmptyRollerArrive { get; set; }
  43. public RelayCommand LineThreeTaskExit { get; set; }
  44. public RelayCommand AGVLThreeArrive { get; set; }
  45. public RelayCommand AGVFryPotThreeDownArrive { get; set; }
  46. public RelayCommand AGVFryPotThreeUpArrive { get; set; }
  47. public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; }
  48. //AGV接口联调
  49. public RelayCommand AgvDebug { get; set; }
  50. //线体123空桶清洗以及回收
  51. public RelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; }
  52. public RelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; }
  53. public RelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; }
  54. public RelayCommand CleanPlateCallAgv { get; set; }
  55. public RelayCommand AgvArriveCleanPlateLoc { get; set; }//下料
  56. public RelayCommand AgvArriveLineFourLoc { get; set; }
  57. public RelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料
  58. public DebugViewModel()
  59. {
  60. AgvDebug = new RelayCommand(new Action(() =>
  61. {
  62. ActionManage.GetInstance.Send("AgvDebug");
  63. }));
  64. AgvArriveLineOneEmptyRollerLoc = new RelayCommand(new Action(() =>
  65. {
  66. ActionManage.GetInstance.Send("AgvArriveLineOneEmptyRollerLoc");
  67. }));
  68. AgvArriveLineTwoEmptyRollerLoc = new RelayCommand(new Action(() =>
  69. {
  70. ActionManage.GetInstance.Send("AgvArriveLineTwoEmptyRollerLoc");
  71. }));
  72. AgvArriveLineThreeEmptyRollerLoc = new RelayCommand(new Action(() =>
  73. {
  74. ActionManage.GetInstance.Send("AgvArriveLineThreeEmptyRollerLoc");
  75. }));
  76. CleanPlateCallAgv = new RelayCommand(new Action(() =>
  77. {
  78. ActionManage.GetInstance.Send("CleanPlateCallAgv");
  79. }));
  80. AgvArriveCleanPlateLoc = new RelayCommand(new Action(() =>
  81. {
  82. ActionManage.GetInstance.Send("AgvArriveCleanPlateLoc");
  83. }));
  84. AgvArriveCleanPlateLocLoad = new RelayCommand(new Action(() =>
  85. {
  86. ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoad");
  87. }));
  88. AgvArriveLineFourLoc = new RelayCommand(new Action(() =>
  89. {
  90. ActionManage.GetInstance.Send("AgvArriveLineFourLoc");
  91. }));
  92. RollerLineRunning = new RelayCommand(new Action(() =>
  93. {
  94. ActionManage.GetInstance.Send("RollerLineRunning");
  95. }));
  96. FryPotInputArrive = new RelayCommand(new Action(() =>
  97. {
  98. ActionManage.GetInstance.Send("FryPotInputArrive");
  99. }));
  100. FryPotEmptyRollerArrive = new RelayCommand(new Action(() =>
  101. {
  102. ActionManage.GetInstance.Send("FryPotEmptyRollerArrive");
  103. }));
  104. AGVLOneArrive = new RelayCommand(new Action(() =>
  105. {
  106. ActionManage.GetInstance.Send("AGVLOneArrive");
  107. }));
  108. AGVFryPotDownArrive = new RelayCommand(new Action(() =>
  109. {
  110. ActionManage.GetInstance.Send("AGVFryPotDownArrive");
  111. }));
  112. AGVFryPotUpArrive = new RelayCommand(new Action(() =>
  113. {
  114. ActionManage.GetInstance.Send("AGVFryPotUpArrive");
  115. }));
  116. AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() =>
  117. {
  118. ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller");
  119. }));
  120. //滚筒线2
  121. RollerLineTwoRunning = new RelayCommand(new Action(() =>
  122. {
  123. ActionManage.GetInstance.Send("RollerLineTwoRunning");
  124. }));
  125. FryPotTwoInputArrive = new RelayCommand(new Action(() =>
  126. {
  127. ActionManage.GetInstance.Send("FryPotTwoInputArrive");
  128. }));
  129. FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() =>
  130. {
  131. ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive");
  132. }));
  133. AGVLTwoArrive = new RelayCommand(new Action(() =>
  134. {
  135. ActionManage.GetInstance.Send("AGVLTwoArrive");
  136. }));
  137. AGVFryPotTwoDownArrive = new RelayCommand(new Action(() =>
  138. {
  139. ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive");
  140. }));
  141. AGVFryPotTwoUpArrive = new RelayCommand(new Action(() =>
  142. {
  143. ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive");
  144. }));
  145. AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() =>
  146. {
  147. ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller");
  148. }));
  149. //滚筒线3
  150. RollerLineThreeRunning = new RelayCommand(new Action(() =>
  151. {
  152. ActionManage.GetInstance.Send("RollerLineThreeRunning");
  153. }));
  154. FryPotThreeInputArrive = new RelayCommand(new Action(() =>
  155. {
  156. ActionManage.GetInstance.Send("FryPotThreeInputArrive");
  157. }));
  158. FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() =>
  159. {
  160. ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive");
  161. }));
  162. AGVLThreeArrive = new RelayCommand(new Action(() =>
  163. {
  164. ActionManage.GetInstance.Send("AGVLThreeArrive");
  165. }));
  166. AGVFryPotThreeDownArrive = new RelayCommand(new Action(() =>
  167. {
  168. ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive");
  169. }));
  170. AGVFryPotThreeUpArrive = new RelayCommand(new Action(() =>
  171. {
  172. ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive");
  173. }));
  174. AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() =>
  175. {
  176. ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller");
  177. }));
  178. LineOneTaskExit = new RelayCommand(new Action(() =>
  179. {
  180. ActionManage.GetInstance.Send("LineOneTaskExit");
  181. }));
  182. LineTwoTaskExit = new RelayCommand(new Action(() =>
  183. {
  184. ActionManage.GetInstance.Send("LineTwoTaskExit");
  185. }));
  186. LineThreeTaskExit = new RelayCommand(new Action(() =>
  187. {
  188. ActionManage.GetInstance.Send("LineThreeTaskExit");
  189. }));
  190. }
  191. }
  192. }