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.
1065 lines
28 KiB
1065 lines
28 KiB
<?php
|
|
require_once('../ajax_asm.php');
|
|
require_once('../php/argus/server.php');
|
|
if( $CUser->Data['id'] > 1 ){
|
|
$EID = intval( $_POST['MID'] );
|
|
$QS = "SELECT * FROM `modbus_modules` WHERE `id`={$EID}";
|
|
$Result = $DATABASE->Query( $QS, false );
|
|
if( count( $Result ) ){
|
|
$SC = $Result[0];
|
|
$CCCV = intval( $SC['values'] );
|
|
$CIVA = ( $CCCV >> 8 ) & 0xFF;
|
|
if( ( $CCCV & 0x01 ) == 0x01 ) $P1 = 'true'; else $P1 = 'false';
|
|
if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false';
|
|
if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = '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];
|
|
$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 );
|
|
switch($SC['func']){
|
|
case 1: {
|
|
$FFF=$SN['left_side'] . ' ' . $Labels->GetLabel('___SIDE__');
|
|
$OCB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'spacer'
|
|
}
|
|
DATA_BOUNDARY;
|
|
$ICB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'spacer'
|
|
},{
|
|
xtype: 'spacer'
|
|
}]
|
|
}
|
|
DATA_BOUNDARY;
|
|
break;
|
|
};
|
|
case 2: {
|
|
$FFF=$SN['right_side'] . ' ' . $Labels->GetLabel('___SIDE__');
|
|
$OCB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
}
|
|
DATA_BOUNDARY;
|
|
$ICB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
},{
|
|
xtype: 'spacer',
|
|
width: 120
|
|
}]
|
|
}
|
|
DATA_BOUNDARY;
|
|
break;
|
|
};
|
|
case 3: {
|
|
$FFF='TCC ' . $Labels->GetLabel('___MODULE__');
|
|
$OCB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'Health Signal'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'AUX Signal'
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_3',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_C}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_4',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_D}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
|
|
}
|
|
}
|
|
}
|
|
DATA_BOUNDARY;
|
|
$ICB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_3',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_C}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_4',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_D}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, b, false );
|
|
}
|
|
}
|
|
}]
|
|
}
|
|
DATA_BOUNDARY;
|
|
break;
|
|
};
|
|
default: {
|
|
$FFF='Not Assignet';
|
|
$OCB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'Health Signal'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'AUX Signal'
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_3',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_C}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_o_4',
|
|
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('__DISABLED__')}'],
|
|
[1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBOV_D}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
|
|
}
|
|
}
|
|
}
|
|
DATA_BOUNDARY;
|
|
$ICB_SECTION=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'panel',
|
|
bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
|
|
html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_1',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_A}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_2',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_B}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_3',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_C}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, b, false );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sce_cb_i_4',
|
|
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('__DISABLED__')}'],
|
|
[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$CBIV_D}',
|
|
width: 120,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, b, false );
|
|
}
|
|
}
|
|
}]
|
|
}
|
|
DATA_BOUNDARY;
|
|
};
|
|
};
|
|
$MODBUS=<<<DATA_BOUNDARY
|
|
{
|
|
xtype: 'panel',
|
|
l00ayout: 'table',
|
|
id: 'c_sca_e_panel',
|
|
border: false,
|
|
frame: false,
|
|
c_do_val: {$CCCV},
|
|
c_in_val: {$CIVA},
|
|
width: '100%',
|
|
items:[{
|
|
xtype: 'panel',
|
|
layout: 'table',
|
|
border: false,
|
|
frame: false,
|
|
width: '100%',
|
|
defaults: { bodyStyle:'padding:10px; text-align: center;'},
|
|
layoutConfig: { columns: 2 },
|
|
items:[{
|
|
xtype: 'panel',
|
|
border: false,
|
|
frame: false,
|
|
width: 160,
|
|
html: '<table width="128px" border=0><tr><td class="medium_prop_logo" id="adam"> </td></tr></table>'
|
|
},{
|
|
xtype: 'form',
|
|
border: false,
|
|
frame: false,
|
|
labelWidth: 100,
|
|
labelAlign: 'right',
|
|
width: '100%',
|
|
items:[{
|
|
xtype: 'panel',
|
|
border: 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_')}:{$FFF}</td><td><img id="scae_onl_sts" src="/style/assets/bul_gray.png"></td></tr></table>'
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5
|
|
},{
|
|
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:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, b, true );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'combo',
|
|
id: 'sca_ena',
|
|
fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
|
|
lazyRender: true,
|
|
mode: 'local',
|
|
forceSelection: true,
|
|
triggerAction: 'all',
|
|
editable: false,
|
|
disableKeyFilter: true,
|
|
store: new Ext.data.ArrayStore({
|
|
fields: ['mode','mode_txt'],
|
|
data: [
|
|
['D','{$Labels->GetLabel('__DISABLED__')}'],
|
|
['E','{$Labels->GetLabel('___ENABLED__')}']
|
|
]
|
|
}),
|
|
valueField: 'mode',
|
|
displayField: 'mode_txt',
|
|
value: '{$SC['wm']}',
|
|
width: 200,
|
|
listeners:{
|
|
select: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 17, b, true );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'textfield',
|
|
id: 'sca_ip',
|
|
fieldLabel: '{$Labels->GetLabel('_DEVICE_IP_')}',
|
|
maxlength: 64,
|
|
value: '{$SC['ip4']}',
|
|
listeners:{
|
|
change: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 15, c, true );
|
|
}
|
|
}
|
|
},{
|
|
xtype: 'textfield',
|
|
id: 'sca_port',
|
|
fieldLabel: '{$Labels->GetLabel('_DEVICE_PORT_')}',
|
|
maxlength: 2,
|
|
value: '{$SC['port']}',
|
|
listeners:{
|
|
change: function( a, c, b ){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 16, c, true );
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
},{
|
|
xtype: 'panel',
|
|
layout: 'table',
|
|
border: true,
|
|
frame: false,
|
|
width: '100%',
|
|
defaults: { bodyStyle:'padding:10px; text-align: center;' },
|
|
layoutConfig: { columns: 4 },
|
|
items:[{$OCB_SECTION},{
|
|
xtype: 'spacer',
|
|
height: 10,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'button',
|
|
id: 'sc_tbtn_1',
|
|
enableToggle: true,
|
|
allowDepress: true,
|
|
width: '80%',
|
|
text: 'Test D0',
|
|
pressed: {$P1},
|
|
disabled: true,
|
|
handler: function( b, e ){
|
|
b.disable();
|
|
var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
|
|
if( b.pressed ){
|
|
//{$CCCV}
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 1 )& 0xFF), false );
|
|
} else {
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~1 ) ) & 0xFF), false );
|
|
};
|
|
}
|
|
},{
|
|
xtype: 'button',
|
|
id: 'sc_tbtn_2',
|
|
width: '80%',
|
|
enableToggle: true,
|
|
allowDepress: true,
|
|
text: 'Test D1',
|
|
pressed: {$P2},
|
|
disabled: true,
|
|
handler: function( b, e ){
|
|
b.disable();
|
|
var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
|
|
if( b.pressed ){
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 2 )& 0xFF), false );
|
|
} else {
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~2 ) ) & 0xFF), false );
|
|
};
|
|
}
|
|
},{
|
|
xtype: 'button',
|
|
id: 'sc_tbtn_3',
|
|
enableToggle: true,
|
|
allowDepress: true,
|
|
width: '80%',
|
|
text: 'Test D2',
|
|
pressed: {$P3},
|
|
disabled: true,
|
|
handler: function( b, e ){
|
|
b.disable();
|
|
var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
|
|
if( b.pressed ){
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 4 )& 0xFF), false );
|
|
} else {
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~4 ) ) & 0xFF), false );
|
|
};
|
|
}
|
|
},{
|
|
xtype: 'button',
|
|
id: 'sc_tbtn_4',
|
|
enableToggle: true,
|
|
allowDepress: true,
|
|
width: '80%',
|
|
text: 'Test D3',
|
|
pressed: {$P4},
|
|
disabled: true,
|
|
handler: function( b, e ){
|
|
b.disable();
|
|
var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
|
|
if( b.pressed ){
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 8 )& 0xFF), false );
|
|
} else {
|
|
doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~8 ) )& 0xFF ), false );
|
|
};
|
|
}
|
|
},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{$ICB_SECTION},{
|
|
xtype: 'spacer',
|
|
height: 5,
|
|
colspan: 4
|
|
},{
|
|
xtype: 'button',
|
|
text: 'Remove this Scada Module',
|
|
width: '100%',
|
|
handler: function(){
|
|
doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 19, 'true', true );
|
|
}
|
|
}],
|
|
listeners: {
|
|
afterrender: function( panel ){
|
|
fetchScadaEditorStatus();
|
|
},
|
|
beforedestroy: function(panel) {
|
|
stopScadaEditorStatusUpdate();
|
|
}
|
|
}
|
|
}
|
|
DATA_BOUNDARY;
|
|
echo $MODBUS;
|
|
} else {
|
|
echo '{ xtype: \'panel\', html: \'Node '.$_POST['EID'].' Loadded\'}';
|
|
};
|
|
} else {
|
|
header('location: /');
|
|
};
|
|
?>
|