added SoftwareDisable Digitizer, Replace SW trigger button with SetNoTrace button
This commit is contained in:
parent
6d7daaa13c
commit
03c3e79497
|
@ -1341,6 +1341,7 @@ void Digitizer::SetOptimialAggOrg(){
|
||||||
uint32_t EventAgg = ReadRegister(DPP::QDC::NumberEventsPerAggregate, 0);
|
uint32_t EventAgg = ReadRegister(DPP::QDC::NumberEventsPerAggregate, 0);
|
||||||
uint32_t chMask = ReadRegister(DPP::QDC::GroupEnableMask);
|
uint32_t chMask = ReadRegister(DPP::QDC::GroupEnableMask);
|
||||||
uint32_t RecordLen = ReadRegister(DPP::QDC::RecordLength_R, 0);
|
uint32_t RecordLen = ReadRegister(DPP::QDC::RecordLength_R, 0);
|
||||||
|
if( RecordLen == 0 ) SetBits(DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace, 0, -1);
|
||||||
|
|
||||||
uint32_t AggRead = ReadRegister(DPP::MaxAggregatePerBlockTransfer);
|
uint32_t AggRead = ReadRegister(DPP::MaxAggregatePerBlockTransfer);
|
||||||
uint32_t boardCfg = ReadRegister(DPP::BoardConfiguration);
|
uint32_t boardCfg = ReadRegister(DPP::BoardConfiguration);
|
||||||
|
@ -1359,6 +1360,7 @@ void Digitizer::SetOptimialAggOrg(){
|
||||||
printf(" Record Length (bit) : %u = %u sample = %u ns\n", RecordLen, RecordLen*8, RecordLen*8*16);
|
printf(" Record Length (bit) : %u = %u sample = %u ns\n", RecordLen, RecordLen*8, RecordLen*8*16);
|
||||||
printf("==============================================================\n");
|
printf("==============================================================\n");
|
||||||
|
|
||||||
|
|
||||||
int eventSize = 6 + 2 * Ex + traceOn * RecordLen * 8; // sample
|
int eventSize = 6 + 2 * Ex + traceOn * RecordLen * 8; // sample
|
||||||
double maxAggOrg = log2( MemorySizekSample * 1024 / eventSize / EventAgg );
|
double maxAggOrg = log2( MemorySizekSample * 1024 / eventSize / EventAgg );
|
||||||
printf(" max Agg. Org. should be less than %.2f\n", maxAggOrg);
|
printf(" max Agg. Org. should be less than %.2f\n", maxAggOrg);
|
||||||
|
|
|
@ -90,6 +90,7 @@ class Digitizer{
|
||||||
bool IsConnected() {return isConnected;}
|
bool IsConnected() {return isConnected;}
|
||||||
|
|
||||||
void DisableBoard() {softwareDisable = true;}
|
void DisableBoard() {softwareDisable = true;}
|
||||||
|
void EnableBoard() {softwareDisable = false;}
|
||||||
bool IsBoardDisabled() const {return softwareDisable;}
|
bool IsBoardDisabled() const {return softwareDisable;}
|
||||||
|
|
||||||
void PrintBoard();
|
void PrintBoard();
|
||||||
|
|
|
@ -38,6 +38,10 @@ public:
|
||||||
// ta = t0;
|
// ta = t0;
|
||||||
t1 = t0;
|
t1 = t0;
|
||||||
|
|
||||||
|
digiMTX[ID].lock();
|
||||||
|
digi->ReadACQStatus();
|
||||||
|
digiMTX[ID].unlock();
|
||||||
|
|
||||||
printf("ReadDataThread for digi-%d running.\n", digi->GetSerialNumber());
|
printf("ReadDataThread for digi-%d running.\n", digi->GetSerialNumber());
|
||||||
do{
|
do{
|
||||||
|
|
||||||
|
@ -90,7 +94,6 @@ public:
|
||||||
// ta = tb;
|
// ta = tb;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}while(!stop);
|
}while(!stop);
|
||||||
printf("ReadDataThread for digi-%d stopped.\n", digi->GetSerialNumber());
|
printf("ReadDataThread for digi-%d stopped.\n", digi->GetSerialNumber());
|
||||||
}
|
}
|
||||||
|
@ -104,7 +107,6 @@ private:
|
||||||
bool isSaveData;
|
bool isSaveData;
|
||||||
bool isScope;
|
bool isScope;
|
||||||
unsigned long readCount;
|
unsigned long readCount;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//^#======================================================= Timing Thread
|
//^#======================================================= Timing Thread
|
||||||
|
|
|
@ -219,9 +219,17 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
||||||
connect(bnLoadSettings, &QPushButton::clicked, this, &DigiSettingsPanel::LoadSetting);
|
connect(bnLoadSettings, &QPushButton::clicked, this, &DigiSettingsPanel::LoadSetting);
|
||||||
|
|
||||||
rowID ++; //---------------------------
|
rowID ++; //---------------------------
|
||||||
bnSendSoftwareTriggerSignal = new QPushButton("Send SW Trigger Signal", this);
|
// bnSendSoftwareTriggerSignal = new QPushButton("Send SW Trigger Signal", this);
|
||||||
buttonLayout->addWidget(bnSendSoftwareTriggerSignal, rowID, 0);
|
// buttonLayout->addWidget(bnSendSoftwareTriggerSignal, rowID, 0);
|
||||||
connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1); UpdateBoardAndChannelsStatus();});
|
// connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1); UpdateBoardAndChannelsStatus();});
|
||||||
|
|
||||||
|
bnSetNoTrace = new QPushButton("Set No Trace", this);
|
||||||
|
buttonLayout->addWidget(bnSetNoTrace, rowID, 0);
|
||||||
|
connect(bnSetNoTrace, &QPushButton::clicked, this, [=](){
|
||||||
|
for( unsigned int i = 0; i < nDigi; i++){
|
||||||
|
chkTraceRecording[i]->setChecked(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
bhAutoSetEventPulling = new QPushButton("Autoset Reading Conf.", this);
|
bhAutoSetEventPulling = new QPushButton("Autoset Reading Conf.", this);
|
||||||
buttonLayout->addWidget(bhAutoSetEventPulling, rowID, 1);
|
buttonLayout->addWidget(bhAutoSetEventPulling, rowID, 1);
|
||||||
|
@ -330,7 +338,6 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
||||||
ID = index;
|
ID = index;
|
||||||
//if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) UpdatePanelFromMemory();
|
//if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) UpdatePanelFromMemory();
|
||||||
UpdatePanelFromMemory();
|
UpdatePanelFromMemory();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1375,7 +1382,28 @@ void DigiSettingsPanel::SetUpChannelMask(unsigned int digiID){
|
||||||
emit UpdateOtherPanels();
|
emit UpdateOtherPanels();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QLabel * blank = new QLabel(" ", this);
|
||||||
|
chLayout->addWidget(blank, 1, nChGrp );
|
||||||
|
|
||||||
|
cbDigiEnable[digiID] = new QCheckBox("Enable Digitizer",this);
|
||||||
|
cbDigiEnable[digiID]->setChecked(true);
|
||||||
|
|
||||||
|
chLayout->addWidget(cbDigiEnable[digiID], 1, nChGrp + 2 );
|
||||||
|
|
||||||
|
connect(cbDigiEnable[digiID], &QCheckBox::stateChanged, this, [=](int state){
|
||||||
|
if( state == Qt::Checked ){
|
||||||
|
digi[digiID]->EnableBoard();
|
||||||
|
cbDigiEnable[digiID]->setStyleSheet("");
|
||||||
|
tabWidget->setTabText(digiID, "Digi-" + QString::number(digi[digiID]->GetSerialNumber()));
|
||||||
|
}else{
|
||||||
|
digi[digiID]->DisableBoard();
|
||||||
|
cbDigiEnable[digiID]->setStyleSheet("color: red");
|
||||||
|
tabWidget->setTabText(digiID, "Digi-" + QString::number(digi[digiID]->GetSerialNumber()) + "(D)");
|
||||||
|
}
|
||||||
|
UpdateBoardAndChannelsStatus();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DigiSettingsPanel::SetUpACQReadOutTab(){
|
void DigiSettingsPanel::SetUpACQReadOutTab(){
|
||||||
|
|
|
@ -106,7 +106,8 @@ private:
|
||||||
QPushButton * bnProgramPreDefined;
|
QPushButton * bnProgramPreDefined;
|
||||||
QPushButton * bnClearBuffer;
|
QPushButton * bnClearBuffer;
|
||||||
|
|
||||||
QPushButton * bnSendSoftwareTriggerSignal;
|
// QPushButton * bnSendSoftwareTriggerSignal;
|
||||||
|
QPushButton * bnSetNoTrace;
|
||||||
QPushButton * bhAutoSetEventPulling;
|
QPushButton * bhAutoSetEventPulling;
|
||||||
//QPushButton * bnSendSoftwareClockSyncSignal;
|
//QPushButton * bnSendSoftwareClockSyncSignal;
|
||||||
QPushButton * bnSaveSettings;
|
QPushButton * bnSaveSettings;
|
||||||
|
@ -134,6 +135,7 @@ private:
|
||||||
RComboBox * cbDigiProbe2[MaxNDigitizer];
|
RComboBox * cbDigiProbe2[MaxNDigitizer];
|
||||||
|
|
||||||
QPushButton * bnChEnableMask[MaxNDigitizer][MaxRegChannel];
|
QPushButton * bnChEnableMask[MaxNDigitizer][MaxRegChannel];
|
||||||
|
QCheckBox * cbDigiEnable[MaxNDigitizer];
|
||||||
RComboBox * cbAggOrg[MaxNDigitizer];
|
RComboBox * cbAggOrg[MaxNDigitizer];
|
||||||
RSpinBox * sbAggNum[MaxNDigitizer];
|
RSpinBox * sbAggNum[MaxNDigitizer];
|
||||||
QCheckBox * chkEnableExternalTrigger[MaxNDigitizer];
|
QCheckBox * chkEnableExternalTrigger[MaxNDigitizer];
|
||||||
|
|
|
@ -1105,6 +1105,7 @@ void MainWindow::StartACQ(){
|
||||||
bnStopACQ->setStyleSheet("background-color: red;");
|
bnStopACQ->setStyleSheet("background-color: red;");
|
||||||
bnOpenScope->setEnabled(false);
|
bnOpenScope->setEnabled(false);
|
||||||
cbAutoRun->setEnabled(false);
|
cbAutoRun->setEnabled(false);
|
||||||
|
bnSync->setEnabled(false);
|
||||||
|
|
||||||
if( digiSettings ) digiSettings->setEnabled(false);
|
if( digiSettings ) digiSettings->setEnabled(false);
|
||||||
|
|
||||||
|
@ -1134,6 +1135,9 @@ void MainWindow::StartACQ(){
|
||||||
|
|
||||||
void MainWindow::StopACQ(){
|
void MainWindow::StopACQ(){
|
||||||
DebugPrint("%s", "FSUDAQ");
|
DebugPrint("%s", "FSUDAQ");
|
||||||
|
|
||||||
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
if( digi == nullptr ) return;
|
if( digi == nullptr ) return;
|
||||||
|
|
||||||
bool commentResult = true;
|
bool commentResult = true;
|
||||||
|
@ -1183,6 +1187,7 @@ void MainWindow::StopACQ(){
|
||||||
bnStopACQ->setStyleSheet("");
|
bnStopACQ->setStyleSheet("");
|
||||||
bnOpenScope->setEnabled(true);
|
bnOpenScope->setEnabled(true);
|
||||||
cbAutoRun->setEnabled(true);
|
cbAutoRun->setEnabled(true);
|
||||||
|
bnSync->setEnabled(true);
|
||||||
|
|
||||||
if( scalar ){
|
if( scalar ){
|
||||||
for( unsigned int iDigi = 0; iDigi < nDigi; iDigi ++){
|
for( unsigned int iDigi = 0; iDigi < nDigi; iDigi ++){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user