V 10
1
LANG:1 8 (NoName)
PANEL,375 385 636 540 N "_3DFace" 0
EEE E E 1 -1 -1 0  180 20
"" 0 1
EE 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
2 17
"Text2"
""
1 180 20 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E
 E E
6 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 182 22 472 46
0 2 0 "s" 0 0 0 192 0 0  182 22
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-180-100-100-*-*-iso8859-1|-21,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 22 SR GLOBAL DCS OVERVIEW
2 19
"Text4"
""
1 13 69 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E
 E E
8 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 15 71 95 90
0 2 0 "s" 0 0 0 192 0 0  15 71
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 8 COOLING:
2 20
"Text5"
""
1 20 174 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E
 E E
9 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 22 176 148 195
0 2 0 "s" 0 0 0 192 0 0  22 176
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 12 ENVIRONMENT:
2 21
"Text6"
""
1 20 371 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E
 E E
10 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 22 373 109 411
0 2 0 "s" 0 0 0 192 0 0  22 373
 2
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 6 POWER 
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 9 SUPPLIES:
2 22
"Text7"
""
1 19 271 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E
 E E
11 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 21 273 130 311
0 2 0 "s" 0 0 0 192 0 0  21 273
 2
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 8 THERMAL 
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 10 ENCLOSURE:
2 25
"COOL_alarm"
""
1 262 109 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
14 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
dyn_errClass err;
string systemName = getSystemName(40);

  if( dpSubStr( systemName+\"PLC_Status.Status:_original.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            systemName+\"PLC_Status.Status:_online.._value\");

  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp1, string Status)
{

	setValue(\"\", \"text\", Status );

  if ( Status == \"OK\" ) setValue( \"\", \"backCol\", \"Green\" );
  else if ( Status == \"Warning\" ) setValue( \"\", \"backCol\", \"Yellow\" );
  else if ( Status == \"Alarm\" ) setValue( \"\", \"backCol\", \"alarmKamUnq\" );
  else setValue( \"\", \"backCol\", \"alarmKamUnq\" );
}" 0
 E 0 1 1 0 1 E U  1 E 264 111 330 127
1 2 0 "s" 0 0 0 65 0 0  264 111
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 11 COOL_status
2 31
"Text12"
""
1 208 279 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
20 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 281 256 296
0 2 0 "s" 0 0 0 192 0 0  210 281
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 6 STATUS
2 34
"Text14"
""
1 208 109 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
23 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 111 256 126
0 2 0 "s" 0 0 0 192 0 0  210 111
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 6 STATUS
2 35
"COOL_status"
""
1 262 79 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
24 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
dyn_errClass err;
string systemName = getSystemName(40);

  if( dpSubStr( systemName+\"PLC_State.State:_original.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\", systemName+\"PLC_State.State:_online.._value\");

  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp1, string State)
{
	setValue(\"\", \"text\", State );

  if ( State == \"Ready\" ) setValue( \"\", \"backCol\", \"Green\" );
  else setValue( \"\", \"backCol\", \"alarmKamUnq\" );
}" 0
 E 0 1 1 0 1 E U  1 E 264 81 330 97
1 2 0 "s" 0 0 0 65 0 0  264 81
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 10 COOL_state
2 36
"Text16"
""
1 208 79 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
25 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 81 247 96
0 2 0 "s" 0 0 0 192 0 0  210 81
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 STATE
2 38
"Text18"
""
1 208 179 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
27 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 181 256 196
0 2 0 "s" 0 0 0 192 0 0  210 181
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 6 STATUS
2 39
"Text19"
""
1 208 209 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
28 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 211 251 226
0 2 0 "s" 0 0 0 192 0 0  210 211
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 ALARM
2 42
"Text22"
""
1 208 309 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
31 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 311 251 326
0 2 0 "s" 0 0 0 192 0 0  210 311
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 ALARM
2 43
"Text23"
""
1 208 379 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
32 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 381 256 396
0 2 0 "s" 0 0 0 192 0 0  210 381
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 6 STATUS
2 44
"PS_status"
""
1 262 379 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
33 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setBackColor();
}

EP_textFieldIn()
{
dyn_errClass err;

  if( dpSubStr( getSystemName()+\"PS.state:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            getSystemName()+\"PS.state:_online.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp, int iNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setBackColor()
{
dyn_errClass err;
string systemName=getSystemName();

  dpConnect(\"EP_setBackColorCB\", 
            systemName+\"PS.state:_online.._value\",
            systemName+\"PS.state:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (iNewValue == 0) {
    setValue(\"\", \"backCol\", \"white\");
    setValue( \"\", \"text\", \"OFF\" ); }
  else if (iNewValue == 1) {
    setValue(\"\", \"backCol\", \"Green\");
    setValue( \"\", \"text\", \"ON\" ); }
  else if (iNewValue == 2){
    setValue(\"\", \"backCol\", \"yellow\");
    setValue( \"\", \"text\", \"STANDBY\" );}
  else {
    setValue(\"\", \"backCol\", \"Grey\");
    setValue( \"\", \"text\", \"DISABLED\" ); }
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTmops1:PS.state}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:PS.state}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:PS.state}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {equal}
// Operant1 {0}
// Color1 {white}
// Operator2 {equal}
// Operant2 {1}
// Color2 {Green}
// Operator3 {equal}
// Operant3 {2}
// Color3 {yellow}
// Operator4 {else}
// Operant4 {}
// Color4 {}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 264 381 330 397
1 2 0 "s" 0 0 0 65 0 0  264 381
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 9 PS_status
2 45
"PS_alarm"
""
1 262 409 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
34 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_textFieldIn();
  EP_setBackColor();
}

EP_textFieldIn()
{
dyn_errClass err;

  dpConnect(\"EP_textFieldInCB\",
            getSystemName()+\"PS.alarm:_online.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_textFieldInCB(string dp, int iNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setBackColor()
{
dyn_errClass err;
string systemName=getSystemName();


  dpConnect(\"EP_setBackColorCB\", 
            systemName+\"PS.alarm:_online.._value\",
            systemName+\"PS.alarm:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (iNewValue == 0) {
    setValue(\"\", \"backCol\", \"Green\");
    setValue( \"\", \"text\", \"OK\" );}
  else if (iNewValue == 1) {
    setValue(\"\", \"backCol\", \"Red\");
    setValue( \"\", \"text\", \"ERROR\" ); }
  else {
    setValue(\"\", \"backCol\", \"Grey\"); 
    setValue( \"\", \"text\", \"DISABLED\" ); }
}
// DP {SCTmops1:PS.alarm}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:PS.alarm}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:PS.alarm}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {equal}
// Operant1 {0}
// Color1 {Green}
// Operator2 {equal}
// Operant2 {1}
// Color2 {Red}
// Operator3 {else}
// Operant3 {}
// Color3 {}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 264 411 330 427
1 2 0 "s" 0 0 0 65 0 0  264 411
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 8 PS_alarm
2 46
"Text26"
""
1 208 409 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
35 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 210 411 251 426
0 2 0 "s" 0 0 0 192 0 0  210 411
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 ALARM
2 48
"Text1"
""
1 262 279 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
36 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setBackColor();
}

EP_textFieldIn()
{
dyn_errClass err;

  if( dpSubStr( \"TEalert.state:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"TEalert.state:_online.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp, int iNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setBackColor()
{
dyn_errClass err;

  if( dpSubStr( \"TEalert.state:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setBackColorCB\", 
            \"TEalert.state:_online.._value\",
            \"TEalert.state:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (iNewValue == 0) {
    setValue(\"\", \"backCol\", \"white\");
    setValue( \"\", \"text\", \"OFF\" ); }
  else if (iNewValue == 1) {
    setValue(\"\", \"backCol\", \"Green\");
    setValue( \"\", \"text\", \"ON\" ); }
  else {
    setValue(\"\", \"backCol\", \"Grey\");
    setValue( \"\", \"text\", \"DISABLED\" ); }
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTmops1:TE.state}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:TE.state}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:TE.state}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {equal}
// Operant1 {0}
// Color1 {white}
// Operator2 {equal}
// Operant2 {1}
// Color2 {Green}
// Operator3 {equal}
// Operant3 {2}
// Color3 {yellow}
// Operator4 {else}
// Operant4 {}
// Color4 {}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 264 281 330 297
1 2 0 "s" 0 0 0 65 0 0  264 281
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 9 PS_status
2 51
"ENV_Status"
""
1 262 179 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
39 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setBackColor();
}

EP_textFieldIn()
{
dyn_errClass err;

  if( dpSubStr( \"Fatl.Indx:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"Fatl.Indx:_online.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp, int iNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setBackColor()
{
dyn_errClass err;

  if( dpSubStr( \"Fatl.Indx:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setBackColorCB\", 
            \"Fatl.Indx:_online.._value\",
            \"Fatl.Indx:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (iNewValue == 0) {
    setValue(\"\", \"backCol\", \"Green\");
    setValue( \"\", \"text\", \"OFF\" ); }
  else if (iNewValue == 1) {
    setValue(\"\", \"backCol\", \"Red\");
    setValue( \"\", \"text\", \"ON\" ); }
  else if (iNewValue == 2){
    setValue(\"\", \"backCol\", \"yellow\");
    setValue( \"\", \"text\", \"STANDBY\" );}
  else {
    setValue(\"\", \"backCol\", \"Grey\");
    setValue( \"\", \"text\", \"DISABLED\" ); }
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTmops1:ENV.state}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:ENV.state}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:ENV.state}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {equal}
// Operant1 {0}
// Color1 {white}
// Operator2 {equal}
// Operant2 {1}
// Color2 {Green}
// Operator3 {equal}
// Operant3 {2}
// Color3 {yellow}
// Operator4 {else}
// Operant4 {}
// Color4 {}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 264 181 330 197
1 2 0 "s" 0 0 0 65 0 0  264 181
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 10 ENV_status
2 55
"Text10"
""
1 262 309 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
43 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_textFieldIn();
  EP_setBackColor();
}

EP_textFieldIn()
{
dyn_errClass err;

  if( dpSubStr( \"TEalert.alarm:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"TEalert.alarm:_online.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_textFieldInCB(string dp, int iNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setBackColor()
{
dyn_errClass err;

  if( dpSubStr( \"TEalert.alarm:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setBackColorCB\", 
            \"TEalert.alarm:_online.._value\",
            \"TEalert.alarm:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (iNewValue == 0) {
    setValue(\"\", \"backCol\", \"Green\");
    setValue( \"\", \"text\", \"OK\" );}
  else if (iNewValue == 1) {
    setValue(\"\", \"backCol\", \"Red\");
    setValue( \"\", \"text\", \"ERROR\" ); }
  else {
    setValue(\"\", \"backCol\", \"Grey\"); 
    setValue( \"\", \"text\", \"DISABLED\" ); }
}
// DP {SCTmops1:TE.alarm}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:TE.alarm}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:TE.alarm}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {equal}
// Operant1 {0}
// Color1 {Green}
// Operator2 {equal}
// Operant2 {1}
// Color2 {Red}
// Operator3 {else}
// Operant3 {}
// Color3 {}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 264 311 330 327
1 2 0 "s" 0 0 0 65 0 0  264 311
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 8 PS_alarm
2 56
"ENV_alarm"
""
1 262 209 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
44 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
dyn_errClass err;

//dpconnect to environmenatl project datapoint
  dpConnect(\"EP_textFieldInCB\",
           getSystemName()+\"Fatl.Numb:_original.._value\");

  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp1, float ramp_status)
{
// sending back confirmation to environmantal, necessary for Acknowledgement
  dpSet(getSystemName()+\"Fatl.Indx:_original.._value\",ramp_status);
  if ( ramp_status>0 )
 	{
	setValue( \"\", \"text\", \"RAMPDOWN\" );
	setValue( \"\", \"backCol\", \"alarmKamUnq\" );
	EP_childPanelOn();
	EP_sendPDO();
	}
	DebugN(\"ramp_status\",ramp_status);
	if ( ramp_status==0 )
	{
		DebugN(\"if loop\");
	setValue( \"\", \"text\", \"OK\" );
	setValue( \"\", \"backCol\", \"Green\" );

	}
}


EP_childPanelOn()
{
 ChildPanelOnCentralModal(\"subpanels\\\\Environmental_Error.pnl\",
      \"Environmental Error\",
      makeDynString(\"\"));
}


EP_sendPDO()
{
dyn_errClass err;
int lv, icard, channel, i,crate;
int set;
string datapoint;

 for(crate=0;crate<=1;crate++)
   {
   sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
   channel = 255| (( 0 & 0x00ff )<<8);
   dpSetWait(datapoint,channel);
   }
 	err = getLastError();
	if (dynlen(err) > 0)
		errorDialog(err);

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTmops1:Monitoring.Crate_Ramp_Off}
// DPConfig {:_original.._value}
// DPType {bool}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 264 211 330 227
1 2 0 "s" 0 0 0 65 0 0  264 211
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 9 ENV_alarm
2 58
"Text3"
""
1 19 108 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
46 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 21 110 96 125
0 2 0 "s" 0 0 0 192 0 0  21 110
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 10 CONNECTION
2 59
"Text8"
""
1 100 106 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
47 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
dyn_errClass err;
string systemName = getSystemName(20);

  if( dpSubStr( systemName+\"_Connections.Dist.ManNums:_online.._stime\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            systemName+\"_Connections.Dist.ManNums:_online.._stime\",
            systemName+\"_DistConnections.Dist.ManNums:_online.._stime\");

 
 
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp1, time TimeConnection, string dp2, time myTimeConnection)
{
	dyn_int Connection,myConnection;
	string systemName = getSystemName(20);

  dpGet(systemName+\"_DistConnections.Dist.ManNums:_original.._value\",Connection);
	dpGet(systemName+\"_Connections.Dist.ManNums:_original.._value\",myConnection);
	
	if(dynContains(Connection,40)>=1&&dynContains(myConnection,20)>=1) {
   setValue( \"\", \"backCol\", \"Green\" );
   setValue( \"\", \"text\", \"OK\" );
  }
  else if(dynContains(Connection,40)<1) {
  setValue( \"\", \"backCol\", \"Red\" );
  setValue( \"\", \"text\", \"NO CONNECTION\" );
  ChildPanelOnCentral(\"/subpanels/Connection.pnl\", \"CANBUS\", \"$error:COOLING\");
  }
   else if(dynContains(myConnection,20)<1) {
  setValue( \"\", \"backCol\", \"Red\" );
  setValue( \"\", \"text\", \"NO CONNECTION\" );
  ChildPanelOnCentral(\"/subpanels/Connection.pnl\", \"CANBUS\", \"$error:DISTRIBUTION MANAGER\");
  }
}" 0
 E 0 1 1 0 1 E U  1 E 102 108 198 128
1 2 0 "s" 0 0 0 65 0 0  102 108
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 11 COOL_status
25 27
"Table1"
""
1 311 -10 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
16 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
343 68 617 147
"main()
{
	string systemName = getSystemName(40);

	// checking state&status: global and per rack
	dpConnect(\"coolingState\", systemName+\"PLC_State.State:_online.._value\",
														systemName+\"PLC_Status.Status:_online.._value\");
}


coolingState( string dp1, string state, string dp2, string status)
{
	int i;
	string dp, systemName = getSystemName(40);
	// check global state&status
	if ( status != \"OK\" )  action(status, \"all\");
	else if ( state != \"Ready\" ) action(state, \"all\");
	// if the global state&status are OK, check each single rack!	
	else {
		for (i=1; i<=8; i++)	{
			sprintf(dp, systemName+\"Rack%d\", i);
			dpConnect(\"rackState\",  dp+\"_State.State:_online.._value\",
															dp+\"_Status.Status:_online.._value\");
		}
	}
}

rackState( string dp1, string state, string dp2, string status)
{
	string rack;
	rack = substr( dp1, strpos(dp1, \"Rack\"), 5 );

	switch(status) {
			case \"Warning\"	:	{ action(status, rack);  return; }
			case \"Alarm\"		: { action(status, rack); return; }
		}
	if ( state != \"Ready\" ) action(state, rack);
}

action( string problem, string rack )
{
	DebugN( problem, rack );
	int i;
	dyn_string Racks;

	ChildPanelOnCentralModal(\"subpanels/CoolingError.pnl\",
	 													\"Cooling Error\",
	 													makeDynString(\"$error:\"+problem, \"$unit:\"+rack ));
	fillTable ( rack+\" is \"+problem );
	
	if ( problem == \"Warning\" ) return;
	
	if ( rack == \"all\" )
			Racks = makeDynString( \"Rack1\", \"Rack2\", \"Rack3\", \"Rack4\", \"Rack5\", \"Rack6\", \"Rack7\", \"Rack8\" );
	else Racks = makeDynString( rack );

	for(i=1; i<=dynlen(Racks); i++) shutdown(Racks[i]);
}

shutdown( string alias)
{
	int i, crate, cardtype, channel;
	dyn_string dps, aliases;

	dpGetAllAliases(dps, aliases, \"*\"+alias+\"*\", getSystemName()+\"Crate*.Channel*\");

	for ( i=1; i<=dynlen(dps); i++) {
		DebugN(dps[i], aliases[i]);
		sscanf(dps[i], getSystemName()+\"Crate%02d.Channel%02d\", crate, channel);
		Set_State(crate, 0+channel);
		Set_State(crate, 64+channel);
	}
}


Set_State( int crate, int cardtype) 
{
dyn_errClass err;
int  i,j;
int set, ack,ackE,channel;
string datapoint, datapoint2,datapoint3;
int terval = 5;
int n_good =0;
int iState=0;

DebugN(iState, crate, cardtype);

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
 sprintf(datapoint2,\"Crate%02d.Controller.CCcf_Ack.Recv:_online.._value\",crate);
 sprintf(datapoint3,\"Crate%02d.Controller.CCcf_AckE.Recv:_online.._value\",crate);
 
  
      // Set channel
    
      channel = cardtype | (( iState & 0x00ff )<<8);
      dpSetWait(datapoint,channel);
 
      //Get Acknowledgement
      ack=-1;
      j=0;
      while ((ack!=channel)&&(j<200))
            {
            delay(0,terval);
            dpGet(datapoint2,ack);
            j++;
            }
      dpGet(datapoint3,ackE);           

      if ((ack!=channel) || (ackE!=0)) {
         dpSet(\"Info.Name:_original.._value\", \"Error: Timeout - channel: \"+channel+\"ack\"+ack+\" ackE \"+ackE+\"after\"+(j*terval)+\"mS\");
         DebugN(\"Error: Timeout channel \"+channel+\" ack \"+ack+\" ackE \"+ackE+\"after\"+(j*terval)+\"mS\");    
      } else {
         n_good++;
      }
 

   
   if (cardtype<64) {
      DebugN(\"Set_State: \"+n_good+\" LV channels changed to state \"+iState);
   } else {
      DebugN(\"Set_State: \"+n_good+\" HV channels changed to state \"+iState);
   }

   err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


fillTable (string ramp_status )
{
  int row,col;
  time t;
  string tim;

  getValue(\"\", \"currentCell\", row, col);
	t=getCurrentTime();
	tim=formatTime(\"%H:%M:%S\", t);
//	setValue(\"\", \"appendLine\", \"#1\", tim, \"#2\",\"Crate shut down! \"+ramp_status);
	setValue(\"\", \"appendLine\", \"#1\", tim, \"#2\", ramp_status);
}
" 0
 E 0 0 1 2 1 "#1" 0 1 0 "s" 1
LANG:1 2 #1
E1
LANG:1 0 
 120 "#2" 0 1 0 "s" 1
LANG:1 2 #2
E1
LANG:1 0 
 200 25 25 "" 1 1
LANG:1 2 #1
8 18 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 1 1 0 0
1 0
25 47
"TablePS"
""
1 -884 -150 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
36 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
343 368 617 447
"main()
{
EP_textFieldIn();
}


EP_textFieldIn()
{
dyn_errClass err;
string systemName=getSystemName();

  if( dpSubStr( systemName+\"PS.state:_original.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB2\",
            systemName+\"PS.state:_original.._value\");
	dpConnect(\"EP_textFieldInCB\", 
            systemName+\"PS.alarm:_original.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dpAlarm, float alarm )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
  if ( alarm )
	 {
	 t=getCurrentTime();
	 tim=formatTime(\"%H:%M:%S\", t);
	 setValue(\"\", \"appendLine\",  \"#1\", tim, \"#2\",\"Emergency: PS shut down!\");
	 }
}

EP_textFieldInCB2(string dpStat, float stat )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
  if ( stat )
	 {
	 t=getCurrentTime();
	 tim=formatTime(\"%H:%M:%S\", t);
	 setValue(\"\", \"appendLine\",  \"#1\", tim, \"#2\",\"Status changed to...\");
	 }
}
" 0
 E 0 0 1 2 1 "#1" 0 1 0 "s" 1
LANG:1 2 #1
E1
LANG:1 0 
 65 "#2" 0 1 0 "s" 1
LANG:1 2 #2
E1
LANG:1 0 
 200 25 25 "" 1 1
LANG:1 2 #1
8 18 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 1 1 0 0
1 0
25 54
"Table4"
""
1 -1251 -630 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
42 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
343 268 617 347
"main()
{
EP_textFieldIn();
}


EP_textFieldIn()
{
dyn_errClass err;

  //if( dpSubStr( \"SCTmops1:TE.state:_original.._value\", DPSUB_DP_EL ) == \"\" )
  //{
   // setValue(\"\", \"color\", \"_dpdoesnotexist\");
   // return;
  //}

  dpConnect(\"EP_textFieldInCB2\",
            \"TEalert.state:_original.._value\");
dpConnect(\"EP_textFieldInCB\", 
            \"TEalert.alarm:_original.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dpAlarm, float alarm )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
  if ( alarm )
	 {
	 t=getCurrentTime();
	 tim=formatTime(\"%H:%M:%S\", t);
	 setValue(\"\", \"appendLine\",  \"#1\", tim, \"#2\",\"Emergency: PS shut down!\");
	 }
}

EP_textFieldInCB2(string dpStat, float stat )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
  if ( stat )
	 {
	 t=getCurrentTime();
	 tim=formatTime(\"%H:%M:%S\", t);
	 setValue(\"\", \"appendLine\",  \"#1\", tim, \"#2\",\"Status changed to...\");
	 }
}
" 0
 E 0 0 1 2 1 "#1" 0 1 0 "s" 1
LANG:1 2 #1
E1
LANG:1 0 
 65 "#2" 0 1 0 "s" 1
LANG:1 2 #2
E1
LANG:1 0 
 200 25 25 "" 1 1
LANG:1 2 #1
8 18 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 1 1 0 0
1 0
25 57
"Table2"
""
1 310 65 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
45 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
343 158 617 252
"main()
{
EP_textFieldIn();
}


EP_textFieldIn()
{
dyn_errClass err;

//  if( dpSubStr( \"SCTmops1:Monitoring.Crate_Ramp_Off:_original.._value\", DPSUB_DP_EL ) == \"\" )
 // {
 //   setValue(\"\", \"color\", \"_dpdoesnotexist\");
  //  return;
  //}
// dpconnect to environmetntal
//  dpConnect(\"EP_textFieldInCB\",
//            \"SCTmops1:Monitoring.Crate_Ramp_Off:_original.._value\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_textFieldInCB(string dp, float ramp_status )
{
  int row,col;
  time t;
  string tim;
  getValue(\"\", \"currentCell\", row, col);
  if ( ramp_status )
	{
	t=getCurrentTime();
	  tim=formatTime(\"%H:%M:%S\", t);
	setValue(\"\", \"appendLine\",  \"#1\", tim, \"#2\",\"Crate shuted down!\");
	}
}
" 0
 E 0 0 1 2 1 "#1" 0 1 0 "s" 1
LANG:1 2 #1
E1
LANG:1 0 
 80 "#2" 0 1 0 "s" 1
LANG:1 2 #2
E1
LANG:1 0 
 200 25 25 "" 1 1
LANG:1 2 #1
8 18 1
LANG:1 118 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,0,0,0,0,Courier New
0 ""
0 1 1 0 0
1 0
0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
0
0