Setting_Init.cs 13.4 KB
using ConfigHelper;


namespace OnlineStore.Common
{
    /// <summary> 
    /// 记录配置的key
    /// </summary>
    public class Setting_Init
    {

        [MyConfigComment("当前默认语言")]
        public static MyConfig<string> App_Default_Language = "zh-CN";
        [MyConfigComment("系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要")]
        public static MyConfig<int> App_AutoRun = 0;
        [MyConfigComment("系统主界面标题")]
        public static MyConfig<string> App_Title = "SMD BOX MIMO G2";
        [MyConfigComment("湿度修正值,写负数 -5等于减5")]
        public static MyConfig<int> App_humidityadjust = 0;
        [MyConfigComment("湿度修正最低值,防止修正过头")]
        public static MyConfig<int> App_humiditylimited = 0;
        [MyConfigComment("SMF服务器地址")]
        public static MyConfig<string> App_http_server = "http://localhost/smf-core";
        [MyConfigComment("料仓CID")]
        public static MyConfig<string> App_CID = "01";
        [MyConfigComment("温湿度串口号")]
        public static MyConfig<string> App_Humiture_Port = "COM1";
        [MyConfigComment("启动吹气的湿度偏移值,即当前湿度+偏移量>最大温湿度时吹气")]
        public static MyConfig<double> App_HumidityStartOffser = 1;

        [MyConfigComment("停止吹气的湿度偏移值,即当前湿度+偏移量<最大温湿度时停止吹气")]
        public static MyConfig<double> App_HumidityEndOffser = 10;

        ///// <summary>
        ///// 摄像机名称
        ///// </summary>
        [MyConfigComment("相机名称")]
        public static MyConfig<string> Camera_CameraName = "CameraName";

        [MyConfigComment("条码类型")]
        public static MyConfig<string> Camera_CodeType = "QR Code#Data Matrix ECC 200#eyem#barcode";
        [MyConfigComment("条码解码参数路径")]
        public static MyConfig<string> Camera_CodeParamPath = "";
        [MyConfigComment("筛选条码数量")]
        public static MyConfig<int> Camera_QRCodeCount = 3;
        [MyConfigComment("解码的超时时间")]
        public static MyConfig<int> Camera_CodeTimeOut = 1000;

        /// <summary>
        /// 校准库位的料盘信息
        /// </summary>
        [MyConfigComment("校准库位的料盘信息")]
        public static MyConfig<string> Buffer_FixBuffInfo = "";



        [MyConfigComment("进出轴运动负载阈值")]
        public static MyConfig<float> LoadRateLimit_InOutMaxLoadRate = 50;
        [MyConfigComment("提升轴运动负载阈值")]
        public static MyConfig<float> LoadRateLimit_BatchMaxLoadRate = 50;


        [MyConfigComment("管理员密码")]
        public static MyConfig<string> User_AdminPassword = "123456";
        [MyConfigComment("启用管理员密码")]
        public static MyConfig<bool> User_Enable = false;

        #region 料盘高度计算参数
        [MyConfigComment("启用自定义厚度计算策略")]
        public static MyConfig<bool> CalHeight_EnableCustHeightList = false;
        /// <summary>
        /// 宽度15料盘,厚度自减mm
        /// </summary>
        [MyConfigComment("宽度15料盘,厚度自减mm")]
        public static MyConfig<int> CalHeight_Width15HeightSubVal = 2;
        /// <summary>
        /// 宽度13料盘,厚度自减mm
        /// </summary>
        [MyConfigComment("宽度13料盘,厚度自减mm")]
        public static MyConfig<int> CalHeight_Width13HeightSubVal = 1;
        [MyConfigComment("如果计算出的厚度小于指定值,都归类为8mm")]
        public static MyConfig<int> CalHeight_Height8MaxVal = 12;
        [MyConfigComment("自定义厚度列表")]
        public static MyConfig<string[]> CalHeight_HeightList = new string[] { "12=12#16", "16=16#24", "24=24#32", "32=32#44", "44=44#56", "56=56#60" };
        #endregion

        [MyConfigComment("出库厚度检测下偏差的值")]
        public static MyConfig<int> Outstore_HeightCheckLowerDeviation = 5;
        [MyConfigComment("出库厚度检测上偏差的值")]
        public static MyConfig<int> Outstore_HeightCheckUpperDeviation = 3;
        [MyConfigComment("料盘最大厚度,用于出库,最后一盘位置小于该高厚度则将下降")]
        public static MyConfig<int> Outstore_ReelMaxHeightMM = 60;
        [MyConfigComment("出库时,是否启用定位旋转气缸检测料盘")]
        public static MyConfig<bool> OutStore_StringReelCheck = false;


        [MyConfigComment("出库料盘定位信号对射触发位置高度偏差")]
        public static MyConfig<int> ReelCheckTriggerDeviation = 5;
        [MyConfigComment("没有出库任务, 料串在待机点取释放料串")]
        public static MyConfig<bool> StringStandbyAtBottom = true;
        [MyConfigComment("空料串到P2点与料盘定位信号补偿值")]
        public static MyConfig<int> OffsetEmptyToTrayCheck = 10;


        [MyConfigComment("是否启用AGV")]
        public static MyConfig<bool> AGV_Enable = false;
        [MyConfigComment("AGV服务软件所在电脑IP")]
        public static MyConfig<string> AGV_ServerIp = "127.0.0.1";
        [MyConfigComment("AGV服务接口")]
        public static MyConfig<int> AGV_ServerPort = 12000;
        [MyConfigComment("AGV节点编号")]
        public static MyConfig<int> AGV_NodeId = 1;
        [MyConfigComment("AGV节点名称")]
        public static MyConfig<string> AGV_NodeName = "MIMO";

        #region 视觉检查NG平台
        [MyConfigComment("是否使用一维码检测料盘在NG平台")]
        public static MyConfig<bool> CamTestReel_useBarcode = false;
        [MyConfigComment("NG平台一维码检测料盘:一维码的内容")]
        public static MyConfig<string> CamTestReel_barcode = "RW0000015";

        [MyConfigComment("NG平台一维码检测料盘:阈值设置,小于该该数量认为有料")]
        public static MyConfig<int> CamTestReel_barcodeThreshold = 2;
        [MyConfigComment("是否打开NG平台检测料盘调试")]
        public static MyConfig<bool> CamTestReel_debug = false;
        [MyConfigComment("NG平台颜色检测料盘:总的覆盖数量")]
        public static MyConfig<int> CamTestReel_totalcover = 69577;
        [MyConfigComment("NG平台颜色检测料盘:色相H的最低值")]
        public static MyConfig<int> CamTestReel_HL = 40;
        [MyConfigComment("NG平台颜色检测料盘:色相H的最大值")]
        public static MyConfig<int> CamTestReel_HH = 70;
        [MyConfigComment("NG平台颜色检测料盘:亮度L的最低值")]
        public static MyConfig<int> CamTestReel_LL = 15;
        [MyConfigComment("NG平台颜色检测料盘:亮度L的最大值")]
        public static MyConfig<int> CamTestReel_LH = 100;
        [MyConfigComment("NG平台颜色检测料盘:饱和度S的最小值")]
        public static MyConfig<int> CamTestReel_SL = 20;
        [MyConfigComment("NG平台颜色检测料盘:饱和度S的最大值")]
        public static MyConfig<int> CamTestReel_SH = 100;
        [MyConfigComment("启用NG平台检测功能")]
        public static MyConfig<bool> CamTestReel_Ability = false;
        [MyConfigComment("NG平台颜色检测料盘:阈值设置,小于该值认为有料")]
        public static MyConfig<double> CamTestReel_threshold = 0.6;
        #endregion



        [MyConfigComment("屏蔽升降轴保护")]
        public static MyConfig<bool> Disable_UpdownProtect = true;
        [MyConfigComment("屏蔽单料门")]
        public static MyConfig<bool> Disable_SingleDoor = false;
        [MyConfigComment("屏蔽料串门")]
        public static MyConfig<bool> Disable_StringDoor = false;
        [MyConfigComment("关闭日志窗口")]
        public static MyConfig<bool> Disable_LogWindow = true;
        [MyConfigComment("屏蔽门安全检查")]
        public static MyConfig<bool> Disable_DoorSafeCheck = false;
        [MyConfigComment("是否禁止单盘入库,禁用时服务端不显示单盘入库按钮")]
        public static MyConfig<bool> Disable_SingleReelIn = false;


        [MyConfigComment("是否启用上料提升轴的料叉检测")]
        public static MyConfig<bool> Enable_BatchFixCheck = false;
        [MyConfigComment("是否启用在校准库位检查料盘功能")]
        public static MyConfig<bool> Enable_CheckReelLocInFix = false;
        [MyConfigComment("启用蜂鸣器")]
        public static MyConfig<bool> Enable_Buzzer = true;
        [MyConfigComment("是否使用校准库位")]
        public static MyConfig<bool> Enable_Fixpos = false;
        [MyConfigComment("是否启用单盘入库,启用则可指定尺寸,在单料口入库")]
        public static MyConfig<bool> Enable_SingleInSingleOut = false;
        [MyConfigComment("是否启用手动关单料门")]
        public static MyConfig<bool> Enable_SingleDoor_ManualClose = false;
        [MyConfigComment("启用隐藏smf单盘入库按钮")]
        public static MyConfig<bool> Enable_HideSingleReelIn = false;
        [MyConfigComment("启用隐藏旋转轴测试按钮,=true隐藏")]
        public static MyConfig<bool> Enable_HideAxisTestBtn = true;
        [MyConfigComment("启用隐藏颜色测试按钮,=true隐藏")]
        public static MyConfig<bool> Enable_HideColorTestBtn = true;

        [MyConfigComment("启用上传监控图像给SMF")]
        public static MyConfig<bool> Enable_UploadVideo = false;
        [MyConfigComment("启用折叠门提示音")]
        public static MyConfig<bool> Enable_DoorSound = true;

        [MyConfigComment("启用料串按Reset按钮流出")]
        public static MyConfig<bool> Enable_StringAutoOut = false;


        [MyConfigComment("压紧轴回原失败重试最大次数")]
        public static MyConfig<int> Comp_Axis_HomeResetTimes = 999;
        [MyConfigComment("大于7寸料盘高度补偿(mm),进而调整压紧轴压紧点")]
        public static MyConfig<int> Comp_1315_ReelHeight_Compensation = 0;


        [MyConfigComment("X08 AGV到位信号是否是料串门光栅")]
        public static MyConfig<bool> StringDoor_X08IsStringDoor_SafetyLightCurtains = false;
        [MyConfigComment("料串门关闭延时,到位信号亮后延时一定时间再停止")]
        public static MyConfig<int> StringDoor_DownOverTimeMS = 0;
        [MyConfigComment("料串门打开延时,到位信号亮后延时一定时间再停止")]
        public static MyConfig<int> StringDoor_UpOverTimeMS = 0;
        [MyConfigComment("料串门光栅触发处理方式:0-设备急停;1-仅料串门停止")]
        public static MyConfig<int> StringDoor_SafetyLightCurtainsProcStrategy = 1;
        [MyConfigComment("料串进出滚筒控制模式,SingleIoIn_SingleIoOut=242405之前的设备单IO进出,SingleIoIn_DoubltIoOut之后的设备双IO反转")]
        public static MyConfig<InOut_Roller_Mode> StringDoor_InOut_Roller_Mode = InOut_Roller_Mode.SingleIoIn_SingleIoOut;


        [MyConfigComment("库位高低点最大相差的值")]
        public static MyConfig<int> Protection_ReelUpDownAxis_MaxRange = 30000;


        [MyConfigComment("入库料盘拿走后,料串下降一段距离")]
        public static MyConfig<int> Batch_ReelGetedDownMM = 8;



        [MyConfigComment("是否启用指定尺寸执行单盘出库,如治具只能单盘出,无法放到料串情况")]
        public static MyConfig<bool> SingleInOut_EnableSpecfiedSize = false;
        [MyConfigComment("单盘出入库的指定尺寸-宽度")]
        public static MyConfig<int> SingleInOut_ReelWidth = 7;
        [MyConfigComment("单盘出入库的指定尺寸-高度")]
        public static MyConfig<int> SingleInOut_ReelHeight = 20;

        [MyConfigComment("监控上传功能_相机名")]
        public static MyConfig<string[]> UploadVideo_IPCameraNames = new string[] { "cam1", "cam2" };
        [MyConfigComment("监控上传功能_监控服务的IP")]
        public static MyConfig<string> UploadVideo_ServiceIp = "localhost";
        [MyConfigComment("监控上传功能_监控服务的端口")]
        public static MyConfig<int> UploadVideo_ServicePort = 8088;
        [MyConfigComment("监控上传功能_图像宽度")]
        public static MyConfig<int> UploadVideo_ImgWidth = 1920;
        [MyConfigComment("监控上传功能_图像高度")]
        public static MyConfig<int> UploadVideo_ImgHeight = 1080;
        [MyConfigComment("监控上传功能_图像质量")]
        public static MyConfig<int> UploadVideo_ImgQuality = 100;





        [MyConfigComment("LED氛围灯_端口号")]
        public static MyConfig<string> Device_LedLight_PortName = "";
        [MyConfigComment("红外传感器_端口号")]
        public static MyConfig<string> Device_DauxiKS107_PortName = "";
        [MyConfigComment("红外传感器_基准值")]
        public static MyConfig<int> Device_DauxiKS107_BaseValue = 1000;
        [MyConfigComment("红外传感器_最大误差值")]
        public static MyConfig<int> Device_DauxiKS107_ErrorValue = 10000;
        [MyConfigComment("红外传感器_调试状态,打印实时值")]
        public static MyConfig<bool> Device_DauxiKS107_Debug = true ;
        [MyConfigComment("重力传感器_端口号")]
        public static MyConfig<string> Device_WeightSensor_PortName = "";
        [MyConfigComment("重力传感器_上限值")]
        public static MyConfig<int> Device_WeightSensor_MaxValue =10000;




    }
    public enum InOut_Roller_Mode
    {
        SingleIoIn_SingleIoOut = 0,
        SingleIoIn_DoubltIoOut = 1
    }
}