You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1064 lines
28 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
2 months ago
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
2 months ago
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
2 months ago
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. require_once('../php/argus/server.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. $EID = intval( $_POST['MID'] );
  6. $QS = "SELECT * FROM `modbus_modules` WHERE `id`={$EID}";
  7. $Result = $DATABASE->Query( $QS, false );
  8. if( count( $Result ) ){
  9. $SC = $Result[0];
  10. $CCCV = intval( $SC['values'] );
  11. $CIVA = ( $CCCV >> 8 ) & 0xFF;
  12. if( ( $CCCV & 0x01 ) == 0x01 ) $P1 = 'true'; else $P1 = 'false';
  13. if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false';
  14. if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = 'false';
  15. if( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true'; else $P4 = 'false';
  16. $QS = "SELECT `left_side`,`right_side` FROM `metro_platforms` WHERE `id`={$SC['platform_id']}";
  17. $ZZ = $DATABASE->Query( $QS, false );
  18. $SN = $ZZ[0];
  19. $QS="SELECT `short` FROM `metro_tracks` WHERE `side`='U' AND `platform_id`={$SC['platform_id']}";
  20. $ZZ = $DATABASE->Query( $QS, false );
  21. $UTN = $ZZ[0]['short'];
  22. $QS="SELECT `short` FROM `metro_tracks` WHERE `side`='B' AND `platform_id`={$SC['platform_id']}";
  23. $ZZ = $DATABASE->Query( $QS, false );
  24. $BTN = $ZZ[0]['short'];
  25. $CBOV_A =( intval($SC['crossbar_a']) & 0x0F );
  26. $CBOV_B =( intval($SC['crossbar_a']) & 0x0F );
  27. $CBOV_C =( intval($SC['crossbar_a']) & 0x0F );
  28. $CBOV_D =( intval($SC['crossbar_a']) & 0x0F );
  29. $CBIV_A =( intval($SC['crossbar_a']) >> 4 );
  30. $CBIV_B =( intval($SC['crossbar_a']) >> 4 );
  31. $CBIV_C =( intval($SC['crossbar_a']) >> 4 );
  32. $CBIV_D =( intval($SC['crossbar_a']) >> 4 );
  33. switch($SC['func']){
  34. case 1: {
  35. $FFF=$SN['left_side'] . ' ' . $Labels->GetLabel('___SIDE__');
  36. $OCB_SECTION=<<<DATA_BOUNDARY
  37. {
  38. xtype: 'panel',
  39. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  40. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  41. },{
  42. xtype: 'panel',
  43. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  44. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  45. },{
  46. xtype: 'spacer'
  47. },{
  48. xtype: 'spacer'
  49. },{
  50. xtype: 'combo',
  51. id: 'sce_cb_o_1',
  52. lazyRender: true,
  53. mode: 'local',
  54. forceSelection: true,
  55. triggerAction: 'all',
  56. editable: false,
  57. disableKeyFilter: true,
  58. store: new Ext.data.ArrayStore({
  59. fields: ['mode','mode_txt'],
  60. data: [
  61. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  62. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  63. ]
  64. }),
  65. valueField: 'mode',
  66. displayField: 'mode_txt',
  67. value: '{$CBOV_A}',
  68. width: 120,
  69. listeners:{
  70. select: function( a, c, b ){
  71. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  72. }
  73. }
  74. },{
  75. xtype: 'combo',
  76. id: 'sce_cb_o_2',
  77. lazyRender: true,
  78. mode: 'local',
  79. forceSelection: true,
  80. triggerAction: 'all',
  81. editable: false,
  82. disableKeyFilter: true,
  83. store: new Ext.data.ArrayStore({
  84. fields: ['mode','mode_txt'],
  85. data: [
  86. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  87. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  88. ]
  89. }),
  90. valueField: 'mode',
  91. displayField: 'mode_txt',
  92. value: '{$CBOV_B}',
  93. width: 120,
  94. listeners:{
  95. select: function( a, c, b ){
  96. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  97. }
  98. }
  99. },{
  100. xtype: 'spacer'
  101. },{
  102. xtype: 'spacer'
  103. }
  104. DATA_BOUNDARY;
  105. $ICB_SECTION=<<<DATA_BOUNDARY
  106. {
  107. xtype: 'panel',
  108. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  109. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  110. },{
  111. xtype: 'panel',
  112. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  113. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  114. },{
  115. xtype: 'spacer'
  116. },{
  117. xtype: 'spacer'
  118. },{
  119. xtype: 'spacer',
  120. height: 5,
  121. colspan: 4
  122. },{
  123. xtype: 'combo',
  124. id: 'sce_cb_i_1',
  125. lazyRender: true,
  126. mode: 'local',
  127. forceSelection: true,
  128. triggerAction: 'all',
  129. editable: false,
  130. disableKeyFilter: true,
  131. store: new Ext.data.ArrayStore({
  132. fields: ['mode','mode_txt'],
  133. data: [
  134. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  135. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  136. ]
  137. }),
  138. valueField: 'mode',
  139. displayField: 'mode_txt',
  140. value: '{$CBIV_A}',
  141. width: 120,
  142. listeners:{
  143. select: function( a, c, b ){
  144. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
  145. }
  146. }
  147. },{
  148. xtype: 'combo',
  149. id: 'sce_cb_i_2',
  150. lazyRender: true,
  151. mode: 'local',
  152. forceSelection: true,
  153. triggerAction: 'all',
  154. editable: false,
  155. disableKeyFilter: true,
  156. store: new Ext.data.ArrayStore({
  157. fields: ['mode','mode_txt'],
  158. data: [
  159. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  160. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  161. ]
  162. }),
  163. valueField: 'mode',
  164. displayField: 'mode_txt',
  165. value: '{$CBIV_B}',
  166. width: 120,
  167. listeners:{
  168. select: function( a, c, b ){
  169. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
  170. }
  171. }
  172. },{
  173. xtype: 'spacer'
  174. },{
  175. xtype: 'spacer'
  176. }]
  177. }
  178. DATA_BOUNDARY;
  179. break;
  180. };
  181. case 2: {
  182. $FFF=$SN['right_side'] . ' ' . $Labels->GetLabel('___SIDE__');
  183. $OCB_SECTION=<<<DATA_BOUNDARY
  184. {
  185. xtype: 'panel',
  186. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  187. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  188. },{
  189. xtype: 'panel',
  190. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  191. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  192. },{
  193. xtype: 'spacer',
  194. width: 120
  195. },{
  196. xtype: 'spacer',
  197. width: 120
  198. },{
  199. xtype: 'combo',
  200. id: 'sce_cb_o_1',
  201. lazyRender: true,
  202. mode: 'local',
  203. forceSelection: true,
  204. triggerAction: 'all',
  205. editable: false,
  206. disableKeyFilter: true,
  207. store: new Ext.data.ArrayStore({
  208. fields: ['mode','mode_txt'],
  209. data: [
  210. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  211. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  212. ]
  213. }),
  214. valueField: 'mode',
  215. displayField: 'mode_txt',
  216. value: '{$CBOV_A}',
  217. width: 120,
  218. listeners:{
  219. select: function( a, c, b ){
  220. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  221. }
  222. }
  223. },{
  224. xtype: 'combo',
  225. id: 'sce_cb_o_2',
  226. lazyRender: true,
  227. mode: 'local',
  228. forceSelection: true,
  229. triggerAction: 'all',
  230. editable: false,
  231. disableKeyFilter: true,
  232. store: new Ext.data.ArrayStore({
  233. fields: ['mode','mode_txt'],
  234. data: [
  235. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  236. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  237. ]
  238. }),
  239. valueField: 'mode',
  240. displayField: 'mode_txt',
  241. value: '{$CBOV_B}',
  242. width: 120,
  243. listeners:{
  244. select: function( a, c, b ){
  245. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  246. }
  247. }
  248. },{
  249. xtype: 'spacer',
  250. width: 120
  251. },{
  252. xtype: 'spacer',
  253. width: 120
  254. }
  255. DATA_BOUNDARY;
  256. $ICB_SECTION=<<<DATA_BOUNDARY
  257. {
  258. xtype: 'panel',
  259. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  260. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  261. },{
  262. xtype: 'panel',
  263. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  264. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  265. },{
  266. xtype: 'spacer',
  267. width: 120
  268. },{
  269. xtype: 'spacer',
  270. width: 120
  271. },{
  272. xtype: 'spacer',
  273. height: 5,
  274. colspan: 4
  275. },{
  276. xtype: 'combo',
  277. id: 'sce_cb_i_1',
  278. lazyRender: true,
  279. mode: 'local',
  280. forceSelection: true,
  281. triggerAction: 'all',
  282. editable: false,
  283. disableKeyFilter: true,
  284. store: new Ext.data.ArrayStore({
  285. fields: ['mode','mode_txt'],
  286. data: [
  287. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  288. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  289. ]
  290. }),
  291. valueField: 'mode',
  292. displayField: 'mode_txt',
  293. value: '{$CBIV_A}',
  294. width: 120,
  295. listeners:{
  296. select: function( a, c, b ){
  297. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
  298. }
  299. }
  300. },{
  301. xtype: 'combo',
  302. id: 'sce_cb_i_2',
  303. lazyRender: true,
  304. mode: 'local',
  305. forceSelection: true,
  306. triggerAction: 'all',
  307. editable: false,
  308. disableKeyFilter: true,
  309. store: new Ext.data.ArrayStore({
  310. fields: ['mode','mode_txt'],
  311. data: [
  312. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  313. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  314. ]
  315. }),
  316. valueField: 'mode',
  317. displayField: 'mode_txt',
  318. value: '{$CBIV_B}',
  319. width: 120,
  320. listeners:{
  321. select: function( a, c, b ){
  322. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
  323. }
  324. }
  325. },{
  326. xtype: 'spacer',
  327. width: 120
  328. },{
  329. xtype: 'spacer',
  330. width: 120
  331. }]
  332. }
  333. DATA_BOUNDARY;
  334. break;
  335. };
  336. case 3: {
  337. $FFF='TCC ' . $Labels->GetLabel('___MODULE__');
  338. $OCB_SECTION=<<<DATA_BOUNDARY
  339. {
  340. xtype: 'panel',
  341. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  342. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  343. },{
  344. xtype: 'panel',
  345. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  346. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  347. },{
  348. xtype: 'panel',
  349. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  350. html: 'Health Signal'
  351. },{
  352. xtype: 'panel',
  353. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  354. html: 'AUX Signal'
  355. },{
  356. xtype: 'combo',
  357. id: 'sce_cb_o_1',
  358. lazyRender: true,
  359. mode: 'local',
  360. forceSelection: true,
  361. triggerAction: 'all',
  362. editable: false,
  363. disableKeyFilter: true,
  364. store: new Ext.data.ArrayStore({
  365. fields: ['mode','mode_txt'],
  366. data: [
  367. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  368. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  369. ]
  370. }),
  371. valueField: 'mode',
  372. displayField: 'mode_txt',
  373. value: '{$CBOV_A}',
  374. width: 120,
  375. listeners:{
  376. select: function( a, c, b ){
  377. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  378. }
  379. }
  380. },{
  381. xtype: 'combo',
  382. id: 'sce_cb_o_2',
  383. lazyRender: true,
  384. mode: 'local',
  385. forceSelection: true,
  386. triggerAction: 'all',
  387. editable: false,
  388. disableKeyFilter: true,
  389. store: new Ext.data.ArrayStore({
  390. fields: ['mode','mode_txt'],
  391. data: [
  392. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  393. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  394. ]
  395. }),
  396. valueField: 'mode',
  397. displayField: 'mode_txt',
  398. value: '{$CBOV_B}',
  399. width: 120,
  400. listeners:{
  401. select: function( a, c, b ){
  402. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  403. }
  404. }
  405. },{
  406. xtype: 'combo',
  407. id: 'sce_cb_o_3',
  408. lazyRender: true,
  409. mode: 'local',
  410. forceSelection: true,
  411. triggerAction: 'all',
  412. editable: false,
  413. disableKeyFilter: true,
  414. store: new Ext.data.ArrayStore({
  415. fields: ['mode','mode_txt'],
  416. data: [
  417. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  418. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  419. ]
  420. }),
  421. valueField: 'mode',
  422. displayField: 'mode_txt',
  423. value: '{$CBOV_C}',
  424. width: 120,
  425. listeners:{
  426. select: function( a, c, b ){
  427. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
  428. }
  429. }
  430. },{
  431. xtype: 'combo',
  432. id: 'sce_cb_o_4',
  433. lazyRender: true,
  434. mode: 'local',
  435. forceSelection: true,
  436. triggerAction: 'all',
  437. editable: false,
  438. disableKeyFilter: true,
  439. store: new Ext.data.ArrayStore({
  440. fields: ['mode','mode_txt'],
  441. data: [
  442. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  443. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  444. ]
  445. }),
  446. valueField: 'mode',
  447. displayField: 'mode_txt',
  448. value: '{$CBOV_D}',
  449. width: 120,
  450. listeners:{
  451. select: function( a, c, b ){
  452. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
  453. }
  454. }
  455. }
  456. DATA_BOUNDARY;
  457. $ICB_SECTION=<<<DATA_BOUNDARY
  458. {
  459. xtype: 'panel',
  460. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  461. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  462. },{
  463. xtype: 'panel',
  464. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  465. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  466. },{
  467. xtype: 'panel',
  468. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  469. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  470. },{
  471. xtype: 'panel',
  472. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  473. html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  474. },{
  475. xtype: 'spacer',
  476. height: 5,
  477. colspan: 4
  478. },{
  479. xtype: 'combo',
  480. id: 'sce_cb_i_1',
  481. lazyRender: true,
  482. mode: 'local',
  483. forceSelection: true,
  484. triggerAction: 'all',
  485. editable: false,
  486. disableKeyFilter: true,
  487. store: new Ext.data.ArrayStore({
  488. fields: ['mode','mode_txt'],
  489. data: [
  490. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  491. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  492. ]
  493. }),
  494. valueField: 'mode',
  495. displayField: 'mode_txt',
  496. value: '{$CBIV_A}',
  497. width: 120,
  498. listeners:{
  499. select: function( a, c, b ){
  500. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
  501. }
  502. }
  503. },{
  504. xtype: 'combo',
  505. id: 'sce_cb_i_2',
  506. lazyRender: true,
  507. mode: 'local',
  508. forceSelection: true,
  509. triggerAction: 'all',
  510. editable: false,
  511. disableKeyFilter: true,
  512. store: new Ext.data.ArrayStore({
  513. fields: ['mode','mode_txt'],
  514. data: [
  515. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  516. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  517. ]
  518. }),
  519. valueField: 'mode',
  520. displayField: 'mode_txt',
  521. value: '{$CBIV_B}',
  522. width: 120,
  523. listeners:{
  524. select: function( a, c, b ){
  525. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
  526. }
  527. }
  528. },{
  529. xtype: 'combo',
  530. id: 'sce_cb_i_3',
  531. lazyRender: true,
  532. mode: 'local',
  533. forceSelection: true,
  534. triggerAction: 'all',
  535. editable: false,
  536. disableKeyFilter: true,
  537. store: new Ext.data.ArrayStore({
  538. fields: ['mode','mode_txt'],
  539. data: [
  540. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  541. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  542. ]
  543. }),
  544. valueField: 'mode',
  545. displayField: 'mode_txt',
  546. value: '{$CBIV_C}',
  547. width: 120,
  548. listeners:{
  549. select: function( a, c, b ){
  550. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, b, false );
  551. }
  552. }
  553. },{
  554. xtype: 'combo',
  555. id: 'sce_cb_i_4',
  556. lazyRender: true,
  557. mode: 'local',
  558. forceSelection: true,
  559. triggerAction: 'all',
  560. editable: false,
  561. disableKeyFilter: true,
  562. store: new Ext.data.ArrayStore({
  563. fields: ['mode','mode_txt'],
  564. data: [
  565. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  566. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  567. ]
  568. }),
  569. valueField: 'mode',
  570. displayField: 'mode_txt',
  571. value: '{$CBIV_D}',
  572. width: 120,
  573. listeners:{
  574. select: function( a, c, b ){
  575. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, b, false );
  576. }
  577. }
  578. }]
  579. }
  580. DATA_BOUNDARY;
  581. break;
  582. };
  583. default: {
  584. $FFF='Not Assignet';
  585. $OCB_SECTION=<<<DATA_BOUNDARY
  586. {
  587. xtype: 'panel',
  588. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  589. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  590. },{
  591. xtype: 'panel',
  592. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  593. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  594. },{
  595. xtype: 'panel',
  596. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  597. html: 'Health Signal'
  598. },{
  599. xtype: 'panel',
  600. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  601. html: 'AUX Signal'
  602. },{
  603. xtype: 'combo',
  604. id: 'sce_cb_o_1',
  605. lazyRender: true,
  606. mode: 'local',
  607. forceSelection: true,
  608. triggerAction: 'all',
  609. editable: false,
  610. disableKeyFilter: true,
  611. store: new Ext.data.ArrayStore({
  612. fields: ['mode','mode_txt'],
  613. data: [
  614. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  615. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  616. ]
  617. }),
  618. valueField: 'mode',
  619. displayField: 'mode_txt',
  620. value: '{$CBOV_A}',
  621. width: 120,
  622. listeners:{
  623. select: function( a, c, b ){
  624. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  625. }
  626. }
  627. },{
  628. xtype: 'combo',
  629. id: 'sce_cb_o_2',
  630. lazyRender: true,
  631. mode: 'local',
  632. forceSelection: true,
  633. triggerAction: 'all',
  634. editable: false,
  635. disableKeyFilter: true,
  636. store: new Ext.data.ArrayStore({
  637. fields: ['mode','mode_txt'],
  638. data: [
  639. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  640. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  641. ]
  642. }),
  643. valueField: 'mode',
  644. displayField: 'mode_txt',
  645. value: '{$CBOV_B}',
  646. width: 120,
  647. listeners:{
  648. select: function( a, c, b ){
  649. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  650. }
  651. }
  652. },{
  653. xtype: 'combo',
  654. id: 'sce_cb_o_3',
  655. lazyRender: true,
  656. mode: 'local',
  657. forceSelection: true,
  658. triggerAction: 'all',
  659. editable: false,
  660. disableKeyFilter: true,
  661. store: new Ext.data.ArrayStore({
  662. fields: ['mode','mode_txt'],
  663. data: [
  664. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  665. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  666. ]
  667. }),
  668. valueField: 'mode',
  669. displayField: 'mode_txt',
  670. value: '{$CBOV_C}',
  671. width: 120,
  672. listeners:{
  673. select: function( a, c, b ){
  674. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
  675. }
  676. }
  677. },{
  678. xtype: 'combo',
  679. id: 'sce_cb_o_4',
  680. lazyRender: true,
  681. mode: 'local',
  682. forceSelection: true,
  683. triggerAction: 'all',
  684. editable: false,
  685. disableKeyFilter: true,
  686. store: new Ext.data.ArrayStore({
  687. fields: ['mode','mode_txt'],
  688. data: [
  689. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  690. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  691. ]
  692. }),
  693. valueField: 'mode',
  694. displayField: 'mode_txt',
  695. value: '{$CBOV_D}',
  696. width: 120,
  697. listeners:{
  698. select: function( a, c, b ){
  699. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
  700. }
  701. }
  702. }
  703. DATA_BOUNDARY;
  704. $ICB_SECTION=<<<DATA_BOUNDARY
  705. {
  706. xtype: 'panel',
  707. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  708. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  709. },{
  710. xtype: 'panel',
  711. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  712. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  713. },{
  714. xtype: 'panel',
  715. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  716. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  717. },{
  718. xtype: 'panel',
  719. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  720. html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  721. },{
  722. xtype: 'spacer',
  723. height: 5,
  724. colspan: 4
  725. },{
  726. xtype: 'combo',
  727. id: 'sce_cb_i_1',
  728. lazyRender: true,
  729. mode: 'local',
  730. forceSelection: true,
  731. triggerAction: 'all',
  732. editable: false,
  733. disableKeyFilter: true,
  734. store: new Ext.data.ArrayStore({
  735. fields: ['mode','mode_txt'],
  736. data: [
  737. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  738. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  739. ]
  740. }),
  741. valueField: 'mode',
  742. displayField: 'mode_txt',
  743. value: '{$CBIV_A}',
  744. width: 120,
  745. listeners:{
  746. select: function( a, c, b ){
  747. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
  748. }
  749. }
  750. },{
  751. xtype: 'combo',
  752. id: 'sce_cb_i_2',
  753. lazyRender: true,
  754. mode: 'local',
  755. forceSelection: true,
  756. triggerAction: 'all',
  757. editable: false,
  758. disableKeyFilter: true,
  759. store: new Ext.data.ArrayStore({
  760. fields: ['mode','mode_txt'],
  761. data: [
  762. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  763. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  764. ]
  765. }),
  766. valueField: 'mode',
  767. displayField: 'mode_txt',
  768. value: '{$CBIV_B}',
  769. width: 120,
  770. listeners:{
  771. select: function( a, c, b ){
  772. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
  773. }
  774. }
  775. },{
  776. xtype: 'combo',
  777. id: 'sce_cb_i_3',
  778. lazyRender: true,
  779. mode: 'local',
  780. forceSelection: true,
  781. triggerAction: 'all',
  782. editable: false,
  783. disableKeyFilter: true,
  784. store: new Ext.data.ArrayStore({
  785. fields: ['mode','mode_txt'],
  786. data: [
  787. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  788. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  789. ]
  790. }),
  791. valueField: 'mode',
  792. displayField: 'mode_txt',
  793. value: '{$CBIV_C}',
  794. width: 120,
  795. listeners:{
  796. select: function( a, c, b ){
  797. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, b, false );
  798. }
  799. }
  800. },{
  801. xtype: 'combo',
  802. id: 'sce_cb_i_4',
  803. lazyRender: true,
  804. mode: 'local',
  805. forceSelection: true,
  806. triggerAction: 'all',
  807. editable: false,
  808. disableKeyFilter: true,
  809. store: new Ext.data.ArrayStore({
  810. fields: ['mode','mode_txt'],
  811. data: [
  812. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  813. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  814. ]
  815. }),
  816. valueField: 'mode',
  817. displayField: 'mode_txt',
  818. value: '{$CBIV_D}',
  819. width: 120,
  820. listeners:{
  821. select: function( a, c, b ){
  822. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, b, false );
  823. }
  824. }
  825. }]
  826. }
  827. DATA_BOUNDARY;
  828. };
  829. };
  830. $MODBUS=<<<DATA_BOUNDARY
  831. {
  832. xtype: 'panel',
  833. l00ayout: 'table',
  834. id: 'c_sca_e_panel',
  835. border: false,
  836. frame: false,
  837. c_do_val: {$CCCV},
  838. c_in_val: {$CIVA},
  839. width: '100%',
  840. items:[{
  841. xtype: 'panel',
  842. layout: 'table',
  843. border: false,
  844. frame: false,
  845. width: '100%',
  846. defaults: { bodyStyle:'padding:10px; text-align: center;'},
  847. layoutConfig: { columns: 2 },
  848. items:[{
  849. xtype: 'panel',
  850. border: false,
  851. frame: false,
  852. width: 160,
  853. html: '<table width="128px" border=0><tr><td class="medium_prop_logo" id="adam">&nbsp;</td></tr></table>'
  854. },{
  855. xtype: 'form',
  856. border: false,
  857. frame: false,
  858. labelWidth: 100,
  859. labelAlign: 'right',
  860. width: '100%',
  861. items:[{
  862. xtype: 'panel',
  863. border: false,
  864. frame: false,
  865. html: '<table width="100%" border=0><tr><td class="small_prop_title" align="center" style="font-size: 14px; font-weight: bold;">{$Labels->GetLabel('_MODBUS_RTU_')}:{$FFF}</td><td><img id="scae_onl_sts" src="/style/assets/bul_gray.png"></td></tr></table>'
  866. },{
  867. xtype: 'spacer',
  868. height: 5
  869. },{
  870. xtype: 'combo',
  871. id: 'sca_func',
  872. fieldLabel: "{$Labels->GetLabel('_MO_FUNC_')}",
  873. lazyRender: true,
  874. mode: 'local',
  875. forceSelection: true,
  876. triggerAction: 'all',
  877. editable: false,
  878. disableKeyFilter: true,
  879. store: new Ext.data.ArrayStore({
  880. fields: ['mode','mode_txt'],
  881. data: [
  882. ['0','{$Labels->GetLabel('__DEFAULT__')}'],
  883. ['1','{$SN['left_side']} {$Labels->GetLabel('___MODULE__')}'],
  884. ['2','{$SN['right_side']} {$Labels->GetLabel('___MODULE__')}'],
  885. ['3','TCC Module']
  886. ]
  887. }),
  888. valueField: 'mode',
  889. displayField: 'mode_txt',
  890. value: '{$SC['func']}',
  891. width: 200,
  892. listeners:{
  893. select: function( a, c, b ){
  894. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, b, true );
  895. }
  896. }
  897. },{
  898. xtype: 'combo',
  899. id: 'sca_ena',
  900. fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
  901. lazyRender: true,
  902. mode: 'local',
  903. forceSelection: true,
  904. triggerAction: 'all',
  905. editable: false,
  906. disableKeyFilter: true,
  907. store: new Ext.data.ArrayStore({
  908. fields: ['mode','mode_txt'],
  909. data: [
  910. ['D','{$Labels->GetLabel('__DISABLED__')}'],
  911. ['E','{$Labels->GetLabel('___ENABLED__')}']
  912. ]
  913. }),
  914. valueField: 'mode',
  915. displayField: 'mode_txt',
  916. value: '{$SC['wm']}',
  917. width: 200,
  918. listeners:{
  919. select: function( a, c, b ){
  920. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 17, b, true );
  921. }
  922. }
  923. },{
  924. xtype: 'textfield',
  925. id: 'sca_ip',
  926. fieldLabel: '{$Labels->GetLabel('_DEVICE_IP_')}',
  927. maxlength: 64,
  928. value: '{$SC['ip4']}',
  929. listeners:{
  930. change: function( a, c, b ){
  931. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 15, c, true );
  932. }
  933. }
  934. },{
  935. xtype: 'textfield',
  936. id: 'sca_port',
  937. fieldLabel: '{$Labels->GetLabel('_DEVICE_PORT_')}',
  938. maxlength: 2,
  939. value: '{$SC['port']}',
  940. listeners:{
  941. change: function( a, c, b ){
  942. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 16, c, true );
  943. }
  944. }
  945. }]
  946. }]
  947. },{
  948. xtype: 'panel',
  949. layout: 'table',
  950. border: true,
  951. frame: false,
  952. width: '100%',
  953. defaults: { bodyStyle:'padding:10px; text-align: center;' },
  954. layoutConfig: { columns: 4 },
  955. items:[{$OCB_SECTION},{
  956. xtype: 'spacer',
  957. height: 10,
  958. colspan: 4
  959. },{
  960. xtype: 'button',
  961. id: 'sc_tbtn_1',
  962. enableToggle: true,
  963. allowDepress: true,
  964. width: '80%',
  965. text: 'Test D0',
  966. pressed: {$P1},
  967. disabled: true,
  968. handler: function( b, e ){
  969. b.disable();
  970. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  971. if( b.pressed ){
  972. //{$CCCV}
  973. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 1 )& 0xFF), false );
  974. } else {
  975. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~1 ) ) & 0xFF), false );
  976. };
  977. }
  978. },{
  979. xtype: 'button',
  980. id: 'sc_tbtn_2',
  981. width: '80%',
  982. enableToggle: true,
  983. allowDepress: true,
  984. text: 'Test D1',
  985. pressed: {$P2},
  986. disabled: true,
  987. handler: function( b, e ){
  988. b.disable();
  989. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  990. if( b.pressed ){
  991. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 2 )& 0xFF), false );
  992. } else {
  993. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~2 ) ) & 0xFF), false );
  994. };
  995. }
  996. },{
  997. xtype: 'button',
  998. id: 'sc_tbtn_3',
  999. enableToggle: true,
  1000. allowDepress: true,
  1001. width: '80%',
  1002. text: 'Test D2',
  1003. pressed: {$P3},
  1004. disabled: true,
  1005. handler: function( b, e ){
  1006. b.disable();
  1007. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1008. if( b.pressed ){
  1009. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 4 )& 0xFF), false );
  1010. } else {
  1011. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~4 ) ) & 0xFF), false );
  1012. };
  1013. }
  1014. },{
  1015. xtype: 'button',
  1016. id: 'sc_tbtn_4',
  1017. enableToggle: true,
  1018. allowDepress: true,
  1019. width: '80%',
  1020. text: 'Test D3',
  1021. pressed: {$P4},
  1022. disabled: true,
  1023. handler: function( b, e ){
  1024. b.disable();
  1025. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1026. if( b.pressed ){
  1027. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 8 )& 0xFF), false );
  1028. } else {
  1029. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~8 ) )& 0xFF ), false );
  1030. };
  1031. }
  1032. },{
  1033. xtype: 'spacer',
  1034. height: 5,
  1035. colspan: 4
  1036. },{$ICB_SECTION},{
  1037. xtype: 'spacer',
  1038. height: 5,
  1039. colspan: 4
  1040. },{
  1041. xtype: 'button',
  1042. text: 'Remove this Scada Module',
  1043. width: '100%',
  1044. handler: function(){
  1045. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 19, 'true', true );
  1046. }
  1047. }],
  1048. listeners: {
  1049. afterrender: function( panel ){
  1050. fetchScadaEditorStatus();
  1051. },
  1052. beforedestroy: function(panel) {
  1053. stopScadaEditorStatusUpdate();
  1054. }
  1055. }
  1056. }
  1057. DATA_BOUNDARY;
  1058. echo $MODBUS;
  1059. } else {
  1060. echo '{ xtype: \'panel\', html: \'Node '.$_POST['EID'].' Loadded\'}';
  1061. };
  1062. } else {
  1063. header('location: /');
  1064. };
  1065. ?>