Skip to content Skip to navigation Skip to collection information

Connexions

You are here: Home » Content » Introduction to Mechanical Measurements » Introduction to Benchtop Equipment and Data Acquisition

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • NSF Partnership display tagshide tags

    This collection is included inLens: NSF Partnership in Signal Processing
    By: Sidney Burrus

    Click the "NSF Partnership" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • National Instruments display tagshide tags

    This collection is included in aLens by: National Instruments

    Comments:

    "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 […]"

    Click the "National Instruments" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Lens for Engineering

    This module and collection are included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Introduction to Benchtop Equipment and Data Acquisition

Module by: Luke Graham. E-mail the author

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.

Introduction:

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.

Teaching Objectives:

  • Learn to use a function generator to produce a variety of voltage signals.
  • Become familiar with an oscilloscope and use it to record and analyze voltage signals.
  • Become familiar with the lab PCs and PC-based data acquisition hardware.
  • Learn how to write a simple LabVIEW VI to read a voltage signal and write data to a file.

Procedure:

Part 1: Creating a Signal with the Function Generator

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.

Part 2: Analyzing a Signal with an Oscilloscope

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.

2.1 Oscilloscope Menu

Press the MENU button to bring up the menu options for the active channel. The far left option is the Coupling button.

  • AC coupling only displays the AC (or changing) components of a wave.
  • We will typically use DC coupling, which displays both DC (constant) and AC (changing) components.
  • The Ground coupling option shows the ground level (0 volts) for channel 1.

When finished with the MENU: push the MENU button, followed by the Off button.

2.2 Setting the Vertical Sweep

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.

  • Turn the SCALE knob and note that the highlighted value changes. (To determine the amplitude of a signal, it is necessary to know how many volts each division represents.)
  • Adjust the VERTICAL POSITION knob to move the entire trace up and down. The number 1 and the right arrow on the left side of the display indicate the ground level for channel 1.
Figure 1: Oscilloscope adjustments
Figure 1 (Graphic1.jpg)

2.3 Setting the Horizontal Sweep (refer to Figure 1)

The SCALE knob under the HORIZONTAL heading is used to set the horizontal sweep speed.

  • Turn this SCALE knob and observe how it changes the appearance of the signal on the o-scope.
  • The number of seconds (usually milliseconds or microseconds) between each vertical line on the LCD screen is shown at the bottom center of the screen.

The HORIZONTAL POSITION adjustment moves the trace horizontally.

2.4 MEASURE features (refer to Figure 2)

  • Push the MEASURE button to bring up the MEASURE menu.
  • Select the Select Measurement for Ch1.
  • Scroll through the new menu that appears on the right side of the screen. Measure the frequency, period, and mean value of your input signal. Compare these measured values with the settings of the function generator.

Turn off the measurements you selected by pushing the Remove Measurement button from the MEASURE menu.

Figure 2: Measure, Cursor, and Save/Recall
Figure 2 (Graphic2.jpg)

2.5 Trigger Options

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.

2.5.1 Types of Triggers
  • Auto triggering:the scope will free-run in the absence of an adequate trigger signal. Useful for capturing periodic signals.
  • Normal triggering: In the absence of an adequate trigger, no baseline trace will be present. Useful for capturing periodic signals.
  • Single triggering: A single sweep is displayed when an acceptable trigger is detected. Useful for capturing a one-time event.
  • Force triggering: Causes a trigger to occur even if there is not a signal of adequate magnitude.
Figure 3: Triggering Options
Figure 3 (Graphic3.jpg)
2.5.2 Adjusting the Trigger
  • The TRIGGER LEVEL knob selects the amplitude of the trigger level. This value is indicated by a left arrow on the right side of the display.
  • Bring up the trigger menu options by selecting the TRIGGER MENU button.

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).

  • The SLOPE option selects which slope of the signal (rising or falling) will trigger the sweep.
  • The SOURCE option determines the channel that provides the trigger signal.
Practice with Trigger Options

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.

2.6 The CURSOR button (refer to Figure 2)

CURSOR can be used to display vertical (time) or horizontal (voltage) cursors on the display.

  • Cursors can be adjusted using the knob to the left of the cursor button.
  • The SELECT button changes which cursor is being adjusted. The solid line is the cursor that is currently selected.
  • The values corresponding to the positions of the two cursors are displayed (next to the “@” icon), as well as their difference (next to the “∆” icon).
  • Use the cursors to measure the peak voltage (Vp-p) and the period of your triangle wave.

Adjust the function generator to create a different waveform and experiment with cursors, triggers and scales.

2.7 The SAVE/RECALL button (refer to Figure 2)

Press the SAVE/RECALL button to bring up the Save/Recall menu.

  • Under this menu, setup parameters and waveforms can be saved and recalled on the o-scope itself.
  • The oscilloscope can save data to a floppy disk or to four internal references.
  • Reference data can be analyzed like current data in the measurements and math menus.

2.8 Accessing oscilloscope data on the PC

To facilitate saving files to the hard drive of the lab computers, each of the oscilloscopes has a network interface card installed.

  • Open Internet Explorer.
  • Under Favorites, click the link titled o-scope. This should bring up a window that has a screen shot of the LCD display of the oscilloscope.
  • Click on the tab labeled DATA.
  • In this window, data from the input, math and reference channels can be saved to the computer.
  • For example, using the options under Waveform transfer from the instrument, choose the Source as CH1, and the Format as SPREADSHEET.
  • Click Get. A dialog box opens for the data to be saved.
  • Make sure to add the correct file extension when saving the data. (.xls for Excel.)

Part 3: Data Acquisition

For some applications, it is not practical to use an oscilloscope to analyze a signal.

  • Some applications generate signals that operate on timescales of hours or weeks.
  • Some signals require statistical analysis
  • Some data are processed by complicated algorithms.
  • Some signals are used to control electromechanical systems.

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.

3.1 Introduction to Data Acquisition Hardware

The SCXI is used to condition a signal. The SCXIs in this lab are equipped with modules that prepare the input signal by:

  • Applying a gain (magnification) to the input signal
  • Filtering out high frequency characteristics
  • Balancing a strain bridge

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.

3.2 Configuring hardware and opening a new program

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.)

3.3 Acquiring data

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.

Figure 4: Functions Palette
Figure 4 (Graphic4.png)

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.

Figure 5: Create New DAQ Assistant Window
Figure 5 (Graphic5.png)

8. Select Analog Input>>Voltage. DAQmx will scan the system for available hardware and present the options; as shown in Figure 6.

Figure 6: List of Physical Channels
Figure 6 (Graphic6.png)

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.

Figure 7: DAQ Assistant Configuration Window
Figure 7 (Graphic7.png)

12. The DAQ Assistant window should now open. Configure the DAQ Assistant as shown in Figure 7.

  • Set the input range from 5 to -5 volts.
  • Change the Terminal Configuration to Differential. (Differential assumes that the voltage is measured between two channels, rather than referenced to a common ground.)
  • Set the Acquisition Mode to N Samples.
  • Change Samples to Read to 1000 and the Rate to 100,000.

13. When you click OK, LabVIEW will build a subVI according to your specifications.

3.4 Amplitude Measurement of Data

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.

Figure 8: Configure Tone Measurements Box
Figure 8 (Graphic8.png)

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.

Figure 9: Block Diagram with Measurements SubVI
Figure 9 (Graphic9.png)

3.4 Displaying data on-screen

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.

Figure 10: Block Diagram with Graph Added
Figure 10 (Graphic10.png)

3.5 Writing Data to a File

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.

Figure 11: Write to Measurement File Configuration Window
Figure 11 (Graphic11.png)

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.

Figure 12: Block Diagram
Figure 12 (Graphic12.png)

3.6 Running the VI

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.

Part 4: Shutting Down

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.

Lab Report

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.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks