V 10
1
LANG:1 8 (NoName)
PANEL,542 72 259 468 N "_3DFace" 0
EEE E E 1 -1 -1 0  -1 -1
"" 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
"Text11"
""
1 30 70 E E E 1 E 1 E N {0,0,0} E N "_Transparent" 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  0 E 32 72 143 93
0 2 0 "s" 0 0 0 64 0 0  32 72
 1
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 13 Activ Status:
2 1
"Text1"
""
1 30 130 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
2 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 32 132 143 153
0 2 0 "s" 0 0 0 64 0 0  32 132
 1
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 13 DCS Commands:
2 2
"DCSStates"
""
1 130 70 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
  EP_setBackColor();

}

EP_setBackColor()
{
dyn_errClass err;

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

  dpConnect(\"EP_setBackColorCB\", 
            \"SCTps:Crate0.DDC.DCS_STATES:_online.._value\",
            \"SCTps:Crate0.DDC.DCS_STATES:_online.._invalid\");
  err = getLastError();
  if (dynlen(err) > 0)
    setValue(\"\", \"color\", \"_dpdoesnotexist\");

}


EP_setBackColorCB(string dpSource, float fNewValue, string dpInvalid, bool boInvalid)
{

  if (boInvalid)
    setValue(\"\", \"backCol\", \"_invalid\");
  else if (fNewValue < 3){

    setValue(\"\", \"backCol\", \"Green\");
    }   
  else
    setValue(\"\", \"backCol\", \"White\");
}



EP_textFieldIn()
{
dyn_errClass err;

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

  dpConnect(\"EP_textFieldInCB\",
            \"SCTps:Crate0.DDC.DCS_STATES:_online.._value\");

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

}


EP_textFieldInCB(string dp, int iNewValue)
{

 if(iNewValue==0){
  setValue(\"\", \"text\", \"Off\" );
  }

  if(iNewValue==1){
  setValue(\"\", \"text\", \"Loaded\" );
  }

 if(iNewValue==2){
  setValue(\"\", \"text\", \"Configured\" );
    }

 if(iNewValue==3){
  setValue(\"\", \"text\", \"Monitoring\" );
    }

 if(iNewValue==4){
  setValue(\"\", \"text\", \"Running\" );
    }
 if(iNewValue==5){
  setValue(\"\", \"text\", \"Paused\" );
   }
}





// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate0.DDC.DCS_STATES}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 132 72 218 88
1 2 0 "s" 0 0 0 64 0 0  132 72
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 10 DCS States
2 3
"Text2"
""
1 130 100 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
 E E
4 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldIn();
}

EP_textFieldIn()
{
dyn_errClass err;

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

  dpConnect(\"EP_textFieldInCB\",
            \"SCTps:Crate0.DDC.DAQinCOMM:_online.._value\");

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

}


EP_textFieldInCB(string dp, int iNewValue)
{
int i,icard;
string datapoint1;

 if(iNewValue==false){
  setValue(\"\", \"text\", \"DCS\" );  
}

 if(iNewValue==true){
  setValue(\"\", \"text\", \"DAQ\" );
}


}




// SimpleCtrlScript {EP_textFieldIn}
// DP {SCTps:Crate0.DDC.DCS_STATES}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
" 0
 E 0 1 1 0 1 E U  1 E 132 102 218 118
1 2 0 "s" 0 0 0 64 0 0  132 102
 1
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 10 DCS States
2 4
"Text3"
""
1 30 100 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
5 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  0 E 32 102 143 123
0 2 0 "s" 0 0 0 64 0 0  32 102
 1
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
1
LANG:1 10 In Charge:
2 5
"Text4"
""
1 60 370 E E E 1 E 1 E N {0,0,0} E N {153,204,255} E E
 E E
6 0 0 0 0 0
EE E
0
1
LANG:1 0 
1
"dashclr"N "_Transparent"
E E 0 1 1 0 1 E U  1 E 62 372 218 391
1 2 0 "s" 0 0 0 192 0 0  62 372
 1
1
LANG:1 125 -microsoft windows-Times New Roman-bold-r-normal-*-*-140-100-100-*-*-iso8859-1|-16,0,0,0,700,0,0,0,0,3,2,1,18,Times New Roman
0 ""
1
LANG:1 16 POWER SUPPLY DCS
2 6
"Text6"
""
1 40 30 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E
 E E
7 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 32 94 47
0 2 0 "s" 0 0 0 192 0 0  42 32
 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 Crate Nb.
22 7
"DCSLocal"
""
1 130 130 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
8 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 ""
128 128 222 154
6
1
LANG:1 3 Off
 1
1
LANG:1 6 Loaded
 0
1
LANG:1 9 Configure
 0
1
LANG:1 10 Monitoring
 0
1
LANG:1 7 Running
 0
1
LANG:1 6 Paused
 0
E
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_textFieldOut();
}

EP_textFieldOut()
{
int iNewValue;
string sNewValue;
dyn_errClass err;
string sTmp;
int iTmp;

  getValue(\"\", \"text\", sTmp);
  if(sTmp==\"Off\"){
    sTmp=\"0\";
    iTmp=0;
}
  if(sTmp==\"Loaded\") {
  sTmp=\"1\";
  iTmp=1;
  }
  
  if(sTmp==\"Configure\") {
  sTmp=\"2\";
  iTmp=2;
  }
  
  if(sTmp==\"Monitoring\") {
  sTmp=\"3\";
  iTmp=3;
  }
  
  if(sTmp==\"Running\") {
  sTmp=\"4\";
  iTmp=4;
  }
  
  if(sTmp==\"Paused\") {
  sTmp=\"5\";
  iTmp=5;
  }
  
  sscanf(sTmp, \"%d\", iNewValue);
  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }
  
 
dpSetWait(\"SCTps:Crate0.DDC.DCS_STATES:_original.._value\",iTmp );
 
//  err = getLastError();
//  if (dynlen(err) > 0)
//    errorDialog(err);
}

// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Crate0.DDC.DCS_STATES}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

E
 0 0
13 8
"Button4"
""
1 90 330 E E E 1 E 1 E N {255,255,255} E N {102,102,204} E E
 E E
9 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 ""
88 328 182 362
T 
1
LANG:1 10 Reset ELMB
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;

  dpSetWait(\"SCTps:Crate0.Elmb_0.NMT:_original.._value\", 129);
  dpSetWait(\"SCTps:Crate0.Elmb_0.NMT:_original.._value\", 1);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate0.Elmb_0.NMT}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {129}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 9
"Button9"
""
1 130 210 E E E 1 E 1 E N {255,255,255} E N {102,102,204} E E
 E E
10 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
128 208 212 242
T 
1
LANG:1 9 ALL LV ON
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
string datapoint1;
int i,j;
dyn_string valset; 
dyn_float initValue;


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

valset=makeDynString(\"LVccTrip\",\"LVccMask\",\"LVco_Vcc\",\"LVco_Vdd\",\"LVcoVCSV\",\"LVcoPINV\",\"LVcoDTrp\",\"LVcoCTrp\",\"LVcoTTrp\",\"LVcoTLim\",\"LVcoCLKS\",\"LVcoCLKR\",\"LVcoVOut\");
initValue=makeDynFloat(46*2.5,15,3.5*50,4*50,4*25,6*20,50/2,50/2,128+50,128+60,0,0,1);
 for(j=1; j<=13; j++)
    {
	if(j<=2)
	  {
      }
 	else
      {
      sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.LV.%s:_original.._value\",i,valset[j] );
      dpSetWait(datapoint1, initValue[j]);

      }
   }
   
  
  
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);       
 }
}
// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 10
"CardONHV"
""
1 50 210 E E E 1 E 1 E N {255,255,255} E N {102,102,204} E E
 E E
11 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
48 208 132 242
T 
1
LANG:1 9 ALL HV ON
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int i;
string datapoint1;


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

  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoVolt\" );
  dpSetWait(datapoint1, 100);
  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoITrp\" );
  dpSetWait(datapoint1, 1100);
  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoRamp\" );
  dpSetWait(datapoint1, 3);

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

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 11
"CardOFFHV"
""
1 50 240 E E E 1 E 1 E N {255,255,255} E N {102,102,204} E E
 E E
12 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
48 238 132 272
T 
1
LANG:1 10 ALL HV OFF
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int i;
string datapoint1;


for (i=0;i<=47;i++){
  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoVolt\" );
  dpSetWait(datapoint1, 0);
  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoITrp\" );
  dpSetWait(datapoint1, 1100);
  sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.HV.%s:_original.._value\",i,\"HVcoRamp\" );
  dpSetWait(datapoint1, 3);

  
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);       
}
}
// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 12
"Button12"
""
1 150 340 E E E 1 E 1 E N {255,255,255} E N {102,102,204} E E
 E E
13 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 117 -microsoft windows-Courier New-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-12,0,0,0,700,0,0,0,0,3,2,1,49,Courier New
0 ""
128 238 212 272
T 
1
LANG:1 10 ALL LV OFF
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
string datapoint1;
int i,j;
dyn_string valset; 
dyn_float initValue;


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

valset=makeDynString(\"LVccTrip\",\"LVccMask\",\"LVco_Vcc\",\"LVco_Vdd\",\"LVcoVCSV\",\"LVcoPINV\",\"LVcoDTrp\",\"LVcoCTrp\",\"LVcoTTrp\",\"LVcoTLim\",\"LVcoCLKS\",\"LVcoCLKR\",\"LVcoVOut\");
initValue=makeDynFloat(46*2.5,15,0,0,0,0,50/2,50/2,128+50,128+60,0,0,0);
 for(j=1; j<=13; j++)
    {
	if(j<=2)
	  {
      }
 	else
      {
      sprintf(datapoint1, \"SCTps:Crate0.Channel_%d.LV.%s:_original.._value\",i,valset[j] );
      dpSetWait(datapoint1, initValue[j]);

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

// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 13
"SendCard"
""
1 50 180 E E E 1 E 1 E N {255,255,255} E N {0,0,153} E E
 E E
14 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 ""
48 178 132 212
T 
1
LANG:1 4 SEND
"// SimpleCtrlScriptStart {invalid}
main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int  channel, i;



for (i=0;i<=48;i++){


channel=i+100;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCco_Set:_original.._value\", channel);
delay(0,10);

 
  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 14
"ReadCard"
""
1 472 300 E E E 1 E 1 E N {255,255,255} E N {0,0,153} 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 ""
48 268 132 302
T 
1
LANG:1 4 READ
"// SimpleCtrlScriptStart {invalid}

main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int channel, i;

for (i=0;i<=47;i++){
channel=i+100;
dpSetWait(\"SCTps:Crate0.Elmb_0.CCcmRead:_original.._value\", channel);

  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 15
"Button15"
""
1 130 180 E E E 1 E 1 E N {255,255,255} E N {0,0,153} E E
 E E
16 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 ""
128 178 212 212
T 
1
LANG:1 4 SEND
"// SimpleCtrlScriptStart {invalid}

main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int lv, icard, channel, i;
int set;

dpGet(\"SCTps:Item.HV:_original.._value\", lv); 
icard=lv/4;

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

delay(0,50);
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}
" 0
 E E E
13 16
"Button16"
""
1 130 270 E E E 1 E 1 E N {255,255,255} E N {0,0,153} E E
 E E
17 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 ""
128 268 212 302
T 
1
LANG:1 4 READ
"// SimpleCtrlScriptStart {invalid}

main()
{
  EP_setDP();
}

EP_setDP()
{
dyn_errClass err;
int  i;

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

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

  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
21 17
"SCrateNb"
""
1 190 30 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
18 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,34,Arial
0 ""
188 28 232 54
0
"// SimpleCtrlScriptStart {valid}
main()
{
  EP_textFieldIn();
  EP_setInvalid();
}

EP_textFieldIn()
{
dyn_errClass err;

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

  dpConnect(\"EP_textFieldInCB\",
            \"SCTps:Item.Crate:_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.Crate:_online.._invalid\", DPSUB_DP_EL ) == \"\" )
  {
    setValue(\"\", \"color\", \"_dpdoesnotexist\");
    return;
  }

  dpConnect(\"EP_setInvalidCB\",
            \"SCTps:Item.Crate:_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.Crate}
// DPConfig {:_online.._value}
// DPType {int}
// UseDPUnit {TRUE}
// UseDPFormat {TRUE}
// SimpleCtrlScriptEnd {EP_textFieldIn}
// SimpleCtrlScript {EP_setInvalid}
// DP {SCTps:Item.Crate}
// DPConfig {:_online.._invalid}
// DPType {bool}
// Attribut {color}
// SimpleCtrlScriptEnd {EP_setInvalid}
" 0

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

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;

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

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }

  dpSetWait(\"SCTps:Item.Crate:_original.._value\", iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Item.Crate}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

E

N 0 100 1 0 0 1
14 18
"CrateNb"
""
1 120 30 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E
19 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 ""
118 28 182 54
3 "s" 0 0 0 0 0 0 
E
"main()
{
 
  dpConnect(\"EP_textFieldInCB\",\"SCTps:Item.Crate:_original.._value\");

}

EP_textFieldInCB(string dp, int iNewValue)
{
string sTmp;

dpGet(dp, iNewValue);
sprintf(sTmp,\"%d\",iNewValue);
setValue(\"\", \"text\", sTmp );
}
" 0

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

EP_textFieldOut()
{
int iNewValue;
dyn_errClass err;
string sTmp;

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

  if( iNewValue != sTmp )
  {
    ChildPanelOnCentral( \"vision/MessageWarning\",
                         getCatStr( \"e_para\", \"warning\" ),
                         makeDynString( getCatStr( \"e_para\", \"wrongFormat\" )));
    return;
  }

  dpSetWait(\"SCTps:Item.Crate:_original.._value\", iNewValue);
  err = getLastError();
  if (dynlen(err) > 0)
    errorDialog(err);
}

// SimpleCtrlScript {EP_textFieldOut}
// DP {SCTps:Item.HV}
// Config {:_original.._value}
// DPType {int}
// SimpleCtrlScriptEnd {EP_textFieldOut}
" 0

0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
0
0