| | |
| | | [Category("换算配置")] |
| | | [DisplayName("脉冲数换算比例")] |
| | | [Description("脉冲数和其他计量单位的换算比例,例如设置为1000,表示1000个脉冲等于1uint")] |
| | | public int PulseRatio { get; set; } = 1; |
| | | public int AxisRatio { get; set; } = 1; |
| | | |
| | | [Category("速度配置")] |
| | | [DisplayName("默认速度参数")] |
| | | [Description("VelocityPara:默认速度参数")] |
| | | [TypeConverter(typeof(ComplexObjectConvert))] |
| | | [Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | public VelocityPara VelocityPara { get; set; } = new VelocityPara(); |
| | | //[Category("速度配置")] |
| | | //[DisplayName("默认速度参数")] |
| | | //[Description("VelocityPara:默认速度参数")] |
| | | //[TypeConverter(typeof(ComplexObjectConvert))] |
| | | //[Editor(typeof(PropertyObjectEditor), typeof(UITypeEditor))] |
| | | //public VelocityPara VelocityPara { get; set; } = new VelocityPara(); |
| | | |
| | | [Category("回原点设置")] |
| | | [DisplayName("回原点模式")] |
| | | [Description("HomeMode:回原点模式。0:一般模式 1:极限限位模式 2:外部触发模式")] |
| | | public int HomeMode { get; set; } = 0; |
| | | //[Category("回原点设置")] |
| | | //[DisplayName("回原点模式")] |
| | | //[Description("HomeMode:回原点模式。0:一般模式 1:极限限位模式 2:外部触发模式")] |
| | | //public int HomeMode { get; set; } = 0; |
| | | |
| | | [Category("回原点设置")] |
| | | [DisplayName("回原点方向")] |
| | | [Description("IsHomePositive:回原点方向。 true:正方向开始 false:负方向开始")] |
| | | public bool IsHomePositive { get; set; } = true; |
| | | //[Category("回原点设置")] |
| | | //[DisplayName("回原点方向")] |
| | | //[Description("IsHomePositive:回原点方向。 true:正方向开始 false:负方向开始")] |
| | | //public bool IsHomePositive { get; set; } = true; |
| | | |
| | | [Category("回原点设置")] |
| | | [DisplayName("是否自动回原点")] |
| | | [Description("IsAutoGoHome:是否自动回原点。 true:是 false:否")] |
| | | public bool IsAutoGoHome { get; set; } = false; |
| | | //[Category("回原点设置")] |
| | | //[DisplayName("是否自动回原点")] |
| | | //[Description("IsAutoGoHome:是否自动回原点。 true:是 false:否")] |
| | | //public bool IsAutoGoHome { get; set; } = false; |
| | | |
| | | [Category("超时设置")] |
| | | [DisplayName("回原点超时")] |
| | | [Description("TimeOutHome:回原点超时,单位毫秒")] |
| | | public int TimeOutHome { get; set; } = 30000; |
| | | //[Category("超时设置")] |
| | | //[DisplayName("回原点超时")] |
| | | //[Description("TimeOutHome:回原点超时,单位毫秒")] |
| | | //public int TimeOutHome { get; set; } = 30000; |
| | | |
| | | [Category("超时设置")] |
| | | [DisplayName("运动超时")] |
| | | [Description("TimeOutMove:运动超时,单位毫秒")] |
| | | public int TimeOutMove { get; set; } = 10000; |
| | | //[Category("超时设置")] |
| | | //[DisplayName("运动超时")] |
| | | //[Description("TimeOutMove:运动超时,单位毫秒")] |
| | | //public int TimeOutMove { get; set; } = 10000; |
| | | |
| | | [Category("开闭环设置")] |
| | | [DisplayName("是否使用Cmmd回馈")] |
| | | [Description("IsUseCmmdPosition:是否使用Cmmd回馈")] |
| | | public bool IsUseCmmdPosition { get; set; } = false; |
| | | //[Category("开闭环设置")] |
| | | //[DisplayName("是否使用Cmmd回馈")] |
| | | //[Description("IsUseCmmdPosition:是否使用Cmmd回馈")] |
| | | //public bool IsUseCmmdPosition { get; set; } = false; |
| | | |
| | | [Category("开闭环设置")] |
| | | [DisplayName("是否使用板卡反馈停止信号")] |
| | | [Description("IsUseMDNStopSignal:是否使用板卡反馈停止信号")] |
| | | public bool IsUseMDNStopSignal { get; set; } = false; |
| | | //[Category("开闭环设置")] |
| | | //[DisplayName("是否使用板卡反馈停止信号")] |
| | | //[Description("IsUseMDNStopSignal:是否使用板卡反馈停止信号")] |
| | | //public bool IsUseMDNStopSignal { get; set; } = false; |
| | | |
| | | [Category("开闭环设置")] |
| | | [DisplayName("是否启用报警")] |
| | | [Description("IsUseWarning:是否启用报警")] |
| | | public bool IsUseWarning { get; set; } = false; |
| | | //[Category("开闭环设置")] |
| | | //[DisplayName("是否启用报警")] |
| | | //[Description("IsUseWarning:是否启用报警")] |
| | | //public bool IsUseWarning { get; set; } = false; |
| | | |
| | | [Category("暂停配置")] |
| | | [DisplayName("是否启用立即暂停")] |
| | | [Description("IsImmediatePause:是否启用立即暂停")] |
| | | public bool IsImmediatePause { get; set; } = false; |
| | | |
| | | [Category("暂停配置")] |
| | | [DisplayName("轴位置处于区间内时适用的暂停操作")] |
| | | [Description("ImmediatePauseSections:当轴位置处于区间内时适用的暂停操作")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<Section>), typeof(UITypeEditor))] |
| | | public List<Section> ImmediatePauseSections { get; set; } = new List<Section>(); |
| | | //[Category("暂停配置")] |
| | | //[DisplayName("轴位置处于区间内时适用的暂停操作")] |
| | | //[Description("ImmediatePauseSections:当轴位置处于区间内时适用的暂停操作")] |
| | | //[TypeConverter(typeof(CollectionCountConvert))] |
| | | //[Editor(typeof(ComplexCollectionEditor<Section>), typeof(UITypeEditor))] |
| | | //public List<Section> ImmediatePauseSections { get; set; } = new List<Section>(); |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 板卡运动状态对象 |
| | | /// </summary> |
| | | public class AxisMovingStatus : IComplexDisplay |
| | | { |
| | | /// <summary> |
| | | /// 轴索引 |
| | | /// </summary> |
| | | public int AxisIndex { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 轴名称 |
| | | /// </summary> |
| | | public string AxisName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 当前位置 |
| | | /// </summary> |
| | | public int CurPosition { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目的地 |
| | | /// </summary> |
| | | public int Destination { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 当前速度参数 |
| | | /// </summary> |
| | | public double CurVelocity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 规划速度参数 |
| | | /// </summary> |
| | | public double PrfVelocity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 轴状态 |
| | | /// </summary> |
| | | public int AxisStatus { get; set; } |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | | return $"轴{AxisIndex}:{AxisName}-当前:{CurPosition}-规划:{Destination}"; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 运动对象 |
| | | /// </summary> |
| | | public class MovingOption : INotifyPropertyChanged, IComplexDisplay |
| | |
| | | } |
| | | } |
| | | |
| | | private MotorMoveMode moveMode = MotorMoveMode.Normal; |
| | | private MotionMode moveMode = MotionMode.Normal; |
| | | [Category("运动配置")] |
| | | [DisplayName("运动模式")] |
| | | [Description("MoveMode:运动模式")] |
| | | public MotorMoveMode MoveMode |
| | | public MotionMode MoveMode |
| | | { |
| | | get => moveMode; |
| | | set |
| | |
| | | } |
| | | } |
| | | |
| | | [Category("板卡运动配置")] |
| | | [Description("超时设置,单位:ms")] |
| | | [DisplayName("运动超时")] |
| | | public int MovingTimeout { get; set; } = 0; |
| | | |
| | | internal List<AxisSetting> _axisSettingList = new List<AxisSetting>(); |
| | | public void SetAxisSetting(List<AxisSetting> settings) |
| | | { |