终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

425 rader
13 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.MorkSVer3
  10. {
  11. public class GVL_MorkSVer3 : 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. /// 制面互锁信号,为true时即正在制面,不可再次制面。
  46. /// </summary>
  47. [VariableMonitor("制面互锁信号")]
  48. public bool MakeNoodleInterlock { get; set; }
  49. /// <summary>
  50. /// 出面中
  51. /// </summary>
  52. [VariableMonitor("出面中")]
  53. public bool OutNoodleing { get; set; }
  54. /// <summary>
  55. /// 允许取面
  56. /// </summary>
  57. [VariableMonitor("允许取面")]
  58. public bool AllowTakeNoodle { get; set; }
  59. /// <summary>
  60. /// 转台互锁信号
  61. /// </summary>
  62. [VariableMonitor("转台互锁信号")]
  63. public bool TurntableInterlock { get; set; }
  64. /// <summary>
  65. /// 机器人出餐互锁
  66. /// </summary>
  67. [VariableMonitor("机器人出餐互锁")]
  68. public bool RobotOutDinnigLock { get; set; }
  69. /// <summary>
  70. /// 煮面炉状态,True:忙碌,false:空闲
  71. /// </summary>
  72. [VariableMonitor("煮面炉状态")]
  73. public bool[] NoodleCookerStatus { get; set; } = new bool[6];
  74. /// <summary>
  75. /// 转台当前启动位置
  76. /// </summary>
  77. //[VariableMonitor("转台当前启动位置")]
  78. //public ushort CurrentLoc { get; set; } = 0;
  79. /// <summary>
  80. /// 制作完成标志
  81. /// </summary>
  82. [VariableMonitor("制作完成标志")]
  83. public bool CookCompleteFlatBit { get; set; }
  84. /// <summary>
  85. /// 取碗任务数量
  86. /// </summary>
  87. [VariableMonitor("取碗任务数量")]
  88. public int TakeBowlTaskCount { get; set; }
  89. /// <summary>
  90. /// 取面任务数量
  91. /// </summary>
  92. [VariableMonitor("取面任务数量")]
  93. public int RBTakeNoodleTaskCount { get; set; }
  94. #endregion
  95. #region 列表数据
  96. /// <summary>
  97. /// 机器人取面位置队列
  98. /// </summary>
  99. public ConcurrentQueue<OrderLocInfo> RBTakeNoodleTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  100. /// <summary>
  101. /// 出碗队列
  102. /// </summary>
  103. public ConcurrentQueue<OrderLocInfo> TakeBowlTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  104. /// <summary>
  105. /// 订单事件队列
  106. /// </summary>
  107. public List<DoOrderEvent> doOrderEvents { get; set; } = new List<DoOrderEvent>();
  108. public ConcurrentDictionary<string, DoOrderEvent> doe { get; set; } = new ConcurrentDictionary<string, DoOrderEvent>();
  109. /// <summary>
  110. /// 历史订单
  111. /// </summary>
  112. public List<string> HistorySuborderId { get; set; } = new List<string>();
  113. /// <summary>
  114. /// 煮面口信息队列
  115. /// </summary>
  116. public NoodleShidModel[] nsm { get; set; } = new NoodleShidModel[6] { new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel() };
  117. /// <summary>
  118. /// 制面机放面框信息,固定在NoodleBoxes[1]取面,气缸动作时,需要交换数据。
  119. /// </summary>
  120. public NoodleBox[] NoodleBoxes { get; set; } = new NoodleBox[2] { new(), new() };
  121. /// <summary>
  122. /// 制面队列
  123. /// </summary>
  124. public ConcurrentQueue<OrderLocInfo> MakeNoodleTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  125. #endregion
  126. #region 订单ID记录
  127. /// <summary>
  128. /// 取碗订单ID
  129. /// </summary>
  130. public string TakeBowlId { get; set; } = string.Empty;
  131. /// <summary>
  132. /// 取碗订单名称
  133. /// </summary>
  134. public string TakeBowName { get; set; } = string.Empty;
  135. /// <summary>
  136. /// 取碗完成订单排序号
  137. /// </summary>
  138. public int TakeBowSortNum { get; set; } = 0;
  139. /// <summary>
  140. /// 允许倒面位置ID
  141. /// </summary>
  142. public string IngredientsCompleteId { get; set; } = string.Empty;
  143. /// <summary>
  144. /// 配料完成订单名称
  145. /// </summary>
  146. public string IngredientsCompleteName { get; set; } = string.Empty;
  147. /// <summary>
  148. /// 配料完成订单排序号
  149. /// </summary>
  150. public int IngredientsCompleteSortNum { get; set; } = 0;
  151. /// <summary>
  152. /// 煮面口对应的订单ID
  153. /// </summary>
  154. public string[] CookNodelId { get; set; } = new string[6] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, };
  155. /// <summary>
  156. /// 出餐订单ID
  157. /// </summary>
  158. public string OutMealId { get; set; } = string.Empty;
  159. /// <summary>
  160. /// 出餐订单名称
  161. /// </summary>
  162. public string OutMealName { get; set; } = string.Empty;
  163. /// <summary>
  164. /// 出餐排序号
  165. /// </summary>
  166. public int OutMealSortNum { get; set; } = 0;
  167. /// <summary>
  168. /// 当前制面ID
  169. /// </summary>
  170. public string CurrentMakeNoodleID { get; set; } = string.Empty;
  171. /// <summary>
  172. /// 当前制面物料ID
  173. /// </summary>
  174. public int CurrentMakeBatchingID { get; set; }
  175. /// <summary>
  176. /// 转台位置轮询
  177. /// </summary>
  178. //public List<ushort> TurntableLocLists { get; set; } = new List<ushort>();
  179. #endregion
  180. #region device Data
  181. /// <summary>
  182. /// 初始化启动
  183. /// </summary>
  184. [VariableMonitor("初始化启动", "M0.0", "320")]
  185. public bool InitStart { get; set; }
  186. /// <summary>
  187. /// 初始化完成
  188. /// </summary>
  189. [VariableMonitor("初始化完成", "M0.1", "321")]
  190. public bool InitComplete { get; set; }
  191. /// <summary>
  192. /// 移碗丝杆初始化完成
  193. /// </summary>
  194. [VariableMonitor("移碗丝杆初始化完成", "M0.2", "322")]
  195. public bool MoveScrewRodInitCom { get; set; }
  196. /// <summary>
  197. /// 供碗1初始化完成
  198. /// </summary>
  199. [VariableMonitor("供碗1初始化完成", "M0.3", "323")]
  200. public bool SacrificialVesselInitCom { get; set; }
  201. /// <summary>
  202. /// 气缸推杆初始化完成
  203. /// </summary>
  204. [VariableMonitor("气缸推杆初始化完成", "M0.4", "324")]
  205. public bool CylinderInitCom { get; set; }
  206. /// <summary>
  207. /// 煮面机初始化完成
  208. /// </summary>
  209. [VariableMonitor("煮面机初始化完成", "M0.5", "325")]
  210. public bool NoodleCookerInitCom { get; set; }
  211. /// <summary>
  212. /// 机器人初始化完成
  213. /// </summary>
  214. [VariableMonitor("机器人初始化完成", "M0.6", "326")]
  215. public bool RobotInitCom { get; set; }
  216. /// <summary>
  217. /// 料仓初始化完成
  218. /// </summary>
  219. //[VariableMonitor("料仓初始化完成", "M0.7", "327")]
  220. //public bool SiloInitCom { get; set; }
  221. /// <summary>
  222. /// 故障复位/停止
  223. /// </summary>
  224. [VariableMonitor("故障复位/停止", "M1.0", "328")]
  225. public bool FaultResetOrStop { get; set; }
  226. /// <summary>
  227. /// 落碗1,大碗
  228. /// </summary>
  229. [VariableMonitor("落碗1,大碗", "M9.0", "392")]
  230. public bool DropBowlOne { get; set; }
  231. /// <summary>
  232. /// 落碗2,一次性碗
  233. /// </summary>
  234. [VariableMonitor("落碗2,一次性碗", "M9.1", "393")]
  235. public bool DropBowlTow { get; set; }
  236. /// <summary>
  237. /// 允许倒面
  238. /// </summary>
  239. [VariableMonitor("允许倒面", "M10.0", "400")]
  240. public bool AllowInvertedFace { get; set; }
  241. /// <summary>
  242. /// 出餐完成
  243. /// </summary>
  244. [VariableMonitor("出餐完成", "M10.1", "401")]
  245. public bool DiningComplete { get; set; }
  246. /// <summary>
  247. /// 落碗机构状态,1:忙碌 0:空闲
  248. /// </summary>
  249. [VariableMonitor("落碗机构状态,1:忙碌 0:空闲", "M10.4", "404")]
  250. public bool DropBowlMechanismStatus { get; set; }
  251. /// <summary>
  252. /// 定位标志,1:忙碌 0:空闲
  253. /// </summary>
  254. [VariableMonitor("定位标志,1:忙碌 0:空闲", "M12.2", "418")]
  255. public bool FixedFlag { get; set; }
  256. /// <summary>
  257. /// 定位启动
  258. /// </summary>
  259. [VariableMonitor("定位启动", "M12.3", "419")]
  260. public bool FixedStart { get; set; }
  261. ///// <summary>
  262. ///// 料仓到位
  263. ///// </summary>
  264. //[VariableMonitor("料仓到位", "M13.5", "429")]
  265. //public bool SiloInPlace { get; set; }
  266. /// <summary>
  267. /// 机器人料仓取面完成
  268. /// </summary>
  269. [VariableMonitor("机器人去料仓取面完成", "M16.7", "455")]
  270. public bool RobotTakeNoodleCom { get; set; }
  271. /// <summary>
  272. /// 机器人状态
  273. /// </summary>
  274. [VariableMonitor("机器人状态", "M17.4", "460")]
  275. public bool RobotStatus { get; set; }
  276. /// <summary>
  277. /// 一次性碗有无检测
  278. /// </summary>
  279. [VariableMonitor("一次性碗有无检测", "M18.0", "464")]
  280. public bool SmallBowlYesOrNoCheck { get; set; }
  281. /// <summary>
  282. /// 大碗有无检测
  283. /// </summary>
  284. [VariableMonitor("大碗有无检测", "M18.1", "465")]
  285. public bool LargeBowYesOrNoCheck { get; set; }
  286. ///// <summary>
  287. ///// 转台高位
  288. ///// </summary>
  289. //[VariableMonitor("转台高位", "M18.2", "466")]
  290. //public bool TurntableHighPosition { get; set; }
  291. ///// <summary>
  292. ///// 转台低位
  293. ///// </summary>
  294. //[VariableMonitor("转台低位", "M18.3", "467")]
  295. //public bool TurntableLowPosition { get; set; }
  296. /// <summary>
  297. /// 煮面完成
  298. /// </summary>
  299. [VariableMonitor("煮面完成")]
  300. public bool[] CookNoodleCom { get; set; } = new bool[6];
  301. /// <summary>
  302. /// 本地/远程
  303. /// </summary>
  304. [VariableMonitor("本地/远程")]
  305. public bool LocalOrRemote { get; set; }
  306. /// <summary>
  307. /// 温度到达
  308. /// </summary>
  309. [VariableMonitor("温度到达")]
  310. public bool TemperatureReaches { get; set; }
  311. /// <summary>
  312. /// 加热中
  313. /// </summary>
  314. [VariableMonitor("加热中")]
  315. public bool Heating { get; set; }
  316. ///// <summary>
  317. ///// 转台当前位置
  318. ///// </summary>
  319. //[VariableMonitor("转台当前位置", "VW770", "870")]
  320. //public ushort CurrentFeedbackLoc { get; set; }
  321. ///// <summary>
  322. ///// 补料完成
  323. ///// </summary>
  324. //[VariableMonitor("补料完成", "M101.6", "1134")]
  325. //public bool FeedComplete { get; set; }
  326. ///// <summary>
  327. ///// 补料中
  328. ///// </summary>
  329. //[VariableMonitor("补料中", "M102.6", "1142")]
  330. //public bool Feeding { get; set; }
  331. #endregion
  332. #region 制面机
  333. /// <summary>
  334. /// 取面任务数量
  335. /// </summary>
  336. [VariableMonitor("制面机初始化完成","M0.7")]
  337. public bool NMachInitComp { get; set; }
  338. /// <summary>
  339. /// 制面机气缸左侧到位
  340. /// </summary>
  341. [VariableMonitor("制面机气缸左侧到位", "M13.0")]
  342. public bool CylLeftPos { get; set; }
  343. /// <summary>
  344. /// 制面机气缸右侧到位
  345. /// </summary>
  346. [VariableMonitor("制面机气缸右侧到位", "M13.1")]
  347. public bool CylRightPos { get; set; }
  348. /// <summary>
  349. /// 制面机气缸动作
  350. /// </summary>
  351. [VariableMonitor("制面机气缸动作", "M13.2")]
  352. public bool CylRotate { get; set; }
  353. /// <summary>
  354. /// 制面机制面完成
  355. /// </summary>
  356. [VariableMonitor("制面机制面完成", "M20.0")]
  357. public bool NMachMakeComp { get; set; }
  358. #endregion
  359. }
  360. }