V 10
1
LANG:1 4 HVLV
PANEL,272 101 951 700 N {204,204,204} 0
"main()
{
//     Read();
//   dpConnect(\"setOpening\",\"setOpening.trigger:_online.._value\");
//   dpSet(\"Crate00.DDC.DCS_STATES:_original.._value\",0);
 //  Load();
//   dpSet(\"Crate00.DDC.DCS_STATES:_original.._value\",1);
 //  Configure();
//   dpSet(\"Crate00.DDC.DCS_STATES:_original.._value\",2);
//   Monitor();
//   dpSet(\"Crate00.DDC.DCS_STATES:_original.._value\",3);
   
//   Configure();
//   DebugN(\"configure\");

//   Monitor();
//   DebugN(\"monitor\");
   

}


//Read all monitored values from ELMB



void Read()
{
dyn_errClass err;
int lv, icard, channel, i;

dpGet(\"HVch.Numb:_original.._value\", lv); 
icard=lv/4;

for (i=icard*4;i<=icard*4+47;i++){
DebugN(\"WE CALLED IT\");
//DebugN(\"lv\", lv ,\"icard\", icard,\"i\", i);
channel=i;
dpSet(\"Crate00.Controller.CCchRead.Send:_original.._value\", channel);
channel=i+100;
delay(0,10);
dpSet(\"Crate00.Controller.CCchRead.Send:_original.._value\", channel);
delay(0,10);
//DebugN(\"i\", i,\"channel\", channel); 
 
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
 }
}

//

void setOpening(string dpeTrigger, bool state)
{
string paramStr;
dyn_string param;
//string dp_path;
float value;
int i;
bool bit;
string port;
int response;

/*
if(state)
{
  response=0;
  dpGet(\"setOpening.trigger:_online.._value\", paramStr);
  param=strsplit(paramStr,\"|\");

  //sscanf(param[1],\"%s\",dp_path);
  sscanf(param[1],\"%f\",value);

  //Limi01.FatL
  response=dpSetWait(\"Crate00.DDC.DCS_STATES:_original.._value\",value);
      if(response!=0)
         response=0-response;

   dpSet(\"setOpening.response:_original.._value\",response,
         \"setOpening.trigger:_original.._value\",!state);
 }
*/
}

//-----------------------------------------------------------
// Load initialisation values into the ELMB
//-----------------------------------------------------------

Load()
{
dyn_errClass err;
int i,j,k,l,m,n,icard;
dyn_string valset, valset2, valset3; 
string datapoint1, datapoint2, datapoint3;
dyn_float initValue, initValue2, initValue3;


// Set Channel number to zero
//-----------------------------------------------------------
dpSetWait(\"HVch.Numb:_original.._value\", 0);


// Starting the ELMB
//-----------------------------------------------------------
//dpSetWait(\"Crate00.Elmb_0.NMT:_original.._value\", 1); 
//DebugN(\"ELMB\");

//Setting configuration of the HV Channels and Cards to the ELMB
//------------------------------------------------------------------ 
valset=makeDynString(\"HVcaMask\",\"HVchVolt\",\"HVchITrp\",\"HVchRamp\");
initValue= makeDynFloat(0,100,1000,3);

for(j=1; j<=4; j++)
    {
	if(j==1)
	  {
	  for(i=0; i<=5; i++)
         {
         sprintf(datapoint1, \"Crate00.HV_card%02d.%s.Send:_original.._value\",i,valset[j]);
         dpSetWait(datapoint1, initValue[j]);
         }
 	  }
 	  else
 	  {
       for(i=0; i<=47; i++)
         {
        sprintf(datapoint1, \"Crate00.Channel%02d.%s.Send:_original.._value\",i,valset[j] );
        dpSetWait(datapoint1, initValue[j]);
         }
        }
       }

//Setting configuration of the LV Cards and channels to the ELMB 
//-----------------------------------------------------------------

valset2=makeDynString(\"LVcaTrip\",\"LVcaMask\",\"LVch_Vcc\",\"LVch_Vdd\",\"LVchVCSV\",\"LVchPINV\", \"LVchDTrp\", \"LVchCTrp\", \"LVchTLim\", \"LVchTTrp\", \"LVchCLKS\", \"LVchCLKR\", \"LVchVOut\");
initValue2=makeDynFloat(46*2.5,0,3.5*50,4*50,4*25,6*20,50/2,50/2,128,148,0,0,1);

for(j=1; j<=13; j++)
    {
	if(j<=2)
	  {
	  for(i=0; i<=11; i++)
         {
         sprintf(datapoint2, \"Crate00.LV_card%02d.%s.Send:_original.._value\",i,valset2[j]);
         dpSetWait(datapoint2, initValue2[j]);
//	     DebugN(\"TTrip\", initValue2[1],\"LVMask\",initValue2[2]);
         }
 	  }
 	  else
 	  {
       for(i=0; i<=47; i++)
         {
        sprintf(datapoint2, \"Crate00.Channel%02d.%s.Send:_original.._value\",i,valset2[j] );
        dpSetWait(datapoint2, initValue2[j]);
         }
        }
       }
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);       
}

//-----------------------------------------------------------
// Transmitting the right values from the ELMB to the Cards
//-----------------------------------------------------------

Configure() {
DebugN(\"Configure\");  
     dpSetWait(\"Crate00.Controller.CCch_Set.Send:_original.._value\", 255); 
  }


//-----------------------------------------------------------
// Starting monitoring state
//-----------------------------------------------------------

Monitor() {
  DebugN(\"Monitor\");
  }

" 0
EE E E 1 -1 -1 0  0 10
"" 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 111
"Text6"
""
1 30 640 E E E 1 E 1 E N {0,0,0} E N {255,255,255} 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  1 E 32 642 218 678
1 2 0 "s" 0 0 0 64 0 0  32 642
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 11 Comments...
2 97
"Text2"
""
1 10 640 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
92 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 642 18 658
1 2 0 "s" 0 0 0 64 0 0  12 642
 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 5 Text2
2 114
"Text1"
""
1 30 650 E E E 1 E 1 E N {0,0,0} E N {255,255,255} 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  1 E 32 652 228 667
1 2 0 "s" 0 0 0 64 0 0  32 652
 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 7 drdtdtr
28 69
"Tab2"
""
1 108 402 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
65 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 248 246 632
E3
"Global CMD" 1
LANG:1 10 Global CMD
1 "subpanels\\Global.pnl" 1
LANG:1 0 
0
"Local CMD" 1
LANG:1 9 Local CMD
1 "subpanels\\Local.pnl" 1
LANG:1 0 
0
"RST" 1
LANG:1 5 Tests
1 "subpanels\\RST.pnl" 1
LANG:1 0 
0
28 46
"Tab1"
""
1 319 1038 E E E 1 E 1 E N "_3DText" E N "_3DFace" 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 ""
248 48 942 692
E3
"Values" 1
LANG:1 6 Values
1 "subpanels\\Values.pnl" 1
LANG:1 0 
0
"Global Monitoring" 1
LANG:1 17 Global Monitoring
1 "subpanels\\Glmon.pnl" 1
LANG:1 0 
0
"IVcurve" 1
LANG:1 7 IVcurve
1 "OurOneIVCurve.pnl" 1
LANG:1 0 
1
"$Chan" ""
13 77
"Button1"
""
1 840 10 E E E 1 E 1 E N "_3DText" E N {204,204,102} E E
 E E
73 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 ""
838 8 942 42
T 
1
LANG:1 6 ERRORS
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_childPanelOn();
}

EP_childPanelOn()
{
  ChildPanelOnCentral(\"vision/SC/AlertScreen\",
      \"\",
      makeDynString(\"\"));
}

// SimpleCtrlScript {EP_childPanelOn}
// Function {ChildPanelOnCentral}
// File {vision/SC/AlertScreen}
// Panel {}
// Parent {}
// Module {}
// OffsetX {0}
// OffsetY {0}
// SimpleCtrlScriptEnd {EP_childPanelOn}
" 0
 E E E
28 92
"Tab3"
""
1 343 60 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
87 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 48 247 242
E4
"Select" 1
LANG:1 6 Select
1 "subpanels\\Select.pnl" 1
LANG:1 0 
0
"File" 1
LANG:1 7 RSTtest
1 "subpanels\\TestRST.pnl" 1
LANG:1 0 
0
"Cooling" 1
LANG:1 7 Cooling
1 "subpanels\\Cooling.pnl" 1
LANG:1 0 
0
"IVTest" 1
LANG:1 6 IVtest
1 "subpanels\\TestIV.pnl" 1
LANG:1 0 
0
0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
6 86
"infoBoard"
""
1 0 483 E E E 1 E 1 E N {0,0,0} E N {51,102,153} E E
 E E
82 0 0 0 0 0
EE E
0
1
LANG:1 21 Vers.01.1, 23-06-2003
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 0 0 950 700
2 91
"Text5"
""
1 16 10 E E E 1 E 1 E N {0,255,255} E N {51,102,153} E E
 E E
87 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 18 12 264 38
0 2 0 "s" 0 0 0 64 0 0  18 12
 1
1
LANG:1 119 -microsoft windows-Courier New-bold-i-normal-*-*-210-100-100-*-*-iso8859-1|-24,0,0,0,700,255,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 17 DIAGNOSTICS PANEL
2 115
"Info"
""
1 20 640 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
109 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N {204,204,204}
"// SimpleCtrlScriptStart {valid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}


EP_textFieldIn()
{
dyn_errClass err;

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

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

}


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

EP_setInvalid()
{
dyn_errClass err;

  if( dpSubStr( \"SCTmops1:Info.Name:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTmops1:Info.Name:_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 {SCTmops1:Info.Name}
// DPConfig {:_online.._value}
// DPType {string}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTmops1:Info.Name}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0
 E 0 1 1 0 0 E U  1 E 22 642 238 668
1 2 0 "s" 0 0 0 64 0 0  22 642
 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 7 Info...
0
0