|
- using BPASmartClient.Device;
- using BPASmartClient.Model;
- using System;
- using System.Collections.Concurrent;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.MorkSVer3
- {
- public class GVL_MorkSVer3 : IStatus
- {
- #region 临时变量
- /// <summary>
- /// 允许运行
- /// </summary>
- [VariableMonitor("允许运行")]
- public bool AllowRun { get; set; }
-
- /// <summary>
- /// 设备连接状态
- /// </summary>
- //[VariableMonitor("设备连接状态")]
- //public bool IsConnected { get; set; }
-
- /// <summary>
- /// 优先级判断
- /// </summary>
- [VariableMonitor("优先级判断条件")]
- public bool PriorityJudgment { get; set; }
-
- /// <summary>
- /// 机器人任务互锁信号,false:取面,true:出餐
- /// </summary>
- [VariableMonitor("机器人任务互锁信号")]
- public bool RobotTaskInterlock { get; set; }
-
- /// <summary>
- /// 取碗互锁信号,False:可取碗,反之为True.
- /// </summary>
- [VariableMonitor("取碗互锁信号")]
- public bool TakeBowlInterlock { get; set; }
-
- /// <summary>
- /// 取面互锁信号
- /// </summary>
- [VariableMonitor("取面互锁信号")]
- public bool TakeNoodleInterlock { get; set; }
-
- /// <summary>
- /// 制面互锁信号,为true时即正在制面,不可再次制面。
- /// </summary>
- [VariableMonitor("制面互锁信号")]
- public bool MakeNoodleInterlock { get; set; }
-
- /// <summary>
- /// 出面中
- /// </summary>
- [VariableMonitor("出面中")]
- public bool OutNoodleing { get; set; }
-
- /// <summary>
- /// 允许取面
- /// </summary>
- [VariableMonitor("允许取面")]
- public bool AllowTakeNoodle { get; set; }
-
- /// <summary>
- /// 转台互锁信号
- /// </summary>
- [VariableMonitor("转台互锁信号")]
- public bool TurntableInterlock { get; set; }
- /// <summary>
- /// 机器人出餐互锁
- /// </summary>
- [VariableMonitor("机器人出餐互锁")]
- public bool RobotOutDinnigLock { get; set; }
-
-
- /// <summary>
- /// 煮面炉状态,True:忙碌,false:空闲
- /// </summary>
- [VariableMonitor("煮面炉状态")]
- public bool[] NoodleCookerStatus { get; set; } = new bool[6];
-
- /// <summary>
- /// 转台当前启动位置
- /// </summary>
- //[VariableMonitor("转台当前启动位置")]
- //public ushort CurrentLoc { get; set; } = 0;
-
- /// <summary>
- /// 制作完成标志
- /// </summary>
- [VariableMonitor("制作完成标志")]
- public bool CookCompleteFlatBit { get; set; }
-
- /// <summary>
- /// 取碗任务数量
- /// </summary>
- [VariableMonitor("取碗任务数量")]
- public int TakeBowlTaskCount { get; set; }
-
- /// <summary>
- /// 取面任务数量
- /// </summary>
- [VariableMonitor("取面任务数量")]
- public int RBTakeNoodleTaskCount { get; set; }
- #endregion
-
- #region 列表数据
- /// <summary>
- /// 机器人取面位置队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> RBTakeNoodleTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
-
- /// <summary>
- /// 出碗队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> TakeBowlTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
- /// <summary>
- /// 订单事件队列
- /// </summary>
- public List<DoOrderEvent> doOrderEvents { get; set; } = new List<DoOrderEvent>();
-
- public ConcurrentDictionary<string, DoOrderEvent> doe { get; set; } = new ConcurrentDictionary<string, DoOrderEvent>();
- /// <summary>
- /// 历史订单
- /// </summary>
- public List<string> HistorySuborderId { get; set; } = new List<string>();
- /// <summary>
- /// 煮面口信息队列
- /// </summary>
- public NoodleShidModel[] nsm { get; set; } = new NoodleShidModel[6] { new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel(), new NoodleShidModel() };
-
- /// <summary>
- /// 制面机放面框信息,固定在NoodleBoxes[1]取面,气缸动作时,需要交换数据。
- /// </summary>
- public NoodleBox[] NoodleBoxes { get; set; } = new NoodleBox[2] { new(), new() };
- /// <summary>
- /// 制面队列
- /// </summary>
- public ConcurrentQueue<OrderLocInfo> MakeNoodleTask { get; set; } = new ConcurrentQueue<OrderLocInfo>();
- #endregion
-
- #region 订单ID记录
- /// <summary>
- /// 取碗订单ID
- /// </summary>
- public string TakeBowlId { get; set; } = string.Empty;
- /// <summary>
- /// 取碗订单名称
- /// </summary>
- public string TakeBowName { get; set; } = string.Empty;
- /// <summary>
- /// 取碗完成订单排序号
- /// </summary>
- public int TakeBowSortNum { get; set; } = 0;
-
-
- /// <summary>
- /// 允许倒面位置ID
- /// </summary>
- public string IngredientsCompleteId { get; set; } = string.Empty;
- /// <summary>
- /// 配料完成订单名称
- /// </summary>
- public string IngredientsCompleteName { get; set; } = string.Empty;
- /// <summary>
- /// 配料完成订单排序号
- /// </summary>
- public int IngredientsCompleteSortNum { get; set; } = 0;
-
-
- /// <summary>
- /// 煮面口对应的订单ID
- /// </summary>
- public string[] CookNodelId { get; set; } = new string[6] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, };
-
- /// <summary>
- /// 出餐订单ID
- /// </summary>
- public string OutMealId { get; set; } = string.Empty;
- /// <summary>
- /// 出餐订单名称
- /// </summary>
- public string OutMealName { get; set; } = string.Empty;
- /// <summary>
- /// 出餐排序号
- /// </summary>
- public int OutMealSortNum { get; set; } = 0;
-
- /// <summary>
- /// 当前制面ID
- /// </summary>
- public string CurrentMakeNoodleID { get; set; } = string.Empty;
- /// <summary>
- /// 当前制面物料ID
- /// </summary>
- public int CurrentMakeBatchingID { get; set; }
- /// <summary>
- /// 转台位置轮询
- /// </summary>
- //public List<ushort> TurntableLocLists { get; set; } = new List<ushort>();
-
- #endregion
-
- #region device Data
- /// <summary>
- /// 初始化启动
- /// </summary>
- [VariableMonitor("初始化启动", "M0.0", "320")]
- public bool InitStart { get; set; }
-
- /// <summary>
- /// 初始化完成
- /// </summary>
- [VariableMonitor("初始化完成", "M0.1", "321")]
- public bool InitComplete { get; set; }
-
- /// <summary>
- /// 移碗丝杆初始化完成
- /// </summary>
- [VariableMonitor("移碗丝杆初始化完成", "M0.2", "322")]
- public bool MoveScrewRodInitCom { get; set; }
-
- /// <summary>
- /// 供碗1初始化完成
- /// </summary>
- [VariableMonitor("供碗1初始化完成", "M0.3", "323")]
- public bool SacrificialVesselInitCom { get; set; }
-
- /// <summary>
- /// 气缸推杆初始化完成
- /// </summary>
- [VariableMonitor("气缸推杆初始化完成", "M0.4", "324")]
- public bool CylinderInitCom { get; set; }
-
- /// <summary>
- /// 煮面机初始化完成
- /// </summary>
- [VariableMonitor("煮面机初始化完成", "M0.5", "325")]
- public bool NoodleCookerInitCom { get; set; }
-
- /// <summary>
- /// 机器人初始化完成
- /// </summary>
- [VariableMonitor("机器人初始化完成", "M0.6", "326")]
- public bool RobotInitCom { get; set; }
-
- /// <summary>
- /// 料仓初始化完成
- /// </summary>
- //[VariableMonitor("料仓初始化完成", "M0.7", "327")]
- //public bool SiloInitCom { get; set; }
-
- /// <summary>
- /// 故障复位/停止
- /// </summary>
- [VariableMonitor("故障复位/停止", "M1.0", "328")]
- public bool FaultResetOrStop { get; set; }
-
- /// <summary>
- /// 落碗1,大碗
- /// </summary>
- [VariableMonitor("落碗1,大碗", "M9.0", "392")]
- public bool DropBowlOne { get; set; }
-
- /// <summary>
- /// 落碗2,一次性碗
- /// </summary>
- [VariableMonitor("落碗2,一次性碗", "M9.1", "393")]
- public bool DropBowlTow { get; set; }
-
- /// <summary>
- /// 允许倒面
- /// </summary>
- [VariableMonitor("允许倒面", "M10.0", "400")]
- public bool AllowInvertedFace { get; set; }
-
- /// <summary>
- /// 出餐完成
- /// </summary>
- [VariableMonitor("出餐完成", "M10.1", "401")]
- public bool DiningComplete { get; set; }
-
- /// <summary>
- /// 落碗机构状态,1:忙碌 0:空闲
- /// </summary>
- [VariableMonitor("落碗机构状态,1:忙碌 0:空闲", "M10.4", "404")]
- public bool DropBowlMechanismStatus { get; set; }
-
- /// <summary>
- /// 定位标志,1:忙碌 0:空闲
- /// </summary>
- [VariableMonitor("定位标志,1:忙碌 0:空闲", "M12.2", "418")]
- public bool FixedFlag { get; set; }
-
- /// <summary>
- /// 定位启动
- /// </summary>
- [VariableMonitor("定位启动", "M12.3", "419")]
- public bool FixedStart { get; set; }
-
- ///// <summary>
- ///// 料仓到位
- ///// </summary>
- //[VariableMonitor("料仓到位", "M13.5", "429")]
- //public bool SiloInPlace { get; set; }
-
- /// <summary>
- /// 机器人料仓取面完成
- /// </summary>
- [VariableMonitor("机器人去料仓取面完成", "M16.7", "455")]
- public bool RobotTakeNoodleCom { get; set; }
-
- /// <summary>
- /// 机器人状态
- /// </summary>
- [VariableMonitor("机器人状态", "M17.4", "460")]
- public bool RobotStatus { get; set; }
-
- /// <summary>
- /// 一次性碗有无检测
- /// </summary>
- [VariableMonitor("一次性碗有无检测", "M18.0", "464")]
- public bool SmallBowlYesOrNoCheck { get; set; }
-
- /// <summary>
- /// 大碗有无检测
- /// </summary>
- [VariableMonitor("大碗有无检测", "M18.1", "465")]
- public bool LargeBowYesOrNoCheck { get; set; }
-
- ///// <summary>
- ///// 转台高位
- ///// </summary>
- //[VariableMonitor("转台高位", "M18.2", "466")]
- //public bool TurntableHighPosition { get; set; }
-
- ///// <summary>
- ///// 转台低位
- ///// </summary>
- //[VariableMonitor("转台低位", "M18.3", "467")]
- //public bool TurntableLowPosition { get; set; }
-
- /// <summary>
- /// 煮面完成
- /// </summary>
- [VariableMonitor("煮面完成")]
- public bool[] CookNoodleCom { get; set; } = new bool[6];
-
- /// <summary>
- /// 本地/远程
- /// </summary>
- [VariableMonitor("本地/远程")]
- public bool LocalOrRemote { get; set; }
-
- /// <summary>
- /// 温度到达
- /// </summary>
- [VariableMonitor("温度到达")]
- public bool TemperatureReaches { get; set; }
-
- /// <summary>
- /// 加热中
- /// </summary>
- [VariableMonitor("加热中")]
- public bool Heating { get; set; }
-
- ///// <summary>
- ///// 转台当前位置
- ///// </summary>
- //[VariableMonitor("转台当前位置", "VW770", "870")]
- //public ushort CurrentFeedbackLoc { get; set; }
-
- ///// <summary>
- ///// 补料完成
- ///// </summary>
- //[VariableMonitor("补料完成", "M101.6", "1134")]
- //public bool FeedComplete { get; set; }
-
- ///// <summary>
- ///// 补料中
- ///// </summary>
- //[VariableMonitor("补料中", "M102.6", "1142")]
- //public bool Feeding { get; set; }
- #endregion
-
- #region 制面机
- /// <summary>
- /// 取面任务数量
- /// </summary>
- [VariableMonitor("制面机初始化完成","M0.7")]
- public bool NMachInitComp { get; set; }
-
- /// <summary>
- /// 制面机气缸左侧到位
- /// </summary>
- [VariableMonitor("制面机气缸左侧到位", "M13.0")]
- public bool CylLeftPos { get; set; }
-
- /// <summary>
- /// 制面机气缸右侧到位
- /// </summary>
- [VariableMonitor("制面机气缸右侧到位", "M13.1")]
- public bool CylRightPos { get; set; }
-
- /// <summary>
- /// 制面机气缸动作
- /// </summary>
- [VariableMonitor("制面机气缸动作", "M13.2")]
- public bool CylRotate { get; set; }
-
-
- /// <summary>
- /// 制面机制面完成
- /// </summary>
- [VariableMonitor("制面机制面完成", "M20.0")]
- public bool NMachMakeComp { get; set; }
- #endregion
- }
- }
|