using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using HBLConsole.Interface; using System.Collections.Concurrent; using HBLConsole.Attributes; using HBLConsole.Model; namespace HBLConsole.MORKS { /// /// MORKS 设备数据 /// public class GVL_MORKS : IGvl { /// /// 机器人取面 /// PLC -> M0.3 /// ModbusTcp -> 323 /// public bool RobotTakeNoodle { get; set; } /// /// 机器人出餐 /// PLC -> M0.4 /// ModbusTcp -> 324 /// public bool RobotOutMeal { get; set; } /// /// 移动转台 /// PLC -> M0.5 /// ModbusTcp -> 325 /// public bool MoveTurntable { get; set; } #region 临时变量 /// /// 允许运行 /// [Circuit(new string[] { "机器人取面", "取碗控制" }, "允许运行")] public bool AllowRun { get; set; } /// /// //机器人任务互锁信号 /// [Circuit(new string[] { "机器人取面", "出面控制" }, "机器人互锁", new bool[] { true, false })] public bool RobotTaskInterlock { get; set; } /// /// 取碗互锁信号 /// [Circuit("取碗控制", "取碗互锁", true)] public bool TakeBowlInterlock { get; set; } /// /// 取面互锁信号 /// [Circuit(new string[] { "机器人取面", "出面控制" }, "取面互锁信号", new bool[] { true, true })] public bool TakeNoodleInterlock { get; set; } /// /// 出面中 /// [Circuit("机器人取面", "出面中", true)] public bool OutNoodleing { get; set; } /// /// 允许取面 /// [Circuit(new string[] { "转台控制", "机器人取面" }, "允许取面", new bool[] { true, false })] public bool AllowTakeNoodle { get; set; } /// /// 转台互锁信号 /// public bool TurntableInterlock { get; set; } #endregion /// /// 初始化完成 /// PLC -> M100.0 /// ModbusTcp -> 1120 /// [Circuit(new string[] { "允许运行", "转台控制", "转台控制" }, "初始化完成")] public bool InitComplete { get; set; } /// /// 取碗机构空闲,True:忙碌,false:空闲 /// PLC -> M100.1 /// ModbusTcp -> 1121 /// [Circuit("取碗控制", "取碗机构空闲", true)] public bool TakeBowlIdle { get; set; } /// /// 温度到达,True:表示到达,false:未到达 /// PLC -> M100.2 /// ModbusTcp -> 1122 /// [Circuit("允许运行", "温度到达")] public bool TemperatureReached { get; set; } /// /// 允许到面,配料完成 /// PLC -> M100.3 /// ModbusTcp -> 1123 /// [Circuit("出面控制", "允许到面")] public bool AllowFallNoodle { get; set; } /// /// 机器人取面完成 /// PLC -> M100.4 /// ModbusTcp -> 1124 /// public bool RbTakeNoodleComplete { get; set; } /// /// 机器人倒面完成 /// PLC -> M100.5 /// ModbusTcp -> 1125 /// public bool RbFallNoodleComplete { get; set; } /// /// 机器人出餐完成,上报取餐完成 /// PLC -> M100.6 /// ModbusTcp -> 1126 /// public bool RbOutMealComplete { get; set; } /// /// 机器人空闲 /// PLC -> M100.7 /// ModbusTcp -> 1127 /// [Circuit(new string[] { "机器人取面", "出面控制" }, "机器人空闲")] public bool RobotIdle { get; set; } /// /// 取餐口检测 /// PLC -> M101.0 /// ModbusTcp -> 1128 /// [Circuit("出面控制", "取餐口检测", true)] public bool TakeMealDetect { get; set; } /// /// 缺碗信号,false:缺碗,true:有碗 /// PLC -> M101.1 /// ModbusTcp -> 1129 /// public bool MissingBowl { get; set; } /// /// 设备初始化中,执行中等于1,2秒后复位 /// PLC -> M101.2 /// ModbusTcp -> 1130 /// public bool DeviceIniting { get; set; } /// /// 转台下限检测 /// PLC -> M101.3 /// ModbusTcp -> 1131 /// [Circuit("转台控制", "转台下限检测有物料")] public bool TurntableLowerLimit { get; set; } /// /// 缺碗信号 2 /// PLC -> M101.4 /// ModbusTcp -> 1132 /// public bool MissingBowlSignal2 { get; set; } /// /// 转台上限检测 /// PLC -> M101.5 /// ModbusTcp -> 1133 /// public bool TurntableUpLimit { get; set; } /// /// 转台移动到位 /// PLC -> M101.7 /// ModbusTcp -> 1135 /// [Circuit(new string[] { "转台控制", "机器人取面" }, "转台移动到位")] public bool TurntableMoveInPlace { get; set; } /// /// 煮面炉状态,True:忙碌,false:空闲 /// M102.0 - M102.5 /// 1136 - 1141 /// public bool[] NoodleCookerStatus { get; set; } = new bool[6] { false, false, false, false, false, false }; /// /// 煮面完成,上升后给信号 /// M103.0 - M103.5 /// 1144 - 1149 /// public bool[] CookNoodlesComplete { get; set; } = new bool[6] { false, false, false, false, false, false }; /// /// 配方编号 /// PLC -> VW0 /// ModbusTcp -> 100 /// public ushort RecipeNumber { get; set; } /// /// 转台位置 /// PLC -> VW2 /// ModbusTcp -> 101 /// public ushort TurntableLoc { get; set; } /// /// 到面至煮面炉位置 /// PLC -> VW4 /// ModbusTcp -> 102 /// public ushort FallNoodleLoc { get; set; } /// /// 取面位置 /// PLC -> VW6 /// ModbusTcp -> 103 /// public ushort TakeNoodleLoc { get; set; } /// /// 机器人取面位置队列 /// [Circuit(new string[] { "转台控制", "机器人取面" }, "有机器人取面队列")] public ConcurrentQueue RBTakeNoodleTask { get; set; } = new ConcurrentQueue(); /// /// 出碗队列 /// [Circuit("取碗控制", "有取碗队列数量")] public ConcurrentQueue TakeBowlTask { get; set; } = new ConcurrentQueue(); /// /// 是否有面条 /// public bool IsNoodles { get; set; } = true; } }