Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 249 → Rev 250

/cvi/RedPitaya/soccli/redpitaya_gui.h
1,91 → 1,91
/**************************************************************************/
/* LabWindows/CVI User Interface Resource (UIR) Include File */
/* */
/* WARNING: Do not add to, delete from, or otherwise modify the contents */
/* of this include file. */
/**************************************************************************/
 
#include <userint.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
/* Panels and Controls: */
 
#define PANEL 1
#define PANEL_EXPORT_4 2 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_2 3 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_1 4 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_3 5 /* control type: command, callback function: ExportCB */
#define PANEL_HRESET 6 /* control type: command, callback function: ResetCB */
#define PANEL_EXIT 7 /* control type: command, callback function: ExitCB */
#define PANEL_IP 8 /* control type: string, callback function: (none) */
#define PANEL_FILENAME 9 /* control type: string, callback function: (none) */
#define PANEL_TIMER 10 /* control type: timer, callback function: (none) */
#define PANEL_TWIN1 11 /* control type: numeric, callback function: (none) */
#define PANEL_TWIN0 12 /* control type: numeric, callback function: (none) */
#define PANEL_ITRGLEVEL 13 /* control type: numeric, callback function: (none) */
#define PANEL_TRGLEVEL 14 /* control type: numeric, callback function: (none) */
#define PANEL_EXPORTNAME 15 /* control type: string, callback function: (none) */
#define PANEL_FILETYPE 16 /* control type: ring, callback function: (none) */
#define PANEL_PFREQ 17 /* control type: numeric, callback function: (none) */
#define PANEL_NBEFORE 18 /* control type: numeric, callback function: (none) */
#define PANEL_SAMPLES 19 /* control type: numeric, callback function: (none) */
#define PANEL_NTOTAL 20 /* control type: numeric, callback function: (none) */
#define PANEL_NEVE 21 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 22 /* control type: numeric, callback function: (none) */
#define PANEL_ADC2 23 /* control type: graph, callback function: (none) */
#define PANEL_TDC2 24 /* control type: graph, callback function: (none) */
#define PANEL_ADC1 25 /* control type: graph, callback function: (none) */
#define PANEL_TDC1 26 /* control type: graph, callback function: (none) */
#define PANEL_DECIMATION 27 /* control type: ring, callback function: (none) */
#define PANEL_TRIGGER 28 /* control type: ring, callback function: (none) */
#define PANEL_OUTWAVE 29 /* control type: radioButton, callback function: (none) */
#define PANEL_ENABLEDOUTPUT 30 /* control type: radioButton, callback function: (none) */
#define PANEL_DEBUG 31 /* control type: radioButton, callback function: (none) */
#define PANEL_CH1 32 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 33 /* control type: graph, callback function: (none) */
#define PANEL_CH0 34 /* control type: radioButton, callback function: (none) */
#define PANEL_TEXTMSG 35 /* control type: textMsg, callback function: (none) */
#define PANEL_STDIO 36 /* control type: textBox, callback function: (none) */
#define PANEL_MAXX_3 37 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_3 38 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_3 39 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_4 40 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_4 41 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_4 42 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_2 43 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_2 44 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_2 45 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_5 46 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_5 47 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_1 48 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_1 49 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_1 50 /* control type: numeric, callback function: (none) */
#define PANEL_CONNECT 51 /* control type: textButton, callback function: StartCB */
#define PANEL_START 52 /* control type: textButton, callback function: StartCB */
#define PANEL_ADCTYPE 53 /* control type: binary, callback function: (none) */
 
 
/* Control Arrays: */
 
/* (no control arrays in the resource file) */
 
 
/* Menu Bars, Menus, and Menu Items: */
 
/* (no menu bars in the resource file) */
 
 
/* Callback Prototypes: */
 
int CVICALLBACK ExitCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ExportCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ResetCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK StartCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 
 
#ifdef __cplusplus
}
#endif
/**************************************************************************/
/* LabWindows/CVI User Interface Resource (UIR) Include File */
/* */
/* WARNING: Do not add to, delete from, or otherwise modify the contents */
/* of this include file. */
/**************************************************************************/
 
#include <userint.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
/* Panels and Controls: */
 
#define PANEL 1
#define PANEL_EXPORT_4 2 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_2 3 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_1 4 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_3 5 /* control type: command, callback function: ExportCB */
#define PANEL_HRESET 6 /* control type: command, callback function: ResetCB */
#define PANEL_EXIT 7 /* control type: command, callback function: ExitCB */
#define PANEL_IP 8 /* control type: string, callback function: (none) */
#define PANEL_FILENAME 9 /* control type: string, callback function: (none) */
#define PANEL_TIMER 10 /* control type: timer, callback function: (none) */
#define PANEL_TWIN1 11 /* control type: numeric, callback function: (none) */
#define PANEL_TWIN0 12 /* control type: numeric, callback function: (none) */
#define PANEL_ITRGLEVEL 13 /* control type: numeric, callback function: (none) */
#define PANEL_TRGLEVEL 14 /* control type: numeric, callback function: (none) */
#define PANEL_EXPORTNAME 15 /* control type: string, callback function: (none) */
#define PANEL_FILETYPE 16 /* control type: ring, callback function: (none) */
#define PANEL_PFREQ 17 /* control type: numeric, callback function: (none) */
#define PANEL_NBEFORE 18 /* control type: numeric, callback function: (none) */
#define PANEL_SAMPLES 19 /* control type: numeric, callback function: (none) */
#define PANEL_NTOTAL 20 /* control type: numeric, callback function: (none) */
#define PANEL_NEVE 21 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 22 /* control type: numeric, callback function: (none) */
#define PANEL_ADC2 23 /* control type: graph, callback function: (none) */
#define PANEL_TDC2 24 /* control type: graph, callback function: (none) */
#define PANEL_ADC1 25 /* control type: graph, callback function: (none) */
#define PANEL_TDC1 26 /* control type: graph, callback function: (none) */
#define PANEL_DECIMATION 27 /* control type: ring, callback function: (none) */
#define PANEL_TRIGGER 28 /* control type: ring, callback function: (none) */
#define PANEL_OUTWAVE 29 /* control type: radioButton, callback function: (none) */
#define PANEL_ENABLEDOUTPUT 30 /* control type: radioButton, callback function: (none) */
#define PANEL_DEBUG 31 /* control type: radioButton, callback function: (none) */
#define PANEL_CH1 32 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 33 /* control type: graph, callback function: (none) */
#define PANEL_CH0 34 /* control type: radioButton, callback function: (none) */
#define PANEL_TEXTMSG 35 /* control type: textMsg, callback function: (none) */
#define PANEL_STDIO 36 /* control type: textBox, callback function: (none) */
#define PANEL_MAXX_3 37 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_3 38 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_3 39 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_4 40 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_4 41 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_4 42 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_2 43 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_2 44 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_2 45 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_5 46 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_5 47 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_1 48 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_1 49 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_1 50 /* control type: numeric, callback function: (none) */
#define PANEL_CONNECT 51 /* control type: textButton, callback function: StartCB */
#define PANEL_START 52 /* control type: textButton, callback function: StartCB */
#define PANEL_ADCTYPE 53 /* control type: binary, callback function: (none) */
 
 
/* Control Arrays: */
 
/* (no control arrays in the resource file) */
 
 
/* Menu Bars, Menus, and Menu Items: */
 
/* (no menu bars in the resource file) */
 
 
/* Callback Prototypes: */
 
int CVICALLBACK ExitCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ExportCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ResetCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK StartCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 
 
#ifdef __cplusplus
}
#endif
/cvi/RedPitaya/soccli/redpitaya_gui.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/cvi/RedPitaya/soccli/soccli.c
357,8 → 357,20
return 0;
}
 
int rpdecimation(int i){
 
switch (i){
case 1: return 0;
case 8: return 1;
case 64: return 2;
case 1024: return 3;
case 8192: return 4;
case 65536: return 5;
}
return 0;
 
}
 
int CVICALLBACK StartCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2) {
char ip[0xFF];
372,7 → 384,7
unsigned short nsamples;
int delay;
int nbefore;
unsigned short decimation;
unsigned int decimation;
unsigned short neve;
int output;
switch (event) {
388,7 → 400,7
GetCtrlVal(panel,PANEL_DEBUG , &debug);
GetCtrlVal(panel,PANEL_NBEFORE , &nbefore);
GetCtrlVal(panel,PANEL_ENABLEDOUTPUT, &output);
GetCtrlVal(panel,PANEL_OUTWAVE, &outwaveforms);
GetCtrlVal(panel,PANEL_OUTWAVE, &outwaveforms);
GetCtrlVal(panel,PANEL_FILENAME, filename);
 
delay= MINTRGDELAY + nsamples - nbefore + 1;
419,15 → 431,16
GetCtrlVal(panel,PANEL_START, &state);
if (state && eventData1==0) {
histoinit();
for (int i=0; i<nsamples; i++) timebins[i]=(i-nbefore)*8*decimation/1000.;
/* decimation n (=1,8,64...) : frequency = 125/n MHz*/
for (int i=0; i<nsamples; i++) timebins[i]=(i-nbefore)* (float)decimation /125.;
if (output) foutput = fopen(filename, "wb");
 
printf("decimation %d\n", decimation);
SetCtrlVal(panel,PANEL_CEVE , 0);
ctrl_c=0;
hdr[0] = 0;
hdr[1] = 7*sizeof(int);
hdr[2] = delay;
hdr[3] = decimation;
hdr[3] = rpdecimation(decimation);
hdr[4] = level * 1000;
sbuff[0] = neve;
sbuff[1] = nsamples;
/cvi/RedPitaya/soccli/soccli.cws
15,11 → 15,11
Project 0002 = "/c/home/CVI/RedPitaya/RedPitaya.prj"
Project 0002 Folder User Interface Files Collapsed = True
Project 0002 FolderId 0 Collapsed = True
Drag Bar Left = 264
Window Top = 113
Window Left = 87
Window Bottom = 859
Window Right = 1074
Drag Bar Left = 184
Window Top = 32
Window Left = 9
Window Bottom = 751
Window Right = 1271
Maximized = False
Maximized Children = True
Max32 Number Of Errors = 20
35,7 → 35,7
Sort Type = "File Name"
Number of Opened Files = 8
Window Confinement Region Enabled = True
MainColumnWidth = 247
MainColumnWidth = 167
FileDateColumnWidth = 70
FileSizeColumnWidth = 70
 
60,23 → 60,32
[File 0001]
Path = "/c/home/CVI/instr/HISTO/H1D.fp"
File Type = "Function Panel"
Disk Date = 3572927977
Disk Date = 3568705022
In Projects = "1,"
 
[File 0002]
Path = "/c/home/CVI/RedPitaya/RedPitaya.c"
File Type = "CSource"
Disk Date = 3574162675
In Projects = "2,"
Window Top = 31
Window Z-Order = 6
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 0003]
Path = "/c/home/CVI/RedPitaya/soccli/soccli.c"
File Type = "CSource"
Disk Date = 3573273305
Disk Date = 3574184081
In Projects = "1,"
Window Top = 33
Window Left = 10
Window Z-Order = 1
Source Window State = "0,338,338,338,16,24,16,0,0,85,32,330,0,299,22,2,132,0,433,0,349,595,1,9601,"
Source Window State = "0,421,421,421,72,79,79,0,0,130,29,417,0,437,41,2,145,0,446,0,349,595,1,9601,"
 
[File 0003]
[File 0004]
Path = "/c/home/CVI/RedPitaya/soccli/redpitaya_gui.uir"
File Type = "User Interface Resource"
Disk Date = 3573273402
Disk Date = 3574163726
In Projects = "1,"
Window Top = 64
Window Left = 26
84,10 → 93,10
Window Width = 595
Window Z-Order = 2
 
[File 0004]
[File 0005]
Path = "/c/home/CVI/RedPitaya/RedPitaya_ui.uir"
File Type = "User Interface Resource"
Disk Date = 3572927996
Disk Date = 3574162676
In Projects = "2,"
Window Top = 64
Window Left = 26
95,20 → 104,10
Window Width = 683
Window Z-Order = 7
 
[File 0005]
Path = "/c/home/CVI/RedPitaya/RedPitaya.c"
File Type = "CSource"
Disk Date = 3573208675
In Projects = "2,"
Window Top = 126
Window Left = 58
Window Z-Order = 6
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]
Path = "/c/home/CVI/instr/HISTO/H1D.c"
File Type = "CSource"
Disk Date = 3573208782
Disk Date = 3574162672
In Projects = ""
Window Top = 126
Window Left = 58
118,7 → 117,7
[File 0007]
Path = "/c/home/CVI/instr/DRS/drs4.c"
File Type = "CSource"
Disk Date = 3572927960
Disk Date = 3574162673
In Projects = ""
Window Top = 126
Window Left = 58
128,7 → 127,7
[File 0008]
Path = "/c/home/CVI/RedPitaya/soccli/mH1D.h"
File Type = "Include"
Disk Date = 3572929116
Disk Date = 3574162675
In Projects = ""
Window Top = 33
Window Left = 10
138,7 → 137,7
[File 0009]
Path = "/c/home/CVI/instr/HISTO/H1D.h"
File Type = "Include"
Disk Date = 3573208896
Disk Date = 3574162672
In Projects = ""
Window Top = 64
Window Left = 26
148,7 → 147,7
[File 0010]
Path = "/c/home/CVI/RedPitaya/soccli/soccli.h"
File Type = "Include"
Disk Date = 3572927995
Disk Date = 3574162675
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,"
 
161,7 → 160,7
[File 0012]
Path = "/c/home/CVI/RedPitaya/RedPitaya_ui.h"
File Type = "Include"
Disk Date = 3572927995
Disk Date = 3574162675
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,"
 
168,7 → 167,7
[File 0013]
Path = "/c/home/CVI/RedPitaya/plottdc.cxx"
File Type = "Unknown"
Disk Date = 3573208675
Disk Date = 3574162678
In Projects = "2,"
 
[Tab Order]