Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 240 → Rev 241

/cvi/RedPitaya/soccli/soccli.c
131,7 → 131,7
GetCtrlVal(panelHandle,PANEL_MAXX_1, &max);
 
H1D_Init(1, "ADC ch 1","Pulse height", nch, min, max );
H1D_SetTitleX(1,"ADC (a.u.)");
H1D_SetTitleX(1,"ADC (V)");
H1D_SetTitleY(1,"N");
 
GetCtrlVal(panelHandle,PANEL_NCH_2, &nch);
139,7 → 139,7
GetCtrlVal(panelHandle,PANEL_MAXX_2, &max);
 
H1D_Init(2, "ADC ch 2","Pulse height", nch, min, max );
H1D_SetTitleX(2,"ADC (a.u.)");
H1D_SetTitleX(2,"ADC (V)");
H1D_SetTitleY(2,"N");
 
GetCtrlVal(panelHandle,PANEL_NCH_3, &nch);
147,7 → 147,7
GetCtrlVal(panelHandle,PANEL_MAXX_3, &max);
 
H1D_Init(3, "TDC ch 1","TDC", nch, min, max );
H1D_SetTitleX(3,"TDC (a.u.)");
H1D_SetTitleX(3,"TDC (us)");
H1D_SetTitleY(3,"N");
 
GetCtrlVal(panelHandle,PANEL_NCH_4, &nch);
155,13 → 155,25
GetCtrlVal(panelHandle,PANEL_MAXX_4, &max);
 
H1D_Init(4, "TDC ch 2","TDC", nch, min, max );
H1D_SetTitleX(4,"TDC (a.u.)");
H1D_SetTitleX(4,"TDC (us)");
H1D_SetTitleY(4,"N");
SetCtrlAttribute (panelHandle, PANEL_ADC1, ATTR_XNAME, H1D_GetTitleX(1) );
SetCtrlAttribute (panelHandle, PANEL_ADC1, ATTR_YNAME, H1D_GetTitleY(1) );
SetCtrlAttribute (panelHandle, PANEL_ADC2, ATTR_XNAME, H1D_GetTitleX(2) );
SetCtrlAttribute (panelHandle, PANEL_ADC2, ATTR_YNAME, H1D_GetTitleY(2) );
SetCtrlAttribute (panelHandle, PANEL_TDC1, ATTR_XNAME, H1D_GetTitleX(3) );
SetCtrlAttribute (panelHandle, PANEL_TDC1, ATTR_YNAME, H1D_GetTitleY(3) );
SetCtrlAttribute (panelHandle, PANEL_TDC2, ATTR_XNAME, H1D_GetTitleX(4) );
SetCtrlAttribute (panelHandle, PANEL_TDC2, ATTR_YNAME, H1D_GetTitleY(4) );
GetCtrlVal(panelHandle,PANEL_MINX_5, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_5, &max);
SetAxisScalingMode (panelHandle, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_LABEL_TEXT , "sampling adc data");
SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_XNAME, "t(us)" );
SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_YNAME, "U(V)" );
return 0;
}
 
199,10 → 211,7
if ( nsamples>0 && neve % pfreq == 0) {
const int col[4]= {VAL_RED,VAL_GREEN,VAL_BLUE,VAL_WHITE};
if (plothandle[id]) DeleteGraphPlot (panelHandle, PANEL_GRAPH, plothandle[id], VAL_IMMEDIATE_DRAW);
//float fdata[nsamples];
//for (int k=0;k<nsamples;k++) fdata[k] = *(float *) (data+k);
//printf("data0 %f %d\n", fdata[0], data[0]);
plothandle[id] = PlotXY (panelHandle, PANEL_GRAPH, timebins, fdata, nsamples, VAL_FLOAT, VAL_FLOAT, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, col[id]);
 
//plothandle[id] = PlotXY (panelHandle, PANEL_GRAPH, timebins, data, nsamples, VAL_FLOAT, VAL_INTEGER, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, col[id]);
220,7 → 229,6
if (fdata[k] < adcdata) adcdata = fdata[k];
if (fdata[k]< athreshold && fdata[k-1]> athreshold) {
double t0= timebins[k-1]+(athreshold-fdata[k-1])/(fdata[k]-fdata[k-1])* (timebins[k]-timebins[k-1]);
//printf("TDC = %f\n", t0);
H1D_Fill(3+id, t0,1);
}
}
255,7 → 263,7
case TCP_DISCONNECT:
printf("TCP_DISCONNECT ErrorString %s\n",GetTCPErrorString(errCode));
printf("TCP_DISCONNECT SystemErrorString %s\n",GetTCPSystemErrorString());
//DisconnectFromTCPServer (&chandle);
 
chandle = 0;
break;
case TCP_DATAREADY: {
334,7 → 342,7
GetCtrlVal(panel,PANEL_FILENAME, filename);
delay= MINTRGDELAY + nsamples - nbefore + 1;
//delay= nsamples - NBEFORE + 1;
mask = 0;
for (int i=0; i<2; i++) {
if (imask[i]) mask |= (1<<i);
/cvi/RedPitaya/soccli/soccli.cws
9,18 → 9,17
IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework Dir = "/C/Program Files (x86)/IVI Foundation/VISA/winnt"
VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
Number of Projects = 3
Number of Projects = 2
Active Project = 1
Project 0001 = "soccli.prj"
Project 0002 = "/c/home/CVI/RedPitaya/RedPitaya.prj"
Project 0002 Folder User Interface Files Collapsed = True
Project 0002 FolderId 0 Collapsed = True
Project 0003 = "/c/home/CVI/RedPitaya/testcli/testcli.prj"
Drag Bar Left = 202
Window Top = 99
Window Left = 61
Window Bottom = 808
Window Right = 1516
Window Top = 110
Window Left = 56
Window Bottom = 819
Window Right = 1511
Maximized = False
Maximized Children = True
Max32 Number Of Errors = 20
34,7 → 33,7
Hide Windows = False
Break At First Statement = False
Sort Type = "File Name"
Number of Opened Files = 12
Number of Opened Files = 10
Window Confinement Region Enabled = True
MainColumnWidth = 185
FileDateColumnWidth = 70
58,15 → 57,6
Batch Build Release = False
Batch Build Debug = False
 
[Project Header 0003]
Version = 1302
Don't Update DistKit = False
Platform Code = 4
Build Configuration = "Debug"
Warn User If Debugging Release = 1
Batch Build Release = False
Batch Build Debug = False
 
[File 0001]
Path = "/c/home/CVI/instr/HISTO/H1D.fp"
File Type = "Function Panel"
76,12 → 66,12
[File 0002]
Path = "/c/home/CVI/RedPitaya/soccli/soccli.c"
File Type = "CSource"
Disk Date = 3573035438
Disk Date = 3573039184
In Projects = "1,"
Window Top = 33
Window Left = 10
Window Z-Order = 2
Source Window State = "0,252,252,252,1,21,21,0,0,69,24,314,0,319,13,1,64,0,365,0,349,595,1,9601,"
Window Z-Order = 1
Source Window State = "0,344,344,344,0,39,39,0,0,152,29,409,0,430,28,2,72,0,373,0,349,595,1,9601,"
 
[File 0003]
Path = "/c/home/CVI/RedPitaya/soccli/redpitaya_gui.uir"
92,7 → 82,7
Window Left = 26
Window Height = 232
Window Width = 595
Window Z-Order = 1
Window Z-Order = 5
 
[File 0004]
Path = "/c/home/CVI/RedPitaya/RedPitaya_ui.uir"
103,7 → 93,7
Window Left = 26
Window Height = 323
Window Width = 683
Window Z-Order = 11
Window Z-Order = 9
 
[File 0005]
Path = "/c/home/CVI/RedPitaya/RedPitaya.c"
112,7 → 102,7
In Projects = "2,"
Window Top = 126
Window Left = 58
Window Z-Order = 10
Window Z-Order = 8
Source Window State = "1,43,43,43,0,26,26,0,0,80,0,0,0,0,0,18,241,0,252,37,258,683,1,0,"
 
[File 0006]
122,7 → 112,7
In Projects = ""
Window Top = 126
Window Left = 58
Window Z-Order = 5
Window Z-Order = 6
Source Window State = "1,230,230,230,17,28,28,0,0,80,0,0,0,0,0,23,26,0,41,9,323,683,1,0,"
 
[File 0007]
132,10 → 122,50
In Projects = ""
Window Top = 126
Window Left = 58
Window Z-Order = 12
Window Z-Order = 10
Source Window State = "1,542,542,542,8,54,8,0,3,80,0,0,0,0,0,18,528,0,542,54,258,683,1,0,"
 
[File 0008]
Path = "/c/home/CVI/RedPitaya/soccli/mH1D.h"
File Type = "Include"
Disk Date = 3572868697
In Projects = ""
Window Top = 33
Window Left = 10
Window Z-Order = 7
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,23,0,0,25,56,323,683,1,0,"
 
[File 0009]
Path = "/c/home/CVI/instr/HISTO/H1D.h"
File Type = "Include"
Disk Date = 3573036110
In Projects = ""
Window Top = 64
Window Left = 26
Window Z-Order = 3
Source Window State = "1,31,31,31,2,13,13,0,0,80,0,0,0,0,0,23,13,0,37,144,323,683,1,0,"
 
[File 0010]
Path = "/c/home/git/arich_daq/sa02_daq/cvi/sa02_CVI.c"
File Type = "CSource"
Disk Date = 3567677198
In Projects = ""
Window Top = 95
Window Left = 42
Window Z-Order = 2
Source Window State = "1,712,712,712,2,66,2,0,3,80,0,0,0,0,0,19,697,0,712,66,271,683,1,0,"
 
[File 0011]
Path = "/c/home/git/arich_daq/sa02_daq/cvi/CAEN_V729/CAEN_V729.c"
File Type = "CSource"
Disk Date = 3567677198
In Projects = ""
Window Top = 64
Window Left = 26
Window Z-Order = 4
Source Window State = "1,21,21,21,12,15,15,0,0,80,0,0,0,0,0,19,6,0,26,21,271,683,1,0,"
 
[File 0012]
Path = "/c/home/CVI/RedPitaya/soccli/soccli.h"
File Type = "Include"
Disk Date = 3572533057
142,13 → 172,13
In Projects = "1,"
Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
 
[File 0009]
[File 0013]
Path = "/c/home/CVI/RedPitaya/soccli/plottdc.cxx"
File Type = "Unknown"
Disk Date = 3570148039
In Projects = "1,"
 
[File 0010]
[File 0014]
Path = "/c/home/CVI/RedPitaya/RedPitaya_ui.h"
File Type = "Include"
Disk Date = 3570144632
155,63 → 185,12
In Projects = "2,"
Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
 
[File 0011]
[File 0015]
Path = "/c/home/CVI/RedPitaya/plottdc.cxx"
File Type = "Unknown"
Disk Date = 3572600625
In Projects = "2,"
 
[File 0012]
Path = "/c/home/CVI/RedPitaya/soccli/mH1D.h"
File Type = "Include"
Disk Date = 3572868697
In Projects = ""
Window Top = 33
Window Left = 10
Window Z-Order = 9
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,23,0,0,25,56,323,683,1,0,"
 
[File 0013]
Path = "/c/home/CVI/instr/HISTO/H1D.h"
File Type = "Include"
Disk Date = 3572868701
In Projects = ""
Window Top = 64
Window Left = 26
Window Z-Order = 8
Source Window State = "1,31,31,31,2,13,13,0,0,80,0,0,0,0,0,23,7,0,26,44,323,683,1,0,"
 
[File 0014]
Path = "/c/home/CVI/RedPitaya/testcli/testcli_ui.uir"
File Type = "User Interface Resource"
Disk Date = 3572939257
In Projects = "3,"
Window Top = 126
Window Left = 58
Window Height = 323
Window Width = 683
Window Z-Order = 7
 
[File 0015]
Path = "/c/home/CVI/RedPitaya/testcli/testcli_ui.c"
File Type = "CSource"
Disk Date = 3572946477
In Projects = "3,"
Window Top = 33
Window Left = 10
Window Z-Order = 6
Source Window State = "1,47,58,47,6,69,6,0,3,80,0,3,0,3,0,23,36,0,58,69,323,683,1,0,"
 
[File 0016]
Path = "/c/home/git/arich_daq/sa02_daq/cvi/sa02_CVI.c"
File Type = "CSource"
Disk Date = 3567677198
In Projects = ""
Window Top = 95
Window Left = 42
Window Z-Order = 3
Source Window State = "1,4415,4415,4415,12,21,12,0,0,80,0,0,0,0,0,19,4728,0,4413,24,271,683,1,0,"
 
[Tab Order]
Tab 0001 = "/c/home/CVI/RedPitaya/soccli/soccli.c"
Tab 0002 = "/c/home/CVI/RedPitaya/soccli/redpitaya_gui.uir"
221,9 → 200,8
Tab 0006 = "/c/home/CVI/RedPitaya/RedPitaya_ui.uir"
Tab 0007 = "/c/home/CVI/RedPitaya/soccli/mH1D.h"
Tab 0008 = "/c/home/CVI/instr/HISTO/H1D.h"
Tab 0009 = "/c/home/CVI/RedPitaya/testcli/testcli_ui.uir"
Tab 0010 = "/c/home/CVI/RedPitaya/testcli/testcli_ui.c"
Tab 0011 = "/c/home/git/arich_daq/sa02_daq/cvi/sa02_CVI.c"
Tab 0009 = "/c/home/git/arich_daq/sa02_daq/cvi/sa02_CVI.c"
Tab 0010 = "/c/home/git/arich_daq/sa02_daq/cvi/CAEN_V729/CAEN_V729.c"
 
[Default Build Config 0001 Debug]
Generate Browse Info = False
401,91 → 379,3
Working Directory = ""
Environment Options = ""
 
[Default Build Config 0003 Debug]
Generate Browse Info = False
Enable Uninitialized Locals Runtime Warning = True
Batch Build = False
Profile = "Disabled"
Debugging Level = "Standard"
Execution Trace = "Disabled"
Command Line Args = ""
Working Directory = ""
Environment Options = ""
External Process Path = ""
 
[Default Build Config 0003 Release]
Generate Browse Info = False
Enable Uninitialized Locals Runtime Warning = True
Batch Build = False
Profile = "Disabled"
Debugging Level = "Standard"
Execution Trace = "Disabled"
Command Line Args = ""
Working Directory = ""
Environment Options = ""
External Process Path = ""
 
[Default Build Config 0003 Debug64]
Generate Browse Info = False
Enable Uninitialized Locals Runtime Warning = True
Batch Build = False
Profile = "Disabled"
Debugging Level = "Standard"
Execution Trace = "Disabled"
Command Line Args = ""
Working Directory = ""
Environment Options = ""
External Process Path = ""
 
[Default Build Config 0003 Release64]
Generate Browse Info = False
Enable Uninitialized Locals Runtime Warning = True
Batch Build = False
Profile = "Disabled"
Debugging Level = "Standard"
Execution Trace = "Disabled"
Command Line Args = ""
Working Directory = ""
Environment Options = ""
External Process Path = ""
 
[Build Dependencies 0003]
Number of Dependencies = 0
 
[Build Options 0003]
Generate Browse Info = False
Enable Uninitialized Locals Runtime Warning = True
Execution Trace = "Disabled"
Profile = "Disabled"
Debugging Level = "Standard"
Break On Library Errors = True
Break On First Chance Exceptions = False
 
[Execution Target 0003]
Execution Target Address = "Local desktop computer"
Execution Target Port = 0
Execution Target Type = 0
 
[SCC Options 0003]
Use global settings = True
SCC Provider = ""
SCC Project = ""
Local Path = ""
Auxiliary Path = ""
Perform Same Action For .h File As For .uir File = "Ask"
Perform Same Action For .cds File As For .prj File = "Ask"
Username = ""
Comment = ""
Use Default Username = False
Use Default Comment = False
Suppress CVI Error Messages = False
Always show confirmation dialog = True
 
[DLL Debugging Support 0003]
External Process Path = ""
 
[Command Line Args 0003]
Command Line Args = ""
Working Directory = ""
Environment Options = ""