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

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