V 10
1
LANG:1 8 (NoName)
PANEL,304 349 244 200 N "_3DFace" 0
EEE E E 1 -1 -1 0  40 100
"" 0 1
EE 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
6 17
"Border1"
""
1 10 150 E E E 1 E 1 E N {0,0,0} E N {204,204,255} E E
 E E
17 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 150
13 0
"Save"
""
1 60 30 E E E 1 E 1 E N {0,0,0} E N {153,204,153} E E
 E E
1 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 28 172 72
T 
1
LANG:1 11 LOAD CONFIG
"// SimpleCtrlScriptStart {invalid}
main()
{
int i, NbMeas, SaveTime;
shape tf1=getShape(\"NbMeas\");
shape tf2=getShape(\"SaveTime\");
 
DebugN(NbMeas, SaveTime);
  
getValue(tf1, \"text\", NbMeas);
getValue(tf2, \"text\", SaveTime);
 
  for (i=0;i<=NbMeas;i++) {
   Save();
   delay(SaveTime);
      }
DebugN(NbMeas, SaveTime);


}

Save()
{
file datalogg;
int i;
float HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt, HVchCurr;
dyn_float value;

//getvalues and put them in string:

dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoVolt:_original.._value\", HVcoVolt);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoITrp:_original.._value\", HVcoITrp);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoRamp:_original.._value\", HVcoRamp);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchStat:_original.._value\", HVchStat);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchVolt:_original.._value\", HVchVolt);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchCurr:_original.._value\", HVchCurr);
DebugN(HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt,HVchCurr);

value=makeDynFloat(HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt,HVchCurr);

//DebugN(value);

//write to file:
datalogg = fopen(\"D:/PVSSmess/Data/test.txt\", \"w+\");
for (i=1; i<=6; i++) {
    fprintfPL(datalogg, \"%f\", value[i]);
    fprintfPL(datalogg, \"%s\", \"	\");    
    }
fprintfPL(datalogg, \"%s\", \"EOF\");
fclose(datalogg);    
}


// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.HVchRamp}
// Config1 {:_original.._value}
// Type1 {int}
// Value1 {1}
// SimpleCtrlScriptEnd {EP_setDP}
" 0
 E E E
13 18
"Button1"
""
1 60 80 E E E 1 E 1 E N {0,0,0} E N {153,204,153} E E
 E E
18 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 78 172 122
T 
1
LANG:1 9 DUMP DATA
"// SimpleCtrlScriptStart {invalid}
main()
{
int i, NbMeas, SaveTime;
shape tf1=getShape(\"NbMeas\");
shape tf2=getShape(\"SaveTime\");
 
DebugN(NbMeas, SaveTime);
  
getValue(tf1, \"text\", NbMeas);
getValue(tf2, \"text\", SaveTime);
 
  for (i=0;i<=NbMeas;i++) {
   Save();
   delay(SaveTime);
      }
DebugN(NbMeas, SaveTime);


}

Save()
{
file datalogg;
int i;
float HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt, HVchCurr;
dyn_float value;

//getvalues and put them in string:

dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoVolt:_original.._value\", HVcoVolt);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoITrp:_original.._value\", HVcoITrp);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVcoRamp:_original.._value\", HVcoRamp);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchStat:_original.._value\", HVchStat);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchVolt:_original.._value\", HVchVolt);
dpGet(\"SCTps:Crate0.Channel_0.HV.HVchCurr:_original.._value\", HVchCurr);
DebugN(HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt,HVchCurr);

value=makeDynFloat(HVcoVolt,HVcoITrp,HVcoRamp,HVchStat,HVchVolt,HVchCurr);

//DebugN(value);

//write to file:
datalogg = fopen(\"D:/PVSSmess/Data/test.txt\", \"w+\");
for (i=1; i<=6; i++) {
    fprintfPL(datalogg, \"%f\", value[i]);
    fprintfPL(datalogg, \"%s\", \"	\");    
    }
fprintfPL(datalogg, \"%s\", \"EOF\");
fclose(datalogg);    
}


// SimpleCtrlScript {EP_setDP}
// DP1 {SCTps:Crate1.HV.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