| | |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<HikCameraInitialConfig>), typeof(UITypeEditor))] |
| | | public List<HikCameraInitialConfig> CameraConfigCollection { get; set; } = new List<HikCameraInitialConfig>(); |
| | | |
| | | [Category("设备配置")] |
| | | [Description("AGV小车设备绑定配置,配置绑定的AGV,机器人和相机信息")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<AGVBindUnit>), typeof(UITypeEditor))] |
| | | public List<AGVBindUnit> AGVBindCollection { get; set; } = new List<AGVBindUnit>(); |
| | | #endregion |
| | | |
| | | #region 操作配置 |
| | |
| | | //[Editor(typeof(MonitorSetBindEditor), typeof(UITypeEditor))] |
| | | //public Dictionary<string, MonitorSet> PLCMonitorSet { get; set; } = new Dictionary<string, MonitorSet>(); |
| | | |
| | | ///// <summary> |
| | | ///// 操作配置的字典集合 |
| | | ///// Key:MethodCode,Value:操作配置 |
| | | ///// </summary> |
| | | //[Category("操作配置")] |
| | | //[Description("操作配置集合")] |
| | | //[TypeConverter(typeof(CollectionCountConvert))] |
| | | //[Editor(typeof(OperationConfigBindEditor), typeof(UITypeEditor))] |
| | | //public Dictionary<string, IOperationConfig> ProcessOpConfigDict { get; set; } = new Dictionary<string, IOperationConfig>(); |
| | | /// <summary> |
| | | /// 操作配置的字典集合 |
| | | /// Key:MethodCode,Value:操作配置 |
| | | /// </summary> |
| | | [Category("操作配置")] |
| | | [Description("默认操作配置集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(OperationConfigBindEditor), typeof(UITypeEditor))] |
| | | public Dictionary<string, IOperationConfig> ProcessOpConfigDict { get; set; } = new Dictionary<string, IOperationConfig>(); |
| | | |
| | | //[Category("监听和操作配置")] |
| | | //[Description("监听操作配置集合")] |
| | |
| | | [Category("路径相关")] |
| | | [Description("各位置标定矩阵")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<PositionMatrix>), typeof(UITypeEditor))] |
| | | public List<PositionMatrix> MatrixCollection { get; set; } = new List<PositionMatrix>(); |
| | | [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; |
| | | |
| | | /// <summary> |
| | | /// 满Tray下料阈值,AGV上的满tray数量不小于该数值时,AGV可以执行满Tray下料任务 |
| | | /// </summary> |
| | | [Category("阈值设置")] |
| | | [Description("满Tray下料阈值,AGV上的满tray数量不小于该数值时,AGV可以执行满Tray下料任务")] |
| | | public int AGV_FullTrayThreshold { get; set; } = 10; |
| | | |
| | | /// <summary> |
| | | /// 产线忙时拍照确认等待间隔,以秒为单位 |
| | | /// </summary> |
| | | [Category("阈值设置")] |
| | | [Description("产线忙时拍照确认等待间隔,以秒为单位")] |
| | | public int LineBusyWaitInterval { get; set; } = 60; |
| | | |
| | | /// <summary> |
| | | /// 产线忙时拍照重试次数 |
| | | /// </summary> |
| | | [Category("阈值设置")] |
| | | [Description("产线忙时拍照重试次数")] |
| | | public int LineBusyRetryTimes { get; set; } = 10; |
| | | |
| | | [Category("阈值设置")] |
| | | [Description("机台压机满Tray数量")] |
| | | public int Machine_FullTrayNum { get; set; } |
| | | |
| | | [Category("阈值设置")] |
| | | [Description("机台压机空Tray数量")] |
| | | public int Machine_EmptyTrayNum { get; set; } |
| | | |
| | | #region Ignore |
| | | [Browsable(false)] |
| | |
| | | [JsonIgnore] |
| | | public virtual bool IsDBSave { get; set; } = false; |
| | | #endregion |
| | | } |
| | | |
| | | public class PathPosition : IComplexDisplay |
| | | { |
| | | [Category("导航路径")] |
| | | [Description("路径节点代码")] |
| | | public string PositionCode { get; set; } |
| | | |
| | | [Category("导航路径")] |
| | | [Description("路径节点描述")] |
| | | public string Description { get; set; } |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"{PositionCode}-{Description}"; |
| | | } |
| | | } |
| | | |
| | | public class PositionMatrix : IComplexDisplay |
| | | { |
| | | [Category("位置矩阵")] |
| | | [Description("位置代码")] |
| | | [TypeConverter(typeof(PositionCodeConverter))] |
| | | public string PositionCode { get; set; } |
| | | |
| | | [Category("位置矩阵")] |
| | | [Description("该位置标定矩阵")] |
| | | [TypeConverter(typeof(SimpleCollectionConvert<double>))] |
| | | public List<double> Matrix { get; set; } = new List<double>(); |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"{PositionCode}:{string.Join(",", Matrix)}"; |
| | | } |
| | | } |
| | | |
| | | public class PositionCodeConverter : ComboBoxItemTypeConvert |
| | | { |
| | | public override void GetConvertHash() |
| | | { |
| | | using (var scope = GlobalVar.Container.BeginLifetimeScope()) |
| | | { |
| | | var config = scope.Resolve<ProcessConfig>(); |
| | | |
| | | config.PositionCollection.ForEach(p => |
| | | { |
| | | _hash[p.PositionCode] = $"{p.PositionCode}-{p.Description}"; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |