Contents - Index


COM API - Read Data Functions

Functions used to read data and status from the analyzer:

     General Status
     Peak Search Operations
     Distortion Readings
     Total Power Readings
     Marker Readings
     Conversion Operations
     Time Series Data     
     Spectral Data
     Phase Data
     Leq Data
     Misc


General Status

IsRunning ( int *runStatus )

   Description: Determine if the analyzer is currently running, or recording
   Parameters: runStatus = pointer to receive the analyzer run status (0 = stopped, 1 = running or recording)
   Return: S_OK = success, E_FAIL

GetCurrentFileTime( long channel, float *seconds )

   Description: Get the current time in the file for the specified channel
   Parameters: channel = 0 - 15; seconds = pointer to variable to receive the time value in seconds
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTotalFileTime( long channel, float *seconds )

   Description: Get the total time in the file for the specified channel
   Parameters: channel = 0 - 15; seconds = pointer to variable to receive the time value in seconds
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetCurrentFileSample( long channel, unsigned long *sample )

   Description: Get the current sample position in the file for the specified channel
   Parameters: channel = 0 - 15; sample =pointer to variable to receive the sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTotalFileSamples( long channel, unsigned long *samples )

   Description: Get the total number of samples in the file for the specified channel
   Parameters: channel = 0 - 15; samples = pointer to variable to receive the total samples value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetFFTCount( long channel, long *fftcount )

   Description: Get the number of FFTs that have been performed since run or record were last pressed
   Parameters: channel = 0 - 15; fftcount - pointer to variable to receive the the fft count 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetOverloadCount( long channel, long *overloadcount )

   Description: Get the number of Overload conditions (clipping) that have been detected since run or record were last pressed
   Parameters: channel = 0 - 15; overloadcount - pointer to variable to receive the the overload count 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTriggerCount( long *trigger_count )

   Description: Get the number of triggers that have occurred since run or record were last pressed
   Parameters: trigger_count - pointer to variable to receive the the trigger count 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Peak Search Operations

GetPeakFrequency( long channel_ext, float *freq )

   Description: Get the peak frequency in the total span for the specified channel
   Parameters: channel_ext = 0 - 15 for main channels, 17 - 32 for composite channels; 
                      freq = pointer to variable to receive the peak frequency
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakFrequencyNth( long channel_ext, long peak_number, float *freq )

   Description: Get the Nth peak frequency in the total span for the specified channel
   Parameters: channel_ext = 0 - 15 for main channels, 17 - 32 for composite channels; 
                     peak_number = 0 - 10; freq = pointer to variable to receive the peak frequency
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakFrequencyNthSpan( long channel_ext, long peak_number, float startHz, float stopHz, float *freq )

   Description: Get the Nth peak frequency in the specified span for the specified channel
   Parameters: channel_ext = 0 - 15 for main channels, 17 - 32 for composite channels; 
                      peak_number = 0 - 10; startHz = span start frequency; stopHz = span stop frequency;
                      freq = pointer to variable to receive the peak frequency
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakAmplitude( long channel_ext, float *amplitude )

   Description: Get the peak amplitude in the total span for the specified channel
   Parameters: channel_ext = 0 - 15 for main channels, 17 - 32 for composite channels; 
                      amplitude = pointer to variable to receive the peak amplitude
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakAmplitudeNth( long channel_ext, long peak_number, float *amplitude )

   Description: Get the amplitude of the Nth peak in the total span for the specified channel
   Parameters: channel_ext = 0 - 15 for main channels, 17 - 32 for composite channels; 
                     peak_number = 0 - 10; amplitude = pointer to variable to receive the peak amplitude
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakAmplitudeNthSpan( long channel_ext, long peak_number, float startHz, float stopHz, float *amplitude )

   Description: Get the amplitude of the Nth peak in the specified span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      peak_number = 0 - 10; startHz = span start frequency; stopHz = span stop frequency;
                      amplitude = pointer to variable to receive the peak amplitude
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Total Power Readings

GetTotalPower( long channel_ext, long weighting, float *power )

   Description: Get the total power in the total span for the specified channel and weighting
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
                      power = pointer to variable to receive the total power value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTotalPowerSpan( long channel_ext, long weighting, float startHz, float stopHz, float *power )

   Description: Get the total power for the specified frequency span for the specified channel and weighting
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
                      startHz = span start frequency; stopHz = span stop frequency;
                      power = pointer to variable to receive the total power
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Distortion Readings

GetTHD( long channel_ext, float *thd )

   Description: Get the THD over the total span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      thd = pointer to variable to receive the THD value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTHDSpan( long channel_ext, float startHz, float stopHz, float *thd )

   Description: Get the THD over the specified frequency span and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = span start frequency; stopHz = span stop frequency;
                      thd = pointer to variable to receive the THD value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTHD_N( long channel_ext, float *thd_n )

   Description: Get the THD+N over the total span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      thd_n = pointer to variable to receive the THD+N value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTHD_NSpan( long channel_ext, float startHz, float stopHz, float *thd_n )

   Description: Get the THD+N over the specified frequency span and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = span start frequency; stopHz = span stop frequency;
                      thd_n = pointer to variable to receive the THD+N value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetIMD( long channel_ext, float *imd )

   Description: Get the IMD over the total span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      imd = pointer to variable to receive the IMD value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSNR( long channel_ext, float *snr )

   Description: Get the SNR over the total span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      snr = pointer to variable to receive the SNR value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSNRSpan( long channel_ext, float startHz, float stopHz, float *snr )

   Description: Get the SNR over the specified frequency span and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = span start frequency; stopHz = span stop frequency;
                      snr = pointer to variable to receive the SNR value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSINAD( long channel_ext, float *sinad )

   Description: Get the SINAD over the total span for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      sinad = pointer to variable to receive the SINAD value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSINADSpan( long channel_ext, float startHz, float stopHz, float *sinad )

   Description: Get the SINAD over the specified frequency span and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = span start frequency; stopHz = span stop frequency;
                      sinad = pointer to variable to receive the SINAD value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Marker Readings

GetMarkerFrequency( long channel_ext, long marker, float *freq )

   Description: Get the frequency at the specified marker
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      marker = 1 - 8;
                      freq = pointer to variable to receive the frequency value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetMarkerAmplitude( long channel_ext, long marker, float *amplitude )

   Description: Get the amplitude at the specified marker
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      marker = 1 - 8;
                      amplitude = pointer to variable to receive the amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Conversion Operations

ConvertTimeToSample( long channel, float time_seconds, unsigned long *sample )

   Description: Convert from seconds to sample position for the specified channel
   Parameters: channel = 0 - 16; time_seconds = time value to convert
                      sample = pointer to variable to receive the sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ConvertSampleToTime( long channel, unsigned long sample, float *time_seconds )

   Description: Convert from sample position to time for the specified channel
   Parameters: channel = 0 - 16; sample = sample position to convert
                      time_seconds = pointer to variable to receive the time in seconds
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Time Series Data

GetTimeSeriesValueFromTime( long channel, float time_seconds, float *value )

   Description: Get the time series amplitude value a the specified time
   Parameters: channel = 0 - 16; time_seconds = file position time in seconds
                      value = pointer to variable to receive the time series amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTimeSeriesValueFromSample( long channel, unsigned long sample, float *value )

   Description: Get the time series value a the specified sample position
   Parameters: channel = 0 - 16; sample = file position in samples
                      value = pointer to variable to receive the time series amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetMaxTimeSeriesValueInSegment( long channel, unsigned long startSample, unsigned long stopSample, float *value )

   Description: Get the maximum time series value in the specified time segment
   Parameters: channel = 0 - 16; 
                      startSample = time segment start position in samples;
                      stopSample = time segment stop position in samples;
                      value = pointer to variable to receive the maximum time series amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetMinTimeSeriesValueInSegment( long channel, unsigned long startSample, unsigned long stopSample, float *value )

   Description: Get the minimum time series value in the specified time segment
   Parameters: channel = 0 - 16; 
                      startSample = time segment start position in samples;
                      stopSample = time segment stop position in samples;
                      value = pointer to variable to receive the minimum time series amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTimeSeriesFromFile(  long channel, SAFEARRAY __RPC_FAR * __RPC_FAR *psaTimes, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of time series data for the specified channel
   Parameters: channel = 0 - 16;
                      psaTimes = pointer to array of time values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTimeSeriesFromFileSegmentSample(  long channel, unsigned long startSample, unsigned long stopSample, SAFEARRAY __RPC_FAR * __RPC_FAR *psaTimes, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of time series data for the specified time segement and channel
   Parameters: channel = 0 - 16;
                      startSample = start sample of time series segment;
                      stopSample = stop sample of time series segment;
                      psTimes = pointer to array of time values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTimeSeriesFromFileSegmentTime(  long channel, float startSecs, float stopSecs, SAFEARRAY __RPC_FAR * __RPC_FAR *psaTimes, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of time series data for the specified time segement and channel
   Parameters: channel = 0 - 16;
                      startSecs = start time of time series segment;
                      stopSecs = stop time of time series segment;
                      psaTimes = pointer to array of time values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetMaxValueInTriggerSeries( long channel, float *value )

   Description: Get the maximum time series value in the block of trigger samples.  The trigger block length is equal to the FFT size for the specified channel.
   Parameters: channel = 0 - 16;
                      value = pointer to variable to receive the maximum amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetMinValueInTriggerSeries( long channel, float *value )

   Description: Get the minimum time series value in the block of trigger samples.  The trigger block length is equal to the FFT size for the specified channel.
   Parameters: channel = 0 - 16;
                      value = pointer to variable to receive the minimum amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetTriggerTimeSeries( long channel, SAFEARRAY __RPC_FAR * __RPC_FAR *psaTimes, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of time series data containing the block of trigger samples.  The trigger block length is equal to the current FFT size.
   Parameters: channel = 0 - 16;
                      psaTimes = pointer to array of time values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetRPM( long channel, float *rpm )

   Description: Get the current RPM from the tachometer channel
   Parameters: channel = 0 - 16 for main channels
                      rpm = pointer to variable to receive the RPM value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter



Spectral Data

GetSpectrumMinFrequency( long channel_ext, float *freq )

   Description: Get the minimum available frequency in the spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      freq = pointer to variable to receive the frequency value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSpectrumMaxFrequency( long channel_ext, float *freq )

   Description: Get the maximum available frequency in the spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      freq = pointer to variable to receive the frequency value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSpectrumValue( long channel_ext, float freqHz, float *value )

   Description: Get the amplitude value of the spectral data at the specified frequency and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      freqHz = frequency to read the amplitude
                      value = pointer to variable to receive the amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSpectrum(  long channel_ext,SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetSpectrumInSpan(  long channel_ext, float startHz, float stopHz, SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = start frequency of selected span;
                      stopHz = stop frequency of selected span;
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakHoldSpectrumValue( long channel_ext, float freqHz, float *value )

   Description: Get the peak hold amplitude value of the spectral data at the specified frequency and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      freqHz = frequency to read the amplitude
                      value = pointer to variable to receive the amplitude value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakHoldSpectrum(  long channel_ext,SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of peak hold spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPeakHoldSpectrumInSpan(  long channel_ext, float startHz, float stopHz, SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of peak hold spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = start frequency of selected span;
                      stopHz = stop frequency of selected span;
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of amplitude values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


GetComplexSpectrum(  long channel_ext,SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaDataR, SAFEARRAY __RPC_FAR * __RPC_FAR *psaDataI ) 

   Description: Get an array of complex spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      psaFrequencies = pointer to array of frequency values
                      psaDataR = pointer to array of real component of complex values
                      psaDataI = pointer to array of imaginary component of complex values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetComplexSpectrumInSpan(  long channel_ext, float startHz, float stopHz, SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaDataR,  SAFEARRAY __RPC_FAR * __RPC_FAR *psaDataI) 

   Description: Get an array of complex spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = start frequency of selected span;
                      stopHz = stop frequency of selected span;
                      psaFrequencies = pointer to array of frequency values
                      psaDataR = pointer to array of real component of complex values
                      psaDataI = pointer to array of imaginary component of complex values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Phase Data

GetPhaseValue( long channel_ext, float freqHz, float *value )

   Description: Get the phase value at the specified frequency and channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      freqHz = frequency to read the phase
                      value = pointer to variable to receive the phase value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPhase(  long channel_ext,SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of phase data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of phase values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

GetPhaseInSpan(  long channel_ext, float startHz, float stopHz, SAFEARRAY __RPC_FAR * __RPC_FAR *psaFrequencies, SAFEARRAY __RPC_FAR * __RPC_FAR *psaData ) 

   Description: Get an array of phase data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      startHz = start frequency of selected span;
                      stopHz = stop frequency of selected span;
                      psaFrequencies = pointer to array of frequency values
                      psaData = pointer to array of phase values
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Leq Data

GetLeqValues( long channel, float *LeqT, float *Leq, float *Lsel, float *Lpk, float *Lmax, float *Lmin, float *L10, float* L50, float *L90 )

   Description: Get the Leq (Equivalent Noise Level) values for the specified channel
   Parameters: channel_ext = 0 - 16 
                      LeqT = pointer to the equivalent noise level converted to the user specified "reference time period".
                      Leq = pointer to the equivalent noise level for the selected time segment.  
                      Lsel = pointer to the equivalent noise level converted to a 1 second period. 
                      Lpk = pointer to the peak level for the selected time segment.  No averaging is used for this parameter.
                      Lmax = pointer to the maximum level for the selected data.  
                      Lmin = pointer to the minimum level for the selected data.  
                      L10 = pointer to the level exceeded 10% of the time.  
                      L50 = pointer to the level exceeded 50% of the time.  
                      L90 = pointer to the level exceeded 90% of the time.  
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Misc

GetMetadata( long channel, BSTR* metadata )
   Description: Get the metadata text from the current wafe file. Wave file must be open for this function to suceed.
   Parameters: channel = 0 -16;  metadata - up to 2000 characters max of ascii text
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter