终端一体化运控平台
Você não pode selecionar mais de 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.
 
 
 

364 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.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. /// 取碗订单ID
  107. /// </summary>
  108. public string TakeBowlId { get; set; } = string.Empty;
  109. /// <summary>
  110. /// 取碗订单名称
  111. /// </summary>
  112. public string TakeBowName { get; set; } = string.Empty;
  113. /// <summary>
  114. /// 取碗完成订单排序号
  115. /// </summary>
  116. public int TakeBowSortNum { get; set; } = 0;
  117. /// <summary>
  118. /// 允许倒面位置ID
  119. /// </summary>
  120. public string IngredientsCompleteId { get; set; } = string.Empty;
  121. /// <summary>
  122. /// 配料完成订单名称
  123. /// </summary>
  124. public string IngredientsCompleteName { get; set; } = string.Empty;
  125. /// <summary>
  126. /// 配料完成订单排序号
  127. /// </summary>
  128. public int IngredientsCompleteSortNum { get; set; } = 0;
  129. /// <summary>
  130. /// 煮面口对应的订单ID
  131. /// </summary>
  132. public string[] CookNodelId { get; set; } = new string[6] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, };
  133. /// <summary>
  134. /// 出餐订单ID
  135. /// </summary>
  136. public string OutMealId { get; set; } = string.Empty;
  137. /// <summary>
  138. /// 出餐订单名称
  139. /// </summary>
  140. public string OutMealName { get; set; } = string.Empty;
  141. /// <summary>
  142. /// 出餐排序号
  143. /// </summary>
  144. public int OutMealSortNum { get; set; } = 0;
  145. /// <summary>
  146. /// 转台位置轮询
  147. /// </summary>
  148. public List<ushort> TurntableLocLists { get; set; } = new List<ushort>();
  149. #endregion
  150. #region device Data
  151. /// <summary>
  152. /// 初始化启动
  153. /// </summary>
  154. [VariableMonitor("初始化启动", "M0.0", "320")]
  155. public bool InitStart { get; set; }
  156. /// <summary>
  157. /// 初始化完成
  158. /// </summary>
  159. [VariableMonitor("初始化完成", "M0.1", "321")]
  160. public bool InitComplete { get; set; }
  161. /// <summary>
  162. /// 移碗丝杆初始化完成
  163. /// </summary>
  164. [VariableMonitor("移碗丝杆初始化完成", "M0.2", "322")]
  165. public bool MoveScrewRodInitCom { get; set; }
  166. /// <summary>
  167. /// 供碗1初始化完成
  168. /// </summary>
  169. [VariableMonitor("供碗1初始化完成", "M0.3", "323")]
  170. public bool SacrificialVesselInitCom { get; set; }
  171. /// <summary>
  172. /// 气缸推杆初始化完成
  173. /// </summary>
  174. [VariableMonitor("气缸推杆初始化完成", "M0.4", "324")]
  175. public bool CylinderInitCom { get; set; }
  176. /// <summary>
  177. /// 煮面机初始化完成
  178. /// </summary>
  179. [VariableMonitor("煮面机初始化完成", "M0.5", "325")]
  180. public bool NoodleCookerInitCom { get; set; }
  181. /// <summary>
  182. /// 机器人初始化完成
  183. /// </summary>
  184. [VariableMonitor("机器人初始化完成", "M0.6", "326")]
  185. public bool RobotInitCom { get; set; }
  186. /// <summary>
  187. /// 料仓初始化完成
  188. /// </summary>
  189. [VariableMonitor("料仓初始化完成", "M0.7", "327")]
  190. public bool SiloInitCom { get; set; }
  191. /// <summary>
  192. /// 故障复位/停止
  193. /// </summary>
  194. [VariableMonitor("故障复位/停止", "M1.0", "328")]
  195. public bool FaultResetOrStop { get; set; }
  196. /// <summary>
  197. /// 落碗1,大碗
  198. /// </summary>
  199. [VariableMonitor("落碗1,大碗", "M9.0", "392")]
  200. public bool DropBowlOne { get; set; }
  201. /// <summary>
  202. /// 落碗2,一次性碗
  203. /// </summary>
  204. [VariableMonitor("落碗2,一次性碗", "M9.1", "393")]
  205. public bool DropBowlTow { get; set; }
  206. /// <summary>
  207. /// 允许倒面
  208. /// </summary>
  209. [VariableMonitor("允许倒面", "M10.0", "400")]
  210. public bool AllowInvertedFace { get; set; }
  211. /// <summary>
  212. /// 出餐完成
  213. /// </summary>
  214. [VariableMonitor("出餐完成", "M10.1", "401")]
  215. public bool DiningComplete { get; set; }
  216. /// <summary>
  217. /// 落碗机构状态,1:忙碌 0:空闲
  218. /// </summary>
  219. [VariableMonitor("落碗机构状态,1:忙碌 0:空闲", "M10.4", "404")]
  220. public bool DropBowlMechanismStatus { get; set; }
  221. /// <summary>
  222. /// 定位标志,1:忙碌 0:空闲
  223. /// </summary>
  224. [VariableMonitor("定位标志,1:忙碌 0:空闲", "M12.2", "418")]
  225. public bool FixedFlag { get; set; }
  226. /// <summary>
  227. /// 定位启动
  228. /// </summary>
  229. [VariableMonitor("定位启动", "M12.3", "419")]
  230. public bool FixedStart { get; set; }
  231. /// <summary>
  232. /// 料仓到位
  233. /// </summary>
  234. [VariableMonitor("料仓到位", "M13.5", "429")]
  235. public bool SiloInPlace { get; set; }
  236. /// <summary>
  237. /// 机器人料仓取面完成
  238. /// </summary>
  239. [VariableMonitor("机器人去料仓取面完成", "M16.7", "455")]
  240. public bool RobotTakeNoodleCom { get; set; }
  241. /// <summary>
  242. /// 机器人状态
  243. /// </summary>
  244. [VariableMonitor("机器人状态", "M17.4", "460")]
  245. public bool RobotStatus { get; set; }
  246. /// <summary>
  247. /// 一次性碗有无检测
  248. /// </summary>
  249. [VariableMonitor("一次性碗有无检测", "M18.0", "464")]
  250. public bool SmallBowlYesOrNoCheck { get; set; }
  251. /// <summary>
  252. /// 大碗有无检测
  253. /// </summary>
  254. [VariableMonitor("大碗有无检测", "M18.1", "465")]
  255. public bool LargeBowYesOrNoCheck { get; set; }
  256. /// <summary>
  257. /// 转台高位
  258. /// </summary>
  259. [VariableMonitor("转台高位", "M18.2", "466")]
  260. public bool TurntableHighPosition { get; set; }
  261. /// <summary>
  262. /// 转台低位
  263. /// </summary>
  264. [VariableMonitor("转台低位", "M18.3", "467")]
  265. public bool TurntableLowPosition { get; set; }
  266. /// <summary>
  267. /// 煮面完成
  268. /// </summary>
  269. [VariableMonitor("煮面完成")]
  270. public bool[] CookNoodleCom { get; set; } = new bool[6];
  271. /// <summary>
  272. /// 本地/远程
  273. /// </summary>
  274. [VariableMonitor("本地/远程")]
  275. public bool LocalOrRemote { get; set; }
  276. /// <summary>
  277. /// 温度到达
  278. /// </summary>
  279. [VariableMonitor("温度到达")]
  280. public bool TemperatureReaches { get; set; }
  281. /// <summary>
  282. /// 加热中
  283. /// </summary>
  284. [VariableMonitor("加热中")]
  285. public bool Heating { get; set; }
  286. /// <summary>
  287. /// 转台当前位置
  288. /// </summary>
  289. [VariableMonitor("转台当前位置", "VW770", "870")]
  290. public ushort CurrentFeedbackLoc { get; set; }
  291. /// <summary>
  292. /// 补料完成
  293. /// </summary>
  294. [VariableMonitor("补料完成", "M101.6", "1134")]
  295. public bool FeedComplete { get; set; }
  296. /// <summary>
  297. /// 补料中
  298. /// </summary>
  299. [VariableMonitor("补料中", "M102.6", "1142")]
  300. public bool Feeding { get; set; }
  301. #endregion
  302. }
  303. }