Commit 54bab92b authored by acq's avatar acq

Modif to QDC driver

parent 5e97000d
......@@ -114,25 +114,34 @@ void RealCAENQdcDriver::init() {
// Set acquisition mode
if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::LISTMODE_MODE) {
boardParams.DPPAcqMode = CAEN_DGTZ_DPP_ACQ_MODE_List;
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8004, 0x00080000);
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8004, 0x00040000);
}
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::SCOPE_MODE) {
boardParams.DPPAcqMode = CAEN_DGTZ_DPP_ACQ_MODE_Oscilloscope;
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8008, 0x00010000);
}
else if (owner()->dppAcqMode() == acquisition::DPPAcquisitionCommon::WAVEFORM_MODE) {
boardParams.DPPAcqMode = CAEN_DGTZ_DPP_ACQ_MODE_Oscilloscope;
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8004, 0x00010000);
}
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) {
cerr << "Error CAEN_DGTZ_SetDPPAcquisitionMode: " << ret << endl;
close();
return;
}
// Set start acquisition mode
// Set Extended Time Stamp
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x8004, 1 << 17);
// Set start acquisition mode
boardParams.AcqMode = (CAEN_DGTZ_AcqMode_t)owner()->acqMode();
ret = CAEN_DGTZ_SetAcquisitionMode(m_boardHandle, CAEN_DGTZ_S_IN_CONTROLLED); //boardParams.AcqMode);
ret |= CAEN_DGTZ_SetAcquisitionMode(m_boardHandle, CAEN_DGTZ_S_IN_CONTROLLED); //boardParams.AcqMode);
if (ret) {
cerr << "Error CAEN_DGTZ_SetAcquisitionMode: " << ret << endl;
close();
......@@ -141,7 +150,8 @@ void RealCAENQdcDriver::init() {
// Set I/O level
boardParams.IOLevel = (CAEN_DGTZ_IOLevel_t)owner()->ioLevel();
ret = CAEN_DGTZ_SetIOLevel(m_boardHandle, boardParams.IOLevel);
// ret = CAEN_DGTZ_SetIOLevel(m_boardHandle, boardParams.IOLevel);
ret |= CAEN_DGTZ_WriteRegister(m_boardHandle, 0x811c, 0x1);
if (ret) {
cerr << "Error CAEN_DGTZ_SetIOLevel: " << ret << endl;
close();
......
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