| | |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using Bro.Common.Model.Interface; |
| | | using Bro.Device.AuboRobot; |
| | | using Bro.Device.HikCamera; |
| | | using Bro.Device.OmronFins; |
| | |
| | | |
| | | namespace A032.Process |
| | | { |
| | | public class ProcessConfig : IStationConfig |
| | | public class ProcessConfig : IStationConfig, IHalconToolPath |
| | | { |
| | | #region 设备配置 |
| | | [Category("设备配置")] |
| | |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(OperationConfigBindEditor), typeof(UITypeEditor))] |
| | | public Dictionary<string, IOperationConfig> ProcessOpConfigDict { get; set; } = new Dictionary<string, IOperationConfig>(); |
| | | |
| | | [Category("操作配置")] |
| | | [Description("操作超时设置,单位min")] |
| | | public int OperationTimeout { get; set; } = 10; |
| | | |
| | | //[Category("监听和操作配置")] |
| | | //[Description("监听操作配置集合")] |
| | |
| | | //[Description("是否采用外部算子。true:采用外部算子,false:使用内部算法")] |
| | | //public bool IsUsingExternalAlgorithem { get; set; } = true; |
| | | |
| | | #region A032 |
| | | [Category("路径相关")] |
| | | [Description("路径节点配置")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | |
| | | [Editor(typeof(ComplexCollectionEditor<PositionVisionConfig>), typeof(UITypeEditor))] |
| | | public List<PositionVisionConfig> VisionConfigCollection { get; set; } = new List<PositionVisionConfig>(); |
| | | |
| | | /// <summary> |
| | | /// 空Tray上料阈值,AGV上的空tray数量不大于该数值时,AGV可以执行空Tray上料任务 |
| | | /// </summary> |
| | | [Category("阈值设置")] |
| | | [Description("空Tray上料阈值,AGV上的空tray数量不大于该数值时,AGV可以执行空Tray上料任务")] |
| | | public int AGV_EmptyTrayThreshold { get; set; } = 0; |
| | | [Category("视觉配置")] |
| | | [Description("是否启用视觉引导")] |
| | | public bool IsEnableVisionGuide { get; set; } = false; |
| | | |
| | | /// <summary> |
| | | /// 满Tray下料阈值,AGV上的满tray数量不小于该数值时,AGV可以执行满Tray下料任务 |
| | | /// </summary> |
| | | [Category("阈值设置")] |
| | | [Description("满Tray下料阈值,AGV上的满tray数量不小于该数值时,AGV可以执行满Tray下料任务")] |
| | | public int AGV_FullTrayThreshold { get; set; } = 10; |
| | | [Category("视觉配置")] |
| | | [Description("视觉引导次数")] |
| | | public int VisionGuideTimes { get; set; } = 2; |
| | | |
| | | [Category("设备参数配置")] |
| | | [Description("光源开关索引配置")] |
| | | public int LightOutputIndex { get; set; } |
| | | |
| | | [Category("设备参数配置")] |
| | | [Description("AGV满载满Tray/空Tray数量")] |
| | | public int AGVAvailableTrayNums { get; set; } = 6; |
| | | |
| | | [Category("设备参数配置")] |
| | | [Description("默认等待任务轮数。当某些条件不满足当前任务执行前提,当前任务会等待若干任务数后执行")] |
| | | public int DefaultWaitShift { get; set; } = 3; |
| | | |
| | | /// <summary> |
| | | /// 产线忙时拍照确认等待间隔,以秒为单位 |
| | |
| | | |
| | | [Category("阈值设置")] |
| | | [Description("机台压机满Tray数量")] |
| | | public int Machine_FullTrayNum { get; set; } |
| | | public int Machine_FullTrayNum { get; set; } = 6; |
| | | |
| | | [Category("阈值设置")] |
| | | [Description("机台压机空Tray数量")] |
| | | public int Machine_EmptyTrayNum { get; set; } |
| | | public int Machine_EmptyTrayNum { get; set; } = 6; |
| | | #endregion |
| | | |
| | | #region IHalconToolPath |
| | | public List<string> GetHalconToolPathList() |
| | | { |
| | | List<string> list = new List<string>(); |
| | | |
| | | ProcessOpConfigDict.Values.ToList().ForEach(c => |
| | | { |
| | | if (c is IHalconToolPath) |
| | | { |
| | | list.AddRange((c as IHalconToolPath).GetHalconToolPathList()); |
| | | } |
| | | }); |
| | | |
| | | this.GetType().GetProperties().ToList().ForEach(p => |
| | | { |
| | | var pValue = p.GetValue(this); |
| | | |
| | | if (pValue is IHalconToolPath) |
| | | { |
| | | list.AddRange((pValue as IHalconToolPath).GetHalconToolPathList()); |
| | | } |
| | | else if (pValue is IEnumerable<IHalconToolPath>) |
| | | { |
| | | list.AddRange((pValue as IEnumerable<IHalconToolPath>).SelectMany(u => u.GetHalconToolPathList())); |
| | | } |
| | | }); |
| | | |
| | | return list.Distinct().ToList(); |
| | | } |
| | | #endregion |
| | | |
| | | #region Ignore |
| | | [Browsable(false)] |
| | |
| | | public virtual bool IsDBSave { get; set; } = false; |
| | | #endregion |
| | | } |
| | | |
| | | [Device("OperationTest", "测试方法配置", DeviceAttributeType.OperationConfig)] |
| | | public class OperationTestConfig : OperationConfigBase |
| | | { |
| | | //[Category("测试配置")] |
| | | //[Description("方法类型")] |
| | | //public TaskType TaskType { get; set; } = TaskType.LoadEmptyTrayToAGV; |
| | | |
| | | [Category("测试配置")] |
| | | [Description("方法信息")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public TrayTask TaskInfo { get; set; } = new TrayTask(); |
| | | |
| | | [Category("测试配置")] |
| | | [Description("执行AGV设备")] |
| | | [TypeConverter(typeof(AGVDeviceConverter))] |
| | | public string AGVId { get; set; } |
| | | } |
| | | } |