User manual
Programmer’s Guide    Page 36 of 66 
status=AcqrsD1_acquire(instrID); // Start the acquisition 
processType = 0; 
for (;;) //loop forever 
{ 
  status=AcqrsD1_processData(instrID, processType, 1); 
  status=AcqrsD1_waitForEndOfProcessing(instrID, timeout); 
  status=AcqrsD1_readData(instrID, channel, &readPar, &adcArray, 
&dataDesc, &segDesc);    
} 
To keep the same interface for the AP240 as was the case for the AP101/AP201, the processing step is kept but the 
“dummy” processing value is used. Actually the software knows which processing is needed from the setup values 
sent to AcqrsD1_configAvgConfig. Thus, the software must wait for the end of processing even if the “processing 
mode” is set to NO_PROCESSING. 
3.10.6.2. What happens when the AutoSwitch semaphore is not set 
After the "processing" of an acquisition, if the semaphore is not set, the FPGA waits for further instructions. This 
feature ensures that the software has finished with the old buffer and gives full compatibility with older software 
implementations.  If  you  make a  call  to  AcqrsD1_stopAcquisition  you  shouldn't  try  to  read  the last  acquisition's 
data. 
3.10.6.3. Changing acquisition settings while acquiring and reading events 
If you want to change any of the acquisition settings you must 
o  terminate the current acquisition sequence 
AcqrsD1_processData(instrID, processType, 2); // do a bank switch but do not 
start 
status = AcqrsD1_waitForEndOfProcessing(instrID, timeout); // usual wait 
// finish reading the data associated with the old settings 
AcqrsD1_readData(instrID, channel, &readParams, waveformArray, &wfDesc, 
&segDesc); 
o  configure the instrument for the new values and start the new set of acquisitions 
// go back to step 0 in the table above 
AcqrsD1_configAvgConfig(…); … 
AcqrsD1_acquire(instrID); … 
3.11.  D1-style Data Readout 
For  the  reading  of  standard  waveforms  the  AcqrsD1_readData  routine  should  be  used.  The  following  older 
routines will remain available but will no longer be discussed:  
AcqrsD1_readCharWform 
AcqrsD1_readCharSequence 
AcqrsD1_readRealWform 
AcqrsD1_readRealSequence 
AcqrsD1_accumulateWform 
You should use the function AcqrsD1_readData for all new programs. The older functions will not give support for 
new instruments or new functionality. All variables of the AqReadParameters structure should be initialized; 0 can 
be used for the reserved words. 
For the readout of the averager data the read function AcqrsD1_readData described in 3.11.1 Reading  Digitizer 
Waveforms  with the Universal Read  Function should be used with  readMode =  2 (ReadModeAvgW). For 
reading data from analyzers please refer to 3.11.7 Reading SSR Analyzer Waveforms, 3.11.8 Reading AP family 
PeakTDC Analyzer Data and Histograms, 3.11.9 Reading U1084A PeakTDC Waveforms and Histograms, or 
3.11.10 Reading AP101/AP201 Analyzer Waveforms. 










