终端一体化运控平台
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 12 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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 LineOneRecipeComSignal { get; set; }
  25. public RelayCommand AGVLOneArrive { get; set; }
  26. public RelayCommand AGVFryPotDownArrive { get; set; }
  27. public RelayCommand AGVFryPotUpArrive { get; set; }
  28. public RelayCommand AGVFryPotGetEmptyRoller { get; set; }
  29. public RelayCommand AGVLineOneLoadCom { get; set; }//线体1上料完成
  30. //滚筒线2绑定命令
  31. public RelayCommand RollerLineTwoRunning { get; set; }
  32. //public RelayCommand EightWorkLoc { get; set; }
  33. public RelayCommand FryPotTwoInputArrive { get; set; }
  34. public RelayCommand FryPotTwoEmptyRollerArrive { get; set; }
  35. public RelayCommand LineTwoTaskExit { get; set; }
  36. public RelayCommand LineTwoRecipeComSignal { get; set; }
  37. public RelayCommand AGVLTwoArrive { get; set; }
  38. public RelayCommand AGVFryPotTwoDownArrive { get; set; }
  39. public RelayCommand AGVFryPotTwoUpArrive { get; set; }
  40. public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; }
  41. public RelayCommand AGVLineTwoLoadCom { get; set; }//线体2上料完成
  42. //滚筒线3绑定命令
  43. public RelayCommand RollerLineThreeRunning { get; set; }
  44. //public RelayCommand EightWorkLoc { get; set; }
  45. public RelayCommand FryPotThreeInputArrive { get; set; }
  46. public RelayCommand FryPotThreeEmptyRollerArrive { get; set; }
  47. public RelayCommand LineThreeTaskExit { get; set; }
  48. public RelayCommand LineThreeRecipeComSignal { get; set; }
  49. public RelayCommand AGVLThreeArrive { get; set; }
  50. public RelayCommand AGVFryPotThreeDownArrive { get; set; }
  51. public RelayCommand AGVFryPotThreeUpArrive { get; set; }
  52. public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; }
  53. public RelayCommand AGVLineThreeLoadCom { get; set; }//线体3上料完成
  54. //AGV接口联调
  55. public RelayCommand AgvDebug { get; set; }
  56. //线体123空桶清洗以及回收
  57. public RelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; }
  58. public RelayCommand AgvLineOneLoadEmptyCom { get; set; }
  59. public RelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; }
  60. public RelayCommand AgvLineTwoLoadEmptyCom { get; set; }
  61. public RelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; }
  62. public RelayCommand AgvLineThreeLoadEmptyCom { get; set; }
  63. public RelayCommand CleanPlateCallAgv { get; set; }
  64. public RelayCommand AgvArriveCleanPlateLoc { get; set; }//下料
  65. public RelayCommand AgvArriveCleanPlateLocCom { get; set; }//下料完成
  66. public RelayCommand AgvArriveLineFourLoc { get; set; }//下料
  67. public RelayCommand AgvArriveLineFourLocCom { get; set; }//4号线空桶下料完成
  68. public RelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料
  69. public RelayCommand AgvArriveCleanPlateLocLoadCom { get; set; }//上料完成
  70. public RelayCommand EmptyRollerCleanTaskRestart { get; set; }
  71. public DebugViewModel()
  72. {
  73. AgvDebug = new RelayCommand(new Action(() =>
  74. {
  75. ActionManage.GetInstance.Send("AgvDebug");
  76. }));
  77. AgvArriveCleanPlateLocCom = new RelayCommand(() =>
  78. {
  79. ActionManage.GetInstance.Send("AgvArriveCleanPlateLocCom");
  80. });
  81. AgvArriveLineFourLocCom = new RelayCommand(() =>
  82. {
  83. ActionManage.GetInstance.Send("AgvArriveLineFourLocCom");
  84. });
  85. AgvArriveCleanPlateLocLoadCom = new RelayCommand(() =>
  86. {
  87. ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoadCom");
  88. });
  89. LineOneRecipeComSignal = new RelayCommand(() =>
  90. {
  91. ActionManage.GetInstance.Send("LineOneRecipeComSignal");
  92. });
  93. LineTwoRecipeComSignal = new RelayCommand(() =>
  94. {
  95. ActionManage.GetInstance.Send("LineTwoRecipeComSignal");
  96. });
  97. LineThreeRecipeComSignal = new RelayCommand(() =>
  98. {
  99. ActionManage.GetInstance.Send("LineThreeRecipeComSignal");
  100. });
  101. EmptyRollerCleanTaskRestart = new RelayCommand(() =>
  102. {
  103. ActionManage.GetInstance.Send("EmptyRollerCleanTaskRestart");
  104. });
  105. AgvLineOneLoadEmptyCom = new RelayCommand(() => {
  106. ActionManage.GetInstance.Send("AgvLineOneLoadEmptyCom");
  107. });
  108. AgvLineTwoLoadEmptyCom = new RelayCommand(() => {
  109. ActionManage.GetInstance.Send("AgvLineTwoLoadEmptyCom");
  110. });
  111. AgvLineThreeLoadEmptyCom = new RelayCommand(() => {
  112. ActionManage.GetInstance.Send("AgvLineThreeLoadEmptyCom");
  113. });
  114. AGVLineOneLoadCom = new RelayCommand(() =>
  115. {
  116. ActionManage.GetInstance.Send("AGVLineOneLoadCom");
  117. });
  118. AGVLineTwoLoadCom = new RelayCommand(() =>
  119. {
  120. ActionManage.GetInstance.Send("AGVLineTwoLoadCom");
  121. });
  122. AGVLineThreeLoadCom = new RelayCommand(() =>
  123. {
  124. ActionManage.GetInstance.Send("AGVLineThreeLoadCom");
  125. });
  126. AgvArriveLineOneEmptyRollerLoc = new RelayCommand(new Action(() =>
  127. {
  128. ActionManage.GetInstance.Send("AgvArriveLineOneEmptyRollerLoc");
  129. }));
  130. AgvArriveLineTwoEmptyRollerLoc = new RelayCommand(new Action(() =>
  131. {
  132. ActionManage.GetInstance.Send("AgvArriveLineTwoEmptyRollerLoc");
  133. }));
  134. AgvArriveLineThreeEmptyRollerLoc = new RelayCommand(new Action(() =>
  135. {
  136. ActionManage.GetInstance.Send("AgvArriveLineThreeEmptyRollerLoc");
  137. }));
  138. CleanPlateCallAgv = new RelayCommand(new Action(() =>
  139. {
  140. ActionManage.GetInstance.Send("CleanPlateCallAgv");
  141. }));
  142. AgvArriveCleanPlateLoc = new RelayCommand(new Action(() =>
  143. {
  144. ActionManage.GetInstance.Send("AgvArriveCleanPlateLoc");
  145. }));
  146. AgvArriveCleanPlateLocLoad = new RelayCommand(new Action(() =>
  147. {
  148. ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoad");
  149. }));
  150. AgvArriveLineFourLoc = new RelayCommand(new Action(() =>
  151. {
  152. ActionManage.GetInstance.Send("AgvArriveLineFourLoc");
  153. }));
  154. RollerLineRunning = new RelayCommand(new Action(() =>
  155. {
  156. ActionManage.GetInstance.Send("RollerLineRunning");
  157. }));
  158. FryPotInputArrive = new RelayCommand(new Action(() =>
  159. {
  160. ActionManage.GetInstance.Send("FryPotInputArrive");
  161. }));
  162. FryPotEmptyRollerArrive = new RelayCommand(new Action(() =>
  163. {
  164. ActionManage.GetInstance.Send("FryPotEmptyRollerArrive");
  165. }));
  166. AGVLOneArrive = new RelayCommand(new Action(() =>
  167. {
  168. ActionManage.GetInstance.Send("AGVLOneArrive");
  169. }));
  170. AGVFryPotDownArrive = new RelayCommand(new Action(() =>
  171. {
  172. ActionManage.GetInstance.Send("AGVFryPotDownArrive");
  173. }));
  174. AGVFryPotUpArrive = new RelayCommand(new Action(() =>
  175. {
  176. ActionManage.GetInstance.Send("AGVFryPotUpArrive");
  177. }));
  178. AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() =>
  179. {
  180. ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller");
  181. }));
  182. //滚筒线2
  183. RollerLineTwoRunning = new RelayCommand(new Action(() =>
  184. {
  185. ActionManage.GetInstance.Send("RollerLineTwoRunning");
  186. }));
  187. FryPotTwoInputArrive = new RelayCommand(new Action(() =>
  188. {
  189. ActionManage.GetInstance.Send("FryPotTwoInputArrive");
  190. }));
  191. FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() =>
  192. {
  193. ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive");
  194. }));
  195. AGVLTwoArrive = new RelayCommand(new Action(() =>
  196. {
  197. ActionManage.GetInstance.Send("AGVLTwoArrive");
  198. }));
  199. AGVFryPotTwoDownArrive = new RelayCommand(new Action(() =>
  200. {
  201. ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive");
  202. }));
  203. AGVFryPotTwoUpArrive = new RelayCommand(new Action(() =>
  204. {
  205. ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive");
  206. }));
  207. AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() =>
  208. {
  209. ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller");
  210. }));
  211. //滚筒线3
  212. RollerLineThreeRunning = new RelayCommand(new Action(() =>
  213. {
  214. ActionManage.GetInstance.Send("RollerLineThreeRunning");
  215. }));
  216. FryPotThreeInputArrive = new RelayCommand(new Action(() =>
  217. {
  218. ActionManage.GetInstance.Send("FryPotThreeInputArrive");
  219. }));
  220. FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() =>
  221. {
  222. ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive");
  223. }));
  224. AGVLThreeArrive = new RelayCommand(new Action(() =>
  225. {
  226. ActionManage.GetInstance.Send("AGVLThreeArrive");
  227. }));
  228. AGVFryPotThreeDownArrive = new RelayCommand(new Action(() =>
  229. {
  230. ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive");
  231. }));
  232. AGVFryPotThreeUpArrive = new RelayCommand(new Action(() =>
  233. {
  234. ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive");
  235. }));
  236. AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() =>
  237. {
  238. ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller");
  239. }));
  240. LineOneTaskExit = new RelayCommand(new Action(() =>
  241. {
  242. ActionManage.GetInstance.Send("LineOneTaskExit");
  243. }));
  244. LineTwoTaskExit = new RelayCommand(new Action(() =>
  245. {
  246. ActionManage.GetInstance.Send("LineTwoTaskExit");
  247. }));
  248. LineThreeTaskExit = new RelayCommand(new Action(() =>
  249. {
  250. ActionManage.GetInstance.Send("LineThreeTaskExit");
  251. }));
  252. }
  253. }
  254. }