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

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