V 10
1
LANG:1 6 Values
PANEL,286 122 840 651 N "_3DFace" 0
EEE E E 1 -1 -1 0  30 40
"" 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 0
"Text2"
""
1 530 20 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
1 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 532 22 798 432
1 2 0 "s" 0 0 0 65 0 0  532 22
 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 7 LV CARD
2 24
"LVchannels"
""
1 20 20 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
24 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 22 528 432
1 2 0 "s" 0 0 0 65 0 0  22 22
 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 10 LV CHANNEL
2 29
"Text9"
""
1 352 91 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
29 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;
crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate, hv);
if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );


}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 93 410 109
1 2 0 "s" 0 0 0 64 0 0  354 93
 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 LVchStat
2 62
"Text17"
""
1 352 121 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
60 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;
crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 123 410 139
1 2 0 "s" 0 0 0 64 0 0  354 123
 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 LVch_Vcc
2 63
"Text18"
""
1 440 121 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
61 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vcc:_online.._value\",crate, hv);
if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVps_Vcc:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vcc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vcc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 442 123 498 139
1 2 0 "s" 0 0 0 64 0 0  442 123
 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 LVps_Vcc
2 64
"Text19"
""
1 352 391 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
62 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_CSR:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_CSR:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_CSR:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_CSR:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 393 410 409
1 2 0 "s" 0 0 0 64 0 0  354 393
 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 LVch_CSR
2 65
"Text20"
""
1 352 271 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
63 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_Icc:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_Icc:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Icc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*10;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Icc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*10;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 273 410 289
1 2 0 "s" 0 0 0 64 0 0  354 273
 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 LVch_Icc
2 66
"Text21"
""
1 352 151 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
64 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_online.._value\",crate, hv);
if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 153 410 169
1 2 0 "s" 0 0 0 64 0 0  354 153
 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 LVch_Vdd
2 67
"Text22"
""
1 440 151 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
65 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vdd:_online.._value\",crate, hv);

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

dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVps_Vdd:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vdd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVps_Vdd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 442 153 498 169
1 2 0 "s" 0 0 0 64 0 0  442 153
 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 LVps_Vdd
2 68
"Text23"
""
1 352 361 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
66 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_DSR:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_DSR:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_DSR:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_DSR:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 363 410 379
1 2 0 "s" 0 0 0 64 0 0  354 363
 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 LVch_DSR
2 69
"Text24"
""
1 352 241 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
67 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_Idd:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_Idd:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Idd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*10;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_Idd:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*10;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 243 410 259
1 2 0 "s" 0 0 0 64 0 0  354 243
 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 LVch_Idd
2 70
"Text25"
""
1 352 181 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
68 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/25;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/25;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 183 410 199
1 2 0 "s" 0 0 0 64 0 0  354 183
 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 LVchVCSV
2 71
"Text26"
""
1 440 181 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
69 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSI:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSI:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSI:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*0.04;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchVCSI:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*0.04;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 442 183 498 199
1 2 0 "s" 0 0 0 64 0 0  442 183
 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 LVchVCSI
2 72
"Text27"
""
1 352 211 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
70 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/20;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 213 410 229
1 2 0 "s" 0 0 0 64 0 0  354 213
 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 LVchPINV
2 73
"Text28"
""
1 440 211 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
71 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVchPINI:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVchPINI:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchPINI:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*0.01;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVchPINI:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue*0.01;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 442 213 498 229
1 2 0 "s" 0 0 0 64 0 0  442 213
 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 LVchPINI
2 74
"Text29"
""
1 352 301 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
72 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_T00:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
   dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_T00:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
float a,b,t,x;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_T00:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue;
t=1/(log(fNewValue*2.5/800.)/3435.+0.0033557)-273.;

//DebugN(\"row T\",t);
fNewValue=t;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
float a,b,t,x;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_T00:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue;
t=1/(log(fNewValue*2.5/800.)/3435.+0.0033557)-273.;
//t=fNewValue/800;


//DebugN(\"row T\",t);
/* Jan's formula
a=3.4350;
b=3.3557;
x=log(fNewValue/800.+a*b);
t=a*1000./x;
t = t-273.;
*/

fNewValue=t;



sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 303 410 319
1 2 0 "s" 0 0 0 64 0 0  354 303
 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 LVch_T00
2 75
"Text30"
""
1 352 331 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
73 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVch_T01:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVch_T01:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
float a,b,t,x;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_T01:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
t=1/(log(fNewValue*2.5/800.)/3435.+0.0033557)-273.;
fNewValue=t;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
float a,b,t,x;
string dp1,sTmp;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVch_T01:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
t=1/(log(fNewValue*2.5/800.)/3435.+0.0033557)-273.;
fNewValue=t;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 354 333 410 349
1 2 0 "s" 0 0 0 64 0 0  354 333
 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 LVch_T01
2 80
"Text35"
""
1 180 90 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
78 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;

sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);

sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%f\",fNewValue);
setValue(\"\", \"text\", fNewValue );


}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 92 238 108
1 2 0 "s" 0 0 0 64 0 0  182 92
 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 LVco_Vcc
2 81
"Text36"
""
1 180 120 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
79 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;


crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue/50;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue ); 
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_online.._value\",crate, hv);
 dpGet(dp1,fNewValue);
 fNewValue=fNewValue/50;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 122 238 138
1 2 0 "s" 0 0 0 64 0 0  182 122
 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 LVco_Vdd
2 82
"Text37"
""
1 180 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
80 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue/25;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue ); 
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue/25;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 152 238 168
1 2 0 "s" 0 0 0 64 0 0  182 152
 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 LVcoVCSV
2 83
"Text38"
""
1 180 180 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
81 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue/20;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue/20;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 182 238 198
1 2 0 "s" 0 0 0 64 0 0  182 182
 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 LVcoPINV
2 84
"Text39"
""
1 180 210 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
82 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 212 238 228
1 2 0 "s" 0 0 0 64 0 0  182 212
 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 LVcoDTrp
2 85
"Text40"
""
1 180 240 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
83 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_online.._value\",crate, hv);

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

  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 242 238 258
1 2 0 "s" 0 0 0 64 0 0  182 242
 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 LVcoCTrp
2 86
"Text41"
""
1 180 270 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
84 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 272 238 288
1 2 0 "s" 0 0 0 64 0 0  182 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 8 LVcoTLim
2 87
"Text42"
""
1 180 300 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
85 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}
// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchVolt}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 302 238 318
1 2 0 "s" 0 0 0 64 0 0  182 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 LVcoTTrp
2 88
"Text43"
""
1 180 330 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
86 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {FALSE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 332 238 348
1 2 0 "s" 0 0 0 64 0 0  182 332
 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 LVcoCLKS
2 89
"Text44"
""
1 180 360 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
87 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
 dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV1.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 362 238 378
1 2 0 "s" 0 0 0 64 0 0  182 362
 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 LVcoCLKR
2 90
"Text45"
""
1 180 390 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
88 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1,sTmp;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%f\",fNewValue);
 setValue(\"\", \"text\", fNewValue );

}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 182 392 238 408
1 2 0 "s" 0 0 0 64 0 0  182 392
 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 LVcoVOut
2 107
"Text55"
""
1 40 50 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
105 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 42 52 112 68
0 2 0 "s" 0 0 0 64 0 0  42 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 9 CONTROL: 
2 110
"Text57"
""
1 40 90 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
108 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 42 92 88 105
0 2 0 "s" 0 0 0 64 0 0  42 92
 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 3 Vcc
2 112
"Text58"
""
1 40 120 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
110 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 42 122 88 135
0 2 0 "s" 0 0 0 64 0 0  42 122
 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 3 Vdd
2 113
"Text59"
""
1 40 150 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
111 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 42 152 98 168
0 2 0 "s" 0 0 0 64 0 0  42 152
 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 VCSEL V
2 116
"Text60"
""
1 40 180 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
114 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 42 182 98 196
0 2 0 "s" 0 0 0 64 0 0  42 182
 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 8 PIN Bias
2 117
"Text61"
""
1 40 210 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
115 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 42 212 108 228
0 2 0 "s" 0 0 0 64 0 0  42 212
 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 13 Idd Trip (ms)
2 120
"Text62"
""
1 40 240 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
118 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 42 242 108 258
0 2 0 "s" 0 0 0 64 0 0  42 242
 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 Icc Trip (ms) Trip
2 121
"Text63"
""
1 40 270 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 42 272 108 288
0 2 0 "s" 0 0 0 64 0 0  42 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 9 T Warning
2 124
"Text64"
""
1 40 300 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 42 302 88 315
0 2 0 "s" 0 0 0 64 0 0  42 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 6 T Trip
2 125
"Text65"
""
1 40 330 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
123 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 42 332 108 348
0 2 0 "s" 0 0 0 64 0 0  42 332
 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 9 Clock Sel
2 128
"Text66"
""
1 40 360 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
126 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 42 362 108 378
0 2 0 "s" 0 0 0 64 0 0  42 362
 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 9 Clock Res
2 129
"Text67"
""
1 40 390 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
127 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 42 392 88 405
0 2 0 "s" 0 0 0 64 0 0  42 392
 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 Out On
2 133
"Text69"
""
1 262 57 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
131 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 264 59 350 73
0 2 0 "s" 0 0 0 64 0 0  264 59
 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 13 MONITORING : 
2 134
"Text70"
""
1 272 91 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
132 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 274 93 320 106
0 2 0 "s" 0 0 0 64 0 0  274 93
 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 135
"Text71"
""
1 272 121 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
133 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 274 123 350 139
0 2 0 "s" 0 0 0 64 0 0  274 123
 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 12 Vcc Mod / PS
2 136
"Text72"
""
1 272 151 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
134 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 274 153 350 169
0 2 0 "s" 0 0 0 64 0 0  274 153
 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 12 Vdd Mod / PS
2 137
"Text73"
""
1 272 181 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
135 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 274 183 340 199
0 2 0 "s" 0 0 0 64 0 0  274 183
 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 11 VCSEL V / I
2 138
"Text74"
""
1 272 211 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
136 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 274 213 350 229
0 2 0 "s" 0 0 0 64 0 0  274 213
 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 14 PIN Bias V / I
2 139
"Text75"
""
1 272 241 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
137 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 274 243 320 256
0 2 0 "s" 0 0 0 64 0 0  274 243
 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 1  
2 140
"Text76"
""
1 272 271 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
138 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 274 273 320 286
0 2 0 "s" 0 0 0 64 0 0  274 273
 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 4 Icc 
2 141
"Text77"
""
1 272 301 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
139 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 274 303 340 319
0 2 0 "s" 0 0 0 64 0 0  274 303
 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 8 T Link 0
2 142
"Text78"
""
1 272 331 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
140 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 274 333 320 346
0 2 0 "s" 0 0 0 64 0 0  274 333
 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 8 T Link 1
2 143
"Text79"
""
1 272 391 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
141 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 274 393 340 409
0 2 0 "s" 0 0 0 64 0 0  274 393
 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 Vcc Return
2 144
"Text80"
""
1 272 361 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
142 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 274 363 340 379
0 2 0 "s" 0 0 0 64 0 0  274 363
 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 Vdd Return
2 152
"Text88"
""
1 272 241 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
150 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 274 243 320 256
0 2 0 "s" 0 0 0 64 0 0  274 243
 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 4 Idd 
4 203
"Line5"
""
1 550 267 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
196 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E  770 267 550 267
2 208
"Text3"
""
1 530 440 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
201 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 532 442 798 628
1 2 0 "s" 0 0 0 65 0 0  532 442
 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 7 HV CARD
2 209
"Text5"
""
1 20 440 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
202 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 442 528 628
1 2 0 "s" 0 0 0 65 0 0  22 442
 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 11 HV CHANNELS
2 210
"Text15"
""
1 718 526 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
203 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/8;
sprintf(datapoint, \"SCTps:Crate%d.HVCard_%d.HVccMask:_online.._value\",crate, icard);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  icard=i/8;
  sprintf(datapoint,\"SCTps:Crate%d.HVCard_%d.HVccMask:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/8;
sprintf(dp1, \"SCTps:Crate%d.HVCard_%d.HVccMask:_online.._value\",crate, icard);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
sprintf(dp1, \"SCTps:Crate%d.HVCard_%d.HVccMask:_online.._value\",crate, icard);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 720 528 776 544
1 2 0 "s" 0 0 0 64 0 0  720 528
 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 HVccMask
2 211
"Text50"
""
1 546 68 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
204 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 548 70 614 84
0 2 0 "s" 0 0 0 64 0 0  548 70
 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 9 CONTROL: 
2 212
"Text52"
""
1 552 136 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
205 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 554 138 592 152
0 2 0 "s" 0 0 0 64 0 0  554 138
 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 4 Trip
2 213
"Text54"
""
1 553 104 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
206 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 555 106 595 118
0 2 0 "s" 0 0 0 64 0 0  555 106
 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 4 Mask
2 214
"Text68"
""
1 550 290 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
207 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 552 292 640 308
0 2 0 "s" 0 0 0 64 0 0  552 292
 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 12 MONITORING: 
2 215
"Text83"
""
1 556 326 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
208 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 558 328 604 341
0 2 0 "s" 0 0 0 64 0 0  558 328
 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 216
"Text84"
""
1 556 356 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
209 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 558 358 634 374
0 2 0 "s" 0 0 0 64 0 0  558 358
 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 11 Temperature
2 217
"Text85"
""
1 556 386 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
210 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 558 388 624 404
0 2 0 "s" 0 0 0 64 0 0  558 388
 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 8 AC Power
2 218
"Text89"
""
1 604 500 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
211 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 606 502 672 518
0 2 0 "s" 0 0 0 64 0 0  606 502
 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 9 CONTROL :
2 219
"Text90"
""
1 600 530 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
212 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 602 532 648 545
0 2 0 "s" 0 0 0 64 0 0  602 532
 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 4 Mask
2 220
"Text95"
""
1 602 560 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
213 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 604 562 690 578
0 2 0 "s" 0 0 0 64 0 0  604 562
 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 12 MONITORING :
2 221
"Text100"
""
1 602 590 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
214 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 604 592 660 608
0 2 0 "s" 0 0 0 64 0 0  604 592
 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 222
"Text33"
""
1 682 104 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
215 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVccMask:_online.._value\",crate, icard);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  icard=i/4;
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVccMask:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVccMask:_online.._value\",crate, icard);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVccMask:_online.._value\",crate, icard);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 684 106 740 122
1 2 0 "s" 0 0 0 64 0 0  684 106
 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 LVccMask
2 223
"Text46"
""
1 682 136 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
216 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVccTrip:_online.._value\",crate, icard);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  icard=i/4;
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVccTrip:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVccTrip:_online.._value\",crate, icard);
dpGet(dp1, fNewValue);
fNewValue=fNewValue/2.5;
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVccTrip:_online.._value\",crate, icard);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/2.5;
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 684 138 740 154
1 2 0 "s" 0 0 0 64 0 0  684 138
 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 LVccTrip
2 224
"Text51"
""
1 682 326 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
217 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVcmStat:_online.._value\", crate, icard);if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  icard=i/4;
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVcmStat:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmStat:_online.._value\", crate, icard);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmStat:_online.._value\", crate, icard);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 684 328 740 344
1 2 0 "s" 0 0 0 64 0 0  684 328
 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 LVcmStat
2 225
"Text6"
""
1 682 356 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
218 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVcmTemp:_online.._value\", crate, icard);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  icard=i/4;
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVcmTemp:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmTemp:_online.._value\", crate, icard);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmTemp:_online.._value\", crate, icard);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 684 358 740 374
1 2 0 "s" 0 0 0 64 0 0  684 358
 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 LVcmTemp
2 226
"Text7"
""
1 682 386 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
219 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* datapoint1;
string datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVcmPowr:_online.._value\", crate, icard);
if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  icard=i/4;
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVcmPowr:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmPowr:_online.._value\", crate, icard);
dpGet(dp1, fNewValue);
fNewValue=fNewValue/2.5;
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
sprintf(dp1, \"SCTps:Crate%d.LVCard_%d.LVcmPowr:_online.._value\", crate, icard);
dpGet(dp1,fNewValue);
fNewValue=fNewValue/2.5;
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 684 388 740 404
1 2 0 "s" 0 0 0 64 0 0  684 388
 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 LVcmPowr
2 227
"Text8"
""
1 717 590 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
220 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 datapoint,dp1;
int hv,i,icard;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
icard=hv/8;
sprintf(datapoint, \"SCTps:Crate%d.HVCard_%d.HVcmStat:_online.._value\",crate, icard);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  icard=i/8;
  sprintf(datapoint,\"SCTps:Crate%d.HVCard_%d.HVcmStat:_online.._value\",crate,icard);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/8;
sprintf(dp1, \"SCTps:Crate%d.HVCard_%d.HVcmStat:_online.._value\",crate, icard);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv,icard;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
sprintf(dp1, \"SCTps:Crate%d.HVCard_%d.HVcmStat:_online.._value\",crate, icard);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}
//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 719 592 775 608
1 2 0 "s" 0 0 0 64 0 0  719 592
 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 HVcmStat
7 267
"Ellipse11"
""
1 545 465 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
260 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);            
   delay(0,50);
 //dpConnect(\"EP_setBackColorCB\", datapoint);
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint1;
int stat;
 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);
 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
  dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{

   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
  
}





// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);

sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.26*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&1)
         {
         imask=imask-1;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (iStat&8&&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&1))
          {
          imask=imask+1;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 465 5 5
2 275
"hvcard"
""
1 707 441 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
267 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 1 E U  1 E 709 443 775 459
0 2 0 "s" 0 0 0 64 0 0  709 443
 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 7 hv card
2 280
"nb0"
""
1 560 456 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
272 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 458 584 474
0 2 0 "s" 0 0 0 64 0 0  562 458
 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 3 nb0
2 282
"Text31"
""
1 560 476 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
274 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+1;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 478 584 496
0 2 0 "s" 0 0 0 64 0 0  562 478
 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 3 nb0
2 283
"Text32"
""
1 560 496 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
275 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+2;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 498 590 514
0 2 0 "s" 0 0 0 64 0 0  562 498
 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 3 nb0
2 284
"Text34"
""
1 560 516 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
276 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+3;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 518 588 534
0 2 0 "s" 0 0 0 64 0 0  562 518
 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 3 nb0
2 285
"Text47"
""
1 560 536 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
277 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+4;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 538 584 554
0 2 0 "s" 0 0 0 64 0 0  562 538
 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 3 nb0
2 286
"Text48"
""
1 560 556 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
278 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+5;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 558 582 574
0 2 0 "s" 0 0 0 64 0 0  562 558
 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 3 nb0
2 287
"Text49"
""
1 560 576 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
279 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+6;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 578 584 594
0 2 0 "s" 0 0 0 64 0 0  562 578
 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 3 nb0
2 288
"Text53"
""
1 560 596 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
280 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/8;
   iNewValue = iNewValue*8+7;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 562 598 586 614
0 2 0 "s" 0 0 0 64 0 0  562 598
 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 3 nb0
7 290
"Ellipse12"
""
1 550 183 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
281 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
hv=icard*4;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.LV.LVchStat:_online.._value\",hv);
 DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);            
   delay(0,50);
 //dpConnect(\"EP_setBackColorCB\", datapoint);
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint1;
int stat;
 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/4;
 hv=icard*4;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate,hv);
// dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv);
 //  delay(0,50);
  dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{

   if (iNewValue==64||iNewValue==0)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==192||iNewValue==128)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
  
}




// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,lv, crate;
int  iVcc,iVdd,iVcsel,iVpin, doit,iStat;
string datapoint2,datapoint3, datapoint4, datapoint5,datapoint6;

crate=0;
doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
icard=lv/4;
lv=icard*4;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_original.._value\",icard);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
delay(0,50);

sprintf(datapoint2,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_original.._value\",crate, lv); 
dpGet(datapoint2, iVcc); 
sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_original.._value\",crate, lv); 
dpGet(datapoint3, iVdd);
sprintf(datapoint4,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_original.._value\",crate, lv); 
dpGet(datapoint4, iVcsel); 
sprintf(datapoint5, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_original.._value\",crate, lv); 
dpGet(datapoint5, iVpin);
sprintf(datapoint6, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_original.._value\", crate, lv); 


dpGet(datapoint6, iStat);

if (iVcc>0.07*50 || iVdd>0.07*50 || iVcsel>0.07*25 || iVpin>0.07*20)
   {
   doit=0;
   }
   
//Debug(\"iVcc\", iVcc/50, \"iVdd\", iVdd/50, \"iVcsel\", iVcsel/25, \"iVpin\", iVpin/20, \"doit\", doit);   
   
   if ((iStat&=128) &&doit==1)
      {
       dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&1)
         {
         imask=imask-1;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (!(iStat&=128))
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&1))
          {
          imask=imask+1;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
 delay(0,50);
 dpGet(datapoint6, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 550 183 5 5
2 294
"Text11"
""
1 564 174 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
285 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 566 176 588 192
0 2 0 "s" 0 0 0 64 0 0  566 176
 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 3 nb0
2 299
"Text87"
""
1 564 195 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
290 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/4;
   iNewValue = iNewValue*4+1;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 566 197 588 213
0 2 0 "s" 0 0 0 64 0 0  566 197
 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 3 nb0
2 301
"Text101"
""
1 564 216 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
292 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/4;
   iNewValue = iNewValue*4+2;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 566 218 588 234
0 2 0 "s" 0 0 0 64 0 0  566 218
 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 3 nb0
2 303
"Text102"
""
1 564 237 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
294 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {153,204,255}
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
  iNewValue = iNewValue/4;
   iNewValue = iNewValue*4+3;
  setValue(\"\", \"text\", dpValToString(dp, iNewValue, TRUE) );
}

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 566 239 588 255
0 2 0 "s" 0 0 0 64 0 0  566 239
 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 3 nb0
2 304
"lvcard"
""
1 710 21 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
295 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 1 E U  1 E 712 23 778 39
0 2 0 "s" 0 0 0 64 0 0  712 23
 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 7 lv card
2 19
"Text1"
""
1 362 520 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
19 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 datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 364 522 418 541
1 2 0 "s" 0 0 0 64 0 0  364 522
 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 HVchStat
2 44
"Text10"
""
1 362 551 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;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;

crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVchCurr:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
dpConnect(\"EP_textFieldInCB\",channel);
count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVchCurr:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchCurr:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchCurr:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 364 553 418 571
1 2 0 "s" 0 0 0 64 0 0  364 553
 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 HVchCurr
2 46
"Text12"
""
1 362 581 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
46 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;
crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVchVolt:_online.._value\",crate, hv);

if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
  setValue(\"\", \"color\", \"_dpdoesnotexist\");
  return;
  }
dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVchVolt:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                  

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

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;



dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchVolt:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
fNewValue = fNewValue /8;
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVchVolt:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
fNewValue = fNewValue /8;
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 364 583 418 601
1 2 0 "s" 0 0 0 64 0 0  364 583
 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 HVchVolt
2 160
"Text96"
""
1 276 493 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
158 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 278 495 374 511
0 2 0 "s" 0 0 0 64 0 0  278 495
 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 12 MONITORING :
2 161
"Text97"
""
1 292 523 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
159 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 294 525 340 538
0 2 0 "s" 0 0 0 64 0 0  294 525
 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 162
"Text98"
""
1 292 553 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
160 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 294 555 340 568
0 2 0 "s" 0 0 0 64 0 0  294 555
 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 Current
2 163
"Text99"
""
1 292 583 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
161 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 294 585 340 601
0 2 0 "s" 0 0 0 64 0 0  294 585
 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 Voltage
2 53
"Text13"
""
1 182 583 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
53 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 channel=\"SCTps:Item.HV:_original.._value\";
 sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_online.._value\",crate, hv);

 if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
   {
   setValue(\"\", \"color\", \"_dpdoesnotexist\");
   return;
   }
 dpConnect(\"EP_textFieldInCB\",channel);
 count=47;
 for(i=0; i<= count;i++)
   {
   sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_online.._value\",crate,i);
   dpConnect(\"EP_textFieldInCB1\",datapoint);  
   }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;


 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_online.._value\",crate, hv);
 dpGet(dp1, fNewValue);
 setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_online.._value\",crate, hv);
 dpGet(dp1,fNewValue);
 setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 184 585 238 601
1 2 0 "s" 0 0 0 64 0 0  184 585
 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 HVcoRamp
2 54
"Text14"
""
1 182 553 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
54 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {

  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}

//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 184 555 238 571
1 2 0 "s" 0 0 0 64 0 0  184 555
 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 HVcoITrp
2 56
"Text16"
""
1 182 523 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
56 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* datapoint1;
string datapoint,dp1;
int hv,i;
int crate,count;
string channel;



crate=0;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
channel=\"SCTps:Item.HV:_original.._value\";

sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_online.._value\",crate, hv);

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



  dpConnect(\"EP_textFieldInCB\",channel);

count=47;
for(i=0; i<= count;i++)
  {
  sprintf(datapoint,\"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_online.._value\",crate,i);
  dpConnect(\"EP_textFieldInCB1\",datapoint);  
  }                   
 err = getLastError();
 if (dynlen(err) > 0)
 setValue(\"\", \"color\", \"_dpdoesnotexist\");
}

EP_textFieldInCB(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;


dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;

sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_online.._value\",crate, hv);
dpGet(dp1, fNewValue);
setValue(\"\", \"text\", dpValToString(dp1, fNewValue, TRUE) ); 

}

EP_textFieldInCB1(string dp, float fNewValue)
{ 
int crate;
int hv;
string dp1;

crate=0;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);

sprintf(dp1, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_online.._value\",crate, hv);
dpGet(dp1,fNewValue);
setValue(\"\", \"text\", dpValToString(dp, fNewValue, TRUE) ); 

}


//dpConnect(\"add\", \"A.:_online.._value\", \"B.:_online.._value\");
//}
//add(string dp1, int a, string dp2, int b)
//{
//dpSet(\"C.:_original.._value\", a + b);

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate1.HV0.HVchStat}
// DPConfig {:_online.._value}
// DPType {float}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 184 525 238 541
1 2 0 "s" 0 0 0 64 0 0  184 525
 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 HVcoVolt
2 155
"Text91"
""
1 32 492 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
153 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 34 494 104 510
0 2 0 "s" 0 0 0 64 0 0  34 494
 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 9 CONTROL :
2 156
"Text92"
""
1 52 523 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
154 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 54 525 100 551
0 2 0 "s" 0 0 0 64 0 0  54 525
 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 Voltage
2 157
"Text93"
""
1 52 553 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
155 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 54 555 110 571
0 2 0 "s" 0 0 0 64 0 0  54 555
 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 9 Curr Trip
2 158
"Text94"
""
1 52 583 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
156 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 54 585 100 598
0 2 0 "s" 0 0 0 64 0 0  54 585
 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 4 Ramp
2 364
"Text4"
""
1 328 21 E E E 1 E 1 E N {0,0,0} E N {255,255,204} E E
 E E
354 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 1 E U  1 E 330 23 416 39
0 2 0 "s" 0 0 0 64 0 0  330 23
 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 10 lv channel
2 365
"Text56"
""
1 334 441 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
354 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTps:Item.HV:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.HV:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}

EP_setInvalidCB(string dp, bool boInvalid)
{
  setValue(\"\", \"color\", (boInvalid ? \"_invalid\" : \"\"));
}

// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.HV}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 1 E U  1 E 336 443 422 459
0 2 0 "s" 0 0 0 64 0 0  336 443
 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 10 hv channel
7 366
"Ellipse1"
""
1 545 485 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
354 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+1;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);  
      delay(0,50);          
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+1;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}


// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+1;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);

sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&2)
         {
         imask=imask-2;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&2))
          {
          imask=imask+2;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 485 5 5
7 367
"Ellipse2"
""
1 545 545 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
355 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+4;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1); 
   delay(0,50);           
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+4;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}


// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+4;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);

sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&16)
         {
         imask=imask-16;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
   else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&16))
          {
          imask=imask+16;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 545 5 5
7 368
"Ellipse3"
""
1 545 525 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
356 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+3;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);
   delay(0,50);            
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+3;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}

// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+3;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);

sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&8)
         {
         imask=imask-8;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&8))
          {
          imask=imask+8;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 525 5 5
7 369
"Ellipse4"
""
1 545 505 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
357 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+2;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);
    delay(0,50);           
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+2;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}


// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+2;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
delay(0,50);

sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv);
dpGet(datapoint4, iStat); 

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&4)
         {
         imask=imask-4;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&4))
          {
          imask=imask+4;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}
// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 505 5 5
7 370
"Ellipse5"
""
1 545 605 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
358 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+7;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1); 
  delay(0,50);           
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+7;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

// dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
//  delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}

// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+7;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
delay(0,50);

sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&128)
         {
         imask=imask-128;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
   else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&128))
          {
          imask=imask+128;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 605 5 5
7 371
"Ellipse6"
""
1 545 585 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
359 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+6;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);
      delay(0,50);            
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+6;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
//    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}


// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+6;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 
sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 

dpGet(datapoint4, iStat);
//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&64)
         {
         imask=imask-64;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&64))
          {
          imask=imask+64;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }
 
 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}
// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 585 5 5
7 372
"Ellipse7"
""
1 545 565 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
360 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+5;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.HV.HVchStat:_online.._value\",hv);
 //DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
  //dpConnect(\"EP_setBackColorCB\", 
          //  datapoint);
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);
      delay(0,50);            
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint,datapoint1;
int mask,stat;

 crate=0;
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/8;
 hv=icard*8+5;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.HV.HVchStat:_online.._value\",crate,hv);

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{
    DebugN(\"datapoint\",datapoint, iNewValue,hv);
   if (iNewValue==11)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==3)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
}

// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,hv;
int iRamp, iVolt,iStat, doit;
string datapoint2,datapoint3,datapoint4;

doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/8;
hv=icard*8+5;
sprintf(datapoint,\"SCTps:Crate0.HVCard_%d.HVccMask:_original.._value\",icard);
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
 delay(0,50);
 
sprintf(datapoint2, \"SCTps:Crate0.Channel_%d.HV.HVcoRamp:_original.._value\", hv); 
dpGet(datapoint2, iRamp);
sprintf(datapoint3, \"SCTps:Crate0.Channel_%d.HV.HVchVolt:_original.._value\", hv); 
dpGet(datapoint3, iVolt);
sprintf(datapoint4, \"SCTps:Crate0.Channel_%d.HV.HVchStat:_original.._value\", hv); 
dpGet(datapoint4, iStat);

//DebugN(\"iStat \",iStat);
if (iRamp==0 || iVolt>0.625*8)
   {
   doit=0;
   }
   
//DebugN(\"iRamp\", iRamp, \"iVolt\", iVolt, iVolt/8,\"hv\", hv, \"doit\", doit);   
   
//getValue(\"\", \"backCol\", on);
//DebugN(\"on \",on,\"{Green}\",\"{red}\");
      
   if (!(iStat&8) &&doit==1)
      {
      dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&32)
         {
         imask=imask-32;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
   else if (iStat&8 &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&32))
          {
          imask=imask+32;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }
      
 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv+100);
  delay(0,50);
 dpGet(datapoint4, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}
// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 545 565 5 5
7 380
"Ellipse8"
""
1 550 204 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
362 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
hv=icard*4+1;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.LV.LVchStat:_online.._value\",hv);
 DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);            
   delay(0,50);
 //dpConnect(\"EP_setBackColorCB\", datapoint);
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint1;
int stat;
 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/4;
 hv=icard*4+1;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate,hv);
 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv);
  delay(0,50);
  dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{

   if (iNewValue==64||iNewValue==0)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==192||iNewValue==128)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
  
}




// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,lv, crate;
int  iVcc,iVdd,iVcsel,iVpin, doit,iStat;
string datapoint2,datapoint3, datapoint4, datapoint5,datapoint6;

crate=0;
doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
icard=lv/4;
lv=icard*4+1;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_original.._value\",icard);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
delay(0,50);

sprintf(datapoint2,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_original.._value\",crate, lv); 
dpGet(datapoint2, iVcc); 
sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_original.._value\",crate, lv); 
dpGet(datapoint3, iVdd);
sprintf(datapoint4,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_original.._value\",crate, lv); 
dpGet(datapoint4, iVcsel); 
sprintf(datapoint5, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_original.._value\",crate, lv); 
dpGet(datapoint5, iVpin);
sprintf(datapoint6, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_original.._value\", crate, lv);
dpGet(datapoint6, iStat);

if (iVcc>0.07*50 || iVdd>0.07*50 || iVcsel>0.07*25 || iVpin>0.07*20)
   {
   doit=0;
   }
   
//Debug(\"iVcc\", iVcc/50, \"iVdd\", iVdd/50, \"iVcsel\", iVcsel/25, \"iVpin\", iVpin/20, \"doit\", doit);   
   
   if ((iStat&=128) &&doit==1)
      {
       dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&2)
         {
         imask=imask-2;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (!(iStat&=128) &&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&2))
          {
          imask=imask+2;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
 delay(0,50);
 dpGet(datapoint6, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 550 204 5 5
7 381
"Ellipse9"
""
1 550 224 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
363 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
hv=icard*4+2;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.LV.LVchStat:_online.._value\",hv);
 DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);            
   delay(0,50);
 //dpConnect(\"EP_setBackColorCB\", datapoint);
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint1;
int stat;
 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/4;
 hv=icard*4+2;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate,hv);
  dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv);
   delay(0,50);
  dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{

   if (iNewValue==64||iNewValue==0)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==192||iNewValue==128)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
  
}




// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,lv, crate;
int  iVcc,iVdd,iVcsel,iVpin, doit,iStat;
string datapoint2,datapoint3, datapoint4, datapoint5,datapoint6;

crate=0;
doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
icard=lv/4;
lv=icard*4+2;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_original.._value\",icard);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
delay(0,50);

sprintf(datapoint2,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_original.._value\",crate, lv); 
dpGet(datapoint2, iVcc); 
sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_original.._value\",crate, lv); 
dpGet(datapoint3, iVdd);
sprintf(datapoint4,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_original.._value\",crate, lv); 
dpGet(datapoint4, iVcsel); 
sprintf(datapoint5, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_original.._value\",crate, lv); 
dpGet(datapoint5, iVpin);
sprintf(datapoint6, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_original.._value\", crate, lv); 

dpGet(datapoint6, iStat);

if (iVcc>0.07*50 || iVdd>0.07*50 || iVcsel>0.07*25 || iVpin>0.07*20)
   {
   doit=0;
   }
   
//Debug(\"iVcc\", iVcc/50, \"iVdd\", iVdd/50, \"iVcsel\", iVcsel/25, \"iVpin\", iVpin/20, \"doit\", doit);   
   
  if ((iStat&=128) &&doit==1)
      {
       dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&4)
         {
         imask=imask-4;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (!(iStat&=128))
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&4))
          {
          imask=imask+4;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
 delay(0,50);
 dpGet(datapoint6, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 550 224 5 5
7 382
"Ellipse10"
""
1 550 244 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
364 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setBackColor();
}

EP_setBackColor()
{
dyn_errClass err;
int icard, hv;
string datapoint,datapoint1;

dpGet(\"SCTps:Item.HV:_original.._value\", hv);
icard=hv/4;
hv=icard*4+3;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_online.._value\",icard);
sprintf(datapoint1,\"SCTps:Crate0.Channel_%d.LV.LVchStat:_online.._value\",hv);
 DebugN(datapoint,\"datapoint\", datapoint1);
  if( dpSubStr( datapoint, DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }
  //dpConnect(\"setdatapoint\",\"SCTps:Item.HV:_original.._value\");
  
  dpConnect(\"EP_setBackColorCB\", \"SCTps:Item.HV:_original.._value\");
   delay(0,50);
  dpConnect(\"EP_setBackColorCB\", 
            datapoint1);            
   delay(0,50);
 //dpConnect(\"EP_setBackColorCB\", datapoint);
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}



EP_setBackColorCB(string dpSource, int iNewValue)
{
int hv,crate,icard;
string datapoint1;
int stat;
 crate=0;

 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 icard=hv/4;
 hv=icard*4+3;
 sprintf(datapoint1,\"SCTps:Crate%d.Channel_%d.LV.LVchStat:_online.._value\",crate,hv);
 dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", hv);
   delay(0,50);
  dpGet(datapoint1,iNewValue);
 //if(stat!=3)
 //{

   if (iNewValue==64||iNewValue==0)
    setValue(\"\", \"backCol\", \"Red\");
  else if (iNewValue==192||iNewValue==128)
    setValue(\"\", \"backCol\", \"Green\");
  else 
    setValue(\"\", \"backCol\", \"Yellow\");  
  
}




// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Item.MaskBool}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {Red}
// Operator2 {else}
// Operant2 {}
// Color2 {Green}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0
 "// SimpleCtrlScriptStart {invalid}
main()
{
 EP_toggleDP();
}

EP_toggleDP()
{

string on,datapoint;
int imask,icard,lv, crate;
int  iVcc,iVdd,iVcsel,iVpin, doit,iStat;
string datapoint2,datapoint3, datapoint4, datapoint5,datapoint6;

crate=0;
doit=1;
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
icard=lv/4;
lv=icard*4+3;
sprintf(datapoint,\"SCTps:Crate0.LVCard_%d.LVccMask:_original.._value\",icard);

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
delay(0,50);

sprintf(datapoint2,\"SCTps:Crate%d.Channel_%d.LV.LVch_Vcc:_original.._value\",crate, lv); 
dpGet(datapoint2, iVcc); 
sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.LV.LVch_Vdd:_original.._value\",crate, lv); 
dpGet(datapoint3, iVdd);
sprintf(datapoint4,\"SCTps:Crate%d.Channel_%d.LV.LVchVCSV:_original.._value\",crate, lv); 
dpGet(datapoint4, iVcsel); 
sprintf(datapoint5, \"SCTps:Crate%d.Channel_%d.LV.LVchPINV:_original.._value\",crate, lv); 
dpGet(datapoint5, iVpin);
sprintf(datapoint6, \"SCTps:Crate%d.Channel_%d.LV.LVchStat:_original.._value\", crate, lv); 
dpGet(datapoint6, iStat);

if (iVcc>0.07*50 || iVdd>0.07*50 || iVcsel>0.07*25 || iVpin>0.07*20)
   {
   doit=0;
   }
   
//Debug(\"iVcc\", iVcc/50, \"iVdd\", iVdd/50, \"iVcsel\", iVcsel/25, \"iVpin\", iVpin/20, \"doit\", doit);   
   
   if ((iStat&=128) &&doit==1)
      {
       dpGet(datapoint,imask);
//      DebugN(\"before off \",imask);
      if (imask&8)
         {
         imask=imask-8;
         dpSet(datapoint,imask);
 //        DebugN(\"off \",imask);
         }
      setValue(\"\", \"backCol\", \"Red\");
      }
    else if (!(iStat&=128)&&doit==1)
      {

       dpGet(datapoint,imask); 
 //      DebugN(\"before on \",imask);
       if (!(imask&8))
          {
          imask=imask+8;
          dpSet(datapoint,imask);
          dpGet(datapoint,imask);
//          DebugN(\"on \",imask);
          }
       setValue(\"\", \"backCol\", \"Green\");
       }
 
     else if (doit==0){
         EP_childPanelOn();
      }

dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", lv);
 delay(0,50);
 dpGet(datapoint6, iStat);
// DebugN(\"iStat \",iStat);    
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_toggleDP}
// DP {SCTps:Item.MaskBool}
// Config {:_original.._value}
// DPType {bool}
// SimpleCtrlScriptEnd {EP_toggleDP}
" 0
 0 1 1 0 1 E U  1 E 550 244 5 5
14 180
"TextField8"
""
1 110 90 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
176 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 88 172 114
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

dpGet(dp, fNewValue);
fNewValue=fNewValue/50;
sprintf(sTmp,\"%.1f\",fNewValue);
setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_original.._value\",crate, hv); 
iNewValue=fNewValue*50;
dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 181
"TextField9"
""
1 110 120 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
177 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 118 172 144
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue/50;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
 
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
  dpGet(\"SCTps:Item.HV:_original.._value\", hv);
  crate=0;
  sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_original.._value\",crate, hv); 
  iNewValue=fNewValue*50;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 182
"TextField10"
""
1 110 300 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
178 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 298 172 324
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTTrp:_original.._value\",crate, hv); 
 iNewValue=fNewValue+128;
 dpSetWait(datapoint, iNewValue);
 err = getLastError();
 if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 183
"TextField11"
""
1 110 270 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
179 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 268 172 294
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
 string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue-128;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue); 
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoTLim:_original.._value\",crate, hv); 
 iNewValue=fNewValue +128;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 184
"TextField12"
""
1 110 240 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
180 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 238 172 264
3 "s" 0 0 0 0 0 0 
E
"
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
 string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}

/*main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
 string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}
*/" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;


  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_original.._value\",crate, hv); 
 iNewValue=fNewValue/2;
 dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

/* main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,sTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCTrp:_original.._value\",crate, hv); 
 iNewValue=fNewValue/2;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}
*/

// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 185
"TextField13"
""
1 110 210 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
181 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 208 172 234
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
 string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue*2;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;


  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoDTrp:_original.._value\",crate, hv); 
 iNewValue=fNewValue/2;
 dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 186
"TextField14"
""
1 110 180 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
182 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 178 172 204
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue/20;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_original.._value\",crate, hv); 
 iNewValue=fNewValue*20;
 dpSetWait(datapoint, iNewValue);
 err = getLastError();
 if (dynlen(err) > 0)
   errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 187
"TextField15"
""
1 110 150 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
183 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 148 172 174
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue/25;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_original.._value\",crate, hv); 
 iNewValue=fNewValue*25;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 188
"TextField16"
""
1 110 390 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
184 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 388 172 414
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue); 
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoVOut:_original.._value\",crate, hv); 
 iNewValue=fNewValue;
   dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 189
"TextField17"
""
1 110 360 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
185 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 358 172 384
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
 }" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
 if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKR:_original.._value\",crate, hv); 
 iNewValue=fNewValue;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 190
"TextField18"
""
1 110 330 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
186 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
108 328 172 354
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
 string sTmp;

 dpGet(dp, fNewValue);
 fNewValue=fNewValue;
 sprintf(sTmp,\"%.1f\",fNewValue);
 setValue(\"\", \"text\", sTmp );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
float fNewValue;
dyn_errClass err;
string sTmp,ssTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", ssTmp);
  sscanf(ssTmp, \"%d\", iNewValue);
  sprintf(sTmp,\"%d\",iNewValue);
  sscanf(ssTmp, \"%f\", fNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
 dpGet(\"SCTps:Item.HV:_original.._value\", hv);
 crate=0;
 sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.LV.LVcoCLKS:_original.._value\",crate, hv); 
 iNewValue=fNewValue;
 dpSetWait(datapoint, iNewValue);
 err = getLastError();
 if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 231
"TextField3"
""
1 652 526 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
224 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
650 524 714 550
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv,icard;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/8;
sprintf(datapoint, \"SCTps:Crate%d.HVCard_%d.HVccMask:_online.._value\",crate, icard); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}



// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Crate0.HVCard_0.HVccMask}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {\\{204,51,51\\}}
// Operator2 {else}
// Operant2 {}
// Color2 {\\{102,204,102\\}}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint, datapoint2, datapoint3;
int crate, hv,icard, iRamp, iVolt, i;
int doit;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/8;
doit=1;


  sprintf(datapoint, \"SCTps:Crate%d.HVCard_%d.HVccMask:_original.._value\",crate,icard);
  for (i=icard*8;i<=icard*8+7;i++)
  {   
      sprintf(datapoint2, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_original.._value\",crate, i); 
      dpGet(datapoint2, iRamp);
      sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_original.._value\",crate, i); 
      dpGet(datapoint3, iVolt);
      if(iRamp==0 || iVolt!=0)
      {
      doit=0;
      }
  }
      if (doit==1)
        {
         dpSetWait(datapoint, iNewValue);
//         DebugN(\"if iNewValue\",iNewValue, \"iVolt\", iVolt, \"iRamp\", iRamp);
        }
      else 
        {
         EP_childPanelOn();
 //        DebugN(\"else iNewValue\",iNewValue, \"iVolt\", iVolt, \"iRamp\", iRamp);
         }

// Read the new values for the mask
/* delay(5);
  for (i=icard*8;i<=icard*8+7;i++)
  {  
       dpSet(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", i+100);
  }
  */
   err = getLastError();
      if (dynlen(err) > 0)
      errorDialog(err);
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask.pnl\",
      \"\",
      makeDynString(\"\"));
}
// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 232
"TextField6"
""
1 605 134 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
225 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
603 132 667 158
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv,icard;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVccTrip:_online.._value\",crate, icard); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
fNewValue=fNewValue/2.5;
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint;
int crate, hv,icard;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
icard=hv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVccTrip:_original.._value\",crate,icard); 
iNewValue=iNewValue*2.5;
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

13 234
"Button4"
""
1 682 60 E E E 1 E 1 E N {255,255,255} E N {255,153,51} E E
 E E
227 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
680 58 754 92
T 
1
LANG:1 4 SEND
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int lv,icard,i;
dyn_int slot;
 
  slot=makeDynString(0,2,3,5,6,8,9,11,12,14,15,17);
  dpGet(\"SCTps:Item.HV:_original.._value\", lv);
  icard=lv/4+1;
  i=200+slot(icard);
  dpSetWait(\"SCTps:Crate0.Elmb_0.CCco_Set:_original.._value\", i);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate0.Elmb_0.CCco_Set}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
// err = getLastError();
  //if (dynlen(err) > 0)
  //  errorDialog(err);" 0
 E E E
13 235
"Button5"
""
1 682 286 E E E 1 E 1 E N {255,255,255} E N {255,153,51} E E
 E E
228 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
680 284 754 318
T 
1
LANG:1 4 READ
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int lv,icard,i;
dyn_int slot;
 
  slot=makeDynString(0,2,3,5,6,8,9,11,12,14,15,17);
  dpGet(\"SCTps:Item.HV:_original.._value\", lv);
  icard=lv/4;
  i=200+slot(icard);
  dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", i);

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



// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate0.Elmb_0.CCco_Set}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
14 289
"TextField1"
""
1 605 102 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
281 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
603 100 667 126
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, lv,icard;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
crate=0;
icard=lv/4;
sprintf(datapoint, \"SCTps:Crate%d.LVCard_%d.LVccMask:_original.._value\",crate, icard); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}



// SimpleCtrlScript {EP_setBackColor}
// DP {SCTps:Crate0.HVCard_0.HVccMask}
// DPConfig {:_online.._value}
// DPType {int}
// AlertHdl {FALSE}
// DPEInvalid {SCTps:Crate0.HVCard_0.HVccMask}
// DPEConfigInvalid {:_online.._invalid}
// Operator1 {less}
// Operant1 {1}
// Color1 {\\{204,51,51\\}}
// Operator2 {else}
// Operant2 {}
// Color2 {\\{102,204,102\\}}
// SimpleCtrlScriptEnd {EP_setBackColor}
" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint, datapoint2, datapoint3,datapoint4, datapoint5;
int crate, lv,icard, iVdd, iVcc,iVcsel,iVpin,i;
int doit;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", lv);
crate=0;
icard=lv/4;
doit=1;

//DebugN(\"first\");
  sprintf(datapoint,\"SCTps:Crate%d.LVCard_%d.LVccMask:_original.._value\",crate,icard);
  for (i=icard*4;i<=icard*4+3;i++)
  {   
   //   DebugN(\"i \",i,\"icard \", icard,\"lv \",lv);
      sprintf(datapoint2,\"SCTps:Crate%d.Channel_%d.LV.LVco_Vcc:_original.._value\",crate, i); 
      dpGet(datapoint2, iVcc); 
      sprintf(datapoint3, \"SCTps:Crate%d.Channel_%d.LV.LVco_Vdd:_original.._value\",crate, i); 
      dpGet(datapoint3, iVdd);
      sprintf(datapoint4,\"SCTps:Crate%d.Channel_%d.LV.LVcoVCSV:_original.._value\",crate, i); 
      dpGet(datapoint4, iVcsel); 
      sprintf(datapoint5, \"SCTps:Crate%d.Channel_%d.LV.LVcoPINV:_original.._value\",crate, i); 
      dpGet(datapoint5, iVpin);
//      DebugN(\"datapoint4\",datapoint4,\"iVpin\", iVcc,iVdd,iVcsel,iVpin);
      if(iVcc!=0 || iVdd!=0 || iVcsel!=0 || iVpin!=0)
      {
      doit=0;
      }
  }
      if (doit==1)
        {
         dpSetWait(datapoint, iNewValue);
 //        DebugN(\"if iNewValue\",iNewValue, \"iVdd\", iVdd, \"iVcc\", iVcc,iVcsel,iVpin);
        }
      else 
        {
         EP_childPanelOn();
 //        DebugN(\"else iNewValue\",iNewValue, \"iVdd\", iVdd, \"iVcc\", iVcc,iVcsel,iVpin);
         }
/*delay(3);
  for (i=icard*4;i<=icard*4+3;i++)
  {  
       dpSet(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", i);
  }
  */
      err = getLastError();
      if (dynlen(err) > 0)
      errorDialog(err);
}


EP_childPanelOn()
{
  ChildPanelOnCentralModal(\"ErrorMask1.pnl\",
      \"\",
      makeDynString(\"\"));
}
// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 58
"TextField2"
""
1 112 583 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
57 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
110 581 174 607
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_online.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoRamp:_original.._value\",crate, hv); 
  dpSet(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 60
"TextField4"
""
1 112 523 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
59 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
110 521 174 547
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_original.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoVolt:_original.._value\",crate, hv); 
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

14 61
"TextField5"
""
1 112 553 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
60 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
110 551 174 577
3 "s" 0 0 0 0 0 0 
E
"main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
string datapoint;
int crate, hv;
dyn_errClass err;

//dpGet(\"SCTps:Item.Crate:_original.._value\", crate);
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_online.._value\",crate, hv); 

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

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

}

EP_textFieldInCB(string dp, float fNewValue)
{
  setValue(\"\", \"text\", dpValToString(dp, fNewValue, FALSE) );
}" 0

"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;
string datapoint;
int crate, hv;

  getValue(\"\", \"text\", sTmp);
  sscanf(sTmp, \"%d\", iNewValue);

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
dpGet(\"SCTps:Item.HV:_original.._value\", hv);
crate=0;
sprintf(datapoint, \"SCTps:Crate%d.Channel_%d.HV.HVcoITrp:_original.._value\",crate, hv); 
  dpSetWait(datapoint, iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}


// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate1.HV0.HVcoRamp}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

13 376
"Button6"
""
1 710 470 E E E 1 E 1 E N {255,255,255} E N {0,0,255} E E
 E E
362 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
708 468 782 502
T 
1
LANG:1 4 SEND
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int hv,icard,i;
dyn_int slot;

  slot=makeDynString(1,4,7,10,13,16);
  //Array starts with 1
  dpGet(\"SCTps:Item.HV:_original.._value\", hv);
  icard=hv/8+1;
  i=200+slot(icard);
  dpSet(\"SCTps:Crate0.Elmb_0.CCco_Set:_original.._value\", i);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate0.Elmb_0.CCco_Set}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 378
"Button8"
""
1 720 550 E E E 1 E 1 E N {255,255,255} E N {0,0,255} E E
 E E
362 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
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 ""
718 548 792 582
T 
1
LANG:1 4 READ
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int hv,icard,i;
dyn_int slot;

  slot=makeDynString(1,4,7,10,13,16);
  //Array starts with 1
  dpGet(\"SCTps:Item.HV:_original.._value\", hv);
  icard=hv/8+1;
  i=200+slot(icard);
  dpSet(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", i);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate0.Elmb_0.CCco_Set}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
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