11-24-2006 12:58 PM
y(n)= Δt * ( T * y(n-1)+x(n) )
T+Δt Δt
Where T is the time constant, x(t) is the input and y(t) is the output.
Experiment 1, Simulate the dynamic response of first order system
1. Launch LabVIEW.
2. Create a blank VI.
3. The front panel should have at least an numeric control to input the time constant and the graph indicator to show the result.
4. Drop the “Simulated Signal” express VI and choose the signal type as square wave, frequency as 1Hz, sample frequency as 1000Hz and number of data points as 500.
5. Use “Convert from Dynamic Data” VI to convert the data from the “Simulated Signal” express VI to single waveform data.
6. Use waveform function to extract the waveform data and the time interval of the waveform.
7. Use FOR loop to iterate the output data of the first order system.
8. Use the formula node to program the algorithm based on equation 3.
9. Use waveform function to create the waveform data from the output data and the time interval of the input waveform.
10. Use “Build Array” function to create an array that consists of the input and output waveforms.
11. Use graph indicator to show the input and output waveforms.
12. Use “Write LabVIEW Measurement File” VI to save the data in a file.
13. Run the VI using the following time constants: 0.01, 0.03, 0.05, 0.07 and 0.1, and save the results to files.
11-24-2006 02:58 PM
Dear Neoforce,
You have numerous errors that will prevent you from running what you have so far. There are several inputs that have nothing wired to them. And the "Y" in your formula node needs to be changed to an output (by right clicking on it).
I would recommend that you click on the broken run arrow and look at each of the errors. Double clicking on each error listed will take you to where it occurs. Clean up each one until the code is able to be run. (The run arrow will turn solid.)
11-26-2006 04:17 PM
Neoforce,
If you are just getting started with LabVIEW, I would highly recommend going through the 3 hour LabVIEW tutorial. You can download the presentation files here:
http://zone.ni.com/devzone/cda/tut/p/id/5247
This should give you a good foundation for developing code in LabVIEW.
Chris M.
Applications Engineer
National Instruments
11-27-2006 09:51 AM