Assignment A06 - Function Generator

 

Previous Assignment

A06 - Function Generator

Next Assignment  
 

Due Tuesday, February 13 for use in class !

Build a Function Generator VI using the Waveform Generation subVI that was created in the previous assignment.  The panel below is an example of the controls and indicators that should be present on this VI.

To compute the frequency use two controls, one frequency knob ranging from 1 to 10 Hz and a second multiplier with values of 1, 10, 100, 1000, and 10000.  Show the actual frequency on a digital control.  You may have to work a bit to make the frequency multiplier give the desired result.

Use an enumerated data type control to select the type of waveform (sine, square, triangular, sawtooth).

Have controls for the Amplitude, DC Offset and Duty Cycle as shown above.

Have a control for the update rate (number of samples to update each second).

Compute the number of updates (i.e. number of samples) to make exactly one complete cycle of the waveform with the desired frequency be generated.  Display this number on a digital indicator.

Add a channel number control [default = 0]

Send the output of your Waveform Generator subVI (Assignment 5) to the AO Waveform Gen.vi which is in the Utilities sub-palette of the Analog Output palette.  You will want to set this VI up to continuously generate the selected analog output signal on the appropriate analog output channel.  Refer to the online documentation for details about the AO Waveform Gen.vi.  Controls that you will have to wire include the generation count (not shown below), device, channels, update rate, waveform data, and clear generation.

AO Waveform Gen.vi

Once the above functionality is working properly you may want to turn your VI into a simple one-state state machine.  You can have a button called "Update Analog Output" that the user must press to cause the updated values to be written to the analog output device.

A worksheet will be distributed in class that suggests various combinations of the input parameters that you should try.  Answer the questions that are posed on this worksheet.

 
     
 

WKU Physics on the Web

Western Kentucky University Home Page

This page was last modified on Wednesday, February 07, 2001 by Doug Harper.

All contents copyright © 2000
Western Kentucky University