start the DAQ form slave, able to Sync

This commit is contained in:
Ryan Tang 2023-09-15 17:53:08 -04:00
parent 9736f5cdc6
commit eda5aeb36d
2 changed files with 4 additions and 3 deletions

View File

@ -629,13 +629,14 @@ void Digitizer2Gen::ProgramPHA(bool testPulse){
if( !isConnected ) return ; if( !isConnected ) return ;
// Acquistion // Acquistion
WriteValue("/par/StartSource" , "SWcmd | SINedge"); WriteValue("/par/StartSource" , "SWcmd");
WriteValue("/par/TrgOutMode", "Disabled"); WriteValue("/par/TrgOutMode", "Disabled");
WriteValue("/par/GPIOMode", "Disabled"); WriteValue("/par/GPIOMode", "Disabled");
WriteValue("/par/SyncOutMode", "Disabled"); WriteValue("/par/SyncOutMode", "Disabled");
WriteValue("/par/RunDelay", "0"); // ns, that is for sync time with multi board WriteValue("/par/RunDelay", "0"); // ns, that is for sync time with multi board
WriteValue("/par/IOlevel", "NIM"); WriteValue("/par/IOlevel", "NIM");
WriteValue("/par/EnStatEvents", "true"); WriteValue("/par/EnStatEvents", "true");
WriteValue("/par/BusyInSource", "Disabled");
// Channel setting // Channel setting
if( testPulse){ if( testPulse){
@ -700,7 +701,7 @@ void Digitizer2Gen::ProgramPHA(bool testPulse){
} }
WriteValue("/ch/0..63/par/DCOffset" , "10"); /// 10% WriteValue("/ch/0..63/par/DCOffset" , "10"); /// 10%
WriteValue("/ch/0..63/par/WaveSaving" , "Always"); WriteValue("/ch/0..63/par/WaveSaving" , "OnRequest");
WriteValue("/ch/0..63/par/ChRecordLengthT" , "4096"); /// 4096 ns, S and T are not Sync WriteValue("/ch/0..63/par/ChRecordLengthT" , "4096"); /// 4096 ns, S and T are not Sync
WriteValue("/ch/0..63/par/ChPreTriggerT" , "1000"); /// 1000 ns WriteValue("/ch/0..63/par/ChPreTriggerT" , "1000"); /// 1000 ns

View File

@ -419,7 +419,7 @@ int MainWindow::StartACQ(){
} }
//============================= start digitizer //============================= start digitizer
for( int i = 0 ; i < nDigi; i ++){ for( int i = nDigi-1 ; i >= 0; i --){
if( digi[i]->IsDummy () ) continue; if( digi[i]->IsDummy () ) continue;
for( int ch = 0; ch < (int) digi[i]->GetNChannels(); ch ++) oldTimeStamp[i][ch] = 0; for( int ch = 0; ch < (int) digi[i]->GetNChannels(); ch ++) oldTimeStamp[i][ch] = 0;