Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
ff7aadc4
Commit
ff7aadc4
authored
Oct 24, 2016
by
Paolo Mutti
Browse files
PSD waveform
parent
d0f6f1b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/controllers/npp/gui/psd_controller/psd_controller.properties
View file @
ff7aadc4
...
@@ -123,6 +123,8 @@ psd_controller.oscilloscopeValue=0
...
@@ -123,6 +123,8 @@ psd_controller.oscilloscopeValue=0
psd_controller.oscilloscopeLabel
=
Oscilloscope
psd_controller.oscilloscopeLabel
=
Oscilloscope
psd_controller.histogramValue
=
1
psd_controller.histogramValue
=
1
psd_controller.histogramLabel
=
Histogram
psd_controller.histogramLabel
=
Histogram
psd_controller.waveformValue
=
2
psd_controller.waveformLabel
=
Wave Form
# Plot group
# Plot group
psd_controller.histogranPlotTitle
=
Energy histogram
psd_controller.histogranPlotTitle
=
Energy histogram
...
@@ -133,8 +135,7 @@ psd_controller.postTrigPrefix=Post trigger samples
...
@@ -133,8 +135,7 @@ psd_controller.postTrigPrefix=Post trigger samples
psd_controller.offsetPrefix
=
Input DC offset
psd_controller.offsetPrefix
=
Input DC offset
psd_controller.histogramLegend
=
Energy
psd_controller.histogramLegend
=
Energy
psd_controller.inputLegend
=
Input
psd_controller.inputLegend
=
Input
psd_controller.trapezoidLegend
=
Trapezoid
psd_controller.longGateLegend
=
Long Gate
psd_controller.shortGateLegend
=
Short Gate
psd_controller.triggerLegend
=
Trigger
psd_controller.triggerLegend
=
Trigger
psd_controller.peakingLegend
=
Peaking
psd_controller.percentSuffix
=
%
psd_controller.percentSuffix
=
%
psd_controller.pn1CoincidencePlotTitle
=
E-dE
src/controllers/npp/gui/psd_controller/psd_controllerView.xml
View file @
ff7aadc4
<plugin>
<plugin>
<controller
type=
"psd_controller"
role=
"psd_controller1"
/>
<controller
type=
"psd_controller"
role=
"psd_controller1"
/>
<property_switcher
role=
"psd_controller1"
property=
"dpp_acq_mode"
switcher_key=
"
useScop
eSwitcher"
/>
<property_switcher
role=
"psd_controller1"
property=
"dpp_acq_mode"
switcher_key=
"
acqMod
eSwitcher"
/>
<group
title=
"psd_controller.boardParamsTitle"
>
<group
title=
"psd_controller.boardParamsTitle"
>
<text
role=
"psd_controller1"
property=
"nb_channels"
prefix=
"psd_controller.nbChannels"
/>
<text
role=
"psd_controller1"
property=
"nb_channels"
prefix=
"psd_controller.nbChannels"
/>
<newLine/>
<newLine/>
<combo
role=
"psd_controller1"
property=
"dpp_acq_mode"
prefix=
"psd_controller.acqMode"
valuesAndLabels=
"psd_controller.oscilloscope,psd_controller.histogram"
/>
<combo
role=
"psd_controller1"
property=
"dpp_acq_mode"
prefix=
"psd_controller.acqMode"
valuesAndLabels=
"psd_controller.oscilloscope,psd_controller.histogram
,psd_controller.waveform
"
/>
<switchable_composite
switcher_key=
"
useScop
eSwitcher"
switch_values=
"0"
>
<switchable_composite
switcher_key=
"
acqMod
eSwitcher"
switch_values=
"0"
>
<plot_launcher
role=
"psd_controller1"
data=
"pha_input_plot,pha_trapezoid_plot,pha_trigger_plot,pha_peaking_plot"
title=
"psd_controller.inputPlotTitle"
height=
"20"
/>
<plot_launcher
role=
"psd_controller1"
data=
"pha_input_plot,pha_trapezoid_plot,pha_trigger_plot,pha_peaking_plot"
title=
"psd_controller.inputPlotTitle"
height=
"20"
/>
</switchable_composite>
</switchable_composite>
<switchable_composite
switcher_key=
"acqModeSwitcher"
switch_values=
"2"
>
<text
role=
"pha_controller1"
property=
"record_length"
prefix=
"psd_controller.recordLength"
/>
</switchable_composite>
</group>
</group>
<newLine/>
<newLine/>
...
...
src/drivers/caen_psd/RealCAENPsdDriver.cpp
View file @
ff7aadc4
...
@@ -79,6 +79,7 @@ void RealCAENPsdDriver::init() {
...
@@ -79,6 +79,7 @@ void RealCAENPsdDriver::init() {
return
;
return
;
}
}
// Set acquisition mode
// Set acquisition mode
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
boardParams
.
DPPAcqMode
=
CAEN_DGTZ_DPP_ACQ_MODE_List
;
boardParams
.
DPPAcqMode
=
CAEN_DGTZ_DPP_ACQ_MODE_List
;
...
@@ -86,6 +87,10 @@ void RealCAENPsdDriver::init() {
...
@@ -86,6 +87,10 @@ void RealCAENPsdDriver::init() {
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
boardParams
.
DPPAcqMode
=
CAEN_DGTZ_DPP_ACQ_MODE_Oscilloscope
;
boardParams
.
DPPAcqMode
=
CAEN_DGTZ_DPP_ACQ_MODE_Oscilloscope
;
}
}
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
WAVEFORM_MODE
)
{
boardParams
.
DPPAcqMode
=
CAEN_DGTZ_DPP_ACQ_MODE_Oscilloscope
;
}
boardParams
.
SaveMode
=
(
CAEN_DGTZ_DPP_SaveParam_t
)
owner
()
->
saveMode
();
boardParams
.
SaveMode
=
(
CAEN_DGTZ_DPP_SaveParam_t
)
owner
()
->
saveMode
();
ret
=
CAEN_DGTZ_SetDPPAcquisitionMode
(
m_boardHandle
,
boardParams
.
DPPAcqMode
,
boardParams
.
SaveMode
);
ret
=
CAEN_DGTZ_SetDPPAcquisitionMode
(
m_boardHandle
,
boardParams
.
DPPAcqMode
,
boardParams
.
SaveMode
);
if
(
ret
)
{
if
(
ret
)
{
...
@@ -133,11 +138,15 @@ void RealCAENPsdDriver::init() {
...
@@ -133,11 +138,15 @@ void RealCAENPsdDriver::init() {
// Set aggregate size - how many events per output buffer
// Set aggregate size - how many events per output buffer
// 0 = automatic
// 0 = automatic
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
boardParams
.
EventAggr
=
2
;
//
0
boardParams
.
EventAggr
=
0
;
//
2
}
}
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
boardParams
.
EventAggr
=
2
;
//10
boardParams
.
EventAggr
=
2
;
//10
}
}
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
WAVEFORM_MODE
)
{
boardParams
.
EventAggr
=
1
;
//10
}
ret
=
CAEN_DGTZ_SetDPPEventAggregation
(
m_boardHandle
,
boardParams
.
EventAggr
,
0
);
ret
=
CAEN_DGTZ_SetDPPEventAggregation
(
m_boardHandle
,
boardParams
.
EventAggr
,
0
);
if
(
ret
)
{
if
(
ret
)
{
cout
<<
"1751 error: "
<<
boardParams
.
EventAggr
<<
endl
;
cout
<<
"1751 error: "
<<
boardParams
.
EventAggr
<<
endl
;
...
@@ -166,20 +175,16 @@ void RealCAENPsdDriver::init() {
...
@@ -166,20 +175,16 @@ void RealCAENPsdDriver::init() {
uint32
data
;
uint32
data
;
ret
=
CAEN_DGTZ_ReadRegister
(
m_boardHandle
,
0x8000
,
&
data
);
ret
=
CAEN_DGTZ_ReadRegister
(
m_boardHandle
,
0x8000
,
&
data
);
cout
<<
" data mode read out "
<<
data
<<
hex
<<
endl
;
//data &= 0xFFF8FFFF;
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
LISTMODE_MODE
)
{
// data |= 0x000C0000;
data
=
0x000C0114
;
data
=
0x000C0114
;
//data = 0x00070110;
cout
<<
" data mode "
<<
data
<<
hex
<<
endl
;
}
}
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
SCOPE_MODE
)
{
//data
|
= 0x0
007000
0;
//data = 0x0
187011
0;
//
data = 0x0
40f
0110;
data
=
0x0
18D
0110
;
//data = 0x01810110;
}
data
=
0x01870110
;
else
if
(
owner
()
->
dppAcqMode
()
==
acquisition
::
DPPAcquisitionCommon
::
WAVEFORM_MODE
)
{
cout
<<
" data mode "
<<
data
<<
hex
<<
endl
;
data
=
0x018D0110
;
}
}
ret
=
CAEN_DGTZ_WriteRegister
(
m_boardHandle
,
0x8000
,
data
);
ret
=
CAEN_DGTZ_WriteRegister
(
m_boardHandle
,
0x8000
,
data
);
if
(
ret
)
{
if
(
ret
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment