V 10
1
LANG:1 8 (NoName)
PANEL,282 160 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 437 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 19 GLOBAL DCS OVERVIEW
2 19
"Text4"
""
1 20 80 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 22 82 102 101
0 2 0 "s" 0 0 0 192 0 0  22 82
 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 230 100 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;

  if( dpSubStr( \"SCTmops1:Monitoring.Crate_Ramp_Off:_original\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"SCTmops1:Monitoring.Crate_Ramp_Off:_original.._value\",
            \"SCTmops1:Crate00.Stat:_original.._value\");

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

}


EP_textFieldInCB(string dp1, float ramp_status, string dp2, unsigned PS_Stat)
{
  if  (!PS_Stat) {
  	setValue( \"\", \"backCol\", \"Red\" );
	setValue( \"\", \"text\", \"DISABLED\" );
	return;
	}
  	
  if ( !ramp_status )
	{
	setValue(\"\", \"text\", \"OFF\" );
  	setValue( \"\", \"backCol\", \"\" );
	}
  else 
	{
	setValue( \"\", \"text\", \"ON\" );
	setValue( \"\", \"backCol\", \"alarmKamUnq\" );
	EP_childPanelOn();
	EP_sendPDO();
//	setValue( \"\", \"backCol\", \"Red\" );
//	setValue( \"\", \"text\", \"DONE\" );
	dpSet(\"SCTmops1:Crate00.Stat:_original.._value\", 0 );
	}
}


EP_childPanelOn()
{
 ChildPanelOnCentralModal(\"subpanels\\\\Cooling_Error.pnl\",
      \"Cooling 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 232 102 298 118
1 2 0 "s" 0 0 0 64 0 0  232 102
 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_alarm
2 31
"Text12"
""
1 160 270 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 162 272 208 287
0 2 0 "s" 0 0 0 192 0 0  162 272
 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 160 70 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 162 72 208 87
0 2 0 "s" 0 0 0 192 0 0  162 72
 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 230 70 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;

  if( dpSubStr( \"SCTmops1:Monitoring.Crate_Ramp_Off:_original\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"SCTmops1:Monitoring.Crate_Ramp_Off:_original.._value\",
            \"SCTmops1:Crate00.Stat:_original.._value\");

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

}


EP_textFieldInCB(string dp1, float ramp_status, string dp2, unsigned PS_Stat)
{
  if  (!PS_Stat) {
  	setValue( \"\", \"backCol\", \"Red\" );
	setValue( \"\", \"text\", \"DISABLED\" );
	return;
	}
  	
  if ( !ramp_status )
	{
	setValue(\"\", \"text\", \"OFF\" );
  	setValue( \"\", \"backCol\", \"\" );
	}
  else 
	{
	setValue( \"\", \"text\", \"ON\" );
	setValue( \"\", \"backCol\", \"alarmKamUnq\" );
	EP_childPanelOn();
	EP_sendPDO();
//	setValue( \"\", \"backCol\", \"Red\" );
//	setValue( \"\", \"text\", \"DONE\" );
	dpSet(\"SCTmops1:Crate00.Stat:_original.._value\", 0 );
	}
}


EP_childPanelOn()
{
 ChildPanelOnCentralModal(\"subpanels\\\\Cooling_Error.pnl\",
      \"Cooling 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 232 72 298 88
1 2 0 "s" 0 0 0 64 0 0  232 72
 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 36
"Text16"
""
1 160 100 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 162 102 203 117
0 2 0 "s" 0 0 0 192 0 0  162 102
 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 38
"Text18"
""
1 160 170 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 162 172 208 187
0 2 0 "s" 0 0 0 192 0 0  162 172
 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 160 200 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 162 202 203 217
0 2 0 "s" 0 0 0 192 0 0  162 202
 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 160 300 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 162 302 203 317
0 2 0 "s" 0 0 0 192 0 0  162 302
 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 160 370 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 162 372 208 387
0 2 0 "s" 0 0 0 192 0 0  162 372
 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 230 370 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( \"SCTmops1:PS.state:_online.._value\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_textFieldInCB\",
            \"SCTmops1: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;

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

  dpConnect(\"EP_setBackColorCB\", 
            \"SCTmops1:PS.state:_online.._value\",
            \"SCTmops1: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 232 372 298 388
1 2 0 "s" 0 0 0 64 0 0  232 372
 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 230 400 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;

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

  dpConnect(\"EP_textFieldInCB\",
            \"SCTmops1: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;

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

  dpConnect(\"EP_setBackColorCB\", 
            \"SCTmops1:PS.alarm:_online.._value\",
            \"SCTmops1: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 232 402 298 418
1 2 0 "s" 0 0 0 64 0 0  232 402
 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 160 400 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 162 402 203 417
0 2 0 "s" 0 0 0 192 0 0  162 402
 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 230 270 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 232 272 298 288
1 2 0 "s" 0 0 0 64 0 0  232 272
 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 230 170 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 232 172 298 188
1 2 0 "s" 0 0 0 64 0 0  232 172
 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 230 300 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 232 302 298 318
1 2 0 "s" 0 0 0 64 0 0  232 302
 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 230 200 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;

  if( dpSubStr( \"SCTmops1:Monitoring.Crate_Ramp_Off:_original\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

//dpconnect to environmenatl project datapoint
  dpConnect(\"EP_textFieldInCB\",
           \"SCTmops1: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(\"SCTmops1: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 232 202 298 218
1 2 0 "s" 0 0 0 64 0 0  232 202
 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
25 27
"Table1"
""
1 296 -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 ""
328 68 602 147
"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(\"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
25 47
"TablePS"
""
1 -899 -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 ""
328 368 602 447
"main()
{
EP_textFieldIn();
}


EP_textFieldIn()
{
dyn_errClass err;

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

  dpConnect(\"EP_textFieldInCB2\",
            \"SCTmops1:PS.state:_original.._value\");
dpConnect(\"EP_textFieldInCB\", 
            \"SCTmops1: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 -1266 -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 ""
328 268 602 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 295 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 ""
328 158 602 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