Creates a request for output data from a specified probe.

Syntax


Sub SetOutputRequest ( _
       ByVal outputName As String, _
       ByVal method As InterpolationMethod, _
       ByVal sampleRate As Double, _
       ByVal numSamples As int32, _
       ByVal repeatFlag As Boolean)

Parameters

outputName—The name of the Multisim probe that collects the data, as returned by EnumOutputs.

method—The interpolation method which Multisim should use for the output data.

sampleRate—The sampling rate of the interpolated data, in samples per second.

numSamples—The total number of datapoints to acquire.

repeatFlag—Specifies, if true, that the output data will continue to repeat itself until it is explicitly cleared or the simulation ends.

Remarks

Indicates that output data will be requested from the probe specified, but does not actually collect any data. After simulation, data can be retrieved using GetOutputData.

SetOutputRequest must be called before the simulation starts. Calling it after simulation has started results in an error.

The data is to be collected over a time period equal to numSamples/sampleRate. This gives the minumum time, in seconds, that the simulation must run in order to obtain one block of data.

Following are the possible values which may be used for the interpolation method. Note that the choice may affect the simulation time steps. The possible values are:

  • SimulationInterpolationRaw—No interpolation is done at all. Raw simulation data will be returned, containing arbitrary time steps. The total length of the output time will be numSamples/sampleRate, but the number of data points returned may be quite different from numSamples, as the simulator adjusts the time step as necessary.
  • SimulationInterpolationForceStep—This setting will force the simulator to take time steps that exactly hit the requested sample rate, ensuring that the data is equi-spaced. On output, any intermediate time steps will be discarded. Note that this may result in slower simulations if the 'natural' timestep for the circuit is much larger than the requested sample rate. However, if any client-supplied inputs have the same sampling rate as this output, then this method will produce no additional interpolation. In fact, if this is the case, then SimulationInterpolationForceStep is the recommended method of output data collection.
  • SimulationInterpolationLinear—Returns a simple linear interpolation of the output data at the requested sample rate. The simulation time-step is unaffected.
  • SimulationInterpolationSpline—Returns a spline interpolation of the output data at the requested sample rate. The simulation time-step is unaffected.
  • SimulationInterpolationCoerce—Uses the LabVIEW 'coerce' method of data interpolation, which is a series of step functions beginning at each raw data point. The simulation time-step is unaffected.

      The interpolation choice for a Digital probe output must be Raw, Force Step or Coerce. All other options will result in an error.

If a simulation is run and you make a call to SetOutputRequest in order to run a second simulation before the first simulation finishes running, the output request will be cleared when the simulation stops. This can cause problems later if you expect that the output request has been set.

To prevent this, if you have previously run a simulation, use either the SimulationStop event or call StopSimulation before setting an output request.

Example

See example for EnumOutputs.

See Also

EnumOutputs

Note on Outputs