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.
 
 

184 lines
4.6 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using HBLConsole.Interface;
  7. using System.Collections.Concurrent;
  8. namespace HBLConsole.GVL
  9. {
  10. /// <summary>
  11. /// MORKS 设备数据
  12. /// </summary>
  13. public class MORKS : IGvl
  14. {
  15. /// <summary>
  16. /// 机器人取面
  17. /// PLC -> M0.3
  18. /// ModbusTcp -> 323
  19. /// </summary>
  20. public bool RobotTakeNoodle { get; set; }
  21. /// <summary>
  22. /// 机器人出餐
  23. /// PLC -> M0.4
  24. /// ModbusTcp -> 324
  25. /// </summary>
  26. public bool RobotOutMeal { get; set; }
  27. /// <summary>
  28. /// 移动转台
  29. /// PLC -> M0.5
  30. /// ModbusTcp -> 325
  31. /// </summary>
  32. public bool MoveTurntable { get; set; }
  33. /// <summary>
  34. /// 初始化完成
  35. /// PLC -> M100.0
  36. /// ModbusTcp -> 1120
  37. /// </summary>
  38. public bool InitComplete { get; set; }
  39. /// <summary>
  40. /// 取碗机构空闲,True:忙碌,false:空闲
  41. /// PLC -> M100.1
  42. /// ModbusTcp -> 1121
  43. /// </summary>
  44. public bool TakeBowlIdle { get; set; }
  45. /// <summary>
  46. /// 温度到达,True:表示到达,false:未到达
  47. /// PLC -> M100.2
  48. /// ModbusTcp -> 1122
  49. /// </summary>
  50. public bool TemperatureReached { get; set; }
  51. /// <summary>
  52. /// 允许到面,配料完成
  53. /// PLC -> M100.3
  54. /// ModbusTcp -> 1123
  55. /// </summary>
  56. public bool AllowFallNoodle { get; set; }
  57. /// <summary>
  58. /// 机器人取面完成
  59. /// PLC -> M100.4
  60. /// ModbusTcp -> 1124
  61. /// </summary>
  62. public bool RbTakeNoodleComplete { get; set; }
  63. /// <summary>
  64. /// 机器人倒面完成
  65. /// PLC -> M100.5
  66. /// ModbusTcp -> 1125
  67. /// </summary>
  68. public bool RbFallNoodleComplete { get; set; }
  69. /// <summary>
  70. /// 机器人出餐完成,上报取餐完成
  71. /// PLC -> M100.6
  72. /// ModbusTcp -> 1126
  73. /// </summary>
  74. public bool RbOutMealComplete { get; set; }
  75. /// <summary>
  76. /// 机器人空闲
  77. /// PLC -> M100.7
  78. /// ModbusTcp -> 1127
  79. /// </summary>
  80. public bool RobotIdle { get; set; }
  81. /// <summary>
  82. /// 取餐口检测
  83. /// PLC -> M101.0
  84. /// ModbusTcp -> 1128
  85. /// </summary>
  86. public bool TakeMealDetect { get; set; }
  87. /// <summary>
  88. /// 缺碗信号,false:缺碗,true:有碗
  89. /// PLC -> M101.1
  90. /// ModbusTcp -> 1129
  91. /// </summary>
  92. public bool MissingBowl { get; set; }
  93. /// <summary>
  94. /// 转台下限检测
  95. /// PLC -> M101.3
  96. /// ModbusTcp -> 1131
  97. /// </summary>
  98. public bool TurntableLowerLimit { get; set; }
  99. /// <summary>
  100. /// 煮面炉状态,True:忙碌,false:空闲
  101. /// M102.0 - M102.5
  102. /// 1136 - 1141
  103. /// </summary>
  104. public bool[] NoodleCookerStatus { get; set; } = new bool[6] { false, false, false, false, false, false };
  105. /// <summary>
  106. /// 煮面完成,上升后给信号
  107. /// M103.0 - M103.5
  108. /// 1144 - 1149
  109. /// </summary>
  110. public bool[] CookNoodlesComplete { get; set; } = new bool[6] { false, false, false, false, false, false };
  111. /// <summary>
  112. /// 配方编号
  113. /// PLC -> VW0
  114. /// ModbusTcp -> 100
  115. /// </summary>
  116. public ushort RecipeNumber { get; set; }
  117. /// <summary>
  118. /// 转台位置
  119. /// PLC -> VW2
  120. /// ModbusTcp -> 101
  121. /// </summary>
  122. public ushort TurntableLoc { get; set; }
  123. /// <summary>
  124. /// 到面至煮面炉位置
  125. /// PLC -> VW4
  126. /// ModbusTcp -> 102
  127. /// </summary>
  128. public ushort FallNoodleLoc { get; set; }
  129. /// <summary>
  130. /// 取面位置
  131. /// PLC -> VW6
  132. /// ModbusTcp -> 103
  133. /// </summary>
  134. public ushort TakeNoodleLoc { get; set; }
  135. /// <summary>
  136. /// 机器人取面位置队列
  137. /// </summary>
  138. public ConcurrentQueue<OrderLocInfo> RBTakeNoodleTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  139. public ConcurrentQueue<OrderLocInfo> TakeBowlTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
  140. }
  141. public class OrderLocInfo
  142. {
  143. public string SuborderId { get; set; }
  144. public ushort Loc { get; set; }
  145. public ushort RecipeNumber { get; set; }
  146. }
  147. }