Assignment A05 - Waveform Generator subVI

 

Previous Assignment

A05 - Waveform Generator subVI

Next Assignment  
 
Create a Virtual Instrument that will be used to generate an arbitrary waveform from user specified information.  Your subVI should have the following controls and indicators.  Default values are given in brackets when appropriate.

Controls

  • Waveform Type - Used to select the type of waveform (sine wave, triangular wave, sawtooth wave, square wave).  Use an enumerated data type. [Sine Wave]
  • Amplitude - The peak amplitude of the waveform. [1.00]
  • Frequency (Hz) - The frequency in Hz (i.e. cycles/sec) of the waveform. [10.0]
  • DC Offset - A constant offset of the waveform from zero. [0.0]
  • Sampling Rate (samples/sec) - This is the number of samples (points) per second in the waveform. [1000]
  • Number of Samples - The total number of samples (points) in the waveform. [1000]
  • Duty Cycle - The percent of time a square wave remains high over one complete period.  Used for square waves only. [50 %]

Indicators

  • Waveform Out - The waveform described by the parameters Waveform Type, Amplitude, Frequency, DC Offset, Sampling Rate, Number of Samples, and Duty Cycle.  Display this waveform on a waveform graph on the front panel.

You will need to use the waveform generation VIs named Sine Wave.vi, Triangle Wave.vi, Sawtooth Wave.vi, and Square Wave.vi.  Refer to the help files for additional information about these VIs.  In the help files you will notice the the "frequency" parameter f is normalized and is in units of cycles per sample.  You will need to use your Frequency and Sampling Rate parameters to compute the appropriate f.  You will also need to compute the appropriate value for dt when you build the waveform.

  

  

Additional Requirements

  • Document the controls and indicators on this virtual instrument.  
  • Create an icon for the VI and connect the controls and indicators to terminals on the icon to create a subVI that we will use in a later exercise.
  • Document the subVI by entering a description in the VI Properties dialog box. 
  • Print your subVI with the "Using as subVI" option of the print dialog.
 
     
 

WKU Physics on the Web

Western Kentucky University Home Page

This page was last modified on Tuesday, February 06, 2001 by Doug Harper.

All contents copyright © 2000
Western Kentucky University