Contents - Index


COM API - Control Functions

The following functions can be used to control the analzyer.

Function Groups

     Analyzer Operations   
     Analyzer Configuration
     Plot and Window Commands
     Overlay Control
     File Management
     File Positioning
     File Post Processing
     Signal Generation
     Digital Input and Output Lines
   
Analyzer Operations

Run()

   Description: Run the analyzer or start recording
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

Stop()

   Description: Stop the analyzer or recording
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

Record()

   Description: Start recording
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RecordPause()

   Description: Pause the current recording.  The analyzer will continue running but data will not be stored in the wave file.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RecordResume()

   Description: Resume a paused recording.
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

FileStep( int numFFTSteps )

   Description: Performs the specified number of FFTs starting at the current file position and advancing by the overlap setting (Post Processing mode only)
   Parameters: numFFTSteps: 1 or more
   Return: S_OK = success, E_FAIL = unsuccessful

Trigger()

   Description: Forces a single trigger event.  Analyzer must be running and triggering must be enabled.
   Return: S_OK = success, E_FAIL = unsuccessful


Analyzer Configuration

LoadConfig( BSTR cfg_filename )

   Description: Load the specified configuration file.  This is the quickest way to change all the analyzer settings.
   Parameters: cfg_filename = filename of the configuration file.  Full path or just filename if file located in /Config folder
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Config path as listed in the <File><Set Paths> dialog box.

SaveConfig( BSTR cfg_filename )

   Description: Save the current settings to the specified configuration file
   Parameters: cfg_filename = filename of the configuration file. 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Config path as listed in the <File><Set Paths> dialog box.

SetMode( long mode )

   Description: Set the current mode
   Parameters: mode: 0 = Real Time, 1 = Recorder, 2 = Post Processing
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ChannelEnable( long channel )

   Description: Enable the specified channel
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ChannelDisable( long channel )

   Description: Disable the specified channel
   Parameters: channel = 0 - 15
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

RecordEnable( long channel )

   Description: Enable recording for the specified channel (device channel must also be enabled - use ChannelEnable())
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

RecordDisable( long channel )

   Description: Disable recording for the specified channel
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSamplingRate( long rate )

   Description: Set the sampling rate for the device
   Parameters: rate = samples per second (applies to all channels)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSamplingPrecision( long bits )

   Description: Set the sampling precision for the device
   Parameters: bits = bits per sample (applies to all channels)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFFTsize( long channel, long fft_size )

   Description: Set the FFT size for the specified channel
   Parameters: channel = 0 - 16, fft_size = 32 through 1048576 pts
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSmoothingWindow( long channel, long window )

   Description: Set the Smoothing window for the specified channel
   Parameters: channel = 0 - 16, window = values as shown below:
      BARTLETT       0
      BLACKMAN       1
      EXPONENTIAL    2
      FLATTOP        3
      FORCE          4
      HAMMING        5
      HANNING        6
      KAISER         7
      PARZEN         8
      TRIANGULAR     9
      UNIFORM        10
      GAUSSIAN       11
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageMode( long channel, long mode )

   Description: Set the Averaging Mode for the specified channel
   Parameters: channel = 0 - 16, mode: 0 = Free Run, 1 = Sound Level Meter
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageType( long channel, long type )

   Description: Set the Averaging Type for the specified channel
   Parameters: channel = 0 - 16, type: 0 = Exponential, 1 = Linear, 2 = Vector
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

EnablePSD( long channel )

   Description: Enable Power Spectral Density scaling
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful

DisablePSD( long channel )

   Description: Disable Power Spectral Density scaling
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful

SetAmplitudeScaleType( long channel, long scale_type )

   Description: Set the amplitude axis scaling type for the specified channel
   Parameters: channel = 0 - 16, scale_type: 0 = Linear, 1 = Logarithmic, 2 = Log Magnitude
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetFrequencyScaleType( long channel, long scale_type, long octave_number )

   Description: Set the frequency axis scaling type for the specified channel
   Parameters: channel = 0 - 16, scale_type: 0 = Linear, 1 = Logarithmic, 2 = Octave.  
                     octave_number: 1,3,6,9,12,24,48,96 (ignored if scale_type not Octave)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumWeighting( long channel, long weighting )

   Description: Set the spectrum weighting for the specified channel
   Parameters: channel = 0 - 16, weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetTotalPowerWeighting( long channel, long weighting )

   Description: Set the total power weighting for the specified channel
   Parameters: channel = 0 - 16, weighting: 0 = Flat, 1 = A, 2 = B, 3 = C
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

TriggerEnable()

   Description: Enable triggering
   Return: S_OK = success, E_FAIL = unsuccessful

TriggerDisable()

   Description: Disable triggering
   Return: S_OK = success, E_FAIL = unsuccessful

SetTriggerThreshold( float threshold_volts )

   Description: Set the trigger threshold
   Parameters: the trigger threshold in volts.  Must be between 0 and 10.0
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetAverageSize( long channel, long size)

   Description: Set the average size for the specified channel
   Parameters: channel = 0 - 16; size = average size 1 - 10000 (free run mode), 0 = Off, 1 = Fast, 2 = Medium, 3 = Slow, 4 = Forever (SLM mode)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ResetAverage( long channel)

   Description: Reset the running average for the specified channel
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetPeakHold( long channel_ext, long peak_hold_type )

   Description: Set the peak hold type for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
                      peak_hold_type: 0 = Off, 1 = Fast, 2 = Medium, 3 = Slow, 4 = Forever
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ResetPeakHold( long channel_ext )

   Description: Resets the peak hold values for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels,  17 -32 for composite channels
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetOverlapPercentage( long channel, long overlap_percent )

   Description: Sets the overlap percentage value for the specified channel
   Parameters: channel = 0 - 16; overlap_percent = 1 - 99
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetCompensationFile( long channel, BSTR short_filename )

   Description: Set the transducer compensation file for the specified channel
   Parameters: channel = 0 - 16, short_filename: short filename (same as shown in the scaling dialog box).  Use "None" to disable compensation.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetMarkerFreq( long channel_ext, long marker, float freqHz )

   Description: Set the frequency for the specific channel and marker index
   Parameters: channel_ext = 0 - 16 for main channels, 17 - 32 for composite channels; 
                      marker = 1 - 8, freqHz = frequency in Hz
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ResetOverloadCount( )

   Description: Reset the overload (clipping) count for all channels
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

DataLoggingEnable()

   Description: Enable data logging
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

DataLoggingDisable()

   Description: Disable data logging
   Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

LoadCalibrationFile( long channel, BSTR short_filename )

   Description: Load the calibration file for the specified channel
   Parameters: channel = 0 - 16; short_filename = the short filename of the calibration file (same as shown in the calibration dialog box).  Use "Volts", "Millivolts" or "RPM" for the internally supported units.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

CalibrateToExternalSource( long channel, float source_level )

   Description: Perform a calibration measurement on the specified channel
   Parameters: channel = 0 - 16; source_level = value to calibrate to (SPL example: 94.0). 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

   Notes
   You must be using the calibration option to calibrate to an external source. 
   The measurement will continue until the following conditions are met:
         1) The measured signal level is stable to within +/-0.1 millivolt. This is approximately +/-0.03 dB with typical mic sensitivities. 
         2) The measured signal level is within 12% of its original value. This is approximately +/-1 dB.  
   If both of these conditions are not satisfied within 60 seconds the measurement will stop and an E_FAIL error will occur.  
   These conditions will assure that settling has completed, the mic calibrator is turned on and the correct mic and channel are used.

SaveCalibrationFile( long channel, BSTR cal_filename )

   Description: Save the calibration file for the specified channel
   Parameters: channel = 0 - 16; cal_filename = filename of the calibration file. 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Cal path as listed in the <File><Set Paths> dialog box.

SetChannelName( long channel, BSTR name )

   Description: Set the channel name for the specified channel
   Parameters: channel = 0 - 16; name = string to use as the channel name.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetRunControl( long mode, long fft_limit, float time_limit, float start_delay_time )

   Description: Set the Run Control options
   Parameters: mode: 0=Continuous, 1=Stop after FFT limit, 2=Stop after time limit
                      fft_limit: number of FFTs to process before stopping when mode = 1
                      time_limit: seconds to process before stopping when mode = 2
                      start_delay_time: seconds to delay before starting processor
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetMetadata( long channel, BSTR metadata )
   Description: Set the metadata text to store in 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


Plot and Window Commands

OpenPlot( long channel_ext, long plot_type )

   Description: Opens a plot for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ClosePlot( long channel_ext, long plot_type )

   Description: Closes a plot for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

MinimizeApplication( )

   Description: Minimize the overall application window to an icon
   Return: S_OK = success, E_FAIL = unsuccessful

MaximizeApplication( )

   Description: Maximize the overall application window on the screen
   Return: S_OK = success, E_FAIL = unsuccessful

RestoreApplication( )

   Description: Restore the application to it's previous size
   Return: S_OK = success, E_FAIL = unsuccessful

HideApplication( )

   Description: Hide the overall application window and icon.  
   Return: S_OK = success, E_FAIL = unsuccessful

ShowApplication( )

   Description: Show the overall application window and icon (restore from HideApplication())
   Return: S_OK = success, E_FAIL = unsuccessful

ClearSpectrum( long channel_ext )

   Description: Clears the spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ClearPeakHoldSpectrum( long channel_ext )

   Description: Clears the peak hold spectral data for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumPlotFrequencySpan( long channel_ext, float startHz, float stopHz )

   Description: Set the displayed frequency span for the spectrum plot for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels; 
  startHz = start frequency, stopHz = stop frequency
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumPlotTop( long channel_ext, float plot_top )

   Description: Set the display amplitude plot top parameter for the spectrum plot for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  plot_top = plot top value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumPlotRange( long channel_ext, float plot_range )

   Description: Set the display amplitude plot range parameter for the spectrum plot for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  plot_range = plot range value
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetSpectrumPlotGraphType( long channel_ext, long graph_type )

   Description: Set the spectrum plot graph type for the specified channel
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
        graph_type: 0 = Line, 1= Bars, 2 = Stepped Bars
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetTimeSeriesPlotTimeSpan( long channel, float start_time, float stop_time )

   Description: Set the time span to be displayed on the time series plot
   Parameters: channel = 0 - 16,  start_time, stop_time = time span to display 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

WritePlotToBitmapFile( long channel_ext, long plot_type, BSTR bmp_filename )

   Description: Saves the plot image to a bitmap file
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      plot_type: 1 = Time Series, 2 = Spectrum, 3 = Phase, 4 = Spectrogram, 5 = 3-D Surface
                      bmp_filename = full filename and path to store bitmap
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


Overlay Control

SetOverlay( long channel_ext, long overlay_index, int create_from_peak_hold, BSTR szLegend)

   Description: Create an overlay from the current spectral data
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      overlay_index = 1 - 7
                      create_from_peak_hold = 1 to create the overlay from the peak hold values (peak hold must be enabled)
                      szLegend = legend to apply to overlay                     
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

ShowOverlay( long channel_ext, long overlay_index)

   Description: Shows the specified overlay
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      overlay_index = 1 - 7
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

HideOverlay( long channel_ext, long overlay_index)

   Description: Hides the specified overlay 
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      overlay_index = 1 - 7
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SaveOverlay( long channel_ext, long overlay_index, BSTR ovl_filename)

   Description: Save an overlay to a file
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      overlay_index = 1 - 7
                      ovl_filename = name of the overlay file.
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Overlay path as listed in the <File><Set Paths> dialog box.

LoadOverlay( long channel_ext, long overlay_index, BSTR ovl_filename)

   Description: Load an overlay from a file
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
                      overlay_index = 1 - 7
                      ovl_filename = name of the overlay file to load
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will load it from the Overlay path as listed in the <File><Set Paths> dialog box.


File Management

FileOpen( long channel, BSTR wav_filename)

   Description: Open a wave file on the specified channel.  
   Parameters: channel = 0 - 16; wav_filename =filename
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will look in the Wave path as listed in the <File><Set Paths> dialog box.

FileSave( long channel, BSTR wav_filename)

   Description: Save the wave file on the specified channel.  
   Parameters: channel = 0 - 16; wav_filename = filename
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: If a short filename is used, it will store in the Wave path as listed in the <File><Set Paths> dialog box.

FileClose( long channel ) 

   Description: Close the wave file on the specified channel
   Parameters: channel = 0 - 16   
   Note: if the channel parameter is set to -1, all open wave files will be closed without saving 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


File Positioning

FileRewind( long channel )

   Description: Go to the start of the wave file on the specified channel
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileForward( long channel )

   Description: Go to the end of the wave file on the specified channel
   Parameters: channel = 0 - 16
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileGoToTime( long channel, float seconds)

   Description: Go to a specific time on the specified channel
   Parameters: channel = 0 - 16; seconds = file position in seconds
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileGoToSample( long channel, unsigned long sample)

   Description: Go to a sample position on the specified channel
   Parameters: channel = 0 - 16; sample = file position in samples
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter


File Post Processing

FilePlaySegmentTime( long channel, float start_seconds, float stop_seconds)

   Description: Playback the specified time segment for the selected channel
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePlaySegmentSample( long channel, unsigned long start_sample, unsigned long stop_sample)

   Description: Playback the specified time segment for the selected channel
   Parameters: channel = 0 - 16; start_sample = segment start sample position; stop_sample = segment stop sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileFilterSegmentTime( long channel, float start_seconds, float stop_seconds)

   Description: Filter the specified time segment for the selected channel
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileFilterSegmentSample( long channel, unsigned long start_sample, unsigned long stop_sample)

   Description: Filter the specified time segment for the selected channel
   Parameters: channel = 0 - 16; start_sample = segment start sample position; stop_sample = segment stop sample position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileProcessSegmentTime( long channel, float start_seconds, float stop_seconds)

   Description: Computes the average spectral data for the specified time segment for the selected channel (same as right clicking on time series plot and choosing "Compute Average Spectrum")
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time.
   Note: If the specified time segment is less than a full FFT size, zero padding will be applied
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileProcessSegmentSample( long channel, unsigned long start_sample, unsigned long stop_sample)

   Description: Computes the average spectral data for the specified time segment for the selected channel (same as right clicking on time series plot and choosing "Compute Average Spectrum")
   Parameters: channel = 0 - 16; start_sample = segment start sample position; stop_sample = segment stop sample position
   Note: If the specified time segment is less than a full FFT size, zero padding will be applied
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCutTime( long channel, float start_seconds, float stop_seconds)

   Description: Cut the specified time segment for the selected channel and place it on the clipboard
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCutSamples( long channel, long start_sample, long stop_sample)

   Description: Cut the specified time segment for the selected channel and place it on the clipboard
   Parameters: channel = 0 - 16; start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCopyTime( long channel, float start_seconds, float stop_seconds)

   Description: Copy the specified time segment for the selected channel and place it on the clipboard
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileCopySamples( long channel, long start_sample, long stop_sample)

   Description: Copy the specified time segment for the selected channel and place it on the clipboard
   Parameters: channel = 0 - 16; start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePasteTime( long channel, float paste_position_seconds)

   Description: Paste the current clipboard contents (wave data) into the current file at the specified position
   Parameters: channel = 0 - 16; paste_position_seconds = location to paste the data
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FilePasteSamples( long channel, long paste_position_sample)

   Description: Paste the current clipboard contents (wave data) into the current file at the specified position
   Parameters: channel = 0 - 16; paste_position_sample = location to paste the data
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileMuteTime( long channel, float start_seconds, float stop_seconds)

   Description: Mute the specified time segment for the selected channel 
   Parameters: channel = 0 - 16; start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileMuteSamples( long channel, long start_sample, long stop_sample)

   Description: Mute the specified time segment for the selected channel 
   Parameters: channel = 0 - 16; start_sample = segment start position; stop_sample = segment stop position
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileBuildSpectrogramPlot( long channel_ext, float start_seconds, float stop_seconds)

   Description: Computes and displays the Spectrogram plot for the specified time segment for the selected channel (same as right clicking on time series plot and choosing "Compute and Display Spectrogram")
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
              start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

FileBuildSurfacePlot( long channel_ext, float start_seconds, float stop_seconds)

   Description: Computes and displays the 3-D Surface plot for the specified time segment for the selected channel (same as right clicking on time series plot and choosing "Compute and Display 3-D Surface")
   Parameters: channel_ext = 0 - 16 for main channels, 17 -32 for composite channels;  
              start_seconds = segment start time; stop_seconds = segment stop time
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid paramete


Signal Generation

OpenGenerator()

   Description: Open the signal generator utility
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

CloseGenerator()

   Description: Close the signal generator utility
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

RunGenerator()

   Description: Start the signal generator
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

StopGenerator()

   Description: Stop the signal generator
Parameters: none
   Return: S_OK = success, E_FAIL = unsuccessful

SetGeneratorSignalType( long channel_sig, long signal_type )

   Description: Set the signal type for the specified signal generator channel
   Parameters: channel = 0 - 1; signal_type - as follows:
         0 = White Noise
         1 = Pink Noise
         2 = Noise Burst
         3 = 1 kHz Tone
         4 = Multiple Tones
         5 = Tone Burst
         6 = IMD Tones
         7 = Freq Sweep
         8 = Level Sweep
         9 = Sawtooth
        10 = Triangular
        11 = Pulse
        12 = Squarewave
        13 = User Defined wave file
        14 = DTMF
        16 = Digital Zero
        16 = Frequency Step
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter

SetGeneratorLevel( long channel_sig, float volts )

   Description: Set the output level for the specified signal generator channel
   Parameters: channel = 0 - 1; volts = rms voltage level 
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The output units will change to Volts when this command is used.

SetGeneratorFreq( long channel_sig, float freqHz )

   Description: Set the signal type to Multiple tones and enable only a single tone at the specified frequency.  The multitone level is set to 0 dBr (use SetGeneratorLeve() to set the output level)
   Parameters: channel_sig = 0 - 1; freqHz = frequency in Hz
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The signal type will change to Multiple Tones when this command is used.

SetGeneratorMultiTone( long channel_sig, long tone_idx, int enable, float freqHz, float levelDBr, float phaseDeg)

   Description: Set the signal type to Multiple tones and set the parameters for a specific tone index.
   Parameters: channel_sig = 0-1; tone_idx = 0-9, enable = 0 (off) or 1 (on), freqHz = frequency in Hz, levelDBr = relative level of tone in dBr (0.0 to -96), phase in degrees (-180 to +180)
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The signal type will change to Multiple Tones when this command is used.

LoadGeneratorMultiToneFile( long channel_sig, BSTR toneFilename )

   Description: Load a .tones file from disk - this allows you to change the set of tones
   Parameters: channel_sig = 0 - 1; toneFilename = name of .tones file
   Return: S_OK = success, E_FAIL = unsuccessful, E_INVALIDARG = invalid parameter
   Note: The signal type will change to Multiple Tones when this command is used.


Digital Input and Output Lines

Many of the Data Translation modules have Digital Input and Output lines for controlling and 
reading external equipment such as relays.  These functions allow you to read and write the 
state of these lines.

GetDigitalInputLineState( DWORD *state )

   Description: Get the current state of the digital Input lines
   Parameters: state = pointer to value to receive the current state of the digital input lines
   Return: S_OK = success, E_FAIL = unsuccessful


SetDigitalOutputLineState( DWORD state )

   Description: Set the current state of the digital Output lines
   Parameters: state = value containing the new state to set the output lines
   Return: S_OK = success, E_FAIL = unsuccessful