Admin Production ni-theme
Current Publication

Read Waveform

IVI Compliance Package

IviScope Read Waveform

IviScope Base Capability Group

This VI initiates an acquisition on all channels that you enable with the IviScope Configure Channel VI. If the channel you specify in the Channel Name parameter is not enabled for the acquisition, this VI returns the IVISCOPE_ERROR_CHANNEL_NOT_ENABLED error. It then waits for the acquisition to complete and returns the waveform for the channel you specify. If the oscilloscope did not complete the acquisition within the time period you specify with the Maximum Time parameter, the VI returns the IVISCOPE_ERROR_MAX_TIME_EXCEEDED error.

You call the IviScope Fetch Waveform VI to obtain the waveforms for each of the remaining enabled channels without initiating another acquisition.

Notes
  1. Use this VI to read waveforms when you set the acquisition mode to IVISCOPE_VAL_NORMAL, IVISCOPE_VAL_HI_RES, or IVISCOPE_VAL_AVERAGE. If the acquisition type is not one of the listed types, the VI returns the IVISCOPE_ERROR_INVALID_ACQ_TYPE error.
  2. After this VI executes, each element in the Waveform Array parameter is either a voltage or a value indicating that the oscilloscope could not sample a voltage.
  3. You configure the interpolation method the oscilloscope uses with the IviScope Is Invalid Waveform Element VI. If you disable interpolation, the oscilloscope does not interpolate points in the waveform. If the oscilloscope cannot sample a value for a point in the waveform, the driver sets the corresponding element in the Waveform Array to an IEEE-defined NaN (Not a Number) value and the VI returns the IVISCOPE_WARN_INVALID_WFM_ELEMENT error.
  4. You can test a waveform value for an invalid value condition by calling the IviScope Is Invalid Waveform Element VI.
  5. This VI performs interchangeability checking when the IviScope Interchange Check property is set to TRUE. Use NI I/O Trace to view interchangeability warnings. Alternately, you may use the IviScope Get Next Interchange Warning VI to retrieve interchangeability warnings. For more information about interchangeability checking, refer to the IviScope Interchange Check property.
  6. The class driver returns simulated minimum and maximum waveforms when this VI is called and the IviScope Simulate property is set to TRUE and the IviScope Use Specific Simulation property is set to FALSE. For information on how to configure a simulated waveform, refer to IviScope Simulator Setup Dialog Box.
instrument handle The instrument handle that you obtain from the IviScope Initialize or the IviScope Initialize With Options VI.
channel name Pass the virtual channel name that you assign to the instrument in MAX from which you want to read a waveform.

Virtual channel names are aliases for instrument specific channel strings. The instrument specific channel strings can differ from one instrument to another. Virtual channel names allow you to use and swap instruments without having to change the channel names in your source code. You assign a virtual channel name to an instrument specific channel through MAX. This control accepts virtual channel names you have assigned to the specific instrument you are using. It also accepts the instrument specific channel names.

Default Value: ""

waveform size Pass the number of elements in the Waveform Array parameter.

maximum time (ms) Pass the maximum length of time in which to allow the read waveform operation to complete.

If the operation does not complete within this time interval, the VI returns the IVISCOPE_ERROR_MAX_TIME_EXCEEDED error. When this occurs, you can call IviScope Abort to cancel the read waveform operation and return the oscilloscope to the Idle state.

Units: milliseconds

Defined Values:

IVISCOPE_VAL_MAX_TIME_INFINITE IVISCOPE_VAL_MAX_TIME_IMMEDIATE

Default Value: 5000 (ms)

Note  The Maximum Time parameter applies only to this VI. It has no effect on other timeout parameters or properties.
error in (no error) The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

instrument handle out The instrument handle that you obtain from the IviScope Initialize or the IviScope Initialize With Options VI.
waveform array Returns the waveform that the oscilloscope acquires.

Units: volts

Notes
  1. You configure the interpolation method the oscilloscope uses with the IviScope Is Invalid Waveform Element VI. If you disable interpolation, the oscilloscope does not interpolate points in the waveform. If the oscilloscope cannot sample a value for a point in the waveform, the driver sets the corresponding element in the Waveform Array to an IEEE-defined NaN (Not a Number) value and the VI returns the IVISCOPE_WARN_INVALID_WFM_ELEMENT error.
  2. You can test a waveform value for an invalid value condition by calling the IviScope Is Invalid Waveform Element VI.
actual points Indicates the number of points the VI places in the Waveform Array parameter.

initial x Indicates the time of the first point in the Waveform Array. The time is relative to the trigger event.

For example, if the oscilloscope acquires the first point in the Waveform Array 1 second before the trigger, this parameter returns the value –1.0. If the acquisition of the first point occurs at the same time as the trigger, this parameter returns the value 0.0.

Units: seconds

x increment Indicates the length of time between points in the Waveform Array.

Units: seconds

error out The error out cluster passes error or warning information out of a VI to be used by other VIs.

The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.