| | |
| | | using Bro.Common.Model; |
| | | using Bro.M135.Common; |
| | | using Bro.Process; |
| | | using MathNet.Numerics.Distributions; |
| | | using Newtonsoft.Json; |
| | | using System.ComponentModel; |
| | | using System.Drawing.Design; |
| | |
| | | using System.Drawing.Printing; |
| | | using System.Reflection; |
| | | using System.Windows.Forms.Design; |
| | | using Windows.Services.Maps; |
| | | using static Bro.Common.Helper.EnumHelper; |
| | | |
| | | namespace Bro.M141.Process |
| | | { |
| | | public class M141Config : ProcessConfigBase |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [Category("打印机配置")] |
| | |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<Printer>), typeof(UITypeEditor))] |
| | | public List<Printer> Printers { get; set; } = new List<Printer>(); |
| | | |
| | | |
| | | [Category("打印机配置")] |
| | | [Description("是否打印封装码")] |
| | | [DisplayName("是否打印封装码")] |
| | | public bool Isprint { get; set; } = false; |
| | | |
| | | |
| | | |
| | |
| | | public List<MeasureBind> MeasureBindCollection { get; set; } = new List<MeasureBind>(); |
| | | |
| | | |
| | | [Category("点检配置")] |
| | | [Description("点检配置集合,配置检测的工位,图片索引,相机和检测调用项关系")] |
| | | [DisplayName("点检配置集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<MeasureBind>), typeof(UITypeEditor))] |
| | | public List<MeasureBind> MeasureBindCollection_Check { get; set; } = new List<MeasureBind>(); |
| | | |
| | | |
| | | |
| | | [Category("检测超时设置")] |
| | | [Description("检测超时设置,获取检测结果时的允许最大等待时间,单位ms")] |
| | |
| | | [Category("检测异常指示")] |
| | | [Description("选择某个Spec,其表示检测过程中异常")] |
| | | [DisplayName("异常指示标准")] |
| | | [TypeConverter(typeof(SpecCodeSelectorConverter))] |
| | | [TypeConverter(typeof(SpecCodeSelectorConverter))] |
| | | public string CheckErrorSpecCode { get; set; } = ""; |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | [Category("连续NG报警设置")] |
| | | [Description("连续NG报警总开关。true:开启连续NG报警 false:关闭连续NG报警机制")] |
| | | [DisplayName("连续NG报警总开关")] |
| | | public bool IsEnableContinuousNGAlarm { get; set; } = true; |
| | | |
| | | [Category("连续NG报警设置")] |
| | | [Description("连续NG报警地址。出现连续NG时,上位机向该地址写入1,取消时,向该地址写入0。")] |
| | | [DisplayName("连续NG报警地址")] |
| | | public int ContinuousNGAlarmAddress { get; set; } = 0; |
| | | |
| | | //[Category("连续NG报警设置")] |
| | | //[Description("连续NG报警上传MES的方法地址。")] |
| | | //[DisplayName("连续NG报警上传MES的方法地址")] |
| | | //public string ContinuousNGAlarmMESFunc { get; set; } = ""; |
| | | |
| | | [Category("连续NG报警设置")] |
| | | [Description("连续NG报警是否需要人工复位")] |
| | | [DisplayName("连续NG报警是否需要人工复位")] |
| | | public bool IsOperatorReset { get; set; } = false; |
| | | |
| | | |
| | | [Category("连续NG报警设置")] |
| | | [Description("连续NG报警设置集合。设置连续NG报警的开关,类型,数量和时间阈值。添加或删除监控需要软件重启生效。")] |
| | | [DisplayName("连续NG报警设置集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<ContinuousNGAlarm>), typeof(UITypeEditor))] |
| | | public List<ContinuousNGAlarm> ContinuousNGAlarmColletion { get; set; } = new List<ContinuousNGAlarm>(); |
| | | |
| | | [Category("位置度设置")] |
| | | [Description("产品测量点位集合")] |
| | |
| | | [DisplayName("当前栏具码")] |
| | | public string basketcode { get; set; } = "NoRead"; |
| | | |
| | | |
| | | |
| | | |
| | | [Category("栏具条码配置")] |
| | | [Description("当前工单号")] |
| | | [DisplayName("当前工单号")] |
| | | public string zwoid { get; set; } = ""; |
| | | |
| | | |
| | | [Category("栏具条码配置")] |
| | | [Description("本站是否读取栏具码")] |
| | | [DisplayName("本站是否读取栏具码")] |
| | |
| | | public int heartadd { get; set; } = 1505; |
| | | |
| | | |
| | | |
| | | [Category("MES配置")] |
| | | [Description("是否上传MES")] |
| | | [DisplayName("是否上传MES")] |
| | | public bool ISupMES { get; set; } = false; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("是否强制MES上传成功")] |
| | | [DisplayName("是否强制MES上传成功")] |
| | | public bool ISokMes { get; set; } = false; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("是否上传NG数据")] |
| | | [DisplayName("是否上传NG数据")] |
| | | public bool ISupNG { get; set; } = true; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("接口选择,0篮具接口,1数据上传接口,-1所有接口")] |
| | | [DisplayName("接口选择")] |
| | | public int MESchannel { get; set; } = 0; |
| | | |
| | | |
| | | |
| | | [Category("MES配置")] |
| | | [Description("账号")] |
| | | [DisplayName("账号")] |
| | | public string zuser { get; set; } = "aoiUser"; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("密码")] |
| | | [DisplayName("密码")] |
| | | public string zpassword { get; set; } = "Chia@aoi"; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("IP")] |
| | | [DisplayName("Ip")] |
| | | public string zIP { get; set; } = "10.2.20.114"; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("端口号")] |
| | | [DisplayName("端口号")] |
| | | public int zport { get; set; } = 15672; |
| | | |
| | | |
| | | |
| | | //[Category("MES配置")] |
| | | //[Description("备用栏具码")] |
| | | //[DisplayName("备用栏具码")] |
| | | //public string basketcode2 { get; set; } = "NoRead"; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("numpro")] |
| | | [DisplayName("numpro")] |
| | | [JsonIgnore] |
| | | public int numpro { get; set; } = 0; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("mesnum1")] |
| | | [DisplayName("mesnum1")] |
| | | [JsonIgnore] |
| | | public int mesnum1 { get; set; } = 0; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("mesnum2")] |
| | | [DisplayName("mesnum2")] |
| | | [JsonIgnore] |
| | | public int mesnum2 { get; set; } = 0; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("mesnum3")] |
| | | [DisplayName("mesnum3")] |
| | | [JsonIgnore] |
| | | public int mesnum3 { get; set; } = 0; |
| | | |
| | | [Category("MES配置")] |
| | | [Description("mesnum4")] |
| | | [DisplayName("mesnum4")] |
| | | [JsonIgnore] |
| | | public int mesnum4 { get; set; } = 0; |
| | | |
| | | |
| | | |
| | | [Category("MES配置")] |
| | | [Description("plc序号和篮具码集合")] |
| | | [DisplayName("plc序号和篮具码集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<PlcAndBasketcode>), typeof(UITypeEditor))] |
| | | public List<PlcAndBasketcode> PlcAndBasketcodes { get; set; } = new List<PlcAndBasketcode>(); |
| | | |
| | | |
| | | [Category("MES配置")] |
| | | [Description("产品ID集合")] |
| | | [DisplayName("产品ID集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<ProductionID>), typeof(UITypeEditor))] |
| | | public List<ProductionID> Productioncode { get; set; } = new List<ProductionID>(); |
| | | |
| | | [Category("MES配置")] |
| | | [Description("条码集合")] |
| | | [DisplayName("条码集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<MES_code>), typeof(UITypeEditor))] |
| | | public List<MES_code> MES_codes { get; set; } = new List<MES_code>(); |
| | | |
| | | |
| | | } |
| | | public class MES_code: IComplexDisplay |
| | | { |
| | | [Category("配置")] |
| | | [Description("MES下发的条码")] |
| | | [DisplayName("条码")] |
| | | public string Printers_code { get; set; } |
| | | public string GetDisplayText() |
| | | { |
| | | return $"{Printers_code}"; |
| | | } |
| | | } |
| | | |
| | | |
| | | public class ProductionID : IComplexDisplay |
| | | { |
| | | [Category("配置")] |
| | | [Description("序号")] |
| | | [DisplayName("序号")] |
| | | public int Uptomesid { get; set; } = 0; |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("PID")] |
| | | public string PID { get; set; } |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("SEQUENCE")] |
| | | public string SEQUENCE { get; set; } |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("BasketCode")] |
| | | public string BasketCode { get; set; } |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("Zword")] |
| | | public string Zword { get; set; } |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("SN")] |
| | | public string SN { get; set; } |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"产品{PID}上传批次序号{Uptomesid}"; |
| | | } |
| | | } |
| | | |
| | | public class WorkPositionSet : IComplexDisplay |
| | | { |
| | |
| | | public string plcname { get; set; } = ""; |
| | | |
| | | |
| | | |
| | | [Category("PLC配置")] |
| | | [DisplayName("是否启用")] |
| | | [Description("是否启用")] |
| | |
| | | [Description("报警名称")] |
| | | public string alarmname { get; set; } = ""; |
| | | |
| | | [Category("配置")] |
| | | [DisplayName("报警种类")] |
| | | [Description("报警种类")] |
| | | public string alarmtype { get; set; } = ""; |
| | | |
| | | |
| | | [Browsable(false)] |
| | | [JsonIgnore] |
| | | public int value { get; set; } = -1; |
| | |
| | | { |
| | | var temchar = data.Split(','); |
| | | ret.alarmname = temchar[0]; |
| | | ret.address =Convert.ToInt32(temchar[1]); |
| | | ret.address = Convert.ToInt32(temchar[1]); |
| | | ret.address2 = Convert.ToInt32(temchar[2]); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | |
| | | |
| | | public class PlcAndBasketcode |
| | | { |
| | | [Category("配置")] |
| | | [Description("序号")] |
| | | [DisplayName("序号")] |
| | | public int id { get; set; } = 0; |
| | | |
| | | [Category("配置")] |
| | | [Description("条码")] |
| | | [DisplayName("条码")] |
| | | public string code { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | public class MeasureBind : IComplexDisplay, IHalconToolPath |
| | | { |
| | | [Category("索引配置")] |
| | |
| | | [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))] |
| | | public string ImageFolder { get; set; } |
| | | |
| | | |
| | | |
| | | [Category("检测功能")] |
| | | [Description("图片在批量测试过程中最终图片结果会存储较慢需要设置延时确保图片不被资源自动释放")] |
| | | [DisplayName("图片存图延时")] |
| | | public int SaveImageTime { get; set; } = 0; |
| | | |
| | | |
| | | |
| | | [Category("检测功能")] |
| | | [Description("true:启动OK测试 false:启动NG测试")] |