![]() |
ReadWaveform()





Public Function |
Declared in: NiIviScope.h |
Declaration
inline void ReadWaveform( const CString &channel, long int maxTime, CNiReal64Vector &waveform, double &xFirst, double &xIncrement);
Description
Initiates an acquisition on all channels that you enable with the Channel.Configure function. 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 maxTime parameter, the function throws an exception. Use this function to read waveforms when you set the acquisition mode to CNiIviScope::Normal CNiIviScope::HiRes or CNiIviScope::Average.
You call the FetchWaveform function to obtain the waveforms for each of the remaining enabled channels without initiating another acquisition.
Each element in the waveform is either a voltage or a value indicating that the oscilloscope could not sample a voltage. You can test a waveform value for an invalid value condition by calling the IsWaveformElementInvalid function.
Parameters
The channel on which you want to obtain a waveform.
The maximum length of time in milliseconds in which to allow the operation to complete.
If the operation does not complete within this time interval, the function throws an exception. When this occurs, you can call Abort to cancel the operation and return the oscilloscope to the Idle state.
Returns the acquired waveform.
The time in seconds of the first point in the waveform relative to the trigger event.
The length of time in seconds between points in the waveform.