Subversion Repositories f9daq

Compare Revisions

No changes between revisions

Ignore whitespace Rev 264 → Rev 265

/cvi/instr/DRS/Makefile
189,9 → 189,6
drsreadDict.cpp: drsread.h LinkDef.h
rootcint -f drsreadDict.cpp -c drsread.h LinkDef.h
drsread.$(ObjSuf): drsread.$(SrcSuf1)
@echo "Compiling drsread $@ "
$(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c drsread.$(SrcSuf1)
 
drsread.$(ObjSuf): drsread.$(SrcSuf1)
@echo "Compiling drsread $@ "
/cvi/instr/DRS/drs4.c
127,6 → 127,7
double rate;
int *args = (int *) functionData;
double twin[2];
 
 
GetCtrlVal(ph, PANEL_CH0, &imask[0] );
138,6 → 139,8
if (imask[i]) mask |= (1<<i);
}
 
 
GetCtrlVal(ph,PANEL_NEVE, &neve);
GetCtrlVal(ph,PANEL_DEBUG, &verbose);
GetCtrlVal(ph,PANEL_PFREQ, &pfreq);
147,6 → 150,7
GetCtrlVal(ph,PANEL_TRGDELAY, &trgdelay);
GetCtrlVal(ph,PANEL_TRGCHANNEL, &trgchannel);
 
GetCtrlVal(ph,PANEL_TRGTYPE, &trgtype);
GetCtrlVal(ph,PANEL_TRGLEVEL, &trglevel);
GetCtrlVal(ph,PANEL_TRGPOLARITY, &trgpolarity);
197,6 → 201,7
time_t t=0,told=0, tstart=0;
 
if (!DRSInit()) {
 
time(&tstart);
told=tstart;
int nev=0;
567,3 → 572,15
}
return 0;
}
 
int CVICALLBACK CalibrateCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2) {
int status = 0;
switch (event) {
case EVENT_COMMIT:
status = DRSCalibrateTiming();
printf("DRSCalibrateTiming() status = %d\n", status);
break;
}
return 0;
}
/cvi/instr/DRS/drs4.cws
13,9 → 13,9
Active Project = 1
Project 0001 = "drs4.prj"
Drag Bar Left = 280
Window Top = 174
Window Top = 31
Window Left = 105
Window Bottom = 996
Window Bottom = 853
Window Right = 1554
Maximized = True
Maximized Children = True
30,7 → 30,7
Hide Windows = False
Break At First Statement = False
Sort Type = "File Name"
Number of Opened Files = 16
Number of Opened Files = 3
Window Confinement Region Enabled = True
MainColumnWidth = 263
FileDateColumnWidth = 70
48,203 → 48,62
[File 0001]
Path = "/c/home/cvi/instr/HISTO/H1D.fp"
File Type = "Function Panel"
Disk Date = 3568264729
Disk Date = 3568268329
In Projects = "1,"
 
[File 0002]
Path = "/c/home/cvi/instr/HISTO/H2D.fp"
File Type = "Function Panel"
Disk Date = 3568264729
Disk Date = 3568268329
In Projects = "1,"
 
[File 0003]
Path = "/c/home/cvi/instr/MIKRO/MIKRO.fp"
File Type = "Function Panel"
Disk Date = 3555477334
Disk Date = 3555480934
In Projects = "1,"
 
[File 0004]
Path = "/c/Users/f9daq/Downloads/test(2).C"
File Type = "CSource"
Disk Date = 3570888004
In Projects = ""
Window Z-Order = 1
Source Window State = "1,229,229,229,4,42,4,0,3,170,0,0,0,0,0,48,216,0,229,42,400,600,0,0,"
 
[File 0005]
Path = "/c/home/dania/mcppmt/drs/drs.C"
File Type = "CSource"
Disk Date = 3570870419
In Projects = ""
Window Top = 31
Window Z-Order = 2
Source Window State = "1,0,0,0,0,0,0,0,0,70,0,0,0,0,0,28,153,0,185,18,400,600,1,0,"
 
[File 0006]
Path = "/c/home/rok/DRS/drs4.c"
File Type = "CSource"
Disk Date = 3568889199
Disk Date = 3577693051
In Projects = "1,"
Window Top = 33
Window Left = 10
Window Z-Order = 4
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,40,0,49,2,349,683,1,0,"
Window Z-Order = 1
Source Window State = "1,580,580,580,15,35,15,0,0,160,0,0,0,0,0,37,537,0,581,59,349,683,1,0,"
 
[File 0007]
Path = "/c/Users/f9daq/Downloads/NativeExportsSample/NativeExportsConsumerApp/AitGui.c"
File Type = "CSource"
Disk Date = 3568700454
In Projects = ""
Window Top = 33
Window Left = 10
Window Z-Order = 13
Source Window State = "1,249,249,249,1,65,1,0,3,68,0,0,0,0,0,25,225,0,249,65,349,587,1,0,"
 
[File 0008]
Path = "/c/home/dania/mcppmt/drs/TwoGaussian.C"
File Type = "CSource"
Disk Date = 3569995289
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,25,0,0,31,73,349,683,1,0,"
 
[File 0009]
[File 0005]
Path = "/c/home/rok/DRS/drs4.uir"
File Type = "User Interface Resource"
Disk Date = 3568889201
Disk Date = 3577692711
In Projects = "1,"
Window Top = 132
Window Left = 49
Window Height = 349
Window Width = 811
Window Z-Order = 9
Window Z-Order = 3
 
[File 0010]
Path = "/c/home/cvi/instr/MIKRO/MIKRO.c"
File Type = "CSource"
Disk Date = 3555477334
In Projects = ""
Window Top = 396
Window Left = 202
Window Z-Order = 8
Source Window State = "1,367,368,368,0,0,0,0,0,80,0,0,0,0,0,25,278,0,290,28,349,683,1,0,"
[File 0006]
Path = "/c/home/rok/DRS/drsread.lib"
File Type = "Library"
Disk Date = 3577692972
In Projects = "1,"
 
[File 0011]
Path = "/c/home/cvi/instr/MIKRO/MIKRO_ui.uir"
File Type = "User Interface Resource"
Disk Date = 3558584602
In Projects = ""
Window Top = 188
Window Left = 90
Window Height = 349
Window Width = 683
Window Z-Order = 16
 
[File 0012]
Path = "/c/home/rok/DRS/drs4.h"
File Type = "Include"
Disk Date = 3568889201
In Projects = ""
Window Top = 157
Window Left = 74
Window Z-Order = 10
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,62,0,75,17,349,683,1,0,"
 
[File 0013]
Path = "/c/home/git/arich/daq/sa02_daq/cvi/sa02_CVI.c"
File Type = "CSource"
Disk Date = 3556593867
In Projects = ""
Window Top = 188
Window Left = 90
Window Z-Order = 15
Source Window State = "1,4397,4397,4397,10,89,10,0,3,80,0,0,0,0,0,25,4378,0,4397,89,349,683,1,0,"
 
[File 0014]
Path = "/c/home/git/arich/daq/sa02_daq/sa02lib.c"
File Type = "CSource"
Disk Date = 3556593867
In Projects = ""
Window Top = 33
Window Left = 10
Window Z-Order = 14
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,0,0,26,39,349,683,1,0,"
 
[File 0015]
Path = "/c/home/cvi/instr/HISTO/H2D.c"
File Type = "CSource"
Disk Date = 3570438572
In Projects = ""
Window Top = 188
Window Left = 90
Window Z-Order = 6
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,204,0,212,22,349,683,1,0,"
 
[File 0016]
Path = "/c/home/cvi/instr/HISTO/H1D.c"
File Type = "CSource"
Disk Date = 3570785346
In Projects = ""
Window Top = 64
Window Left = 26
Window Z-Order = 5
Source Window State = "1,162,162,162,11,14,14,0,0,80,0,0,0,0,0,25,223,0,235,32,349,683,1,0,"
 
[File 0017]
Path = "/c/home/cvi/instr/HISTO/H1D.h"
File Type = "Include"
Disk Date = 3568264728
In Projects = ""
Window Top = 188
Window Left = 90
Window Z-Order = 12
Source Window State = "1,68,68,68,17,28,28,0,3,80,0,0,0,0,0,25,31,0,68,17,349,683,1,0,"
 
[File 0018]
[File 0007]
Path = "/c/home/rok/DRS/drsread.h"
File Type = "Include"
Disk Date = 3566543748
Disk Date = 3577691433
In Projects = ""
Window Top = 126
Window Left = 58
Window Z-Order = 11
Source Window State = "1,18,18,18,18,28,28,0,0,80,0,0,0,0,0,25,0,0,31,6,349,683,1,0,"
 
[File 0019]
Path = "/c/home/dania/mcppmt/drs/drsgui.C"
File Type = "CSource"
Disk Date = 3568020233
In Projects = ""
Window Top = 33
Window Left = 10
Window Z-Order = 3
Window Top = 219
Window Left = 106
Window Z-Order = 2
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,0,0,0,0,349,683,1,0,"
 
[File 0020]
Path = "/c/home/rok/DRS/drsread.lib"
File Type = "Library"
Disk Date = 3567673573
In Projects = "1,"
 
[Tab Order]
Tab 0001 = "/c/home/rok/DRS/drs4.uir"
Tab 0002 = "/c/home/rok/DRS/drs4.c"
Tab 0003 = "/c/home/cvi/instr/MIKRO/MIKRO_ui.uir"
Tab 0004 = "/c/home/cvi/instr/MIKRO/MIKRO.c"
Tab 0005 = "/c/home/git/arich/daq/sa02_daq/cvi/sa02_CVI.c"
Tab 0006 = "/c/home/git/arich/daq/sa02_daq/sa02lib.c"
Tab 0007 = "/c/Users/f9daq/Downloads/NativeExportsSample/NativeExportsConsumerApp/AitGui.c"
Tab 0008 = "/c/home/dania/mcppmt/drs/TwoGaussian.C"
Tab 0009 = "/c/home/cvi/instr/HISTO/H1D.c"
Tab 0010 = "/c/home/cvi/instr/HISTO/H1D.h"
Tab 0011 = "/c/home/rok/DRS/drsread.h"
Tab 0012 = "/c/home/rok/DRS/drs4.h"
Tab 0013 = "/c/home/cvi/instr/HISTO/H2D.c"
Tab 0014 = "/c/home/dania/mcppmt/drs/drs.C"
Tab 0015 = "/c/home/dania/mcppmt/drs/drsgui.C"
Tab 0016 = "/c/Users/f9daq/Downloads/test(2).C"
Tab 0001 = "/c/home/rok/DRS/drs4.c"
Tab 0002 = "/c/home/rok/DRS/drs4.uir"
Tab 0003 = "/c/home/rok/DRS/drsread.h"
 
[Default Build Config 0001 Debug]
Generate Browse Info = True
/cvi/instr/DRS/drs4.h
17,30 → 17,31
#define PANEL_OPENGUI 2 /* control type: command, callback function: OpenGuiCB */
#define PANEL_EXIT 3 /* control type: command, callback function: ExitCB */
#define PANEL_STOP 4 /* control type: command, callback function: StopCB */
#define PANEL_START 5 /* control type: command, callback function: StartCB */
#define PANEL_FILENAME 6 /* control type: string, callback function: (none) */
#define PANEL_TIMER 7 /* control type: timer, callback function: (none) */
#define PANEL_TWIN1 8 /* control type: numeric, callback function: (none) */
#define PANEL_TWIN0 9 /* control type: numeric, callback function: (none) */
#define PANEL_TRGLEVEL 10 /* control type: numeric, callback function: (none) */
#define PANEL_TRGDELAY 11 /* control type: numeric, callback function: (none) */
#define PANEL_RANGE 12 /* control type: numeric, callback function: (none) */
#define PANEL_TRGCHANNEL 13 /* control type: numeric, callback function: (none) */
#define PANEL_PFREQ 14 /* control type: numeric, callback function: (none) */
#define PANEL_FREQUENCY 15 /* control type: numeric, callback function: (none) */
#define PANEL_NEVE 16 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 17 /* control type: numeric, callback function: (none) */
#define PANEL_TRGTYPE 18 /* control type: ring, callback function: (none) */
#define PANEL_ENABLEDOUTPUT 19 /* control type: radioButton, callback function: (none) */
#define PANEL_DEBUG 20 /* control type: radioButton, callback function: (none) */
#define PANEL_CH3 21 /* control type: radioButton, callback function: (none) */
#define PANEL_CH2 22 /* control type: radioButton, callback function: (none) */
#define PANEL_CH1 23 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 24 /* control type: graph, callback function: (none) */
#define PANEL_CH0 25 /* control type: radioButton, callback function: (none) */
#define PANEL_TRGPOLARITY 26 /* control type: binary, callback function: (none) */
#define PANEL_TEXTMSG 27 /* control type: textMsg, callback function: (none) */
#define PANEL_STDIO 28 /* control type: textBox, callback function: (none) */
#define PANEL_CALIBRATE 5 /* control type: command, callback function: CalibrateCB */
#define PANEL_START 6 /* control type: command, callback function: StartCB */
#define PANEL_FILENAME 7 /* control type: string, callback function: (none) */
#define PANEL_TIMER 8 /* control type: timer, callback function: (none) */
#define PANEL_TWIN1 9 /* control type: numeric, callback function: (none) */
#define PANEL_TWIN0 10 /* control type: numeric, callback function: (none) */
#define PANEL_TRGLEVEL 11 /* control type: numeric, callback function: (none) */
#define PANEL_TRGDELAY 12 /* control type: numeric, callback function: (none) */
#define PANEL_RANGE 13 /* control type: numeric, callback function: (none) */
#define PANEL_TRGCHANNEL 14 /* control type: numeric, callback function: (none) */
#define PANEL_PFREQ 15 /* control type: numeric, callback function: (none) */
#define PANEL_FREQUENCY 16 /* control type: numeric, callback function: (none) */
#define PANEL_NEVE 17 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 18 /* control type: numeric, callback function: (none) */
#define PANEL_TRGTYPE 19 /* control type: ring, callback function: (none) */
#define PANEL_ENABLEDOUTPUT 20 /* control type: radioButton, callback function: (none) */
#define PANEL_DEBUG 21 /* control type: radioButton, callback function: (none) */
#define PANEL_CH3 22 /* control type: radioButton, callback function: (none) */
#define PANEL_CH2 23 /* control type: radioButton, callback function: (none) */
#define PANEL_CH1 24 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 25 /* control type: graph, callback function: (none) */
#define PANEL_CH0 26 /* control type: radioButton, callback function: (none) */
#define PANEL_TRGPOLARITY 27 /* control type: binary, callback function: (none) */
#define PANEL_TEXTMSG 28 /* control type: textMsg, callback function: (none) */
#define PANEL_STDIO 29 /* control type: textBox, callback function: (none) */
 
#define SCAN 2
#define SCAN_OPENGUI 2 /* control type: command, callback function: OpenGuiCB */
83,6 → 84,7
 
/* Callback Prototypes: */
 
int CVICALLBACK CalibrateCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ExitCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK GetCurrentPositionCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK GoXCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
/cvi/instr/DRS/drs4.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/cvi/instr/DRS/drsread.cpp
109,12 → 109,78
 
static DRS *drs=NULL;
 
 
DLLEXPORT int DRSCalibrateTiming( )
{
DRSBoard *b;
if (drs == NULL) drs = new DRS();
if (!drs) return -1;
DRSParameters = drssettings::instance();
//fCalMode = 2;
if (drs->GetNumberOfBoards() ) {
/* continue working with first board only */
b = drs->GetBoard(0);
if (b->GetFirmwareVersion() < 13279)
printf("Firmware revision 13279 or later\nrequired for timing calibration\n");
else if (b->GetInputRange() != 0)
printf("Timing calibration can only be done\nat the -0.5V to +0.5V input range\n");
 
else {
 
 
/* remember current settings */
double acalVolt = b->GetAcalVolt();
int acalMode = b->GetAcalMode();
int tcalFreq = b->GetTcalFreq();
int tcalLevel = b->GetTcalLevel();
int tcalSource = b->GetTcalSource();
int flag1 = b->GetTriggerEnable(0);
int flag2 = b->GetTriggerEnable(1);
int trgSource = b->GetTriggerSource();
int trgDelay = b->GetTriggerDelay();
double range = b->GetInputRange();
int config = b->GetReadoutChannelConfig();
 
int status = b->CalibrateTiming(NULL);
 
if (!status)
printf("Error performing timing calibration, please check waveforms and redo voltage calibration.\n");
else
printf("Timing calibration successfully finished.\n");
 
/* restore old values */
b->EnableAcal(acalMode, acalVolt);
b->EnableTcal(tcalFreq, tcalLevel);
b->SelectClockSource(tcalSource);
b->EnableTrigger(flag1, flag2);
b->SetTriggerSource(trgSource);
b->SetTriggerDelayPercent(trgDelay);
b->SetInputRange(range);
b->SetChannelConfig(config, 8, 8);
 
if (b->GetBoardType() == 5)
b->SetTranspMode(1); // Evaluation board with build-in trigger
else
b->SetTranspMode(1); // VPC Mezzanine board
 
return status;
}
}
return -1;
}
 
 
DLLEXPORT int DRSInit()
{
 
DRSBoard *b;
/* do drsinitial scan */
drs = new DRS();
if (drs == NULL) drs = new DRS();
if (!drs) return -1;
DRSParameters = drssettings::instance();
/cvi/instr/DRS/drsread.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/cvi/instr/DRS/drsread.h
19,6 → 19,7
DLLEXPORT float * DRSGetTime(int ch);
DLLEXPORT float * DRSGetWave(int ch);
 
DLLEXPORT int DRSCalibrateTiming();
DLLEXPORT int DRSInit();
DLLEXPORT int DRSRead( int drstimer);
DLLEXPORT int DRSEnd();
/cvi/instr/DRS/drsread.lib
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream