User manual

Programmer’s Guide Page 29 of 66
long channel = 1, gate =2;
AcqrsD1_configAvgConfig(instrID, channel, "GateType", &gate);
long preSamples = 0, postSamples = 0, maxGates = 1;
double threshold = 0.0; // in Volts
status = AcqrsD1_configAvgConfig(instrID, channel,
"PreSamples", &preSamples);
status = AcqrsD1_configAvgConfig(instrID, channel,
"PostSamples", &postSamples);
status = AcqrsD1_configAvgConfig(instrID, channel,
"Threshold", &threshold);
status = AcqrsD1_configAvgConfig(instrID, channel,
"NbrMaxGates", &maxGates);
3.5.3. SSR Time stamps
The „On-board10 MHz reference clock is used to increment a counter. The value of the counter is stored after the
trigger of each new segment. The value of the counter can be read by the software as shown here:
double SSRtimeStamp;
Acqrs_getInstrumentInfo(instrID, "SSRTimeStamp", &SSRtimeStamp);
Since each channel is controlled by its own FPGA the time stamps for the same segment are not necessarily the same
for the two channels. The command above works with the stamp of Channel 2.
In this release if the function is called before the first acquisition has been started the value returned will be 0!
It is possible to reset the time stamp when starting an acquisition using a call like
status = AcqrsD1_acquireEx(instrID,0,4,0,0);
or with a hardware signal on the P1 or P2 connectors. This can be done with a call like:
Long TSReset = 1;
status = AcqrsD1_configAvgConfig(instrID, channel, "P1Control",&TSReset);
3.6. Configuring AP family Peak
TDC
Analyzers
Since Peak
TDC
processing can be viewed as an additional form of processing after SSR acquisition please refer to the
discussion in 3.5 Configuring SSR Analyzers for that part of process. In addition you will have to
// Configure peak detection
long numberOfTriggersPerSeg = 50, numberOfSegments = 1;
double startDelta=0.1,validDelta = 0.2;
AcqrsD1_configMode(instrID, 5, 0, 0);
AcqrsD1_configAvgConfig(instrID, 0, "NbrRoundRobins", &numberOfTriggersPerSeg);
AcqrsD1_configAvgConfig(instrID, 0, "NbrSegments", &numberOfSegments);
AcqrsD1_configAvgConfig(instrID, 0, "StartDeltaPosPeakV", &startDelta);
AcqrsD1_configAvgConfig(instrID, 0, "ValidDeltaPosPeakV", &validDelta);
// Configure histogram
long tdcMode = 1, tdcDepth = 1, tdcIncr = 2, tdcType = 1;
AcqrsD1_configAvgConfig(instrID, 0, "TdcHistogramMode", &tdcMode);
AcqrsD1_configAvgConfig(instrID, 0, "TdcHistogramDepth", &tdcDepth);
AcqrsD1_configAvgConfig(instrID, 0, "TdcHistogramIncrement", &tdcIncr);
AcqrsD1_configAvgConfig(instrID, 0, "TdcProcessType", &tdcType);
// if the acquisition has segments to be histogrammed independently
long tdcOverlay = 0;
AcqrsD1_configAvgConfig(instrID, 0, "TdcOverlaySegments", &tdcOverlay);