终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

308 řádky
13 KiB

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