Summary: Many sensors produce analog (continuous) electrical signals. Once recorded, these signals are scaled to determine the magnitude of the physical phenomenon. In this lab, you will learn about some common methods for recording and displaying voltage signals. Your focus will not be on any particular sensing technology. In the process of performing the lab exercises, you will learn about hardware and software that you will use throughout the semester.
Many sensors produce analog (continuous) electrical signals. Once recorded, these signals are scaled to determine the magnitude of the physical phenomenon. In this lab, you will learn about some common methods for recording and displaying voltage signals. Your focus will not be on any particular sensing technology. In the process of performing the lab exercises, you will learn about hardware and software that you will use throughout the semester.
Throughout this lab you’ll be asked to create different signals with the function generator. The function generator at your workstation. Can create periodic square waves, sine waves and triangle waves. These waveforms can be injected into a circuit under test and analyzed as the waveform progresses to confirm the proper operation of the device or to pinpoint a fault. Try to be accurate, but don’t waste a lot of time trying to get the “exact” frequency or voltage levels listed. The purpose of this lab does not depend on meeting exact values; rather, this lab is to help you become familiar with how the signal characteristics can be manipulated.
1. Turn on the oscilloscope and the function generator.
2. Use the frequency range buttons along the top of the function generator to produce a sine wave with a frequency in the range of 200 to 500 Hz.
3. Use the frequency knob (bottom left) to adjust the frequency.
4. Adjust the signal amplitude and DC offset.
Press the Display Select button next to the LCD readout.
Turn the appropriate knobs located on the right side of the function generator (above the BNC connector).
5. Using a BNC cable, connect the MAIN OUT of the function generator to CH 1 of the oscilloscope.
6. Use the CH 1 and CH 2 buttons on the o-scope to turn the channels On or Off (e.g. to turn off CH 2, press CH 2 and then press OFF).
7. Push the AUTOSET button. This will set the triggering, horizontal and vertical so that the signal is displayed nicely on the screen.
The digital oscilloscope (o-scope) is used for viewing voltage signals that change with time. The o-scope measures voltage and displays thousands of samples over time. It is easier to visualize the characteristics of a signal with an oscilloscope than with a digital multimeter.
Press the MENU button to bring up the menu options for the active channel. The far left option is the Coupling button.
When finished with the MENU: push the MENU button, followed by the Off button.
The vertical SCALE knob (under the VERTICAL heading) is used to adjust the vertical range of the oscilloscope trace. The number next to CH1 in the lower left corner of the LCD screen shows how many volts are represented by each horizontal line on the screen.
![]() |
The SCALE knob under the HORIZONTAL heading is used to set the horizontal sweep speed.
The HORIZONTAL POSITION adjustment moves the trace horizontally.
Turn off the measurements you selected by pushing the Remove Measurement button from the MEASURE menu.
![]() |
The Trigger makes signals appear to stand still on the screen rather than dancing all over the place. When the signal reaches a designated trigger level, the o-scope begins acquiring data. We will be using the Trigger MENU to adjust the triggering of the sweep of the oscilloscope display.
![]() |
1. Set the trigger mode to NORMAL.
2. Adjust the trigger level so that it is above the maximum voltage of the input signal. Notice that the trace remains fixed and that the trigger status displayed at the top right of the display goes from Trig’d to Trig?. This indicates that the channel 1 input has not met the trigger level.
3. Now switch the trigger to AUTO mode. Notice how the signal rolls when the signal is not triggered (either too high or low).
1. Configure the function generator to produce a triangular waveform output at about 1 kHz.
2. Set the normal trigger to work on the channel connected to the function generator.
3. Make adjustments to the triggering so that you get a stable display of the triangle wave. Do not use auto triggering.
4. Set the trigger slope to rising (arrow up).
5. Adjust the amplitude of the function generator to be 1 V peak-to-peak, Vp-p,.
6. Adjust the oscilloscope sensitivity using the controls we’ve introduced (do not use AUTOSET) so that the waveform is as large as possible. Adjust the time scale so that at least two and no more than five complete cycles are displayed.
7. Experiment with the trigger LEVEL control. Notice how it sets the position of the waveform relative to the horizontal trigger position changes as the trigger level is adjusted.
8. You should be able to move the starting point of the trace back and forth along the ramp in the triangular wave. Again notice how the indicator switches to Trig? when the level is set above or below the top and bottom of the waveform. This indicates that the scope is not triggering and therefore not actively sampling data.
9. Set the trigger slope to Falling (arrow down) and observe that the trace now begins (relative to the horizontal trigger position) on the falling ramp of the wave.
CURSOR can be used to display vertical (time) or horizontal (voltage) cursors on the display.
Adjust the function generator to create a different waveform and experiment with cursors, triggers and scales.
Press the SAVE/RECALL button to bring up the Save/Recall menu.
To facilitate saving files to the hard drive of the lab computers, each of the oscilloscopes has a network interface card installed.
For some applications, it is not practical to use an oscilloscope to analyze a signal.
For any of these applications, you would need a data acquisition (DAQ) system that measures a signal and then writes the data to a file for later analysis, or communicates with another system for real-time use.
In the next section of this lab, you will connect your signal (the function generator) to your signal conditioning equipment (the National Instruments SCXI) and data acquisition equipment (the PCI data acquisition card). You will use LabVIEW, a graphical programming language, to generate a simple Virtual Instrument (VI) to acquire data, chart the data on your monitor, and write the data to a file.
The SCXI is used to condition a signal. The SCXIs in this lab are equipped with modules that prepare the input signal by:
Once the signals are conditioned, they are multiplexed into a single signal. This signal is then passed by a serial cable to the data acquisition card in the PCI slot of the PC. The data acquisition card uses an analog to digital converter (ADC) to record the magnitude of an analog signal as a digital value. As a digital value, these data can be interpreted by a computer.
Connect the function generator output to the BNC connector on Channel 0 (the first input) of the SCXI-1520 module on the SCXI chassis.
1. Use the function generator to produce a 200 Hz sinusoidal wave.
2. Open LabVIEW 8.0.
3. Click Blank VI. Your new VI will open with two windows: the Front Panel (the user interface) and the Block Diagram (which is where you develop your graphical code). These two windows are linked, and as you develop your VI, you will see that some objects that you place in one of the windows will appear simultaneously in the other window.
4. On either the front panel or the block diagram, click File>>Save As. Save your VI to the folder (on the desktop) that corresponds to your lab section. (Saving either window will save the content from both the front panel and block diagram windows.)
You will now develop your VI to acquire the data that the ADC is sampling. The VI will acquire 1000 samples at a rate of 100,000 samples per second. Once the 1000 samples have been gathered, the data will be analyzed programmatically to determine the peak-to-peak amplitude and the DC offset. The data set will be displayed on a graph, and will be written to a measurement file that can be opened in Excel.
LabVIEW contains a useful set of functions for data acquisition known as DAQmx. DAQmx is NI’s driver configuration software for DAQ devices. We will use the DAQ Assistant function to open communication with the DAQ hardware, read data from the device, and close communication.
5. On the block diagram, right click to bring up the Functions Palette. (Refer to Figure 4.) The Functions Palette contains all of the functions and structures that can be placed directly on the block diagram. Notice that the functions are organized into sub-palettes by functionality.
![]() |
6. Click Measurement I/O>>NI-DAQmx>>DAQ Assist.
7. When you place the DAQ Assistant on the block diagram, a Create New… window will open as shown in Figure 5. This menu will guide you as you configure your software to communicate with your hardware.
![]() |
8. Select Analog Input>>Voltage. DAQmx will scan the system for available hardware and present the options; as shown in Figure 6.
![]() |
9. Expand the cDAQ module that is labeled (SCXI-1520).
10. Select ai0, (the analog input channel that the function generator is connected to.)
11. Click Finish.
![]() |
12. The DAQ Assistant window should now open. Configure the DAQ Assistant as shown in Figure 7.
13. When you click OK, LabVIEW will build a subVI according to your specifications.
Similar to the measurements made on the oscilloscope, LabVIEW programs can analyze characteristics of a signal.
14. Right click on the Block Diagram to bring up the Functions Palette. (Note that if you click on the Front Panel you will bring up the Controls Palette, which has entirely different choices.)
15. Select Express>>Signal Analysis>>Tone. The Configure Tone Measurements dialog box will now open. The Tone Express VI will display values related to the amplitude and frequency of the signal.
![]() |
16. Configure the dialog box as shown in Figure 8.
17. Select Amplitude and Frequency in the Single Tone Measurements box.
18. When you click OK, LabVIEW will build a subVI according to your specifications.
19. Place your cursor over the data output terminal on the DAQ Assistant icon. The cursor should change to a wire spool. Click on the data terminal and connect the wire to the signals inputterminal on the Tone Measurements icon. This wire represents the data flow from the DAQ Assistant to the measurements subVI.
20. For both output terminals on the Tone Measurements icon, right click and select Create>>Numeric Indicator to create Front Panel displays of these parameters.
21. Your block diagram should now be similar to Figure 9.
22. There are several Express VIs in the Signal Analysis palette that are similar to the Tone Express VI. These other Express VIs display information regarding frequency content, DC offset, curve fitting, etc. Depending on time, you may want to experiment with these other functions.
![]() |
One of the strengths of LabVIEW is the ease with which user interfaces are developed. In this section we will develop an on-screen graph display.
23. Right-click on the wire between the DAQ Assistant and the Tone Measurements icons. Select Create>>Graph Indicator.
24. Display the Front Panel by pressing <Ctrl-E>. You should see that a graph has been created on the Front Panel.
![]() |
Now that the VI can acquire data, we will develop a means to write the data to an Excel file and display the data onscreen. We will use the “Write to Measurement File” Express VI.
25. Right click on the Block Diagram to bring up the Functions Palette.
26. If you can’t find the “Write to Measurement File” Express VI, click on the search button at the top of the Functions Palette. Type “write to file” and double click the choice that ends in <<file I/O>>. The search menu will change into the Functions Palette, and the “Write to Measurement File” Express VI will be highlighted. Place this Express VI on the block diagram.
![]() |
27. Configure the window as shown in Figure 11. Configure the File Name window to contain the path to wherever you wish to store your data. Change the Segment Headers to One Header Only and the X Value Columns to One Column Only. Click OK.
28. Place your cursor over the data output terminal on the DAQ assistant icon. The cursor should change to a wire spool. Click on the data terminal and connect the wire to the signals inputterminal on the Write to File icon.
29. Right click the File Name terminal input on the Write to File icon. Select Create>>Control. This creates a field on the Front Panel where the user can enter the name of the data file that will be created.
30. Create a write disable button by right-clicking on the front panel. Click Boolean>>Push Button. Type “Store Data” to change the name of the control.
31. On the block diagram, connect the push button to the Enable terminal on the Write to File icon. (When this control is enabled, the program will write data to the file-path indicated on the Front Panel.)
32. Your Block Diagram should now be similar to Figure 12.
![]() |
33. On the Front Panel, click the Run button. You should see the signal from the function generator displayed on the graph.
34. When you enable data storage, a .lvm file should will be created in your folder. On the Windows desktop, open your group’s folder. Right click on the .lvm file that you just made and select Open With>>Microsoft Office Excel.
35. Plot the data and compare it to the graph shown on the front panel. You may want save screen shots or make hard-copies of any plots to include in your lab book.
After you have saved any data you want to keep, close all programs and log off of the computer. Turn off the CompactDAQ chassis, the function generator, and the oscilloscope. Take time to clean up your work area. Ten percent of your lab book grade will be based on cleanliness.
You are to submit a one-page memo report describing what you learned from the lab. See the Lab 1 Writing Assignment handout for more details.
"This course is the lab portion of ME 363, an instrumentation class in the Mechanical Engineering Department at Brigham Young University. This course covers the use of oscilloscopes, function […]"