终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

369 linhas
11 KiB

  1. using BPASmartClient.Device;
  2. using BPASmartClient.Model;
  3. using System;
  4. using System.Collections.Concurrent;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPASmartClient.MorkMV1
  10. {
  11. public class GVL_MorkMV1 : IStatus
  12. {
  13. #region 临时变量
  14. /// <summary>
  15. /// 允许运行
  16. /// </summary>
  17. [VariableMonitor("允许运行")]
  18. public bool AllowRun { get; set; }
  19. /// <summary>
  20. /// 优先级判断
  21. /// </summary>
  22. [VariableMonitor("优先级判断条件")]
  23. public bool PriorityJudgment { get; set; }
  24. /// <summary>
  25. /// 机器人任务互锁信号,false:取面,true:出餐
  26. /// </summary>
  27. [VariableMonitor("机器人任务互锁信号")]
  28. public bool RobotTaskInterlock { get; set; }
  29. /// <summary>
  30. /// 机器人倒冒菜互锁
  31. /// </summary>
  32. [VariableMonitor("机器人倒冒菜互锁")]
  33. public bool RobotOutDinnigLock { get; set; }
  34. /// <summary>
  35. /// 取碗互锁信号
  36. /// </summary>
  37. [VariableMonitor("取碗互锁信号")]
  38. public bool TakeBowlInterlock { get; set; }
  39. /// <summary>
  40. /// 取面互锁信号
  41. /// </summary>
  42. [VariableMonitor("取面互锁信号")]
  43. public bool TakeNoodleInterlock { get; set; }
  44. /// <summary>
  45. /// 出面中
  46. /// </summary>
  47. [VariableMonitor("出面中")]
  48. public bool OutNoodleing { get; set; }
  49. /// <summary>
  50. /// 允许取面
  51. /// </summary>
  52. [VariableMonitor("允许取面")]
  53. public bool AllowTakeNoodle { get; set; }
  54. /// <summary>
  55. /// 转台互锁信号
  56. /// </summary>
  57. [VariableMonitor("转台互锁信号")]
  58. public bool TurntableInterlock { get; set; }
  59. /// <summary>
  60. /// 煮面炉状态,True:忙碌,false:空闲
  61. /// </summary>
  62. [VariableMonitor("煮面炉状态")]
  63. public bool[] NoodleCookerStatus { get; set; } = new bool[6];
  64. /// <summary>
  65. /// 转台当前启动位置
  66. /// </summary>
  67. [VariableMonitor("转台当前启动位置")]
  68. public ushort CurrentLoc { get; set; } = 0;
  69. /// <summary>
  70. /// 制作完成标志
  71. /// </summary>
  72. [VariableMonitor("制作完成标志")]
  73. public bool CookCompleteFlatBit { get; set; }
  74. /// <summary>
  75. /// 取碗任务数量
  76. /// </summary>
  77. [VariableMonitor("取碗任务数量")]
  78. public int TakeBowlTaskCount { get; set; }
  79. /// <summary>
  80. /// 取面任务数量
  81. /// </summary>
  82. [VariableMonitor("取面任务数量")]
  83. public int RBTakeNoodleTaskCount { get; set; }
  84. #endregion
  85. #region 列表数据
  86. /// <summary>
  87. /// 机器人取面位置队列
  88. /// </summary>
  89. public ConcurrentQueue<MOrderLocInfo> RBTakeNoodleTask { get; set; } = new ConcurrentQueue<MOrderLocInfo>();
  90. /// <summary>
  91. /// 出碗队列
  92. /// </summary>
  93. public ConcurrentQueue<OrderLocInfo> TakeBowlTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  94. public List<DoOrderEvent> doOrderEvents { get; set; } = new List<DoOrderEvent>();
  95. /// <summary>
  96. /// 子订单对应的物料数量
  97. /// </summary>
  98. public ConcurrentDictionary<string, SuborderInfo> SuborderCount { get; set; } = new ConcurrentDictionary<string, SuborderInfo>();
  99. public List<string> HistorySuborderId { get; set; } = new List<string>();
  100. public NoodleShidModel[] nsm { get; set; } = new NoodleShidModel[6] { new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel() };
  101. #endregion
  102. #region 订单ID记录
  103. /// <summary>
  104. /// 取碗订单ID
  105. /// </summary>
  106. public string TakeBowlId { get; set; } = string.Empty;
  107. /// <summary>
  108. /// 取碗订单名称
  109. /// </summary>
  110. public string TakeBowName { get; set; } = string.Empty;
  111. /// <summary>
  112. /// 配料完成订单名称
  113. /// </summary>
  114. public int TakeBowSortNum { get; set; } = 0;
  115. /// <summary>
  116. /// 允许倒面位置ID
  117. /// </summary>
  118. public string IngredientsCompleteId { get; set; } = string.Empty;
  119. /// <summary>
  120. /// 配料完成订单名称
  121. /// </summary>
  122. public string IngredientsCompleteName { get; set; } = string.Empty;
  123. /// <summary>
  124. /// 配料完成订单名称
  125. /// </summary>
  126. public int IngredientsCompleteSortNum { get; set; } = 0;
  127. /// <summary>
  128. /// 煮面口对应的订单ID
  129. /// </summary>
  130. public string[] CookNodelId { get; set; } = new string[6] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, };
  131. /// <summary>
  132. /// 出餐订单ID
  133. /// </summary>
  134. public string OutMealId { get; set; } = string.Empty;
  135. /// <summary>
  136. /// 出餐订单名称
  137. /// </summary>
  138. public string OutMealName { get; set; } = string.Empty;
  139. /// <summary>
  140. /// 出餐排序号
  141. /// </summary>
  142. public int OutMealSortNum { get; set; } = 0;
  143. /// <summary>
  144. /// 转台位置轮询
  145. /// </summary>
  146. public List<ushort> TurntableLocLists { get; set; } = new List<ushort>();
  147. #endregion
  148. #region device Data
  149. /// <summary>
  150. /// 初始化启动
  151. /// </summary>
  152. [VariableMonitor("初始化启动", "M0.0", "320")]
  153. public bool InitStart { get; set; }
  154. /// <summary>
  155. /// 初始化完成
  156. /// </summary>
  157. [VariableMonitor("初始化完成", "M0.1", "321")]
  158. public bool InitComplete { get; set; }
  159. /// <summary>
  160. /// 移碗丝杆初始化完成
  161. /// </summary>
  162. [VariableMonitor("移碗丝杆初始化完成", "M0.2", "322")]
  163. public bool MoveScrewRodInitCom { get; set; }
  164. /// <summary>
  165. /// 供碗1初始化完成
  166. /// </summary>
  167. [VariableMonitor("供碗1初始化完成", "M0.3", "323")]
  168. public bool SacrificialVesselInitCom { get; set; }
  169. /// <summary>
  170. /// 气缸推杆初始化完成
  171. /// </summary>
  172. [VariableMonitor("气缸推杆初始化完成", "M0.4", "324")]
  173. public bool CylinderInitCom { get; set; }
  174. /// <summary>
  175. /// 煮面机初始化完成
  176. /// </summary>
  177. [VariableMonitor("煮面机初始化完成", "M0.5", "325")]
  178. public bool NoodleCookerInitCom { get; set; }
  179. /// <summary>
  180. /// 机器人初始化完成
  181. /// </summary>
  182. [VariableMonitor("机器人初始化完成", "M0.6", "326")]
  183. public bool RobotInitCom { get; set; }
  184. /// <summary>
  185. /// 料仓初始化完成
  186. /// </summary>
  187. [VariableMonitor("料仓初始化完成", "M0.7", "327")]
  188. public bool SiloInitCom { get; set; }
  189. /// <summary>
  190. /// 故障复位/停止
  191. /// </summary>
  192. [VariableMonitor("故障复位/停止", "M1.0", "328")]
  193. public bool FaultResetOrStop { get; set; }
  194. /// <summary>
  195. /// 落碗1,大碗
  196. /// </summary>
  197. [VariableMonitor("落碗1,大碗", "M9.0", "392")]
  198. public bool DropBowlOne { get; set; }
  199. /// <summary>
  200. /// 落碗2,一次性碗
  201. /// </summary>
  202. [VariableMonitor("落碗2,一次性碗", "M9.1", "393")]
  203. public bool DropBowlTow { get; set; }
  204. /// <summary>
  205. /// 允许倒面
  206. /// </summary>
  207. [VariableMonitor("允许倒面", "M10.0", "400")]
  208. public bool AllowInvertedFace { get; set; }
  209. /// <summary>
  210. /// 出餐完成
  211. /// </summary>
  212. [VariableMonitor("出餐完成", "M10.1", "401")]
  213. public bool DiningComplete { get; set; }
  214. /// <summary>
  215. /// 落碗机构状态,1:忙碌 0:空闲
  216. /// </summary>
  217. [VariableMonitor("落碗机构状态,1:忙碌 0:空闲", "M10.4", "404")]
  218. public bool DropBowlMechanismStatus { get; set; }
  219. /// <summary>
  220. /// 定位标志,1:忙碌 0:空闲
  221. /// </summary>
  222. [VariableMonitor("定位标志,1:忙碌 0:空闲", "M12.2", "418")]
  223. public bool FixedFlag { get; set; }
  224. /// <summary>
  225. /// 定位启动
  226. /// </summary>
  227. [VariableMonitor("定位启动", "M12.3", "419")]
  228. public bool FixedStart { get; set; }
  229. /// <summary>
  230. /// 料仓到位
  231. /// </summary>
  232. [VariableMonitor("料仓到位", "M13.5", "429")]
  233. public bool SiloInPlace { get; set; }
  234. /// <summary>
  235. /// 机器人将面倒入碗中完成
  236. /// </summary>
  237. [VariableMonitor("机器人取面倒入碗中完成", "M16.6")]
  238. public bool RobotInvertedSurfaceCom { get; set; }
  239. /// <summary>
  240. /// 机器人料仓取面完成
  241. /// </summary>
  242. [VariableMonitor("机器人去料仓取面完成", "M16.7", "455")]
  243. public bool RobotTakeNoodleCom { get; set; }
  244. /// <summary>
  245. /// 机器人状态
  246. /// </summary>
  247. [VariableMonitor("机器人状态", "M17.4", "460")]
  248. public bool RobotStatus { get; set; }
  249. /// <summary>
  250. /// 一次性碗有无检测
  251. /// </summary>
  252. [VariableMonitor("一次性碗有无检测", "M18.0", "464")]
  253. public bool SmallBowlYesOrNoCheck { get; set; }
  254. /// <summary>
  255. /// 大碗有无检测
  256. /// </summary>
  257. [VariableMonitor("大碗有无检测", "M18.1", "465")]
  258. public bool LargeBowYesOrNoCheck { get; set; }
  259. /// <summary>
  260. /// 转台高位
  261. /// </summary>
  262. [VariableMonitor("转台高位", "M18.2", "466")]
  263. public bool TurntableHighPosition { get; set; }
  264. /// <summary>
  265. /// 转台低位
  266. /// </summary>
  267. [VariableMonitor("转台低位", "M18.3", "467")]
  268. public bool TurntableLowPosition { get; set; }
  269. /// <summary>
  270. /// 煮面完成
  271. /// </summary>
  272. [VariableMonitor("煮面完成")]
  273. public bool[] CookNoodleCom { get; set; } = new bool[6];
  274. /// <summary>
  275. /// 本地/远程
  276. /// </summary>
  277. [VariableMonitor("本地/远程")]
  278. public bool LocalOrRemote { get; set; }
  279. /// <summary>
  280. /// 温度到达
  281. /// </summary>
  282. [VariableMonitor("温度到达")]
  283. public bool TemperatureReaches { get; set; }
  284. /// <summary>
  285. /// 加热中
  286. /// </summary>
  287. [VariableMonitor("加热中")]
  288. public bool Heating { get; set; }
  289. /// <summary>
  290. /// 转台当前位置
  291. /// </summary>
  292. [VariableMonitor("转台当前位置", "VW770", "870")]
  293. public ushort CurrentFeedbackLoc { get; set; }
  294. /// <summary>
  295. /// 补料完成
  296. /// </summary>
  297. [VariableMonitor("补料完成", "M101.6", "1134")]
  298. public bool FeedComplete { get; set; }
  299. /// <summary>
  300. /// 补料中
  301. /// </summary>
  302. [VariableMonitor("补料中", "M102.6", "1142")]
  303. public bool Feeding { get; set; }
  304. #endregion
  305. }
  306. }