| | |
| | | { |
| | | public event Action<DateTime, string, IDevice, IMonitorSet> OnMonitorInvoke; |
| | | public event Action<DateTime, IDevice, IWarningSet> OnMonitorAlarm; |
| | | public event Action<int, string> OnAxisAlarmRaised; |
| | | public event Action<int, int, int> OnAxisStatusChanged; |
| | | |
| | | public void AxisAlarmRaised(int axisIndex, string msg) |
| | | { |
| | | OnAxisAlarmRaised?.Invoke(axisIndex, msg); |
| | | } |
| | | |
| | | public void AxisStatusChanged(int axisIndex, int preStatus, int curStatus) |
| | | { |
| | | OnAxisStatusChanged?.Invoke(axisIndex, preStatus, curStatus); |
| | | } |
| | | |
| | | protected override void Start() |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | Monitor(); |
| | | }); |
| | | } |
| | | public abstract List<AxisInfo> GetCurrentAxisInfo(params string[] axisName); |
| | | public abstract void Monitor(); |
| | | public abstract ResponseMessage MoveToPoint(IOperationConfig opConfig); |
| | |
| | | /// <summary> |
| | | /// 轴的运动状态值 |
| | | /// </summary> |
| | | public List<AxisMovingStatus> AxisMovingOptionValues { get; set; } = new List<AxisMovingStatus>(); |
| | | public List<AxisMovingStatus> AxisStatusList { get; set; } = new List<AxisMovingStatus>(); |
| | | |
| | | public abstract void WriteOutput(short index, IOValue value); |
| | | |
| | | #region ImmediatePause |
| | | /// <summary> |
| | | /// 启动立即暂停 |
| | | /// </summary> |
| | | public abstract void SetImmediatePause(); |
| | | |
| | | /// <summary> |
| | | /// 恢复立即暂停 |
| | | /// </summary> |
| | | public abstract void ResetImmediatePause(bool isResumeMoving); |
| | | #endregion |
| | | } |
| | | |
| | | public class MotionCardInitialConfigBase : InitialConfigBase, IMonitorConfig |
| | |
| | | [Category("板卡配置")] |
| | | [DisplayName("卡号")] |
| | | [Description("CardNum:卡号")] |
| | | public int CardNum { get; set; } |
| | | public int CardNum { get; set; } = 1; |
| | | |
| | | [Category("板卡配置")] |
| | | [DisplayName("初始配置文件路径")] |
| | |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<IODefinition>), typeof(UITypeEditor))] |
| | | public List<IODefinition> IODefinitionCollection { get; set; } = new List<IODefinition>(); |
| | | |
| | | [Category("IO配置")] |
| | | [Description("true:输出取反 false:输出不取反")] |
| | | public bool IsOutputReversed { get; set; } = true; |
| | | |
| | | #region IMonitorConfig |
| | | [Category("监听设置")] |
| | |
| | | [Editor(typeof(MovingOpsCollectionEditor), typeof(UITypeEditor))] |
| | | public List<MovingOption> MovingOps { get; set; } = new List<MovingOption>(); |
| | | |
| | | [Category("3.运动延时")] |
| | | [Description("操作前延时,单位ms")] |
| | | public int DelayBefore { get; set; } = 0; |
| | | |
| | | [Category("3.运动延时")] |
| | | [Description("操作后延时,单位ms")] |
| | | public int DelayAfter { get; set; } = 0; |
| | | |
| | | public string MotionCardId = ""; |
| | | |
| | | //[Category("板卡运动配置")] |