WeighterC.cs 7.47 KB
using FLY.OBJComponents.IService;
using Misc;
using System.ComponentModel;
using System.Windows.Media;

namespace FLY.Weight2.Common
{
    public class WeighterC : INotifyPropertyChanged, IPropertyOpt
    {
        public WeighterC(string number, int index)
        {
            Number = number;
            Index = index;
        }
        #region IWeighterC实现
        /// <summary>
        /// 名称:A,B,C,D,E
        /// </summary>
        public string Number { get; set; }
        /// <summary>
        /// 序号 0,1,2,3,4.....
        /// </summary>
        public int Index { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public Brush Color { get; set; }
        #endregion
        #region 辅助代码生成
        /// <summary>
        /// 当前流量(kg/h) xxx.x
        /// </summary>
        [Description("当前流量(kg/h) xxx.x")]
        public float CurrentFlow{ get; set; }

        /// <summary>
        /// 运行比例(%) xx.x
        /// </summary>
        [Description("运行比例(%) xx.x")]
        public float ScrewPDisp{ get; set; }

        /// <summary>
        /// 自动模式时,当前流量(kg/h) xxx.x
        /// </summary>
        [Description("自动模式时,当前流量(kg/h) xxx.x")]
        public float CurrentFlowAuto{ get; set; }

        /// <summary>
        /// 自动模式时,运行比例(%) xx.x
        /// </summary>
        [Description("自动模式时,运行比例(%) xx.x")]
        public float ScrewPDispAuto{ get; set; }

        /// <summary>
        /// 当前重量(Kg) x.xxx
        /// </summary>
        [Description("当前重量(Kg) x.xxx")]
        public float BinWeight{ get; set; }

        /// <summary>
        /// 电机运行频率(Hz) xx.x
        /// </summary>
        [Description("电机运行频率(Hz) xx.x")]
        public float ScrewMotorFreq{ get; set; }

        /// <summary>
        /// 电机设定频率(Hz)
        /// </summary>
        [Description("电机设定频率(Hz)")]
        public float ScrewManualFreq{ get; set; }

        /// <summary>
        /// 设定频率确定(取反)
        /// </summary>
        [Description("设定频率确定(取反)")]
        public bool ScrewManualFreqIsSet{ get; set; }

        /// <summary>
        /// 螺杆自动
        /// </summary>
        [Description("螺杆自动")]
        public bool ScrewIsAutoMode{ get; set; }

        /// <summary>
        /// 螺杆操作
        /// </summary>
        [Description("螺杆操作")]
        public bool ScrewMotorIsOn{ get; set; }

        /// <summary>
        /// 螺杆启动设置(┴)
        /// </summary>
        [Description("螺杆启动设置(┴)")]
        public bool ScrewMotorOnSet{ get; set; }

        /// <summary>
        /// 最高频率(Hz) xxx.x
        /// </summary>
        [Description("最高频率(Hz) xxx.x")]
        public float MaxFreq{ get; set; }

        /// <summary>
        /// 稳定时间(s) xxx.x
        /// </summary>
        [Description("稳定时间(s) xxx.x")]
        public float StableTime{ get; set; }

        /// <summary>
        /// 采样时间(s) xxx.x
        /// </summary>
        [Description("采样时间(s) xxx.x")]
        public float SampleTime{ get; set; }

        /// <summary>
        /// 料位上限(kg) xxx.x
        /// </summary>
        [Description("料位上限(kg) xxx.x")]
        public float BinUpperLimit{ get; set; }

        /// <summary>
        /// 料位下限(kg) xxx.x
        /// </summary>
        [Description("料位下限(kg) xxx.x")]
        public float BinLowerLimit{ get; set; }

        /// <summary>
        /// 螺杆下限(kg) xxx.x
        /// </summary>
        [Description("螺杆下限(kg) xxx.x")]
        public float ScrewLowerLimit{ get; set; }

        /// <summary>
        /// 加料时间(s) xxx.x
        /// </summary>
        [Description("加料时间(s) xxx.x")]
        public float ChargeTime{ get; set; }

        /// <summary>
        /// 快速标准(s) xxx.x
        /// </summary>
        [Description("快速标准(s) xxx.x")]
        public float FastStandard{ get; set; }

        /// <summary>
        /// 稳定级别 xxx.x
        /// </summary>
        [Description("稳定级别 xxx.x")]
        public float StableLv{ get; set; }

        /// <summary>
        /// 调整级别 xxx.x
        /// </summary>
        [Description("调整级别 xxx.x")]
        public float AdjustLv{ get; set; }

        /// <summary>
        /// 高系数 xxx.x
        /// </summary>
        [Description("高系数 xxx.x")]
        public float HighFactor{ get; set; }

        /// <summary>
        /// 低系数 xxx.x
        /// </summary>
        [Description("低系数 xxx.x")]
        public float LowFactor{ get; set; }

        /// <summary>
        /// 调节限制 xxxx
        /// </summary>
        [Description("调节限制 xxxx")]
        public float AdjustLimit{ get; set; }

        /// <summary>
        /// 比例系数 xxx.x
        /// </summary>
        [Description("比例系数 xxx.x")]
        public float Pc{ get; set; }

        /// <summary>
        /// 积分时间(s) xxx
        /// </summary>
        [Description("积分时间(s) xxx")]
        public float It{ get; set; }

        /// <summary>
        /// 微分增益 xxx.x
        /// </summary>
        [Description("微分增益 xxx.x")]
        public float Dg{ get; set; }

        /// <summary>
        /// 微分时间(s) xxx.x
        /// </summary>
        [Description("微分时间(s) xxx.x")]
        public float Dt{ get; set; }

        /// <summary>
        /// 滤波常数 xxx.x
        /// </summary>
        [Description("滤波常数 xxx.x")]
        public float Filter{ get; set; }

        /// <summary>
        /// 快速频率(Hz) xxx.x
        /// </summary>
        [Description("快速频率(Hz) xxx.x")]
        public float FastFreq{ get; set; }

        /// <summary>
        /// 快速时间(s) xxx.x
        /// </summary>
        [Description("快速时间(s) xxx.x")]
        public float FastTime{ get; set; }

        /// <summary>
        /// 计算运用 xxx.x
        /// </summary>
        [Description("计算运用 xxx.x")]
        public float Cal{ get; set; }

        /// <summary>
        /// 偏差报警(%) xxx
        /// </summary>
        [Description("偏差报警(%) xxx")]
        public float Tolerance{ get; set; }

        /// <summary>
        /// PID输出 xxx
        /// </summary>
        [Description("PID输出 xxx")]
        public float PIDResult{ get; set; }

        /// <summary>
        /// PID调节 xxx
        /// </summary>
        [Description("PID调节 xxx")]
        public float PIDAdjust{ get; set; }

        /// <summary>
        /// 螺杆缺料!!
        /// </summary>
        [Description("螺杆缺料!!")]
        [IsError()]
        public bool IsErrorOfScrewLack{ get; set; }

        /// <summary>
        /// 料仓缺料!!
        /// </summary>
        [Description("料仓缺料!!")]
        [IsError()]
        public bool IsErrorOfBinLack{ get; set; }

        /// <summary>
        /// 流量超偏差!!
        /// </summary>
        [Description("流量超偏差!!")]
        [IsError()]
        public bool IsErrorOfFlow{ get; set; }

        #endregion
        public event PropertyChangedEventHandler PropertyChanged;


        public string[] GetSyncPropNames()
        {
            return null;
        }

        public string[] GetNoSyncPropNames()
        {
            return new string[] {
                "Number",
                "Color"
            };
        }
    }
}