ShakerControlModel.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Shaker.Model
  7. {
  8. [MessagePack.MessagePackObject]
  9. public class ShakerControlModel : TableBase
  10. {
  11. public ShakerControlModel()
  12. {
  13. IPAddress = "127.0.0.1";
  14. Port = 502;
  15. SlaveID = 1;
  16. Name = "振动台";
  17. Description = "测试用振动台";
  18. PowerAmplifier.ResetBitIndex = 2;
  19. PowerAmplifier.StartBitIndex = 0;
  20. PowerAmplifier.StopBitIndex = 1;
  21. PowerAmplifier.GainSwitchBitIndex = 4;
  22. PowerAmplifier.ResetAddress = 2501;
  23. PowerAmplifier.StartAddress = 2501;
  24. PowerAmplifier.GainSwitchAddress = 2501;
  25. PowerAmplifier.GainAddress = 2502;
  26. OperatingStatus.Address = 3012;
  27. OperatingStatus.Unit = "";
  28. OperatingStatus.IsReadOnly = true;
  29. OperatingStatus.B = 0;
  30. OperatingStatus.K = 1;
  31. OperatingStatus.Name = "系统运行状态";
  32. OutputVoltage.Address = 3014;
  33. OutputVoltage.Unit = "V";
  34. OutputVoltage.IsReadOnly = true;
  35. OutputVoltage.B = 0;
  36. OutputVoltage.K = 1;
  37. OutputVoltage.Name = "功放输出电压";
  38. OutputVoltage.MaxValue = 999;
  39. OutputVoltage.MinValue = 0;
  40. OutputCurrent.MaxValue = 9999;
  41. OutputCurrent.MinValue = 0;
  42. OutputCurrent.Address = 3013;
  43. OutputCurrent.B = 0;
  44. OutputCurrent.K = 1;
  45. OutputCurrent.Unit = "A";
  46. OutputCurrent.IsReadOnly = true;
  47. OutputCurrent.Name = "功放输出总电流";
  48. ExcitationCurrent.MaxValue = 999;
  49. ExcitationCurrent.MinValue = 0;
  50. ExcitationCurrent.Address = 3015;
  51. ExcitationCurrent.B = 0;
  52. ExcitationCurrent.K = 1;
  53. ExcitationCurrent.Unit = "A";
  54. ExcitationCurrent.IsReadOnly = true;
  55. ExcitationCurrent.Name = "励磁电流";
  56. ExcitationVoltage.MaxValue = 999;
  57. ExcitationVoltage.MinValue = 0;
  58. ExcitationVoltage.Address = 3016;
  59. ExcitationVoltage.B = 0;
  60. ExcitationVoltage.K = 1;
  61. ExcitationVoltage.Unit = "V";
  62. ExcitationVoltage.IsReadOnly = true;
  63. ExcitationVoltage.Name = "励磁电压";
  64. ThreePhaseVoltage.MaxValue = 999;
  65. ThreePhaseVoltage.MinValue = 0;
  66. ThreePhaseVoltage.Address = 3017;
  67. ThreePhaseVoltage.B = 0;
  68. ThreePhaseVoltage.K = 1;
  69. ThreePhaseVoltage.Unit = "V";
  70. ThreePhaseVoltage.IsReadOnly = true;
  71. ThreePhaseVoltage.Name = "三相电压";
  72. AbutmentTemperature0.MaxValue = 999;
  73. AbutmentTemperature0.MinValue = 0;
  74. AbutmentTemperature0.Address = 3018;
  75. AbutmentTemperature0.B = 0;
  76. AbutmentTemperature0.K = 1;
  77. AbutmentTemperature0.Unit = "℃";
  78. AbutmentTemperature0.IsReadOnly = true;
  79. AbutmentTemperature0.Name = "台体温度0";
  80. AbutmentTemperature1.MaxValue = 999;
  81. AbutmentTemperature1.MinValue = 0;
  82. AbutmentTemperature1.Address = 3019;
  83. AbutmentTemperature1.B = 0;
  84. AbutmentTemperature1.K = 1;
  85. AbutmentTemperature1.Unit = "℃";
  86. AbutmentTemperature1.IsReadOnly = true;
  87. AbutmentTemperature1.Name = "台体温度1";
  88. DCVoltage1.MaxValue = 999;
  89. DCVoltage1.MinValue = 0;
  90. DCVoltage1.Address = 3020;
  91. DCVoltage1.B = 0;
  92. DCVoltage1.K = 1;
  93. DCVoltage1.Unit = "V";
  94. DCVoltage1.IsReadOnly = true;
  95. DCVoltage1.Name = "1柜直流电压";
  96. DCVoltage2.MaxValue = 999;
  97. DCVoltage2.MinValue = 0;
  98. DCVoltage2.Address = 3021;
  99. DCVoltage2.B = 0;
  100. DCVoltage2.K = 1;
  101. DCVoltage2.Unit = "V";
  102. DCVoltage2.IsReadOnly = true;
  103. DCVoltage2.Name = "2柜直流电压";
  104. DCVoltage3.MaxValue = 999;
  105. DCVoltage3.MinValue = 0;
  106. DCVoltage3.Address = 3022;
  107. DCVoltage3.B = 0;
  108. DCVoltage3.K = 1;
  109. DCVoltage3.Unit = "V";
  110. DCVoltage3.IsReadOnly = true;
  111. DCVoltage3.Name = "3柜直流电压";
  112. DCVoltage4.MaxValue = 999;
  113. DCVoltage4.MinValue = 0;
  114. DCVoltage4.Address = 3023;
  115. DCVoltage4.B = 0;
  116. DCVoltage4.K = 1;
  117. DCVoltage4.Unit = "V";
  118. DCVoltage4.IsReadOnly = true;
  119. DCVoltage4.Name = "4柜直流电压";
  120. ExternalCirculatingWaterPressure.MaxValue = 999;
  121. ExternalCirculatingWaterPressure.MinValue = 0;
  122. ExternalCirculatingWaterPressure.Address = 3024;
  123. ExternalCirculatingWaterPressure.B = 0;
  124. ExternalCirculatingWaterPressure.K = 1;
  125. ExternalCirculatingWaterPressure.Unit = "MPa";
  126. ExternalCirculatingWaterPressure.IsReadOnly = true;
  127. ExternalCirculatingWaterPressure.Name = "外循环水压力";
  128. ExternalCirculatingWaterFlow.MaxValue = 999;
  129. ExternalCirculatingWaterFlow.MinValue = 0;
  130. ExternalCirculatingWaterFlow.Address = 3025;
  131. ExternalCirculatingWaterFlow.B = 0;
  132. ExternalCirculatingWaterFlow.K = 1;
  133. ExternalCirculatingWaterFlow.Unit = "m³/h";
  134. ExternalCirculatingWaterFlow.IsReadOnly = true;
  135. ExternalCirculatingWaterFlow.Name = "外循环水流量";
  136. ExternalCirculatingWaterTemperature.MaxValue = 999;
  137. ExternalCirculatingWaterTemperature.MinValue = 0;
  138. ExternalCirculatingWaterTemperature.Address = 3026;
  139. ExternalCirculatingWaterTemperature.B = 0;
  140. ExternalCirculatingWaterTemperature.K = 1;
  141. ExternalCirculatingWaterTemperature.Unit = "℃";
  142. ExternalCirculatingWaterTemperature.IsReadOnly = true;
  143. ExternalCirculatingWaterTemperature.Name = "外循环水温度";
  144. MovingCoilWaterSupplyPressure.MaxValue = 999;
  145. MovingCoilWaterSupplyPressure.MinValue = 0;
  146. MovingCoilWaterSupplyPressure.Address = 3027;
  147. MovingCoilWaterSupplyPressure.B = 0;
  148. MovingCoilWaterSupplyPressure.K = 1;
  149. MovingCoilWaterSupplyPressure.Unit = "MPa";
  150. MovingCoilWaterSupplyPressure.IsReadOnly = true;
  151. MovingCoilWaterSupplyPressure.Name = "动圈供水压力";
  152. MovingCoilWaterSupplyFlow.MaxValue = 999;
  153. MovingCoilWaterSupplyFlow.MinValue = 0;
  154. MovingCoilWaterSupplyFlow.Address = 3028;
  155. MovingCoilWaterSupplyFlow.B = 0;
  156. MovingCoilWaterSupplyFlow.K = 1;
  157. MovingCoilWaterSupplyFlow.Unit = "m³/h";
  158. MovingCoilWaterSupplyFlow.IsReadOnly = true;
  159. MovingCoilWaterSupplyFlow.Name = "动圈供水流量";
  160. MovingCoilWaterSupplyTemperature.MaxValue = 999;
  161. MovingCoilWaterSupplyTemperature.MinValue = 0;
  162. MovingCoilWaterSupplyTemperature.Address = 3029;
  163. MovingCoilWaterSupplyTemperature.B = 0;
  164. MovingCoilWaterSupplyTemperature.K = 1;
  165. MovingCoilWaterSupplyTemperature.Unit = "℃";
  166. MovingCoilWaterSupplyTemperature.IsReadOnly = true;
  167. MovingCoilWaterSupplyTemperature.Name = "动圈供水温度";
  168. ExcitationWaterSupplyFlow.MaxValue = 999;
  169. ExcitationWaterSupplyFlow.MinValue = 0;
  170. ExcitationWaterSupplyFlow.Address = 3030;
  171. ExcitationWaterSupplyFlow.B = 0;
  172. ExcitationWaterSupplyFlow.K = 1;
  173. ExcitationWaterSupplyFlow.Unit = "m³/h";
  174. ExcitationWaterSupplyFlow.IsReadOnly = true;
  175. ExcitationWaterSupplyFlow.Name = "励磁供水流量";
  176. ExcitationWaterSupplyPressure.MaxValue = 999;
  177. ExcitationWaterSupplyPressure.MinValue = 0;
  178. ExcitationWaterSupplyPressure.Address = 3031;
  179. ExcitationWaterSupplyPressure.B = 0;
  180. ExcitationWaterSupplyPressure.K = 1;
  181. ExcitationWaterSupplyPressure.Unit = "MPa";
  182. ExcitationWaterSupplyPressure.IsReadOnly = true;
  183. ExcitationWaterSupplyPressure.Name = "励磁供水压力";
  184. ExcitationWaterSupplyTemperature.MaxValue = 999;
  185. ExcitationWaterSupplyTemperature.MinValue = 0;
  186. ExcitationWaterSupplyTemperature.Address = 3032;
  187. ExcitationWaterSupplyTemperature.B = 0;
  188. ExcitationWaterSupplyTemperature.K = 1;
  189. ExcitationWaterSupplyTemperature.Unit = "℃";
  190. ExcitationWaterSupplyTemperature.IsReadOnly = true;
  191. ExcitationWaterSupplyTemperature.Name = "励磁供水温度";
  192. CoolingWater.StartAddress = 2502;
  193. CoolingWater.StopAddress = 2502;
  194. CoolingWater.ResetAddress = 2502;
  195. CoolingWater.ResetBitIndex = 2;
  196. CoolingWater.StartBitIndex = 0;
  197. CoolingWater.StopBitIndex = 1;
  198. CoolingWaterOperatingStatus.Name = "冷却状态";
  199. CoolingWaterOperatingStatus.MaxValue = 999;
  200. CoolingWaterOperatingStatus.MinValue = 0;
  201. CoolingWaterOperatingStatus.Address = 3033;
  202. CoolingWaterOperatingStatus.B = 0;
  203. CoolingWaterOperatingStatus.K = 1;
  204. CoolingWaterOperatingStatus.Unit = "";
  205. CoolingWaterOperatingStatus.IsReadOnly = true;
  206. DigitalGroup.Address = 3051;
  207. DigitalGroup.Names = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  208. {
  209. "门开关",
  210. "主柜热继",
  211. "冷却单元",
  212. "水平台油压",
  213. "水平台过位移",
  214. "台体导向静压轴承压力",
  215. "外部触发1",
  216. "台体过位移",
  217. "台体温度",
  218. "变压器温度",
  219. "励磁控制继电器反馈",
  220. "冷却单元控制继电器反馈",
  221. "急停",
  222. "外部触发2",
  223. "柜1模块",
  224. "柜2模块",
  225. "柜1继电器反馈",
  226. "柜2继电器反馈",
  227. "外部1",
  228. "外部变压器温度",
  229. "柜3模块",
  230. "柜4模块",
  231. "柜3继电器反馈",
  232. "柜4继电器反馈",
  233. "","","","","","","",""
  234. };
  235. DigitalGroup.ErrorMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  236. {
  237. "打开",
  238. "报警",
  239. "报警",
  240. "报警",
  241. "报警",
  242. "报警",
  243. "报警",
  244. "报警",
  245. "报警",
  246. "报警",
  247. "报警",
  248. "报警",
  249. "报警",
  250. "报警",
  251. "报警",
  252. "报警",
  253. "报警",
  254. "报警",
  255. "急停",
  256. "报警",
  257. "报警",
  258. "报警",
  259. "报警",
  260. "报警",
  261. "","","","","","","",""
  262. };
  263. DigitalGroup.NomalMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  264. {
  265. "关闭",
  266. "正常",
  267. "正常",
  268. "正常",
  269. "正常",
  270. "正常",
  271. "正常",
  272. "正常",
  273. "正常",
  274. "正常",
  275. "正常",
  276. "正常",
  277. "正常",
  278. "正常",
  279. "正常",
  280. "正常",
  281. "正常",
  282. "正常",
  283. "正常",
  284. "正常",
  285. "正常",
  286. "正常",
  287. "正常",
  288. "正常",
  289. "","","","","","","",""
  290. };
  291. DigitalGroup1.Address = 3104;
  292. DigitalGroup1.Names = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  293. {
  294. "输出电压",
  295. "励磁欠流",
  296. "励磁过流",
  297. "励磁欠压",
  298. "励磁过压",
  299. "三相电压欠压",
  300. "三相电压过压",
  301. "柜1直流电压欠压",
  302. "柜1直流电压过压",
  303. "",
  304. "T01温度过高",
  305. "",
  306. "T00温度过高",
  307. "",
  308. "柜1输出电流过流",
  309. "柜2直流电压欠压",
  310. "柜2直流电压过压",
  311. "",
  312. "柜2输出电流过流",
  313. "",
  314. "",
  315. "",
  316. "",
  317. "柜3直流电压欠压",
  318. "柜3直流电压过压",
  319. "柜4直流电压欠压",
  320. "柜4直流电压过压",
  321. "",
  322. "柜3输出电流过流",
  323. "",
  324. "柜4输出电流过流",
  325. ""
  326. };
  327. DigitalGroup1.ErrorMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  328. {
  329. "报警",
  330. "报警",
  331. "报警",
  332. "报警",
  333. "报警",
  334. "报警",
  335. "报警",
  336. "报警",
  337. "报警",
  338. "",
  339. "报警",
  340. "",
  341. "报警",
  342. "",
  343. "报警",
  344. "报警",
  345. "报警",
  346. "",
  347. "报警",
  348. "",
  349. "",
  350. "",
  351. "",
  352. "报警",
  353. "报警","报警","报警","","报警","","报警",""
  354. };
  355. DigitalGroup1.NomalMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  356. {
  357. "正常",
  358. "正常",
  359. "正常",
  360. "正常",
  361. "正常",
  362. "正常",
  363. "正常",
  364. "正常",
  365. "正常",
  366. "",
  367. "正常",
  368. "",
  369. "正常",
  370. "",
  371. "正常",
  372. "正常",
  373. "正常",
  374. "",
  375. "正常",
  376. "",
  377. "",
  378. "",
  379. "",
  380. "正常",
  381. "正常","正常","正常","","正常","","正常",""
  382. };
  383. CoolingWaterDigitalGroup.Address = 3105;
  384. CoolingWaterDigitalGroup.Names = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  385. {
  386. "1#水泵",
  387. "2#水泵",
  388. "动圈水箱液位",
  389. "励磁水箱液位",
  390. "水冷单元",
  391. "",
  392. "",
  393. "",
  394. "",
  395. "",
  396. "",
  397. "",
  398. "",
  399. "",
  400. "",
  401. "",
  402. "",
  403. "",
  404. "",
  405. "",
  406. "",
  407. "",
  408. "",
  409. "",
  410. "",
  411. "",
  412. "",
  413. "",
  414. "",
  415. "",
  416. "",
  417. ""
  418. };
  419. CoolingWaterDigitalGroup.ErrorMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  420. {
  421. "关闭",
  422. "关闭",
  423. "超限",
  424. "超限",
  425. "故障",
  426. "",
  427. "",
  428. "",
  429. "",
  430. "",
  431. "",
  432. "",
  433. "",
  434. "",
  435. "",
  436. "",
  437. "",
  438. "",
  439. "",
  440. "",
  441. "",
  442. "",
  443. "",
  444. "",
  445. "",
  446. "",
  447. "",
  448. "",
  449. "",
  450. "",
  451. "",
  452. ""
  453. };
  454. CoolingWaterDigitalGroup.NomalMessage = new string[PLCDigitalGroupModel.DIGITAL_GROUP_BIT_COUNT]
  455. {
  456. "正常",
  457. "正常",
  458. "正常",
  459. "正常",
  460. "正常",
  461. "",
  462. "",
  463. "",
  464. "",
  465. "",
  466. "",
  467. "",
  468. "",
  469. "",
  470. "",
  471. "",
  472. "",
  473. "",
  474. "",
  475. "",
  476. "",
  477. "",
  478. "",
  479. "",
  480. "",
  481. "",
  482. "",
  483. "",
  484. "",
  485. "",
  486. "",
  487. ""
  488. };
  489. }
  490. [MessagePack.Key(1)]
  491. public string Name = string.Empty;
  492. [MessagePack.Key(2)]
  493. public string Description = string.Empty;
  494. [MessagePack.Key(3)]
  495. public string IPAddress = string.Empty;
  496. [MessagePack.Key(4)]
  497. public int Port = 502;
  498. [MessagePack.Key(5)]
  499. public byte SlaveID = 1;
  500. [MessagePack.Key(6)]
  501. public string ClientID = string.Empty;
  502. [MessagePack.Key(7)]
  503. public bool AllowCoolingWater = true;
  504. [MessagePack.Key(8)]
  505. public PowerAmplifierModel PowerAmplifier = new PowerAmplifierModel();
  506. [MessagePack.Key(9)]
  507. public PLCAnlogModel OperatingStatus = new PLCAnlogModel();
  508. [MessagePack.Key(10)]
  509. public PLCAnlogModel OutputCurrent = new PLCAnlogModel();
  510. [MessagePack.Key(11)]
  511. public PLCAnlogModel OutputVoltage = new PLCAnlogModel();
  512. [MessagePack.Key(12)]
  513. public PLCAnlogModel ExcitationCurrent = new PLCAnlogModel();
  514. [MessagePack.Key(13)]
  515. public PLCAnlogModel ExcitationVoltage = new PLCAnlogModel();
  516. [MessagePack.Key(14)]
  517. public PLCAnlogModel ThreePhaseVoltage = new PLCAnlogModel();
  518. [MessagePack.Key(15)]
  519. public PLCAnlogModel AbutmentTemperature0 = new PLCAnlogModel();
  520. [MessagePack.Key(16)]
  521. public PLCAnlogModel AbutmentTemperature1 = new PLCAnlogModel();
  522. [MessagePack.IgnoreMember]
  523. public string AbutmentTemperatureName => AbutmentTemperature0.Name + AbutmentTemperature1.Name;
  524. [MessagePack.Key(17)]
  525. public PLCAnlogModel DCVoltage1 = new PLCAnlogModel();
  526. [MessagePack.Key(18)]
  527. public PLCAnlogModel DCVoltage2 = new PLCAnlogModel();
  528. [MessagePack.Key(19)]
  529. public PLCAnlogModel DCVoltage3 = new PLCAnlogModel();
  530. [MessagePack.Key(20)]
  531. public PLCAnlogModel DCVoltage4 = new PLCAnlogModel();
  532. [MessagePack.Key(21)]
  533. public PLCAnlogModel ExternalCirculatingWaterPressure = new PLCAnlogModel();
  534. [MessagePack.Key(22)]
  535. public PLCAnlogModel ExternalCirculatingWaterFlow = new PLCAnlogModel();
  536. [MessagePack.Key(23)]
  537. public PLCAnlogModel ExternalCirculatingWaterTemperature = new PLCAnlogModel();
  538. [MessagePack.Key(24)]
  539. public PLCAnlogModel MovingCoilWaterSupplyPressure = new PLCAnlogModel();
  540. [MessagePack.Key(25)]
  541. public PLCAnlogModel MovingCoilWaterSupplyFlow = new PLCAnlogModel();
  542. [MessagePack.Key(26)]
  543. public PLCAnlogModel MovingCoilWaterSupplyTemperature = new PLCAnlogModel();
  544. [MessagePack.Key(27)]
  545. public PLCAnlogModel ExcitationWaterSupplyPressure = new PLCAnlogModel();
  546. [MessagePack.Key(28)]
  547. public PLCAnlogModel ExcitationWaterSupplyFlow = new PLCAnlogModel();
  548. [MessagePack.Key(29)]
  549. public PLCAnlogModel ExcitationWaterSupplyTemperature = new PLCAnlogModel();
  550. [MessagePack.IgnoreMember]
  551. public string DCVoltageName => DCVoltage1.Name + DCVoltage2.Name + DCVoltage3.Name + DCVoltage4.Name;
  552. [MessagePack.Key(30)]
  553. public PLCDigitalGroupModel DigitalGroup = new PLCDigitalGroupModel();
  554. [MessagePack.Key(31)]
  555. public PLCDigitalGroupModel DigitalGroup1 = new PLCDigitalGroupModel();
  556. [MessagePack.Key(32)]
  557. public PLCDigitalGroupModel CoolingWaterDigitalGroup = new PLCDigitalGroupModel();
  558. [MessagePack.Key(33)]
  559. public CoolingWaterModel CoolingWater = new CoolingWaterModel();
  560. [MessagePack.Key(34)]
  561. public PLCAnlogModel CoolingWaterOperatingStatus = new PLCAnlogModel();
  562. }
  563. }