| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- using Prism.Mvvm;
- using SKMC.Api.Motion.Control;
- using SKMC.Api.Motion.Driver;
- using SKMC.Api.Motion.Model;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- namespace SKMC.Api.Motion
- {
- /// <summary>
- /// 运动控制缓存
- /// </summary>
- public abstract class MotionCacher : BindableBase
- {
- public IMotionDriver MotionDriver { get; set; }
- public IMotionDriverAdvance MotionDriverAdvance { get; set; }
- public IMotionControl MotionControl { get; set; }
- private int _ecatStatusNow;
- /// <summary>
- /// Ecat总线当前状态,0为正常,非0为异常码
- /// </summary>
- public int MotionEcatStatusNow
- {
- get { return _ecatStatusNow; }
- set { _ecatStatusNow = value; RaisePropertyChanged(); }
- }
- private int _ecatStatusLatch;
- /// <summary>
- /// Ecat总线状态锁存,0为正常,非0为异常码。只要检测到一次Ecat连接异常就不为0直到重连总线或者重启程序并连接成功
- /// </summary>
- public int MotionEcatStatusLatch
- {
- get { return _ecatStatusLatch; }
- set { _ecatStatusLatch = value; RaisePropertyChanged(); }
- }
- /// <summary>
- /// Axis对象集
- /// </summary>
- public List<MotionAxis> MotionAxises { get; set; } = new List<MotionAxis>();
- /// <summary>
- /// Axis轨迹运动数据集
- /// </summary>
- //public List<MotionTraject> MotionTrajects { get; set; } = new List<MotionTraject>();
- /// <summary>
- /// DI 模块集
- /// </summary>
- public List<MotionIODev> MotionDiDevs { get; set; } = new List<MotionIODev>();
- /// <summary>
- /// DO 模块集
- /// </summary>
- public List<MotionIODev> MotionDoDevs { get; set; } = new List<MotionIODev>();
- /// <summary>
- /// AO 数据点集
- /// </summary>
- public List<MotionAO> MotionAos { get; set; } = new List<MotionAO>();
- /// <summary>
- /// SDO 数据集
- /// </summary>
- public List<MotionSdo> MotionSdos { get; set; } = new List<MotionSdo>();
- /// <summary>
- /// 可写PDO数据集
- /// </summary>
- public List<MotionPdo> MotionWritePdos { get; set; } = new List<MotionPdo>();
- /// <summary>
- /// 只读PDO数据集
- /// </summary>
- public List<MotionPdo> MotionReadPdos { get; set; } = new List<MotionPdo>();
- public abstract MotionIO GetMotionDi(string code);
- public abstract MotionIO GetMotionDo(string code);
- public abstract MotionIO GetMotionDio(string code);
- public abstract MotionAO GetMotionAO(string code);
- public abstract MotionPdo GetMotionWritePdo(string code);
- public abstract MotionPdo GetMotionReadPdo(string code);
- [Obsolete("此方法已废弃")]
- public abstract void SetMotionDi(string code, byte value, bool testMode = false);
- [Obsolete("此方法已废弃")]
- public abstract void SetMotionDo(string code, byte value, bool testMode = false);
- public abstract MotionAxis GetMotionAxis(string axisCode);
- public abstract MotionAxis GetMotionAxis(short axisNo);
- }
- }
|