Automating Measurements From a Tektronix MDO MSO DPO 2000 3000 4000 Oscilloscope With LabVIEW NXG

Publish Date: Feb 02, 2018 | 0 Ratings | 0.00 out of 5 | Print | Submit your review

Overview

Learn how to download and install the Instrument Driver to automate measurements from Tektronix 2000, 3000, and 4000 Series Oscilloscope Instrument using LabVIEW NXG.  This tutorial will discuss the Tektronix DPO 4054B, but applies to any of the Tektronix MDO MSO DPO 2000 3000 4000 Series instruments.

Table of Contents

  1. Install LabVIEW NXG
  2. Connect and Configure Tektronix 4000 Series Oscilloscope
  3. Automate Measurements With LabVIEW NXG
  4. Conduct Sequencing and Database Reporting With TestStand Test Management Software
  5. Consider PXI Source Measure Units
  6. Learn More

1. Install LabVIEW NXG

LabVIEW NXG simplifies hardware integration so that you can rapidly acquire and visualize data from virtually any I/O device, whether from NI or a third party. Combined with a graphical programming syntax that reduces programming time, LabVIEW NXG streamlines complex system design with tools and IP at the forefront of today’s technology.

       Download LabVIEW NXG

       Learn more about LabVIEW NXG

 

Figure 1. LabVIEW NXG provides an intuitive programming environment for automating measurements from both NI and third party instruments.

 

 

Install Tektronix 4000 Series Instrument Driver

NI develops and supports thousands of instrument drivers for third party instruments to help engineers and scientists automate measurements. You can find these instrument drivers in the Instrument Driver Network.

          Download Tektronix 4000 Series Instrument Driver

 

Figure 2. The NI Instrument Driver Network houses thousands of instrument drivers for automating third party instruments.

 

Back to Top

2. Connect and Configure Tektronix 4000 Series Oscilloscope

The Tektronix MDO MSO DPO 2000 3000 4000 Series Instruments support USB and Ethernet communication. You need either a USB cable (Type A to Type B) or an Ethernet cable connected to a network to connect the Tektronix oscilloscope to your computer.

Figure 3. The Tektronix 4000 Series have USB and Ethernet ports on the back.

 

Configure Your System With SystemDesigner

SystemDesigner, a graphical tool for discovering, documenting, and configuring your test system, is integrated directly into every LabVIEW NXG project. This tool automatically detects USB hardware connected to your host PC and adds a graphical representation to the window. If you select the device, you can see additional properties, such as the device name, and any software or drivers that are installed on your system to support this device. You can also troubleshoot and make manual function calls to your instrument to ensure that it is working as expected before moving into automation.

 

 

Figure 4. SystemDesigner provides an intuitive, graphical representation of all hardware and software associated with your test and measurement system.

 

Procedure

  1. Locate the communication ports on the back of the Tektronix Instrument.
  2. Locate the communication ports on your host PC.
    1. If you are using a laptop, you likely have multiple USB ports and one Ethernet port.
    2. If you are using a PC or an industrial PC, you likely have multiple USB ports but need to connect the computer to your local network.  Tektronix oscilloscopes have network capability to allow the computer to connect over this network.  If you are not connected to a local network, feel free to plug in the Tektronix Oscilloscope to the computer directly via Ethernet or USB port.
  3. Using the right cable for your communication port (USB/Ethernet), connect your Tektronix oscilloscope instrument to your host PC.
  4. Power on your Tektronix oscilloscope Instrument and allow time for initialization.
  5. Launch LabVIEW NXG.
  6. On the LabVIEW NXG Welcome screen, select Use Your Hardware
  7. The SystemDesigner opens with a high level view of your system. The procedure for detecting your device depends on the bus you are using.

          USB: USB devices are automatically detected in NI Measurement & Automation Explorer (MAX) and SystemDesigner

    • Select your USB interface in SystemDesigner. From the Configuration Pane on the right, scroll down to the Installed drivers section to find and install the NI-VISA driver.  Then return to the Configuration Pane and go to the Advanced section to select Launch NI MAX. Within MAX, select the USB interface and click Scan for Instruments. The instrument is then detected.

          Ethernet: Ethernet network devices have to be added using the IP address the device is given.  

    • Select your PC in SystemDesigner.  From the Configuration Pane on the left, scroll down to the Advanced section to select Launch NI MAX.  Within MAX expand My System»Devices and Interfaces»Network Devices to view instruments that are connected to the same subnet as your PC.  To add an instrument that is not on the local subnet, right-click Network Devices, select Create new VISA TCP/IP Resource, and follow the instructions in the wizard.

     8. The instrument is now configured.

 

Back to Top

3. Automate Measurements With LabVIEW NXG

After performing manual/interactive measurements to achieve the results that you need to test your device, the next step is to perform automated measurements to reduce measurement time and increase repeatability.

 

Application Programming Interface (API)

To help accelerate software development, all instrument drivers follow a consistent programming flow of: Open, Configure, Read/Write, Close. All drivers for NI hardware (for example, PXI modular instrumentat) also follow this paradigm because it is a best practice when programming in LabVIEW NXG.

 

Figure 5. The Tektronix instrument driver for LabVIEW NXG uses an intuitive and consistent programming pattern of Open, Configure, Read/Write, and Close.

 

 

 

Start From an Example Program

The Tektronix 4000 series LabVIEW Plug and Play driver includes a LabVIEW NXG project that features several example VIs to help you get started. Open these examples using the following procedure.

  1. Open LabVIEW NXG. 
  2. Open the Learning tab by selecting the Learn to Program tile in the Welcome screen or selecting the Learning tab from the top right.
  3. Select Examples»Hardware Input and Output»Instrument Drivers to locate all of the examples included with installed LabVIEW Plug and Play instrument drivers.
  4. Click the Tektronix project to create a new copy. 

     

    Figure 6. LabVIEW NXG instrument driver examples are included with every LabVIEW Plug and Play instrument driver.

     

     

  5.     The Tektronix DPO MSO 2000 4000 Series.lvproj contains several example VIs that require no extra programming to run. Double click a VI in the Project Files tab within the Navigation Pane to open it.

     

    Figure 7. The Tektronix 4000 series LabVIEW Plug and Play driver includes multiple example VIs to get started.

     

  6.    To run a VI, first select the corresponding VISA Resource Name and appropriate settings on the Panel. Then click the green Run arrow at the top left of the VI. 

     

     

    Figure 8. Select the corresponding VISA Resource Name and appropriate settings on the Panel before running the example VI.

     

     

Customize Measurement Settings

All LabVIEW Plug and Play examples are completely extensible and customizable to fit your measurement needs. For example, start with the Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi included in the Tektronix DPO MSO 2000 4000 Series example project. Then add the ability to control the range of the measurement being taken.

  1. Open the Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi from the Tektronix DPO MSO 2000 4000 Series.lvproject.
  2. Click Diagram on the View Selector to view the VI's Diagram.
  3. Use the following procedure to add the ability to control the range for your measurements
    1. Create a Range double control by right clicking the orange double constant that is set to 10 and selecting Change to control.
    2. Reposition controls on the Diagram as needed.  You can easily sort the Diagram by clicking and dragging to help with reading and understanding program flow.
    3. Go back to the Panel by choosing Panel on the View Selector. Place the new control on the Panel by selecting the Unplaced items box and placing it on the Panel.  Note that you can place multiple items simultaneously from the Unplaced items box by holding Ctrl while selecting the items in the box. You can then place items one by one on the Panel.

 

Figure 9. Right click the Vertical Range constant and choose Change to control.  You can also add Controls, Constants and Indicators by right clicking terminals on VI's on the Diagram to add functionality or test parameters.

 

 

    1. You can add and edit any controls, constants and indicators in the Item view on the right side of the LabVIEW NXG environment.  This includes changing data types, adding documentation, and changing the name of the item.

 

Figure 10. Place controls onto the Panel using the unplaced items box.  Keeping controls on the left of the Panel and indicators on the right helps user readability.

 

 

Add Signal Processing

LabVIEW includes hundreds of built-in functions we can take advantage of to implement things like Signal Processing and Analysis. Follow the procedure below to add a Peak Amplitude Analysis to the "Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi".

  1. Open the Diagram of the VI by selecting Diagram in the View Selector.  
  2. Focus on the section containing the Read (Multiple Waveforms) Node. Drop down the Peak Amplitude Node next to the Read (Multiple Waveforms) Node.  You can find the Peak Amplitude analysis gvi can be found by right clicking on the Diagram white space, going to Analysis»Signal Processing» Measurement and selecting the top left node that is called Amplitude Measurements.  Drop this on the Diagram and recreate the picture shown in Figure 12. 
  3. Use this opportunity to explore the other signal processing categories that are available for your test.

 

 

Figure 11. This is the Peak Amplitude measurement node that you are adding.

 

  1. The Peak Amplitude Node reads in the waveform signal that the Read (Multiple Waveforms) Node creates and analyzes the data your Tektronix device collects. 
  2. Connect the Waveform Graph Wire to the Peak Amplitude VI by left clicking the top left terminal of the Peak Amplitude VI and then clicking the Waveform Graph Wire.  
  3. Delete the Yellow Error Wire.  Then left click the bottom left Error Terminal of the Peak Amplitude VI and connect it to the output Error Terminal of the Read Waveform VI to the left of it.  Next, connect the Error Out Terminal to the Error In Terminal of the Close VI.
  4. Right click each of the Double Output Terminal on the Peak Amplitude VI and select Create Indicator to add outputs for the Peak Amplitude VIs data.

 

 

Figure 12. Your example with the added Peak Amplitude VI should look like this.

 

  1. Switch to the Panel of the VI by selecting Panel in the View Selector.
  2. Drop down all of the indicators and controls from the Unplaced Items box onto the Panel.
  3. Rename the x and y axis of the histogram graph to correspond with the values you are measuring by clicking on the axis labels and replacing the text or by clicking on the axis labels and changing the Name text at the top of the Configuration Pane on the right.

 

 

Figure 13. The Panel should look like this.  You have added a new control to decide the range of your test and you incorporated signal processing to determine the amplitudes of your signal.  Customize the Panel of the VI to fit your applications needs.

 

     4. Save the VI by selecting File then Save Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi.

 

Add File I/O

Log the results of each test by adding file I/O to your application. LabVIEW NXG can log to TDMS, text, binary, and CSV files.  Follow these steps to add logging to a CSV file to the Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi.

  1. Open the Diagram of the VI by selecting Diagram in the View Selector.
  2. Create space between the Read (Multiple Waveforms) Node and the Close Node. Delete the yellow Error wire between the two.
  3. Place a Build Array Node from the Data Types » Array palette where you just created space. Expand the Build Array Node to add an extra terminal by dragging down with the mouse after seeing the expansion cursor appear on the bottom of the node.
  4. On the Build Array Node, connect the first terminal Element 1 to the maximum peak indicator wire, Element 2 to the minimum peak indicator wire, and Element 3 to the peak to peak indicator wire.

 

 

Figure 14. Expand the Build Array Node to include multiple elements.

 

     5.  Next to the Build Array Node, drop down a Write Delimited Spreadsheet Node from the Storage palette. Connect the appended array terminal on the Build Array Node to the 2D data terminal on the Write Delimited Spreadsheet Node.

     6.  Create a constant for the delimiter (/t) terminal on the Write Delimited Spreadsheet Node. Put “,” into the constant to make the file comma delimited. Then create an indicator for the new file terminal on the top right of the Write Delimiter Spreadsheet Node. Rename this indicator "New File Path".

 

Figure 15. Write to CSV files using the Write Delimited Spreadsheet Node.

 

     7.  Drop down to the left of the Write Delimited Spreadsheet Node a Get System Directory, Build Path, and Replace File Extension nodes found in the Storage > Path palette in that order from right to left. 

     8.  Wire the path with new extension terminal on the top right of the Replace File Extension Node to the file terminal on the top left of the Write Delimited Spreadsheet Node.

     9.  On the Write Delimited Spreadsheet Node create a constant for the top format terminal. View how to create a format specifier by selecting the Write Delimited Spreadsheet Node and Online manual in the Configuration Pane on the right.

     10.  Wire the appended path terminal on the top right of the Build Path Node to the path terminal on the top left of the Write Delimited Spreadsheet Node.

     11.  Create a constant for the new extension terminal on the left side of the Replace File Extension Node. Place ".csv" into the constant to ensure the file is saved with the .csv extension.

     12.  Wire the system directory terminal on the top right of the Get System Directory Node to the base path terminal on the top left of the Build Path Node.

     13.  Create a control for the name or relative path terminal on the left side of the Build Path Node. Rename the control "File Name".

     14.  Create a constant for the type terminal on the top left side of the Get System Directory Node. Select "Default Data Directory" to save the file to the default LabVIEW directory.

 

Figure 16. With the File Name control, you can name the .csv file being created and new file. 

 

     15.  Wire the error out terminal on the Enable Output Node to the error in terminal on the Write Delimited Spreadsheet Node. Then wire the error out terminal of the Write Delimited Spreadsheet Node to the error in terminal of the Close Node.

     16.  Open the Panel by selecting Panel in the View Selector. Place the unplaced controls and indicators on the Panel.

 

Figure 17. With the File Name control, you can name the new .csv file.

 

     17.  Save the VI by selecting File and then Save Tektronix DPO MSO 2000 4000 Series Acquire Multiple Waveform Example.gvi.

     18.  Before you run the gvi type in the desired file name, save the file in the default LabVIEW directory and you can see the new file path in the New File Path indicator.

 

 

Back to Top

4. Conduct Sequencing and Database Reporting With TestStand Test Management Software

TestStand is a ready-to-run test management software that is designed to help you develop, execute, and deploy automated test and validation systems faster. While LabVIEW NXG is ideal for developing individual code modules, you can use TestStand to call multiple code modules you have developed in LabVIEW NXG, along with other programming languages, to build a sequence. Finally, you can specify execution flow, reporting, database logging, and connectivity to other enterprise systems for your test system.

          Learn more about TestStand Test Management Software

          Download TestStand

 

 

Figure 18. Test management software, for example TestStand, is at the top of a properly architected test system.

 

 

Back to Top

5. Consider PXI Source Measure Units

PXI Source Measure Units and oscilloscopes are flexible, software‐defined instruments that are versatile enough for both time‐ and frequency‐domain measurements and deliver the benefits of the PXI platform. They feature up to eight channels that can sample at speeds up to 12.5 GS/s with 5 GHz of analog bandwidth. Using the PXI platform, you can synchronize multiple oscilloscopes with other instruments at picosecond‐level accuracy for high‐channel‐count and mixed‐signal applications. These instruments also feature numerous triggering modes, deep onboard memory, and a driver software API that includes data streaming and analysis functions.

          Learn more about NI Oscilloscopes

 

 

Figure 19. The PXI-5922 oscilloscope delivers a smarter way to tackle difficult
applications in industries ranging from consumer electronics and semiconductor test to aerospace and
defense test.

 

 

 

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit