V 10
1
LANG:1 8 (NoName)
PANEL,482 305 655 258 N "_3DFace" 0
EEE E E 1 -1 -1 0  30 70
"" 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
6 36
"Border1"
""
1 10 250 E E E 1 E 1 E N {0,0,0} E N {255,255,255} 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  1 E 10 10 500 250
2 37
"Text3"
""
1 10 10 E E E 1 E 1 E N {0,0,0} E N {204,204,204} 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  1 E 12 12 498 33
1 2 0 "s" 0 0 0 65 0 0  12 12
 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 18 STATUS EXPLICATION
2 80
"Text4"
""
1 122 102 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
74 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 124 104 237 224
0 2 0 "s" 0 0 0 192 0 0  124 104
 8
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 16 7   HV_HARD_VOLT
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 16 6   HV_HARD_VOLT
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 5   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 4   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 16 3   HV_SOFT_VOLT
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 16 2   HV_SOFT_CURR
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 1   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 0   X
2 122
"CCstatH"
""
1 70 50 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
114 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;
  int crate, channel,i, value;
  int crateold, channelold;
  string DPchannel, DPcrate, DPvalue;

  //Make addresses for the crate and channel numbers
  DPcrate=\"Crate.Numb:_original.._value\";

  //Get value of new selected crate and channel number
  dpGet(DPcrate, crate);
  //Get values of old selected crate and channel number
  dpGet(\"Crate.Indx:_original.._value\", crateold);

  //Make address of the status value
  sprintf(DPvalue, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crateold);

  //Connect the output to all changes to datapoints from value crate and channel select
  dpConnect(\"ConnectValue\",DPvalue);
  ////DebugN(\"DP connect\",DPchannel);
  dpConnect(\"ConnectSelect\", DPcrate);
   
  //Error function                    
  err = getLastError();
  if (dynlen(err) > 0)
      setValue(\"\", \"color\", \"_dpdoesnotexist\");

  //Set Colour to lilac when  datapoint not excisting
  if (dpSubStr( DPvalue, DPSUB_DP_EL ) == \"\" )
     {
      setValue(\"\", \"color\", \"_dpdoesnotexist\");
      return;
     } 
 
}


ConnectSelect(string dp, int iNewValue)
{
  int crateold, channelold, crate, channel;
  string DPvalueold, DPvalue;

  //Disconnect old datapoint
  dpGet(\"Crate.Indx:_original.._value\", crateold);

  sprintf(DPvalue,\"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crateold);
  ////DebugN(\" DPvalue\",DPvalue);
  dpDisconnect(\"ConnectValue\", DPvalue); 

  //Connect new datapoint  
  dpGet(\"Crate.Numb:_original.._value\", crate);
        
  sprintf(DPvalue,\"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
  dpConnect(\"ConnectValue\",DPvalue); 
}

ConnectValue(string dp, float fNewValue)
{ 
  string DPvalue, xTmp;
  int crate,channel, number, error,val;
  float value;
  
  dpGet(\"Crate.Numb:_original.._value\", crate);

  sprintf(DPvalue,\"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
  dpGet(DPvalue,value);

  //Display channel number
  //value =  0xffff - (value &  0xff0000);
  //value =  (value & 0x00f) >> 0 ;
  //((value & 0x00ff )<< 8);
  val = value;
  number = (0x000000ff & val);
  Debug(number);
  error  = (0x0000ff00 &val)>>8; 
  
  //(value & 0x001) >> 0)
  //sprintf(xTmp,\"%x\", value);
  setValue(\"\", \"text\", error);
  ////DebugN(\"displayed datapoint\",datapoint);

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {Crate1.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 "main()
{
CurrentChannel();

}

CurrentChannel()
{
int x_position, y_position;
int crate, channel;
string datapoint;

getValue(\"\", \"position\", x_position, y_position);

dpGet(\"Crate.Numb:_original.._value\", crate);
sprintf(datapoint,\"Crate%02d.Controller.CCchStat.Recv\",crate); 
   
   getTimeStamp(datapoint, x_position, y_position);
}" 0
 0 1 1 0 1 E U  1 E 72 52 111 68
1 2 0 "s" 0 0 0 64 0 0  72 52
 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 7 CCstatH
2 124
"Text41"
""
1 30 50 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
116 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 32 52 78 65
0 2 0 "s" 0 0 0 64 0 0  32 52
 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 Error
2 127
"Text51"
""
1 120 50 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
119 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 122 52 328 78
0 2 0 "s" 0 0 0 64 0 0  122 52
 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 27  Warnings and alarms only !
2 128
"Text2"
""
1 315 99 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
120 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 317 101 452 221
0 2 0 "s" 0 0 0 192 0 0  317 101
 8
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 7   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 6   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 5   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 17 4   LV_ALARM_TRIP
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 5 3   X
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 16 2   LV_ALARM_OUT
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 20 1   LV_ALARM_SOFT_T0
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 20 0   LV_ALARM_SOFT_T1
2 129
"Text5"
""
1 124 81 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
121 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 126 83 182 109
0 2 0 "s" 0 0 0 64 0 0  126 83
 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 7 HV card
2 130
"Text6"
""
1 316 79 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
122 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 318 81 374 107
0 2 0 "s" 0 0 0 64 0 0  318 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 7 LV card
7 131
"Ellipse1"
""
1 106 110 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
123 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x080) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 106 110 5 5
7 132
"Ellipse2"
""
1 106 185 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
124 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x004) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 106 185 5 5
7 133
"Ellipse3"
""
1 106 200 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
125 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x002) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 106 200 5 5
7 134
"Ellipse5"
""
1 106 215 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
126 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x001) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}

// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:Crate00.Channel00.LVchStat.Recv}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:Crate00.Channel00.LVchStat.Recv}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Black}
// Operator2 {else}
// Operant2 {}
// Color2 {white}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 106 215 5 5
7 135
"Ellipse6"
""
1 106 170 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
127 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x008) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 106 170 5 5
7 136
"Ellipse7"
""
1 106 155 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
128 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x010) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 106 155 5 5
7 137
"Ellipse8"
""
1 106 140 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
129 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if ((iNewValue & 0x020) >> 0) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 106 140 5 5
7 138
"Ellipse9"
""
1 106 125 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
130 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x040) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 106 125 5 5
7 139
"Ellipse4"
""
1 300 108 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
131 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x080) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 300 108 5 5
7 140
"Ellipse10"
""
1 300 183 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
132 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x004) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 300 183 5 5
7 141
"Ellipse11"
""
1 300 198 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
133 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x002) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 300 198 5 5
7 142
"Ellipse12"
""
1 300 213 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
134 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x001) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}

// SimpleCtrlScript {EP_setBackColor}
// DP {SCTmops1:Crate00.Channel00.LVchStat.Recv}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTmops1:Crate00.Channel00.LVchStat.Recv}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Black}
// Operator2 {else}
// Operant2 {}
// Color2 {white}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 E 0 1 1 0 1 E U  1 E 300 213 5 5
7 143
"Ellipse13"
""
1 300 168 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
135 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x008) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}" 0
 E 0 1 1 0 1 E U  1 E 300 168 5 5
7 144
"Ellipse14"
""
1 300 153 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
136 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x010) >> 0) && !((iNewValue & 0x020) >> 0)){
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 300 153 5 5
7 145
"Ellipse15"
""
1 300 138 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
137 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if ((iNewValue & 0x020) >> 0) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 300 138 5 5
7 146
"Ellipse16"
""
1 300 123 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
138 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int hv, channel, crate, flag;
string datapoint1, datapoint2;

dpGet(\"Crate.Numb:_original.._value\", crate);

sprintf(datapoint1, \"Crate%02d.Controller.CCchStat.Recv:_online.._value\",crate);
sprintf(datapoint2, \"Crate%02d.Controller.CCchStat.Recv:_online.._invalid\",crate);

//DebugN(datapoint1, datapoint2);
//dpGet(datapoint1, flag);
//DebugN(flag, \"flag\");

  if( dpSubStr( datapoint1, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

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

}


EP_setBackColorCB(string dpSource, int iNewValue, string dpInvalid, bool boInvalid)
{
//DebugN(\"flag0\",iNewValue);
  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (((iNewValue & 0x040) >> 0)&& !((iNewValue & 0x020) >> 0)) {
    setValue(\"\", \"backCol\", \"Black\");
//    DebugN(\"black\");
    }
  else {
    setValue(\"\", \"backCol\", \"white\");
//    DebugN(\"white\");
    }
}
" 0
 E 0 1 1 0 1 E U  1 E 300 123 5 5
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