AITServoMotorData.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. using System.Runtime.Serialization;
  2. namespace OldWorldData.CommonData.DeviceData
  3. {
  4. [DataContract]
  5. public enum ServoState
  6. {
  7. [EnumMember]
  8. Unknown,
  9. [EnumMember]
  10. NotInitial,
  11. [EnumMember]
  12. Idle,
  13. [EnumMember]
  14. Moving,
  15. [EnumMember]
  16. Error,
  17. }
  18. [DataContract]
  19. [Serializable]
  20. public class AITServoMotorData
  21. {
  22. [DataMember]
  23. public string Module { get; set; }
  24. [DataMember]
  25. public string DeviceName { get; set; }
  26. /// <summary>
  27. /// 显示在界面上的名称
  28. /// </summary>
  29. [DataMember]
  30. public string DisplayName { get; set; }
  31. /// <summary>
  32. /// IO 表中定义的物理编号,物理追溯使用 比如: V122
  33. /// </summary>
  34. [DataMember]
  35. public string DeviceSchematicId { get; set; }
  36. [DataMember]
  37. public bool IsServoOn { get; set; }
  38. [DataMember]
  39. public bool IsStopped { get; set; }
  40. [DataMember]
  41. public bool IsError { get; set; }
  42. [DataMember]
  43. public bool IsRunning { get; set; }
  44. [DataMember]
  45. public bool IsEmo { get; set; }
  46. [DataMember]
  47. public bool IsAuto { get; set; }
  48. [DataMember]
  49. public bool IsManual { get; set; }
  50. [DataMember]
  51. public bool IsServoNormal { get; set; }
  52. [DataMember]
  53. public bool IsServoNoWarning { get; set; }
  54. [DataMember]
  55. public bool IsServoNoAlarm { get; set; }
  56. [DataMember]
  57. public bool IsNop { get; set; }
  58. [DataMember]
  59. public bool IsPositionComplete { get; set; }
  60. [DataMember]
  61. public bool IsNLimit { get; set; }
  62. [DataMember]
  63. public bool IsPLimit { get; set; }
  64. #region Boffotto
  65. [DataMember]
  66. public bool DiPosFeedBack1 { get; set; }
  67. [DataMember]
  68. public bool DiPosFeedBack2 { get; set; }
  69. [DataMember]
  70. public bool DiPosFeedBack3 { get; set; }
  71. [DataMember]
  72. public bool DiReady { get; set; }
  73. [DataMember]
  74. public bool DiOnTarget { get; set; }
  75. [DataMember]
  76. public bool DiOnError { get; set; }
  77. [DataMember]
  78. public bool DiOnLeftLimit { get; set; }
  79. [DataMember]
  80. public bool DiOnRightLimit { get; set; }
  81. [DataMember]
  82. public bool DiOnHomeSensor { get; set; }
  83. [DataMember]
  84. public bool DoStart { get; set; }
  85. [DataMember]
  86. public bool DoPos1 { get; set; }
  87. [DataMember]
  88. public bool DoPos2 { get; set; }
  89. [DataMember]
  90. public bool DoPos3 { get; set; }
  91. [DataMember]
  92. public bool DoHomeOn { get; set; }
  93. [DataMember]
  94. public bool DoFreeOn { get; set; }
  95. [DataMember]
  96. public bool DoStop { get; set; }
  97. [DataMember]
  98. public bool DoReset { get; set; }
  99. [DataMember]
  100. public bool DoJogFwd { get; set; }
  101. [DataMember]
  102. public bool DoJogRev { get; set; }
  103. #endregion
  104. [DataMember]
  105. public int ErrorCode { get; set; }
  106. [DataMember]
  107. public float CurrentPosition { get; set; }
  108. [DataMember]
  109. public float CurrentSpeed { get; set; }
  110. [DataMember]
  111. public string CurrentStatus { get; set; }
  112. [DataMember]
  113. public float JogSpeedSetPoint { get; set; }
  114. [DataMember]
  115. public float AutoSpeedSetPoint { get; set; }
  116. [DataMember]
  117. public float AccSpeedSetPoint { get; set; }
  118. [DataMember]
  119. public ServoState State { get; set; }
  120. public AITServoMotorData()
  121. {
  122. DisplayName = "Undefined Servo Motor";
  123. }
  124. }
  125. public class AITServoMotorOperation
  126. {
  127. public const string Home = "Home";
  128. public const string SetServoOn = "SetServoOn";
  129. public const string SetServoOff = "SetServoOff";
  130. public const string MoveTo = "MoveTo";
  131. public const string MoveBy = "MoveBy";
  132. public const string Reset = "Reset";
  133. public const string Stop = "Stop";
  134. }
  135. public class AITServoMotorProperty
  136. {
  137. public const string IsServoOn = "IsServoOn";
  138. public const string IsStopped = "IsStopped";
  139. public const string IsError = "IsError";
  140. public const string CurrentPosition = "CurrentPosition";
  141. public const string CurrentStatus = "CurrentStatus";
  142. public const string IsWalkingShaftStart = "IsWalkingShaftStart";
  143. public const string IsWalkingShaftIn1 = "IsWalkingShaftIn1";
  144. public const string IsWalkingShaftIn2 = "IsWalkingShaftIn2";
  145. public const string IsWalkingShaftIn3 = "IsWalkingShaftIn3";
  146. public const string IsWalkingShaftHome = "IsWalkingShaftHome";
  147. public const string IsWalkingShaftFree = "IsWalkingShaftFree";
  148. public const string IsWalkingShafStop = "IsWalkingShafStop";
  149. public const string IsWalkingShaftReset = "IsWalkingShaftReset";
  150. public const string IsWalkingShaftJogFwd = "IsWalkingShaftJogFwd";
  151. public const string IsWalkingShaftJogRev = "IsWalkingShaftJogRev";
  152. }
  153. }