Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

15
Laboratory #1 LabVIEW Supplement Prepared by Tiffany

Transcript of Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

Page 1: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

Laboratory #1

LabVIEW Supplement

Prepared by Tiffany Morris

Page 2: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

View Data

Page 3: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Open the labview program on the desktop.

• Click on “new”.• Select blank VI, and click

ok.

• A blank front panel will open.

Page 4: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• In the menu bar click on "Window" then scroll to "Show Block Diagram" and click on it.The Lab1.vi Block Diagram (a white screen workspace) will open.

• You will need to place three elements on the block diagram with the help of the search feature.

• Right click on the block diagram to get the functions Pallet.

• Click on Search.

Page 5: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Type “Read form spreadsheet file”. Then drag the “Read from spreadsheet file.vi” onto the block diagram. A graphical representation will appear.

• Now add the function “Transpose 2D array” to the block diagram using the search feature.

Page 6: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• In order to add a waveform graph, you must click on the front panel.

• Once on the front panel right click to get the controls window.

• Select Graph Inds, then select and drag graph onto the front panel.

• This will also place a waveform graph on the block diagram.

• Finally, select the wire tool and connect the three elements.

Page 7: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Whenever you need help with wiring an element, go to help menu, and select show content help. This will give a small window that explains how to use the vi.

Page 8: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Create a path to your data file: Go to the Front Panel and right click to view "controls".

• Move the mouse to "all controls" to "string & path" to "file path control", select and drop the path icon into the Front Panel.

• Select the hand from the tools pallet.

• Click the "open file" icon and browse for the data file of your choice and press "OK".

• Click the "run" button.

• You will now see a plot of the data.

Page 9: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Adjust the graph title to match the data file, y-axis to "Response Time" and x-axis to "Number of Data Points".

• To change the axis titles right click on the waveform graph and select properties from the pull down menu.

• Select the Scales tab and type in the new names.

Page 10: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

Calculate Statistics

Page 11: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• In the block diagram, use the search feature to find the “statistics” VI. Select the statistical parameters desired, click "OK" and drop the icon into the block diagram.

• Wire the elements together.

• Right click to create numeric indicators for each of the statistical parameters.

• You must calculate standard deviation of mean by hand or by using the formula vi.

X1 + X2

Page 12: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Go to the Front Panel and click the "run" button.

• You will be prompted for the data file.

• Browse for and click on the data file of your choice and press "OK".

• You will now see the parameter values.

• Record these values in the hand-in sheet or create a spreadsheet to enter the data into.

Page 13: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

Create a Histogram

Page 14: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• In the block diagram, right click get the "functions" list and find the “histogram” express VI. Click "OK" (later, you can adjust the number of bins) and drop the icon into the block diagram.

• Wire it up.

• Right click to create a graphic indicators for the histogram.

• Go to the Front Panel, click "run" and load data file.

• You will see the histogram.

Page 15: Laboratory #1 LabVIEW Supplement Prepared by Tiffany Morris.

• Go to the histogram icon in the block diagram and right click on the histogram vi to select “properties”. If you need to adjust the bin size (the resolution of the histogram) and to adjust the minimum and maximum values to get the best possible shape.

• The optimum bin size is the smallest value that does not give “artificial” zeroes in the central portion of the distribution (because there are no data points in this bin).

• Note the final shape of the histogram.