18
Spring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group format. Each student is responsible for learning all of the material, so I strongly recommend that you rotate roles about every 20 minutes. You may ask the lab monitor for assistance if needed, but successful completion of the lab is your responsibility . Report A short, informal report is due from each lab group at 8:00 AM on the Friday of the week after you complete this lab. This short report does NOT need to follow the formal report format described in the ME 360 course manual. Exercise #5.4 requires two plots (follow all ME 360 lab report rules) and a short table of information about the collected data. Exercises #5.1, #5.2, and #5.3 require “screen shots” from your wiring diagrams for this lab. When you have completed each of the first three exercises, do the following: 1. Tile the front panel and wiring diagram front panels of you LabVIEW VI (virtual instrument) by pressing Ctrl-T. 2. Press “Alt” and “Print Screen” simultaneously to store a “screen shot” into the clipboard. 3. Open PowerPoint and paste the “screen shot” onto a page (Edit>>Paste). Use a landscape view to match the orientation of the screen to the page. The pasted image should cover most of the page. 4. When you have completed all three of the LabVIEW exercises you should have a 3 page PowerPoint presentation that can be saved and printed (outside the 360 lab). Introduction Many of the personal computers located in the ME laboratories are equipped with data acquisition systems. In the ME 360 labs we use National Instruments data acquisition boards and the LabVIEW software. The purpose of Lab #5 is to give you some experience using LabVIEW to accomplish typical data acquisition tasks. This lab will not make you a LabVIEW “expert,” but will provide a foundation upon which you can build in subsequent electives and projects.

Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-1

Lab 4 - Data Acquisition

FFoorrmmaatt

This lab will be conducted during your regularly scheduled lab time in a group format. Each student is responsible for learning all of the material, so I strongly recommend that you rotate roles about every 20 minutes. You may ask the lab monitor for assistance if needed, but successful completion of the lab is your responsibility.

RReeppoorrtt

A short, informal report is due from each lab group at 8:00 AM on the Friday of the week after you complete this lab. This short report does NOT need to follow the formal report format described in the ME 360 course manual. Exercise #5.4 requires two plots (follow all ME 360 lab report rules) and a short table of information about the collected data. Exercises #5.1, #5.2, and #5.3 require “screen shots” from your wiring diagrams for this lab. When you have completed each of the first three exercises, do the following:

1. Tile the front panel and wiring diagram front panels of you LabVIEW VI (virtual instrument) by pressing Ctrl-T.

2. Press “Alt” and “Print Screen” simultaneously to store a “screen shot” into the clipboard.

3. Open PowerPoint and paste the “screen shot” onto a page (Edit>>Paste). Use a landscape view to match the orientation of the screen to the page. The pasted image should cover most of the page.

4. When you have completed all three of the LabVIEW exercises you should have a 3 page PowerPoint presentation that can be saved and printed (outside the 360 lab).

Introduction

Many of the personal computers located in the ME laboratories are equipped with data acquisition systems. In the ME 360 labs we use National Instruments data acquisition boards and the LabVIEW software. The purpose of Lab #5 is to give you some experience using LabVIEW to accomplish typical data acquisition tasks. This lab will not make you a LabVIEW “expert,” but will provide a foundation upon which you can build in subsequent electives and projects.

Page 2: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-2

Introduction to National Instruments LabVIEW 8 and Data Acquisition (NI-DAQmx)

Jeffery Radigan Ohio State University

Introduction In this lab, you will create a LabVIEW virtual instrument (VI) to read data, analyze it and display it to the screen. Through the use of virtual instrumentation to acquire the voltages from a battery, you will learn how measurement devices interface with both the computer and the physical world.

Objectives Take data measurements using computer-based instrumentation

Become familiar with the LabVIEW and DAQ system environment

Understand the flow of data through acquiring, analyzing and presenting

LabVIEW Creating LabVIEW systems begins with an understanding of PC-based data acquisition. When data is collected from an instrument it passes through three areas of interest. At the lowest level a sensor detects a physical phenomenon and sends it back via a signal to the PC. There, a device known as a Data Acquisition (DAQ) card takes the signal and converts it into digital data that can be processed by the computer. After the data has been collected, steps can be taken to make an analysis and a meaningful conclusion can be drawn. LabVIEW provides the order and structure for these steps to occur. The two parts to a LabVIEW VI are the front panel, a set of controls for the user to manipulate while the system is running and the block diagram, a collection of actions bound together like a flow-chart. The front panel can be customized for any look and feel desired, while the block diagram can be manipulated to clearly show the flow of data. When a LabVIEW system is running, data is moved back and forth between the block diagram and the front panel. It is important that the two be thought of together as a system rather than running independently. The front panel of a LabVIEW VI contains controls and indicators. As their name suggests, controls are the inputs into the system, and the indicators are the outputs. A simple example of what is possible with the front panel is shown in Figure 1.

Page 3: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-3

Figure1. Example Front Panel.

In the above example there are six different buttons, five control buttons for the radio and one “STOP” button which can be pressed with the mouse. To

begin, the user would click on the “Run” button . Then, when one of the five radio buttons is pressed the number of the button appears in the Index of Selection box, the indicator for the system. The LabVIEW system will run continuously displaying the last button pressed until the STOP button is pressed. Alternatively, there is a button shaped like a stop sign called the

Abort Execution button to the right of the Run button that can be used to halt the system. It is always better to stop the program with the Stop button on the front panel, however, instead of the Abort Execution button. Buttons and numeric indicators are not the only things that can be placed on the front panel. An assortment of graphical displays, lights, meters, sliders, and other controls and indicators found on traditional instruments such as function generators and oscilloscopes can be used on the VI front panel to make the system interactive and easy to use. The block diagram is where the user can link all of the parts of a LabVIEW system together. Initially the user places the function icons that correspond to the actions they wish the system to take on the block diagram. They are then “wired” together in a set order to produce a coherent path through the system. To illustrate the flow of a block diagram let us go through the following diagram on the next page together.

Page 4: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-4

Figure 2. Block Diagram for a Temperature Data Logger.

Note: This block diagram does not correspond to the front panel in the previous example. The flow of data in the LabVIEW block diagram in Figure 2 goes from left to right and top to bottom. This is not always the case, but it is a good practice to format the block diagram so that it is easy to read. The system begins by prompting the user for the name of a file to save the data to. If no name is entered, the file receives the default name “Temp.dat”. The system then goes on to record the current temperature, date, and time to that file. To log to a file, the system creates a new file, writes the data to that file, and then closes the file so it can be used with other programs. Notice here that closing the file does not destroy the file, it only means that LabVIEW is finished using it. In addition to a graphical measurement and data acquisition tool, LabVIEW can also be used for general purpose program creation. Although the original use of LabVIEW was for measurement and data acquisition, it now has the power to be incorporated into many other areas as a user friendly alternative to text based programming. LabVIEW is a compiled graphical programming language for use by engineers and scientists. All of the basic functions of a traditional text based language such as file input and output, data structure, and program flow are present in LabVIEW. One does not need to be a programmer to use LabVIEW, but for those programmers who choose to use it, LabVIEW has enormous potential as a highly productive, visual language.

Page 5: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-5

Data Acquisition and NI-DAQ In order to acquire data and process it using the PC, there must be some interface for connecting sensors to the computer. This is done through DAQ cards that plug into the PC. At the lab station will be a computer and a set of probes that will plug into that computer. This system can take various types of measurement and instead of having a stand alone instrument for each type of measurement, the PC and DAQ card can be configured to take any one of them. The PC can also be an alternative to collecting the data by hand. By hooking the probes into the data acquisition card the system can be automated to save time, space, and effort. In addition to the physical attachment of the sensors there is an application that runs on the PC called “NI-DAQ” that allows the user to configure the data acquisition to suit their current needs. This allows multiple sensor readings to be done with a single PC DAQ system. Using NI-DAQ is straightforward and built into LabVIEW 7 with the DAQ-Assistant Express VI. When the user selects the DAQ-Assistant to configure their PC Data Acquisition system, the following window will pop up on the screen.

Figure 3. DAQ Assistant.

The DAQ-Assistant allows the user to choose the type of measurement they require. This assistant will be used in Part 2 of this lab to acquire voltages.

Page 6: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-6

Exercise 5.1 A LabVIEW Tutorial: Displaying Scaled Random Numbers on a Chart

The following tutorial will help you learn the basics of LabVIEW. Read each step completely before executing the step. By the end of the tutorial, you will have constructed a VI that displays scaled random numbers on a chart. After completing this tutorial, you will be better prepared to complete the rest of the lab. Be sure that everyone in the group gets a chance at the computer during the tutorial. To use the LabVIEW system you must become familiar with the Automatic Tool Selection and the different functions that it provides. Previously each task in LabVIEW would use a different tool to complete that task. In LabVIEW 7 the Auto Tool automatically switches itself to the task that you are trying to do. The Auto Tool is activated by default. To turn the Auto Tool on or off go to Windows >> Show Tools Palette to bring up the Tools Palette. The Auto Tool is located at the top of the tools palette.

Table 1. Reference of Auto Tool functions and common keyboard commands

Command/Tool Purpose Used When Picture

Operating tool Changes values You need to change a value in a front panel object

Text tool Edits text You need to change a label or a comment

Positioning tool Moves and selects objects

You need to be move or delete elements or insert new ones

Wiring tool Connects objects together

Program elements must be connected to allow data to flow between them

Delete key Deletes selected objects

There are unwanted objects on the front panel or block diagram

<Delete>

Ctrl-S Saves files You want to save your changes

<Ctrl-S>

Ctrl-B Removes all broken wires

There are several unwanted wires on the block diagram; use with caution

<Ctrl-B>

Page 7: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-7

Setup:

a. Launch LabVIEW by going to Start >> Programs >> NI LabVIEW 8.5.1

b. When the launcher loads click on Blank VI.

c. If the tool palette is not currently visible, go to View and click on Tools Palette

d. Verify that the Auto Tool is selected for use.

e. From the File menu, select Save As and save the file to your floppy disk (or USB drive) under a suitable name. The file extension must be *.vi. It is a good idea to save the file every few minutes during the development process. Save the file after making a change you want to keep.

f. Review the commands and tools in Table 1.

1. Virtual Instrument programming:

a. With either the block diagram or front panel window selected, press <Ctrl-T> to tile the windows left and right. This way you can see both the block diagram and front panel at the same time.

b. Insert a While Loop onto the block diagram. To do this, open the Functions palette by right clicking with the cursor in the block diagram window. Then move the pointer down to the Execution Control palette button (bottom left button). When the cursor reaches the button, a sub-palette of VIs will appear. Click on the While Loop (icon on the left in the top row). Refer to Figure 4.

Figure 4. Palette showing location of While Loop.

Remember!

Page 8: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-8

c. The While Loop first appears in the Block Diagram window as a box-shaped cursor. Insert the while loop by placing the cursor in the upper left corner of the block diagram window and clicking and dragging the icon to the lower right corner. Make the While Loop almost as large as the window.

d. Notice that a stop button has appeared on both the block diagram and the front panel. Notice also that on the block diagram the stop button is connected to a conditional terminal of the While Loop. The default setting for the While Loop is Stop if True. With this option, when the stop button is pressed (switched to true) the While Loop will stop running.

e. Insert the Random Number Generator function into the While Loop. The random number generator function outputs a number between 0 and 1. To place it on the block diagram first right click on the block diagram as before. . This time, select Arithmetic & Comparison >> Numeric >> Random Num and place it on the block diagram.

f. Press <Ctrl-H> to open the Context Help window. Move the cursor to

the pair of dice and view the information in the Help window. This help feature can be useful when determining what connections need to be made to a VI.

g. Insert a Waveform Chart on the Front Panel to view the random numbers that are being generated. Right-click in the Front Panel window to bring up the Controls palette. Click on Graph Indicators >>Waveform Chart and place it on the Front Panel.

h. Name the chart “Scaled Data”. When you place the Chart on the Front Panel it is possible to just begin typing, or you can double click on the label box to change the name. You should see the text appear in a box near the upper left corner of the chart.

i. Point the cursor at the chart and right-click with your mouse. Select Find Terminal from the pop-up menu. This should bring up the Block Diagram window, and the terminal for the chart will be highlighted with dashed lines. Make sure the chart terminal is inside the While Loop. If it isn’t, use the Positioning Tool to drag it into the While Loop.

Page 9: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-9

j. Connect the Random Number Generator to the Waveform Chart terminal. Use the Auto Tool to connect the output of the dice to the terminal for the Waveform Chart by pointing the tool at the dice and clicking once. Move the tool to the indicator terminal and click once more. An orange line should appear.

k. In order to reduce the amount of data on the chart so it is readable, the while loop will need to run at a set rate. To do this place a Time Delay in the while loop. Go to Functions >> Execution Control >> Time Delay and place it inside the while loop.

l. Input 100 milliseconds (0.1 seconds) into the field when prompted for how much time to delay.

m. Your block diagram and front panel should look something like Figures 5 and 6.

Figure 5. Block Diagram of Random Number Generator.

Page 10: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-10

Figure 6. Front Panel of Random Number Generator.

2. Click on the Front Panel window. Now you can test your VI. Click on the Run button, the single arrow in the upper left corner. To stop the execution, press the STOP button you put on the front panel. Run the VI several times. Does the VI run? How do you know? How could you determine the number of times the while loop executes each time you run the program? Hint: What does the other small square with an “i” do in the bottom left corner of the While Loop?

Answer these questions on your PowerPoint sheet.

3. Have your instructor check your progress. You may want rearrange some of the icons to make the program clearer. In general, it is best to place input terminals on the left and output terminals on the right. Also, the wires in between should not cross unless absolutely necessary.

4. Save the VI.

5. Take a screen shot (Ctrl-Print Screen) with the front panel and block diagram side-by-side (remember Ctrl-T) and paste into PowerPoint for documentation purposes.

6. Close the VI. Click “Don’t Save SubVIs” if necessary.

Page 11: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-11

Exercise 5.2: Building a Voltmeter with LabVIEW A different student in the lab group should enter the information for this exercise. On the solderless breadboard, connect a potentiometer’s end terminals to +12V and -12V. Connect the potentiometer wiper to a voltage follower. Build a graphing digital voltmeter using the steps given below. In this part of the lab you will be using the DAQ-Assistant and the knowledge that you gained in Part 1.

Building a Voltmeter with LabVIEW

1. Create a new Blank VI and save it to disk as “Read Voltage.vi”

2. Place a While Loop on the block diagram.

3. Place the DAQ-Assistant inside of the While Loop by going to Functions >> Input >> DAQ Assistant and dropping onto the Block Diagram.

4. When you place the DAQ-Assistant on the Block Diagram, the NI-DAQ screen will pop up and help you configure your system. Choose Acquire Signals / Analog Input from the first screen that pops up as you will be collecting a wide range of data values.

5. The next screen allows you to choose the type of measurement you are going to take. Choose Voltage to make voltage measurements.

6. On the next screen you will select the physical channel that you are collecting measurements on. Choose channel ai0. Connect the orange wire on the CB-68LP terminal block to the output pin from the voltage follower. Connect the black wire to the black/”common” row of the solderless breadboard

7. Now that you have completed the initial setup, you will see the screen shown in Figure 7.

Page 12: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-12

Figure 7. DAQ-Assistant Configuration Window.

8. This window is where most of the configuration lies. There are three different areas of this window that are important. In the top right corner you can specify the Input Range of the voltage signal that you are collecting. The closer the range of voltages that you input to the range of voltages that you will be measuring, the more accurate your measurement becomes.

9. Below the Input Range are the Terminal Configuration and Scaling menus. If your acquired signal requires any scaling you can enter it here. For now, we will leave these two as they are.

10. The last area of the window is the timing and triggering section. Here you specify how to acquire data and if there are specific points at which you wish to begin or stop acquiring. Change the task timing section to 1 Sample (On Demand). Leave the triggering section as it is.

Page 13: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-13

11. Click OK and return to the Block Diagram.

12. Press <Ctrl-E> to switch to the Front Panel.

13. Place a Numeric Indicator on the front panel by going to Controls >> Numeric Indicators >> Numeric Indicator and dropping it anywhere on the front panel.

14. Go back to the Block Diagram. This can be done by clicking on the Block Diagram or pressing <Ctrl-E>.

15. Move the numeric indicator to a position inside the While loop and to the right of the DAQ Assistant. Wire the data terminal of the DAQ-Assistant to the input of the numeric indicator.

16. Run the program by clicking the right arrow on the front panel.

17. How could you slow down the output of voltages that are written to the screen? See if you can get a 2 times per second update.

18. Add an output gauge to the front panel as shown below. Controls >> Numeric Indicators and select the Gauge.

19. Click the “0” on the gauge and change to -10 as shown above.

20. On the block diagram move the gauge inside the While loop and connect the input of the gauge to the wire running to the Numeric indicator. You might find it easier to delete lines and then reconnect them. Run program again and see what happens.

21. Save the VI.

22. Take a screen shot (Ctrl-Print Screen) with the front panel and block diagram side-by-side (remember Ctrl-T) and paste into PowerPoint for documentation purposes.

23. Close the VI. Click “Don’t Save SubVIs” if necessary.

Page 14: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-14

Exercise 5.3: Voltmeter VI

A different student in the lab group should enter the information for this exercise.

Complete the following steps to build a VI that acquires a sine wave from a function generator and scales it. Verify your function generator is connected to channel ai1 (yellow/black wires) and set it to a sine output of about 5 Hz.

1. Open a new VI and build the following front panel (Figure 8).

Figure 8. Exercise 3 Front Panel.

2. Place the DAQ Assistant on the Block Diagram. The DAQ Assistant can be

found under Functions >> Input >> DAQ Assistant. A window will come up asking for the type of measurement you are taking. Choose Analog Input >> Voltage >> Dev1/ai1 from the menus. This will allow you to take measurements on channel 1 of Device 1. The screen shown in Figure 9 will appear.

Page 15: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-15

Figure 9. DAQ Assistant.

3. The three important parts of the DAQ Assistant configuration page are the 1) Settings, 2) the Task Timing, and 3) Task Triggering. Set the Task Timing to Acquire 1 Sample.

4. Under Settings >> Custom Scaling the value should be “<No Scale>”. Click the drop down box and select Create New. The screen shown in Figure 10 will appear.

Page 16: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-16

Figure 10. DAQ Assistant Custom Scaling (may look different)

For this lab we will amplify the sine wave by a factor of 5. Choose Linear and enter “Amplifier” for the name of the scale.

5. In the box entitle Slope enter a value of “5”. In the Units - Scaled box enter “Scaled Waveform”. Click OK to complete the scale setup.

6. Now that the input is scaled by a factor of 5, you will need to adjust the range of the data. In the section of the DAQ Assistant configuration page labeled Input Range, specify a range that will encompass the scaled input data. For example, if you function generator is outputting a signal from +/- 1 V, and you are scaling it by 5, the input range should be set to be +/- 5 V or greater. Click OK to close the DAQ Assistant.

Page 17: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-17

7. Build the Block Diagram to look similar to that shown in Figure 11. The Time Delay VI can be found under Functions >> Execution Control >> Time Delay. Set the time delay to 0.010 seconds.

Figure 11. Exercise 2 Block Diagram.

8. Display the Front Panel and run the VI.

The graph displays the scaled sine wave to the screen. Vary the frequency and notice how the signal on the screen changes.

9. Save the VI. 10. Take a screen shot (Ctrl-Print Screen) with the front panel and block diagram

side-by-side (remember Ctrl-T) and paste into PowerPoint for documentation purposes.

11. Close the VI. Click “Don’t Save SubVIs” if necessary.

Page 18: Lab 4 - Data AcquisitionSpring ‘11 Lab 4 - Data Acquisition Lab 4-1 Lab 4 - Data Acquisition Format This lab will be conducted during your regularly scheduled lab time in a group

Spring ‘11 Lab 4 - Data Acquisition Lab 4-18

Exercise 5.4: Aliasing Close LabVIEW and use Signal Express for all parts of Exercise 5.4. Set the function generator to output a sine wave at about 590 to 610 Hz with amplitude of about 5 volts peak-to-peak (~ 5 VP-P). Collect data from the function generator at the following sampling frequencies and total sample times.

Data Set

Sampling Rate Total Sample Time Number of Samples

#1 20 kHz 0.010 sec

#2 5 kHz 0.010 sec

#3 2 kHz 0.010 sec

#4 1 kHz 0.010 sec

#5 20 kHz 0.040 sec

#6 800 Hz 0.040 sec

#7 600 Hz 0.040 sec

#8 400 Hz 0.040 sec

Outside of class: The first 4 sets of data will be plotted together on one graph, while data sets #5 to #8 are plotted together on a second graph. Experimental data is normally plotted with points only. However, since this experimental data is known to be sine waves, connect the individual data points with straight lines in your two plots. Also create a legend to identify the four sets of data on each plot. Based on your data, create a table and fill out the information below for all 8 data sets based on the data shown in your two plots.

Data Set Amplitude of Displayed

Waveform (VP-P) Frequency of Displayed

Waveform (Hz) Aliased? (Yes/No)

#1

#2

:

#8