| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- using Prism.Mvvm;
- using System;
- namespace SKMC.Api.Motion.Model
- {
- /// <summary>
- /// 电机状态模型
- /// </summary>
- public class MotionAxisStatus : BindableBase
- {
- private byte _isEnable;
- /// <summary>
- /// 轴是否打开使能
- /// </summary>
- public byte IsEnable
- {
- get { return _isEnable; }
- set { _isEnable = value; RaisePropertyChanged(); }
- }
- private byte _isBusy;
- /// <summary>
- /// 轴是否忙(运动)
- /// </summary>
- public byte IsBusy
- {
- get { return _isBusy; }
- set { _isBusy = value; RaisePropertyChanged(); }
- }
- private byte _isOutBound;
- /// <summary>
- /// 轴是否越限
- /// </summary>
- public byte IsOutBound
- {
- get { return _isOutBound; }
- set { _isOutBound = value; RaisePropertyChanged(); }
- }
- private byte _isDone;
- /// <summary>
- /// 轴是否到位
- /// </summary>
- public byte IsDone
- {
- get { return _isDone; }
- set { _isDone = value; RaisePropertyChanged(); }
- }
- private byte _isAlarm;
- /// <summary>
- /// 轴是否报警
- /// </summary>
- public byte IsAlarm
- {
- get { return _isAlarm; }
- set { _isAlarm = value; RaisePropertyChanged(); }
- }
- private byte _isHomed;
- /// <summary>
- /// 轴是否已回零
- /// </summary>
- public byte IsHomed
- {
- get { return _isHomed; }
- set { _isHomed = value; RaisePropertyChanged(); }
- }
- private byte _isBreak;
- /// <summary>
- /// 轴是否已刹车
- /// </summary>
- public byte IsBreak
- {
- get { return _isBreak; }
- set { _isBreak = value; RaisePropertyChanged(); }
- }
- private byte _isORG;
- /// <summary>
- /// 是否触发原点
- /// </summary>
- public byte IsORG
- {
- get { return _isORG; }
- set { _isORG = value; RaisePropertyChanged(); }
- }
- private byte _isPEL;
- /// <summary>
- /// 是否触发正限位
- /// </summary>
- public byte IsPEL
- {
- get { return _isPEL; }
- set { _isPEL = value; RaisePropertyChanged(); }
- }
- private byte _isNEL;
- /// <summary>
- /// 是否触发负限位
- /// </summary>
- public byte IsNEL
- {
- get { return _isNEL; }
- set { _isNEL = value; RaisePropertyChanged(); }
- }
- private double _prf;
- /// <summary>
- /// 运行目标值
- /// </summary>
- public double PRF
- {
- get { return _prf; }
- set { _prf = value; RaisePropertyChanged(); }
- }
- private double _enc;
- /// <summary>
- /// 当前反馈值
- /// </summary>
- public double ENC
- {
- get { return _enc; }
- set { _enc = value; RaisePropertyChanged(); }
- }
- #region watch data
- public long StartTicks { get; set; }
- public long WatchTicks { get => DateTime.Now.Ticks - StartTicks; }
- public double StartPos { get; set; }
- public double WatchPos { get => _enc - StartPos; }
- #endregion
- }
- }
|