领胜LDS 键盘AOI检测项目
wells.liu
2020-07-01 e9f47e76b9932949c9df829e98b09938eb93e870
src/Bro.Device.GTSCard/GTSCardConfig.cs
@@ -1,6 +1,7 @@
using Bro.Common.Base;
using Bro.Common.Helper;
using Bro.Common.Interface;
using Bro.Common.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -39,20 +40,11 @@
        [Description("CardNum:卡号")]
        public int CardNum { get; set; }
        //[Category("板卡配置")]
        //[Description("IO卡号")]
        //public int IOCardNum { get; set; }
        [Category("板卡配置")]
        [DisplayName("初始配置文件路径")]
        [Description("InitialConfigFilePath:初始配置文件路径")]
        [Editor(typeof(FileDialogEditor), typeof(UITypeEditor))]
        public string InitialConfigFilePath { get; set; }
        [Category("IO扫描配置")]
        [DisplayName("扫描间隔")]
        [Description("ScanInterval:扫描间隔,以毫秒为单位")]
        public int ScanInterval { get; set; } = 100;
        [Category("轴配置")]
        [DisplayName("轴数量")]
@@ -76,15 +68,63 @@
        [Description("ActionAfterDelay:动作完成后延迟")]
        public int ActionAfterDelay { get; set; } = 100;
        public bool IsEnableMonitor { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
        public int MonitorInterval { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
        public int MonitorTimeout { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
        public List<IMonitorSet> MonitorSetCollection { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
        [Category("警报配置")]
        [Description("WarningSetCollection:警报配置列表")]
        [DisplayName("警报配置")]
        [TypeConverter(typeof(CollectionCountConvert))]
        [Editor(typeof(WarningSetsEditor), typeof(UITypeEditor))]
        public List<IWarningSet> WarningSetCollection { get; set; } = new List<IWarningSet>();
        #region IMonitorConfig
        [Category("监听设置")]
        [Description("MonitorSetCollection:监听操作配置集合")]
        [DisplayName("监听配置")]
        [TypeConverter(typeof(CollectionCountConvert))]
        [Editor(typeof(ComplexCollectionEditor<MotionCardMonitorSet>), typeof(UITypeEditor))]
        public List<IMonitorSet> MonitorSetCollection { get; set; } = new List<IMonitorSet>();
        [Category("监听设置")]
        [Description("true:启动监听 false:关闭监听")]
        [DisplayName("监听启用")]
        public bool IsEnableMonitor { get; set; } = true;
        [Category("监听设置")]
        [Description("扫描间隔时间,单位:ms")]
        [DisplayName("扫描间隔")]
        public int MonitorInterval { get; set; } = 10;
        [Category("监听设置")]
        [Description("超时设置,单位:ms")]
        [DisplayName("监听超时")]
        public int MonitorTimeout { get; set; } = 500;
        //[Category("事件地址设置")]
        //[Description("事件开始地址,PLC的实际寄存器地址。十进制,不包含功能码。")]
        //[DisplayName("监听开始地址")]
        //public int EventStartAddress { get; set; } = 8000;
        //[Category("事件地址设置")]
        //[Description("事件地址长度,最大长度128")]
        //[DisplayName("监听长度")]
        //public int EventLength { get; set; } = 120;
        public List<IMonitorSet> GetAllMonitorSet()
        {
            throw new NotImplementedException();
            WarningSetCollection.ForEach(m => m.Source = this.Name);
            MonitorSetCollection.ForEach(m => m.SourceDevice = this.Id);
            return MonitorSetCollection;
        }
        #endregion
        //#region IMotion Related
        //[Category("运动配置")]
        //[Description("运动轴状态集合")]
        //[DisplayName("运动轴状态集合")]
        //[TypeConverter(typeof(CollectionCountConvert))]
        //[Editor(typeof(ComplexCollectionEditor<PLCMotionDefinition_State>), typeof(UITypeEditor))]
        //public List<PLCMotionDefinition_State> MotionStateCollection { get; set; } = new List<PLCMotionDefinition_State>();
        //#endregion
    }
    /// <summary>
@@ -211,12 +251,12 @@
        [Category("速度配置")]
        [DisplayName("加速度")]
        [Description("Acc:加速度,为0时表示不修改当前设置")]
        public double Acc { get; set; } = 0;
        public double Acc { get; set; } = 1;
        [Category("速度配置")]
        [DisplayName("减速度")]
        [Description("减速度,为0时表示不修改当前设置。回原点模式时设置为曲线参数")]
        public double Dec { get; set; } = 0;
        [Description("减速度,为0时表示不修改当前设置")]
        public double Dec { get; set; } = 1;
    }
    /// <summary>
@@ -575,165 +615,4 @@
        public AutoResetEvent MoveSendHandle { get; set; } = new AutoResetEvent(false);
    }
    ///// <summary>
    ///// 点位类型
    ///// </summary>
    //public enum PosType
    //{
    //    /// <summary>
    //    /// 直线插补
    //    /// </summary>
    //    Line = 1,
    //    /// <summary>
    //    /// 圆弧插补(半径)
    //    /// </summary>
    //    CircleRadius,
    //    /// <summary>
    //    /// 圆弧插补(圆心)
    //    /// </summary>
    //    CircleCenter
    //}
    //public static class GTSCardParameter
    //{
    //    #region 运动参数
    //    public static int Dangliang = 1;
    //    public static int AxisCount = 2;//运动轴数量
    //    public static short CardNum = Convert.ToInt16(ConfigurationManager.AppSettings["cardNum"]);
    //    public static short fifo = Convert.ToInt16(ConfigurationManager.AppSettings["fifo"]);
    //    public static int FlySpeed = Convert.ToInt32(ConfigurationManager.AppSettings["flySpeed"]);
    //    public static double FlyAcc = Convert.ToDouble(ConfigurationManager.AppSettings["flyAcc"]);
    //    public static int P2PSpeed = Convert.ToInt32(ConfigurationManager.AppSettings["p2pSpeed"]);
    //    public static double P2PAcc = Convert.ToDouble(ConfigurationManager.AppSettings["p2pAcc"]);
    //    public static double P2PDec = Convert.ToDouble(ConfigurationManager.AppSettings["p2pDec"]);
    //    public static int FreeSpeed = Convert.ToInt32(ConfigurationManager.AppSettings["freeSpeed"]);
    //    public static int VelEnd = Convert.ToInt32(ConfigurationManager.AppSettings["velEnd"]);//飞拍结束速度
    //    public static int HomeSpeed = Convert.ToInt32(ConfigurationManager.AppSettings["homeSpeed"]);
    //    public static int Loading = Convert.ToInt32(ConfigurationManager.AppSettings["loading"]);
    //    //public const short cardn = 0;//运动控制器卡号 默认为:0
    //    //public const short crdn = 1;//坐标系号 取值范围:[1, 2]
    //    //public const short fifo = 0;//插补缓存区号 取值范围:[0, 1],默认值为:0
    //    //public const int flySpeed = 250;//飞拍速度
    //    //public const double flyAcc = 0.5;//飞拍加速度
    //    //public const int gocatorSpeed = 150;//3D检测轴运动速度
    //    //public const int p2pSpeed = 250;//P2P速度
    //    //public const double p2pAcc = 1;//P2P加速度
    //    //public const double p2pDec = 1;//P2P减速度
    //    //public const int calibrationSpeed = 10;//标定速度
    //    //public const int calibrationZ = 19336;//标定Z轴高度
    //    //public const int barcodeSpeed = 250;//条码检测轴运动速度
    //    //public const int freeSpeed = 250;//非检测时轴运动速度
    //    //public const int velEnd = 0;//飞拍结束速度
    //    //public const int homeSpeed = 50;//回零速度
    //    //public const int loading = 80000;//上料位置
    //    #endregion
    //    #region IO
    //    /// <summary>
    //    /// 输入IO默认值
    //    /// </summary>
    //    public const int InDefaultValue = 0xFFDA;
    //    /// <summary>
    //    /// 夹紧气缸
    //    /// </summary>
    //    public const short EXO_1 = 100;//夹紧气缸
    //    /// <summary>
    //    /// 日光灯
    //    /// </summary>
    //    public const short EXO_2 = 101;//日光灯
    //    /// <summary>
    //    /// 光源切换
    //    /// </summary>
    //    public const short EXO_3 = 102;//光源切换
    //    /// <summary>
    //    /// 红灯
    //    /// </summary>
    //    public const short EXO_4 = 103;//红灯
    //    /// <summary>
    //    /// 黄灯
    //    /// </summary>
    //    public const short EXO_5 = 104;//黄灯
    //    /// <summary>
    //    /// 绿灯
    //    /// </summary>
    //    public const short EXO_6 = 105;//绿灯
    //    /// <summary>
    //    /// 蜂鸣器
    //    /// </summary>
    //    public const short EXO_7 = 106;//蜂鸣器
    //    /// <summary>
    //    /// Gocator X
    //    /// </summary>
    //    public const short EXO_8 = 107;//Gocator X
    //    /// <summary>
    //    /// 正面光(左)
    //    /// </summary>
    //    public const short EXO_9 = 108;//正面光(左)
    //    /// <summary>
    //    /// 正面光(后)
    //    /// </summary>
    //    public const short EXO_10 = 109;//正面光(后)
    //    /// <summary>
    //    /// 正面光(右)
    //    /// </summary>
    //    public const short EXO_11 = 110;//正面光(右)
    //    /// <summary>
    //    /// 正面光(前)
    //    /// </summary>
    //    public const short EXO_12 = 111;//正面光(前)
    //    /// <summary>
    //    /// Gocator Y
    //    /// </summary>
    //    public const short EXO_16 = 115;//Gocator Y
    //    /// <summary>
    //    /// 输出IO默认值
    //    /// </summary>
    //    public const int OutDefaultValue = 0xFFF;
    //    /// <summary>
    //    /// 左启动
    //    /// </summary>
    //    public const short EXI0 = 0;//左起动
    //    /// <summary>
    //    /// 右启动
    //    /// </summary>
    //    public const short EXI1 = 1;//右起动
    //    /// <summary>
    //    /// 停止
    //    /// </summary>
    //    public const short EXI2 = 2;//停止
    //    /// <summary>
    //    /// 复位
    //    /// </summary>
    //    public const short EXI3 = 3;//复位
    //    /// <summary>
    //    /// 急停
    //    /// </summary>
    //    public const short EXI4 = 4;//急停
    //    /// <summary>
    //    /// 门开关
    //    /// </summary>
    //    public const short EXI5 = 5;//门开关
    //    /// <summary>
    //    /// 安全光幕
    //    /// </summary>
    //    public const short EXI6 = 6;//安全光幕
    //    public const short EXI7 = 7;//
    //    /// <summary>
    //    /// 夹紧气缸原位
    //    /// </summary>
    //    public const short EXI8 = 8;//夹紧气缸原位
    //    /// <summary>
    //    /// 夹紧气缸到位
    //    /// </summary>
    //    public const short EXI9 = 9;//夹紧气缸到位
    //    #endregion
    //}
}