Commit ff7aadc4 authored by Paolo Mutti's avatar Paolo Mutti
Browse files

PSD waveform

parent d0f6f1b3
......@@ -123,6 +123,8 @@ psd_controller.oscilloscopeValue=0
psd_controller.oscilloscopeLabel=Oscilloscope
psd_controller.histogramValue=1
psd_controller.histogramLabel=Histogram
psd_controller.waveformValue=2
psd_controller.waveformLabel=Wave Form
# Plot group
psd_controller.histogranPlotTitle=Energy histogram
......@@ -133,8 +135,7 @@ psd_controller.postTrigPrefix=Post trigger samples
psd_controller.offsetPrefix=Input DC offset
psd_controller.histogramLegend=Energy
psd_controller.inputLegend=Input
psd_controller.trapezoidLegend=Trapezoid
psd_controller.longGateLegend=Long Gate
psd_controller.shortGateLegend=Short Gate
psd_controller.triggerLegend=Trigger
psd_controller.peakingLegend=Peaking
psd_controller.percentSuffix=%
psd_controller.pn1CoincidencePlotTitle=E-dE
<plugin>
<controller type="psd_controller" role="psd_controller1"/>
<property_switcher role="psd_controller1" property="dpp_acq_mode" switcher_key="useScopeSwitcher"/>
<property_switcher role="psd_controller1" property="dpp_acq_mode" switcher_key="acqModeSwitcher"/>
<group title="psd_controller.boardParamsTitle">
<text role="psd_controller1" property="nb_channels" prefix="psd_controller.nbChannels"/>
<newLine/>
<combo role="psd_controller1" property="dpp_acq_mode" prefix="psd_controller.acqMode" valuesAndLabels="psd_controller.oscilloscope,psd_controller.histogram"/>
<switchable_composite switcher_key="useScopeSwitcher" switch_values="0">
<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="acqModeSwitcher" 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"/>
</switchable_composite>
<switchable_composite switcher_key="acqModeSwitcher" switch_values="2">
<text role="pha_controller1" property="record_length" prefix="psd_controller.recordLength"/>
</switchable_composite>
</group>
<newLine/>
......
......@@ -79,6 +79,7 @@ void RealCAENPsdDriver::init() {
return;
}
// Set acquisition mode
if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::LISTMODE_MODE) {
boardParams.DPPAcqMode = CAEN_DGTZ_DPP_ACQ_MODE_List;
......@@ -86,6 +87,10 @@ void RealCAENPsdDriver::init() {
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::SCOPE_MODE) {
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();
ret = CAEN_DGTZ_SetDPPAcquisitionMode(m_boardHandle, boardParams.DPPAcqMode, boardParams.SaveMode);
if (ret) {
......@@ -133,11 +138,15 @@ void RealCAENPsdDriver::init() {
// Set aggregate size - how many events per output buffer
// 0 = automatic
if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::LISTMODE_MODE) {
boardParams.EventAggr = 2; //0
boardParams.EventAggr = 0; //2
}
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::SCOPE_MODE) {
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);
if (ret) {
cout << "1751 error: " << boardParams.EventAggr << endl;
......@@ -166,20 +175,16 @@ void RealCAENPsdDriver::init() {
uint32 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) {
// data |= 0x000C0000;
data = 0x000C0114;
//data = 0x00070110;
cout << " data mode " << data << hex << endl;
}
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::SCOPE_MODE) {
//data |= 0x00070000;
//data = 0x040f0110;
//data = 0x01810110;
data = 0x01870110;
cout << " data mode " << data << hex << endl;
//data = 0x01870110;
data = 0x018D0110;
}
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::WAVEFORM_MODE) {
data = 0x018D0110;
}
ret = CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8000, data);
if (ret) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment