From 5918194fccdb2a2303e713b8d2f3335243b9e2ef Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期二, 07 七月 2020 14:53:13 +0800 Subject: [PATCH] 板卡驱动 --- src/Bro.Common.Model/Model/MotionCardRelated.cs | 145 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 98 insertions(+), 47 deletions(-) diff --git a/src/Bro.Common.Model/Model/MotionCardRelated.cs b/src/Bro.Common.Model/Model/MotionCardRelated.cs index 5b4f5ac..6342b0a 100644 --- a/src/Bro.Common.Model/Model/MotionCardRelated.cs +++ b/src/Bro.Common.Model/Model/MotionCardRelated.cs @@ -35,66 +35,66 @@ [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锛氭槸鍚︿娇鐢–mmd鍥為")] - public bool IsUseCmmdPosition { get; set; } = false; + //[Category("寮�闂幆璁剧疆")] + //[DisplayName("鏄惁浣跨敤Cmmd鍥為")] + //[Description("IsUseCmmdPosition锛氭槸鍚︿娇鐢–mmd鍥為")] + //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() { @@ -193,6 +193,52 @@ } /// <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 @@ -216,11 +262,11 @@ } } - private MotorMoveMode moveMode = MotorMoveMode.Normal; + private MotionMode moveMode = MotionMode.Normal; [Category("杩愬姩閰嶇疆")] [DisplayName("杩愬姩妯″紡")] [Description("MoveMode锛氳繍鍔ㄦā寮�")] - public MotorMoveMode MoveMode + public MotionMode MoveMode { get => moveMode; set @@ -305,6 +351,11 @@ } } + [Category("鏉垮崱杩愬姩閰嶇疆")] + [Description("瓒呮椂璁剧疆锛屽崟浣嶏細ms")] + [DisplayName("杩愬姩瓒呮椂")] + public int MovingTimeout { get; set; } = 0; + internal List<AxisSetting> _axisSettingList = new List<AxisSetting>(); public void SetAxisSetting(List<AxisSetting> settings) { -- Gitblit v1.8.0