| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- 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>
- /// 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);
- public abstract MotionAxis GetMotionAxis(string axisCode);
- public abstract MotionAxis GetMotionAxis(short axisNo);
- }
- }
|