ChannelData.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. using GeneralData;
  2. using System.Xml.Serialization;
  3. namespace HardwareData;
  4. public class ChannelData
  5. {
  6. public byte Mini8Index { get; set; }
  7. public byte ChannelIndex { get; set; }
  8. public string? Name { get; set; }
  9. public ChannelMode ChannelMode { get; set; }
  10. [XmlIgnore]
  11. public DateTime CollectTime { get; set; }
  12. [XmlIgnore]
  13. public float Caps { get; set; }
  14. [XmlIgnore]
  15. public float Floor { get; set; }
  16. [XmlIgnore]
  17. public float CapsWarning { get; set; }
  18. [XmlIgnore]
  19. public float FloorWarning { get; set; }
  20. [XmlIgnore]
  21. public float PV { get; set; }
  22. [XmlIgnore]
  23. public float WorkingOutput { get; set; }
  24. [XmlIgnore]
  25. public AutoTuneStatus AutoTuneStatus { get; set; }
  26. [XmlIgnore]
  27. public float AutoTune_P { get; set; }
  28. [XmlIgnore]
  29. public float AutoTune_I { get; set; }
  30. [XmlIgnore]
  31. public float AutoTune_D { get; set; }
  32. [XmlIgnore]
  33. public TcBorken SensorBreakAlarm { get; set; }
  34. [XmlIgnore]
  35. public float SetPoint { get; set; }
  36. [XmlIgnore]
  37. public ActiveTuneSet ActiveTuneSet { get; set; }
  38. [XmlIgnore]
  39. public float Running_P { get; set; }
  40. [XmlIgnore]
  41. public float Running_I { get; set; }
  42. [XmlIgnore]
  43. public float Running_D { get; set; }
  44. [XmlIgnore]
  45. public Inhibit Inhibit { get; set; }
  46. [XmlIgnore]
  47. public float SetpointUpRate { get; set; }
  48. [XmlIgnore]
  49. public float SetpointDownRate { get; set; }
  50. }
  51. public interface IChannelAddress<T_AddressType>
  52. {
  53. public byte Mini8Index { get; set; }
  54. public byte ChannelIndex { get; set; }
  55. public T_AddressType PV { get; set; }
  56. public T_AddressType WorkingOutput { get; set; }
  57. public T_AddressType AutoTuneStatus { get; set; }
  58. public T_AddressType AutoTune_P { get; set; }
  59. public T_AddressType AutoTune_I { get; set; }
  60. public T_AddressType AutoTune_D { get; set; }
  61. public T_AddressType SensorBreakAlarm1 { get; set; }
  62. public T_AddressType SensorBreakAlarm2 { get; set; }
  63. public T_AddressType SetPoint { get; set; }
  64. public T_AddressType ActiveTuneSet { get; set; }
  65. public T_AddressType Running_P { get; set; }
  66. public T_AddressType Running_I { get; set; }
  67. public T_AddressType Running_D { get; set; }
  68. public T_AddressType Inhibit { get; set; }
  69. public T_AddressType ActiveAutoTune { get; set; }
  70. public T_AddressType SetpointUpRate { get; set; }
  71. public T_AddressType SetpointDownRate { get; set; }
  72. public T_AddressType Caps { get; set; }
  73. public T_AddressType Floor { get; set; }
  74. public T_AddressType CapsWarning { get; set; }
  75. public T_AddressType FloorWarning { get; set; }
  76. }
  77. public class ChannelAddress : IChannelAddress<ushort>
  78. {
  79. public byte Mini8Index { get; set; }
  80. public byte ChannelIndex { get; set; }
  81. public ushort PV { get; set; }
  82. public ushort WorkingOutput { get; set; }
  83. public ushort AutoTuneStatus { get; set; }
  84. public ushort AutoTune_P { get; set; }
  85. public ushort AutoTune_I { get; set; }
  86. public ushort AutoTune_D { get; set; }
  87. public ushort SensorBreakAlarm1 { get; set; }
  88. public ushort SensorBreakAlarm2 { get; set; }
  89. public ushort SetPoint { get; set; }
  90. public ushort ActiveTuneSet { get; set; }
  91. public ushort Running_P { get; set; }
  92. public ushort Running_I { get; set; }
  93. public ushort Running_D { get; set; }
  94. public ushort Inhibit { get; set; }
  95. public ushort ActiveAutoTune { get; set; }
  96. public ushort SetpointUpRate { get; set; }
  97. public ushort SetpointDownRate { get; set; }
  98. public ushort Caps { get; set; }
  99. public ushort Floor { get; set; }
  100. public ushort CapsWarning { get; set; }
  101. public ushort FloorWarning { get; set; }
  102. }
  103. public class ChannelAddressPLC : IChannelAddress<string?>
  104. {
  105. public byte Mini8Index { get; set; }
  106. public byte ChannelIndex { get; set; }
  107. public string? PV { get; set; }
  108. public string? WorkingOutput { get; set; }
  109. public string? AutoTuneStatus { get; set; }
  110. public string? AutoTune_P { get; set; }
  111. public string? AutoTune_I { get; set; }
  112. public string? AutoTune_D { get; set; }
  113. public string? SensorBreakAlarm1 { get; set; }
  114. public string? SensorBreakAlarm2 { get; set; }
  115. public string? SetPoint { get; set; }
  116. public string? ActiveTuneSet { get; set; }
  117. public string? Running_P { get; set; }
  118. public string? Running_I { get; set; }
  119. public string? Running_D { get; set; }
  120. public string? Inhibit { get; set; }
  121. public string? ActiveAutoTune { get; set; }
  122. public string? SetpointUpRate { get; set; }
  123. public string? SetpointDownRate { get; set; }
  124. public string? Caps { get; set; }
  125. public string? Floor { get; set; }
  126. public string? CapsWarning { get; set; }
  127. public string? FloorWarning { get; set; }
  128. }