AITHeaterData.cs 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. using System.Runtime.Serialization;
  2. namespace OldWorldData.CommonData.DeviceData
  3. {
  4. [DataContract]
  5. [Serializable]
  6. public class AITHeaterData
  7. {
  8. [DataMember]
  9. public string UniqueName { get; set; }
  10. [DataMember]
  11. public string Module { get; set; }
  12. [DataMember]
  13. public string DeviceName { get; set; }
  14. [DataMember]
  15. public string DisplayName { get; set; }
  16. [DataMember]
  17. public string DeviceSchematicId { get; set; }
  18. [DataMember]
  19. public string Unit { get; set; }
  20. [DataMember]
  21. public string Description { get; set; }
  22. [DataMember]
  23. public double Scale { get; set; }
  24. [DataMember]
  25. public double SetPoint { get; set; }
  26. [DataMember]
  27. public double RawFeedBack { get; set; }
  28. [DataMember]
  29. public double OverTemp { get; set; }
  30. [DataMember]
  31. public double OverTempScale { get; set; }
  32. [DataMember]
  33. public bool IsTempLmtError { get; set; }
  34. [DataMember]
  35. public bool IsOverTempError { get; set; }
  36. [DataMember]
  37. public double CascadePV { get; set; }//经过Profile table和offset table校正之后的值
  38. [DataMember]
  39. public double HeaterPV { get; set; }//经过Profile table和offset table校正之后的值
  40. [DataMember]
  41. public double FeedBack { get; set; }//经过Profile table和offset table校正之后的值
  42. [DataMember]
  43. public double SetPointFb { get; set; }//设置值对应的反馈值
  44. [DataMember]
  45. public double DefaultValue { get; set; }
  46. [DataMember]
  47. public double DefaultSetPoint { get; set; }
  48. [DataMember]
  49. public double UpRateSetPoint { get; set; }
  50. [DataMember]
  51. public double DownRateSetPoint { get; set; }
  52. [DataMember]
  53. public bool IsWarning { get; set; }
  54. [DataMember]
  55. public bool IsAlarm { get; set; }
  56. [DataMember]
  57. public string ErroMessage { get; set; }
  58. [DataMember]
  59. public string Type { get; set; }
  60. [DataMember]
  61. public double Factor { get; set; }
  62. [DataMember]
  63. public bool IsRemoteMode { get; set; }//Local Remote模式设定。
  64. [DataMember]
  65. public int ControlMode { get; set; }//Paddle模式控温。
  66. [DataMember]
  67. public double Ramping { get; set; }
  68. [DataMember]
  69. public double CascadePID_P { get; set; }//PID--P(Proportioning),比例动作
  70. [DataMember]
  71. public double CascadePID_I { get; set; }//PID--P(Proportioning),比例动作
  72. [DataMember]
  73. public double CascadePID_D { get; set; }//PID--P(Proportioning),比例动作
  74. [DataMember]
  75. public double HeaterPID_P { get; set; }//PID--P(Proportioning),比例动作
  76. [DataMember]
  77. public double HeaterPID_I { get; set; }//PID--P(Proportioning),比例动作
  78. [DataMember]
  79. public double HeaterPID_D { get; set; }//PID--P(Proportioning),比例动作
  80. [DataMember]
  81. public double ProportioningSetPoint { get; set; }//PID--P(Proportioning),比例动作
  82. [DataMember]
  83. public double ProportioningFeedBack { get; set; }//PID--P(Proportioning),比例动作
  84. [DataMember]
  85. public double IntegralSetPoint { get; set; }//PID--I(Integral),积分动作或复位动作
  86. [DataMember]
  87. public double IntegralFeedBack { get; set; }//PID--I(Integral),积分动作或复位动作
  88. [DataMember]
  89. public double DerivativeSetPoint { get; set; }//PID--D(Derivative),微分动作或比率动作
  90. [DataMember]
  91. public double DerivativeFeedBack { get; set; }//PID--D(Derivative),微分动作或比率动作
  92. [DataMember]
  93. public double ProcessVariable { get; set; }//PV Process Variable(过程值),热电偶、热电阻、线性输入等的测量值。
  94. [DataMember]
  95. public double LocalSetPoint { get; set; }//LSP Local Set Point(本地设定点),存储在调节器中的设定值
  96. [DataMember]
  97. public double ManipulatedVariable { get; set; }//MV Manipulated Variable(操作变量),是执行控制的仪表的输出,表示PID的运算结果
  98. [DataMember]
  99. public double LspIncreaseRampRateSetPoint { get; set; }//LSP用SP斜坡上升斜率
  100. [DataMember]
  101. public double LspIncreaseRampRateFeedBack { get; set; }//LSP用SP斜坡上升斜率
  102. [DataMember]
  103. public double LspDecreaseRampRateSetPoint { get; set; }//LSP用SP斜坡下降斜率
  104. [DataMember]
  105. public double LspDecreaseRampRateFeedBack { get; set; }//LSP用SP斜坡下降斜率
  106. [DataMember]
  107. public double RspIncreaseRampRateSetPoint { get; set; }//RSP用SP斜坡上升斜率
  108. [DataMember]
  109. public double RspIncreaseRampRateFeedBack { get; set; }//RSP用SP斜坡上升斜率
  110. [DataMember]
  111. public double RspDecreaseRampRateSetPoint { get; set; }//RSP用SP斜坡下降斜率
  112. [DataMember]
  113. public double RspDecreaseRampRateFeedBack { get; set; }//RSP用SP斜坡下降斜率
  114. [DataMember]
  115. public bool IsAutoTuningSetPoint { get; set; }//自动调整PID的最佳参数。
  116. [DataMember]
  117. public bool IsAutoTuningFeedBack { get; set; }//自动调整PID的最佳参数。
  118. [DataMember]
  119. public bool IsLspModeSetPoint { get; set; }//LSP RSP模式设定。
  120. [DataMember]
  121. public bool IsLspModeFeedBack { get; set; }//LSP RSP模式设定。
  122. [DataMember]
  123. public bool IsAutoMode { get; set; }//和manual对应,把PID的运算结果作为操作量的自动运行状态。 manual-把操作者的手动操作所设定的值作为操作量的手动运行状态。
  124. [DataMember]
  125. public bool IsRun { get; set; }//和Ready对应,执行控制运算的状态。ready--控制运算处于停止的待机状态
  126. [DataMember]
  127. public double TempFeedback { get; set; }
  128. [DataMember]
  129. public double RampSetPoint { get; set; }
  130. [DataMember]
  131. public string ProfileTable { get; set; }
  132. [DataMember]
  133. public string CorrectTable { get; set; }
  134. [DataMember]
  135. public string PIDTable { get; set; }
  136. [DataMember]
  137. public string RHCTable { get; set; }
  138. [DataMember]
  139. public string ControlModeSetpoint { get; set; }
  140. [DataMember]
  141. public string AlarmWatchTable { get; set; }
  142. public RampUnit RampUnit { get; set; }
  143. [DataMember]
  144. public double ProfileTotalTime { get; set; }
  145. [DataMember]
  146. public double ProfilePreheatTime { get; set; }
  147. [DataMember]
  148. public double ProfileCheckTime { get; set; }
  149. [DataMember]
  150. public double ProfileCheckLimit { get; set; }
  151. [DataMember]
  152. public double ProfileAlarmLimit { get; set; }
  153. [DataMember]
  154. public double ProfileResult { get; set; }
  155. [DataMember]
  156. public bool IsProfiling { get; set; }
  157. public string ControlModeDisplay
  158. {
  159. get
  160. {
  161. return ControlModeSetpoint;
  162. }
  163. }
  164. [DataMember]
  165. public string ProfileStatus { get; set; }
  166. [DataMember]
  167. public bool IsCascadePVBreak { get; set; }
  168. [DataMember]
  169. public bool IsHeaterPVBreak { get; set; }
  170. [DataMember]
  171. public bool IsPowerOn { get; set; }
  172. [DataMember]
  173. public bool IsPowerOnSetPoint { get; set; }
  174. [DataMember]
  175. public bool IsControlTcBroken { get; set; }
  176. [DataMember]
  177. public bool IsMonitorTcBroken { get; set; }
  178. [DataMember]
  179. public double MonitorTcFeedBack { get; set; }
  180. //for the PID control type
  181. [DataMember]
  182. public Dictionary<string, object> AttrValue { get; set; }
  183. public string Display
  184. {
  185. get
  186. {
  187. string value = FeedBack.ToString(FormatString);
  188. return DisplayWithUnit ? value + " " + Unit : value;
  189. }
  190. }
  191. [DataMember]
  192. public string FormatString { get; set; }
  193. [DataMember]
  194. public bool DisplayWithUnit { get; set; }
  195. [DataMember]
  196. public bool EnableOutput { get; set; }
  197. public AITHeaterData()
  198. {
  199. DisplayName = "Undefined";
  200. Factor = 1.0;
  201. Unit = "℃";
  202. Type = "Heater";
  203. FormatString = "F2";
  204. AttrValue = [];
  205. }
  206. }
  207. public class AITHeaterOperation
  208. {
  209. public const string Ramp = "Ramp";
  210. public const string SetPowerOnOff = "SetPowerOnOff";
  211. }
  212. public class AITHeaterPropertyName
  213. {
  214. public const string ControlTcFeedback = "ControlTcFeedback";
  215. public const string MonitorTcFeedback = "MonitorTcFeedback";
  216. public const string ControlTcSetPoint = "ControlTcSetPoint";
  217. public const string IsControlTcBroken = "IsControlTcBroken";
  218. public const string IsMonitorTcBroken = "IsMonitorTcBroken";
  219. public const string IsPowerOnFeedback = "IsPowerOnFeedback";
  220. public const string IsPowerOnSetPoint = "IsPowerOnSetPoint";
  221. public const string IsTemperatureAlarm = "IsTemperatureAlarm";
  222. }
  223. public enum HeaterLineTypeEnum
  224. {
  225. GasLine,
  226. ForLine
  227. }
  228. public enum GroupEnum
  229. {
  230. HTR1 = 1,
  231. HTR2 = 2,
  232. HTR3 = 3,
  233. HTR4 = 4,
  234. HTR5 = 5,
  235. }
  236. public enum RampUnit
  237. {
  238. degreePerSec = 1,
  239. degreePerMin,
  240. degreePerHour,
  241. }
  242. }