LabView: Visual Programming at Its Best
LabView is built with the electrical engineer / flow chart specialist in mind. It's actually quite useful, though a swift pain to get the hang of. It will interface with the DAQ board, will generate output and retrieve input signals, and will allow for quick displays of this data.
The task here is to build a LabView program that will (1) generate white noise to drive the circuit, (2) read the input signals, (3) average samples over multiple runs, and (4) output this data (to screen or file):
1) Generating white noise
Use the DAQ Assistant and define the output channel you wish to send signals through (perhaps "dev/ao0" for device analog output 0).
Create a white noise (DC) signal with the Simulate Signal component. This should excite the circuit at all frequencies simultaneously.
Make sure the input signal's strength will not be amplified to hit the op amp's maximum or minimum (supplied voltage) range.
2) Read Output Signal
Use another DAQ Assitant (this time, perhaps on "dev/ai0").
Change the sampling rate to the DAQ's maximum value, which is 250 kHz, and sample 125000 points, which will generate two samples per second. Doing so, each sample will change by 2 Hz.
Change the input voltage range to −5V to 5V (be careful with this).
Perform a Fourier Transform on the input signal to change from time space to frequency space. Use a Spectral Measurement component to retrieve a Power Spectrum form the output signal. You should also set the parameter to average the signal a good number of times (e.g., 32).
3) Average for N samples
Include the components for steps (1) and (2) inside a loop which will repeat all of the above steps for the same number of times as you will average the output signals.
4) Output the data
Build a waveform display device on the front panel and wire that to the output signal for visual interpretation of the data.
Now build an array of values and output that to file using the WriteToSpreadsheet component. This is possibly the trickiest part of the whole program, especially for someone used to conventional programming languages. (Hints: use a FOR loop, multiply the step value (2 Hz) by the index and wire that result to the edge of the loop, at which point it becomes an array. Use build array and combine with the other signal to get a two dimensional array.)
If you've been having excessive difficulty, look here.
|