User manual
2.3.28 AcqrsD1_bestSampInterval
Purpose
Helper function to simplify digitizer configuration. It returns the best possible sampling rate for an
acquisition, which covers the timeWindow with no more than maxSamples. The calculation takes into
account the requested state of the instrument, in particular the requested number of segments. In addition,
this routine returns the "real" nominal number of samples that can be accommodated (it is computed as
timeWindow/samplingInterval!).
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
maxSamples ViInt32 Maximum number of samples to be used
timeWindow ViReal64 Time window to be covered, in seconds
Output
Name Type Description
sampInterval ViReal64 Recommended sampling interval in seconds
nomSamples ViInt32 Recommended number of data samples
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
The function returns the value status = ACQIRIS_ERROR_SETUP_NOT_AVAILABLE when the available
memory is too short, and the longest available sampling interval too short. The returned sampling interval is
the longest one possible. It returns VI_SUCCESS when a good solution has been found.
NOTE: This function does not modify the state of the digitizer at all. It simply returns a recommendation
that the user is free to override.
NOTE: When using this method, make sure to use
AcqrsD1_configMemory beforehand to set the number
of segments to the desired value (nbrSamples may be any number!).
AcqrsD1_bestSampInterval depends
on this variable.
NOTE: The returned "recommended" values for the sampling interval sampInterval and the nominal
number of samples nomSamples are expected to be used for configuring the instrument with calls to
AcqrsD1_configMemory and AcqrsD1_configHorizontal. Make sure to use the same number of segments
in this second call to
AcqrsD1_configMemory, as in the first one.
Programmer’s Reference Manual Page 52 of 210