V 10
1
LANG:1 8 (NoName)
PANEL,447 107 229 466 N "_3DFace" 0
EEE E E 1 -1 -1 0  30 70
"" 0 1
E"EP_childPanelOn()
{
 ChildPanelOnCentralModal(\"subpanels/ErrorMask.pnl\",\"\",makeDynString(\"\"));
}" 0
 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
6 38
"Border1"
""
1 10 340 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
33 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 10 10 210 340
2 39
"Text3"
""
1 10 10 E E E 1 E 1 E N {0,0,0} E N {153,153,204} E E
 E E
34 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 12 12 208 33
1 2 0 "s" 0 0 0 65 0 0  12 12
 1
1
LANG:1 105 -microsoft windows-Arial-bold-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,34,Arial
0 ""
1
LANG:1 18 One Crate Controll
2 40
"Text4"
""
1 10 271 E E E 1 E 1 E N {0,0,0} E N {153,153,204} E E
 E E
35 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 12 273 208 294
1 2 0 "s" 0 0 0 65 0 0  12 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 14 One Crate Mask
13 24
"Button5"
""
1 20 40 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
21 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 ""
18 38 112 72
T 
1
LANG:1 9 ON ALL HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=1;
   
   dpGet(\"Crate.Numb:_original.._value\", crate);
	
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);

  for (i=0;i<=47;i++)
  {
 channel = i+64 | (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 14
"ReadCard"
""
1 968 160 E E E 1 E 1 E N {0,0,0} E N {153,153,204} E E
 E E
15 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 ""
18 128 202 162
T 
1
LANG:1 4 READ
"// SimpleCtrlScriptStart {invalid}

main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int crate,channel, i;
string datapoint;

dpGet(\"Crate.Numb:_original.._value\",crate);
sprintf(datapoint,\"Crate%02d.Controller.CCchRead.Send:_original.._value\", crate);
for (i=0;i<=47;i++){
channel=i+64;
dpSetWait(datapoint, channel);
dpSetWait(datapoint,i);
delay(0,10);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 }
}

// SimpleCtrlScript {EP_setDP}
// DP1 {Crate00.Controller.CCco_Set}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 21
"Button1"
""
1 74 510 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
20 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 ""
18 298 112 332
T 
1
LANG:1 12 ALL MASKS ON
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int i;
string datapoint;
int crate;


dpGet(\"Crate.Numb:original.._value\",crate);
 for (i=0;i<=5;i++)
  {
  sprintf(datapoint, \"Crate%02d.HV_card%02d.HVcaMask.Send:_original.._value\",crate,i);

  dpSetWait(datapoint, 255);
  }
 for (i=0;i<=11;i++)
  {
  sprintf(datapoint, \"Crate%02d.LV_card%02d.LVcaMask.Send:_original.._value\",crate,i);

  dpSetWait(datapoint, 15);
  }

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

//DebugN(\"Mask on...\");
dpSet(\"Info.Name:_original.._value\", \"Mask on...\");     
  
}

// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 22
"AllMasksOff"
""
1 183 830 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
20 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 ""
108 298 202 332
T 
1
LANG:1 12 ALL MSKS OFF
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int i;
string datapoint;
int crate,volt ;
int flag;

flag=0;
dpGet(\"Crate.Numb:original.._value\",crate);
 for (i=0;i<=47;i++)
   {
   sprintf(datapoint,\"Crate%02d.Channel%02d.HVchVolt.Recv:_online.._value\",crate,i);
   dpGet(datapoint,volt);
   if(volt>10) flag=1;
   }
  if(flag==0)
  {
    for (i=0;i<=5;i++)
      {
      sprintf(datapoint, \"Crate%02d.HV_card%02d.HVcaMask.Send:_original.._value\",crate,i);
      //DebugN(datapoint,i);
      dpSetWait(datapoint, 0);
      }
    for (i=0;i<=11;i++)
      {
      sprintf(datapoint, \"Crate%02d.LV_card%02d.LVcaMask.Send:_original.._value\",crate,i);
      //DebugN(datapoint,i);
      dpSetWait(datapoint, 0);
      }
  }
  else 
  {
   ChildPanelOnCentral(\"realmask.pnl\", \"realmask\", \"\");
  } 

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

dpSet(\"Info.Name:_original.._value\", \"Mask off...\");        
  
}




// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 45
"Button9"
""
1 20 70 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
40 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 ""
18 68 112 102
T 
1
LANG:1 12 STNBY ALL HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=2;
   dpGet(\"Crate.Numb:_original.._value\", crate);
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
  for (i=0;i<=47;i++)
  {
 channel = i+64 | (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 46
"Button12"
""
1 20 100 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
41 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 ""
18 98 112 132
T 
1
LANG:1 10 OFF ALL HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=0;
   dpGet(\"Crate.Numb:_original.._value\", crate);
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
  for (i=0;i<=47;i++)
  {
 channel = i+64 | (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 47
"Button2"
""
1 110 40 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
42 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 ""
108 38 202 72
T 
1
LANG:1 9 ON ALL LV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=1;
   
   dpGet(\"Crate.Numb:_original.._value\", crate);
	
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);

  for (i=0;i<=47;i++)
  {
 channel = i| (( iState & 0x00ff )<<8);
 delay(0,50);
 dpSetWait(datapoint,channel);

 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 48
"Button3"
""
1 110 70 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
43 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 ""
108 68 202 102
T 
1
LANG:1 12 STNBY ALL LV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=2;
   dpGet(\"Crate.Numb:_original.._value\", crate);
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);

  for (i=0;i<=47;i++)
  {
 delay(0,50);
 channel = i| (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 49
"Button4"
""
1 110 100 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
44 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 ""
108 98 202 132
T 
1
LANG:1 10 OFF ALL LV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=0;
   dpGet(\"Crate.Numb:_original.._value\", crate);
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
  for (i=0;i<=47;i++)
  {
  delay(0,50);
 channel = i| (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 }

  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 50
"Button6"
""
1 60 170 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
44 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 ""
58 168 172 202
T 
1
LANG:1 12 ON LV and HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=1;
   
   dpGet(\"Crate.Numb:_original.._value\", crate);
	
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
 channel = 255| (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 51
"Button7"
""
1 60 200 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
45 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 ""
58 198 172 232
T 
1
LANG:1 16 STNBY  LV and HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=2;
   dpGet(\"Crate.Numb:_original.._value\", crate);
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
 channel = 255| (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 err = getLastError();
 if (dynlen(err) > 0)
 errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 53
"Button8"
""
1 60 230 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
47 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 ""
58 228 172 262
T 
1
LANG:1 13 OFF LV and HV
"// SimpleCtrlScriptStart {invalid}
main()
{

int iState,crate;
 
   setValue(\"\", \"backCol\", \"Red\");
   iState=0;
   
   dpGet(\"Crate.Numb:_original.._value\", crate);
	
   PSset(iState,crate);
   setValue(\"\", \"backCol\", \"{204,204,255}\");
}

PSset(int iState, int crate)
{
dyn_errClass err;
int  i,j;
int set,channel;
string datapoint;

 sprintf(datapoint,\"Crate%02d.Controller.CCch_Set.Send:_original.._value\",crate);
 channel = 255| (( iState & 0x00ff )<<8);
 dpSetWait(datapoint,channel);
 
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 
}
// SimpleCtrlScript {EP_setDP}
// DP1 {Crate1.HVchRamp}
// 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