|
|
@ -12,6 +12,29 @@ |
|
|
if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false'; |
|
|
if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false'; |
|
|
if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = 'false'; |
|
|
if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = 'false'; |
|
|
if( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true'; else $P4 = 'false'; |
|
|
if( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true'; else $P4 = 'false'; |
|
|
|
|
|
$QS = "SELECT `left_side`,`right_side` FROM `metro_platforms` WHERE `id`={$SC['platform_id']}"; |
|
|
|
|
|
$ZZ = $DATABASE->Query( $QS, false ); |
|
|
|
|
|
$SN = $ZZ[0]; |
|
|
|
|
|
switch($SC['func']){ |
|
|
|
|
|
case 1: $FFF=$SN['left_side'] . ' ' . $Labels->GetLabel('___SIDE__'); break; |
|
|
|
|
|
case 2: $FFF=$SN['right_side'] . ' ' . $Labels->GetLabel('___SIDE__'); break; |
|
|
|
|
|
case 3: $FFF='TCC ' . $Labels->GetLabel('___MODULE__'); break; |
|
|
|
|
|
default: $FFF='Not Assignet'; |
|
|
|
|
|
}; |
|
|
|
|
|
$QS="SELECT `short` FROM `metro_tracks` WHERE `side`='U' AND `platform_id`={$SC['platform_id']}"; |
|
|
|
|
|
$ZZ = $DATABASE->Query( $QS, false ); |
|
|
|
|
|
$UTN = $ZZ[0]['short']; |
|
|
|
|
|
$QS="SELECT `short` FROM `metro_tracks` WHERE `side`='B' AND `platform_id`={$SC['platform_id']}"; |
|
|
|
|
|
$ZZ = $DATABASE->Query( $QS, false ); |
|
|
|
|
|
$BTN = $ZZ[0]['short']; |
|
|
|
|
|
$CBOV_A =( intval($SC['crossbar_a']) & 0x0F ); |
|
|
|
|
|
$CBOV_B =( intval($SC['crossbar_a']) & 0x0F ); |
|
|
|
|
|
$CBOV_C =( intval($SC['crossbar_a']) & 0x0F ); |
|
|
|
|
|
$CBOV_D =( intval($SC['crossbar_a']) & 0x0F ); |
|
|
|
|
|
$CBIV_A =( intval($SC['crossbar_a']) >> 4 ); |
|
|
|
|
|
$CBIV_B =( intval($SC['crossbar_a']) >> 4 ); |
|
|
|
|
|
$CBIV_C =( intval($SC['crossbar_a']) >> 4 ); |
|
|
|
|
|
$CBIV_D =( intval($SC['crossbar_a']) >> 4 ); |
|
|
$MODBUS=<<<DATA_BOUNDARY |
|
|
$MODBUS=<<<DATA_BOUNDARY |
|
|
{ |
|
|
{ |
|
|
xtype: 'panel', |
|
|
xtype: 'panel', |
|
|
@ -44,19 +67,36 @@ |
|
|
xtype: 'panel', |
|
|
xtype: 'panel', |
|
|
border: false, |
|
|
border: false, |
|
|
frame: false, |
|
|
frame: false, |
|
|
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_')}:{$SC['label']}</td><td><img id="scae_onl_sts" src="/style/assets/bul_gray.png"></td></tr></table>' |
|
|
|
|
|
|
|
|
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>' |
|
|
},{ |
|
|
},{ |
|
|
xtype: 'spacer', |
|
|
xtype: 'spacer', |
|
|
height: 5 |
|
|
height: 5 |
|
|
},{ |
|
|
},{ |
|
|
xtype: 'textfield', |
|
|
|
|
|
id: 'sca_label', |
|
|
|
|
|
fieldLabel: '{$Labels->GetLabel('_NAME_LABEL_')}', |
|
|
|
|
|
maxlength: 64, |
|
|
|
|
|
value: '{$SC['label']}', |
|
|
|
|
|
|
|
|
xtype: 'combo', |
|
|
|
|
|
id: 'sca_func', |
|
|
|
|
|
fieldLabel: "{$Labels->GetLabel('_MO_FUNC_')}", |
|
|
|
|
|
lazyRender: true, |
|
|
|
|
|
mode: 'local', |
|
|
|
|
|
forceSelection: true, |
|
|
|
|
|
triggerAction: 'all', |
|
|
|
|
|
editable: false, |
|
|
|
|
|
disableKeyFilter: true, |
|
|
|
|
|
store: new Ext.data.ArrayStore({ |
|
|
|
|
|
fields: ['mode','mode_txt'], |
|
|
|
|
|
data: [ |
|
|
|
|
|
['0','{$Labels->GetLabel('__DEFAULT__')}'], |
|
|
|
|
|
['1','{$SN['left_side']} {$Labels->GetLabel('___MODULE__')}'], |
|
|
|
|
|
['2','{$SN['right_side']} {$Labels->GetLabel('___MODULE__')}'], |
|
|
|
|
|
['3','TCC Module'] |
|
|
|
|
|
] |
|
|
|
|
|
}), |
|
|
|
|
|
valueField: 'mode', |
|
|
|
|
|
displayField: 'mode_txt', |
|
|
|
|
|
value: '{$SC['func']}', |
|
|
|
|
|
width: 200, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
change: function( a, c, b ){ |
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, c, true ); |
|
|
|
|
|
|
|
|
select: function( a, c, b ){ |
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, b, true ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
},{ |
|
|
},{ |
|
|
@ -120,11 +160,11 @@ |
|
|
items:[{ |
|
|
items:[{ |
|
|
xtype: 'panel', |
|
|
xtype: 'panel', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
html: 'Upper Track' |
|
|
|
|
|
|
|
|
html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}' |
|
|
},{ |
|
|
},{ |
|
|
xtype: 'panel', |
|
|
xtype: 'panel', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
html: 'Bottom Track' |
|
|
|
|
|
|
|
|
html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}' |
|
|
},{ |
|
|
},{ |
|
|
xtype: 'panel', |
|
|
xtype: 'panel', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;', |
|
|
@ -146,12 +186,12 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Coil D1'],[2,'Coil D2'],[3,'Coil D3'],[4,'Coil D4'] |
|
|
|
|
|
|
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '0', |
|
|
|
|
|
|
|
|
value: '{$CBOV_A}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
@ -171,12 +211,12 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Coil D1'],[2,'Coil D2'],[3,'Coil D3'],[4,'Coil D4'] |
|
|
|
|
|
|
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '0', |
|
|
|
|
|
|
|
|
value: '{$CBOV_B}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
@ -196,12 +236,12 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Coil D1'],[2,'Coil D2'],[3,'Coil D3'],[4,'Coil D4'] |
|
|
|
|
|
|
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '0', |
|
|
|
|
|
|
|
|
value: '{$CBOV_C}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
@ -221,12 +261,12 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Coil D1'],[2,'Coil D2'],[3,'Coil D3'],[4,'Coil D4'] |
|
|
|
|
|
|
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '0', |
|
|
|
|
|
|
|
|
value: '{$CBOV_D}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
@ -243,7 +283,7 @@ |
|
|
enableToggle: true, |
|
|
enableToggle: true, |
|
|
allowDepress: true, |
|
|
allowDepress: true, |
|
|
width: '80%', |
|
|
width: '80%', |
|
|
text: 'Test D1', |
|
|
|
|
|
|
|
|
text: 'Test D0', |
|
|
pressed: {$P1}, |
|
|
pressed: {$P1}, |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
handler: function( b, e ){ |
|
|
handler: function( b, e ){ |
|
|
@ -260,7 +300,7 @@ |
|
|
width: '80%', |
|
|
width: '80%', |
|
|
enableToggle: true, |
|
|
enableToggle: true, |
|
|
allowDepress: true, |
|
|
allowDepress: true, |
|
|
text: 'Test D2', |
|
|
|
|
|
|
|
|
text: 'Test D1', |
|
|
pressed: {$P2}, |
|
|
pressed: {$P2}, |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
handler: function( b, e ){ |
|
|
handler: function( b, e ){ |
|
|
@ -277,7 +317,7 @@ |
|
|
enableToggle: true, |
|
|
enableToggle: true, |
|
|
allowDepress: true, |
|
|
allowDepress: true, |
|
|
width: '80%', |
|
|
width: '80%', |
|
|
text: 'Test D3', |
|
|
|
|
|
|
|
|
text: 'Test D2', |
|
|
pressed: {$P3}, |
|
|
pressed: {$P3}, |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
handler: function( b, e ){ |
|
|
handler: function( b, e ){ |
|
|
@ -294,7 +334,7 @@ |
|
|
enableToggle: true, |
|
|
enableToggle: true, |
|
|
allowDepress: true, |
|
|
allowDepress: true, |
|
|
width: '80%', |
|
|
width: '80%', |
|
|
text: 'Test D4', |
|
|
|
|
|
|
|
|
text: 'Test D3', |
|
|
pressed: {$P4}, |
|
|
pressed: {$P4}, |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
handler: function( b, e ){ |
|
|
handler: function( b, e ){ |
|
|
@ -342,16 +382,16 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Upper Track'],[2,'Bottom Track'],[3,'Both'] |
|
|
|
|
|
|
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '-1', |
|
|
|
|
|
|
|
|
value: '{$CBIV_A}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
|
|
|
|
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
},{ |
|
|
},{ |
|
|
@ -367,16 +407,16 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Upper Track'],[2,'Bottom Track'],[3,'Both'] |
|
|
|
|
|
|
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '-1', |
|
|
|
|
|
|
|
|
value: '{$CBIV_B}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
|
|
|
|
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
},{ |
|
|
},{ |
|
|
@ -392,16 +432,16 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Upper Track'],[2,'Bottom Track'],[3,'Both'] |
|
|
|
|
|
|
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '-1', |
|
|
|
|
|
|
|
|
value: '{$CBIV_C}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
|
|
|
|
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, b, false ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
},{ |
|
|
},{ |
|
|
@ -417,16 +457,16 @@ |
|
|
fields: ['mode','mode_txt'], |
|
|
fields: ['mode','mode_txt'], |
|
|
data: [ |
|
|
data: [ |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[0,'{$Labels->GetLabel('__DISABLED__')}'], |
|
|
[1,'Upper Track'],[2,'Bottom Track'],[3,'Both'] |
|
|
|
|
|
|
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX'] |
|
|
] |
|
|
] |
|
|
}), |
|
|
}), |
|
|
valueField: 'mode', |
|
|
valueField: 'mode', |
|
|
displayField: 'mode_txt', |
|
|
displayField: 'mode_txt', |
|
|
value: '-1', |
|
|
|
|
|
|
|
|
value: '{$CBIV_D}', |
|
|
width: 120, |
|
|
width: 120, |
|
|
listeners:{ |
|
|
listeners:{ |
|
|
select: function( a, c, b ){ |
|
|
select: function( a, c, b ){ |
|
|
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
|
|
|
|
|
|
|
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, b, false ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}] |
|
|
}] |
|
|
|