Complete the following steps to build a VI that measures temperature every 0.25 s for 10s. During the acquisition, the VI displays the measurements in real time on a waveform chart. After the acquisition is complete, the VI plots the data on a graph and calculates the minimum, maximum, and average temperatures. The VI displays the best fit of the temperature graph.
Front Panel
1. Open a new VI and build the following front panel using the following tips.
· Do not create the Mean, Max, and Min indicators yet. Create them on the Block Diagram by right clicking on the functions and choosing Create Indicator. Then position them on the Front Panel.
Block Diagram
1. Build the following block diagram.
a. Select Functions»All Functions»Select a VI… and choose Thermometer.vi (from previous exercise).
b. Place the Wait Until Next ms Multiple function located on the Functions»All Functions »Time & Dialog palette and create a constant of 250. Much like the Time Delay Express VI, this function causes the For Loop to execute every 0.25 s (250 ms).
c. Place the Array Max & Min function located on the Functions»All Functions »Array palette. This function returns the maximum and minimum temperature.
d. Place the Mean VI located on the Functions»All Functions» Mathematics»Probability and Statistics palette. This VI returns the average of the temperature measurements.
e. Right-click the output terminals of the Array Max & Min function and Mean VI and select Create»Indicator from the shortcut menu to create the Max, Min, and Mean indicators.
f. Place the Write LabVIEW Measurements File Express VI located on the Functions»Output palette. LabVIEW will automatically insert the From DDT function into the wire you connect to the Signals input.
3. Save the VI as Temperature Logger.vi.
4. Display the front panel and run the VI.
5. After pressing STOP a dialog box will appear. Enter the name of the file to save the spreadsheet.
6. Open the spreadsheet file to make sure the file was properly created by using Notepad or by creating a VI to read the file as follows.
· Create the following block diagram
· Place the Read LabVIEW Measurement File Express VI located on the Functions»Input palette.
· Configure the VI to ask the user to choose the file to read and change the delimiter to Tab
· Right click on the Signals Output and choose create graph indicator
7. Run the VI
8. Save and close both of the VIs.
End of Exercise
No comments:
Post a Comment