Contacting Tektronix

Tektronix, Inc.
14200 SW Karl Braun Drive
P.O. Box 500
Beaverton, OR 97077
USA

For product information, sales, service, and technical support:
In North America, call 1-800-833-9200.
Worldwide, visit www.tektronix.com to find contacts in your area.

Copyright © Tektronix. All rights reserved. Licensed software products are owned by Tektronix or its subsidiaries or suppliers, and are protected by national copyright laws and international treaty provisions.

Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material. Specifications and price change privileges reserved.

TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.

Online help version: 1.0

(release date)

000-0000-00


Introduction

The TekXL Toolbar, an add-in to Microsoft® Excel, lets you capture and graph oscilloscope data in Microsoft Excel 2000 and 2002 spreadsheets.

Click an appropriate toolbar button. Use the resulting dialog box to make selections for the type of waveform and measurement data you want to capture and automatically paste into Excel. Click the Help button in the Toolbar for help on any of the buttons.

The toolbar enables different buttons depending on the features supported for the selected instrument. The figure below shows the toolbar for a Tektronix TDS200, 1000, 2000, 3000, 5000, 6000, or 7000 series oscilloscope in a configuration where the PC and the oscilloscope communicate with a non-serial protocol, such as GPIB or Ethernet.

To learn more about the toolbar, click one of the buttons shown in the diagram above, or select one of the links below:

Subhead

Subhead

Connection

Selects a target instrument to connect to.

Settings

Displays settings of the target instrument, and transfers settings between the instrument and files.

Waveforms

Captures the waveform data and displays the data graphically in an Excel worksheet.

Measurement

Captures and charts waveform measurements.

Triggered Captures

Captures waveform data and measurement data with an oscilloscope-defined trigger.

NOTE. This feature not currently implemented for TDS/CSA8000 oscilloscopes nor for configurations where the PC and the oscilloscope communicate over serial connections.

Help

Launches this online help file.

See Also.

Adding the Toolbar to Excel

Source Code Information


Adding the Toolbar to Excel

The Tektronix OpenChoice installer normally loads the TekXL Toolbar files in these locations:

  • C:\VXIPnP\Win95\TekVISA\ExcelToolbar directory for Windows 95 or Windows 98 systems

  • C:\VXIPnP\WinNT\TekVISA\ExcelToolbar directory for Windows NT, Windows 2000, or Windows XP systems

Normally, the toolbar will be automatically placed in the Add-Ins list when installed. To manually make the toolbar available to Excel:

  1. Select Tools and then Templates and Add-Ins… from within Excel.

  2. Browse and click on TekXLToolbar in the correct directory. This should open the toolbar on the Excel spreadsheet.


Connecting to TekVISA-enabled Oscilloscopes

To select an instrument:

The Connection window should appear and display all available instruments, including remote instruments that have been connected. The toolbar controls one instrument at a time. The figure below shows the Connection window.

To see the model number for an instrument, click its entry once, and then click the Identify button to the right. The model number will appear at the bottom pane of the Connection box, as shown in the figure below.

  1. Either double-click the entry for the instrument that you wish to connect to or click the entry once and then click the OK button. A successful connection is indicated by the grayed-out, non-functional toolbar buttons becoming functional, as shown below:

See Also.

Settings

Waveforms

Measurement

Triggered Captures

Help


Saving and Restoring Oscilloscope Settings

Click the Settings button in the toolbar to view oscilloscope settings and to transfer them to the currently selected oscilloscope, the current worksheet, or to files.

To display the Settings window, click the Settings [image] button. The Settings window should appear. The right-side settings pane should be blank.

To display settings from an oscilloscope:

  • Click the Scope button in the Get Settings from pane. Settings from the selected oscilloscope will appear in a scrollable list box on the right side of the window, as shown below.

  • Click the setting of interest if it is too long to read in the list box. The toolbar will then display the full text of the setting in the box at the bottom of the Settings window, as shown below.

To send oscilloscope settings to an oscilloscope:

First acquire the settings from the upper-left, Get Settings from pane of the Settings window. Then assign the settings by clicking the Scope button in the lower-left, Send Settings to pane.

To save oscilloscope settings in a workbook:

Click the Workbook button in the Send Settings to pane. The toolbar will send the settings into an invisible worksheet named TekXLSettings.

To save oscilloscope settings to a file:

  • Click the File button in the Send Settings to pane. The toolbar displays a Save Scope Settings window as shown below.

Type in the file name or accept the default name. The default file name is a date and time representation with the format yymmdd_hhmmss. This is a two-digit representation of year/month/day_hour/minute/second. The hour’s hh setting can be any integer between 01 and 24. This lets the name signify whether the time refers to AM or PM. For instance, 050412_063303 would represent April 12, 2005 6:33:03 AM while 050412_183303 would represent April 12, 2005 6:33:03 PM.

Select the file type, or accept the default type.

The toolbar supports the following file types:

  • .SET file is identical to settings saved from within the instrument.

  • .STG file contains the standard settings data and a descriptor, which you specify when saving the settings. You can enter up to 256 characters for the STG file descriptor. A descriptor can serve as a reminder of which settings go with which file when storing many different instrument settings to files. The toolbar does not prompt you to enter the descriptor.

See Also.

Connection

Waveforms

Measurement

Triggered Captures

Help


Capturing and Graphing Waveforms

Click the Waveforms button in the toolbar to capture and graph waveforms in an Excel worksheet.

To display the Waveform window, click the Waveforms [image] button. The Waveform Capture window should appear, as shown below.

The waveform capture feature can obtain up to 65,000 rows of data. All active channels are displayed in a list box. The record length is displayed in a text box.

To display the current active channel list and the record length, click the Refresh button. The toolbar does not automatically update these fields when you change them on the oscilloscope.

To specify a cell into which to start the first row of waveform data:

  • Use the arrow-key buttons, or

  • Type the row and column values in the edit boxes inside the Start Display In: frame.

Possible Excel starting cells range from A1 to AZ99. Enter starting cell designations in "A1" format rather than the "R1C1" format.

To capture a waveform, click once on the channel or channels to capture data from, and then click the Capture button. This will start the acquisition and display the data in the spreadsheet at the designated starting cell. The toolbar displays a single time column next to the data from the selected active channel or channels.

To display a waveform data graph:

  • Select the Generate Excel Graph checkbox (default), and

  • Select either Active Sheet or New Sheet.

The program will only graph waveforms with equal horizontal scales. It will not graph items with unequal scales, such as a waveform and FFT data.

The following figure shows sample output with both data and a graph.

To clear the Active Sheet, press the Clear Active Sheet button. A window similar to the following window appears:

  • Click Yes to clear the active sheet. This will clear all data from the worksheet cells, cell formulas, and cell formatting. It also removes any embedded charts inside the active worksheet if the active sheet is a Chart sheet.

  • Click either No or Cancel to not clear the active sheet.

See Also.

Connection

Settings

Measurement

Triggered Captures

Help


Capturing and Graphing Waveform Measurements

Click the Measurement [image] button in the toolbar to capture single and repeated timed measurements. After you do so, a three-tabbed box appears, as shown below.

To specify single measurements:

  • Click the Single Capture button. This makes the Timing and Charting tab forms disappear.

  • Select desired channel or channels in the Active Channels list box.

  • Select one or more measurements in the Select Measurement(s) box. Alternatively, click the Select All button to select all measurements or click Reset to highlight only the first measurement in the list.

  • Select whether to display data in the Active Sheet or a New Sheet.

  • Select whether to place captured data in Columns or Rows.

  • Select the Column and Row of the Start Display In: cell for displaying captured measurements.

  • Select whether to Capture By: Channels orMeasurements. Capturing by channels instructs the toolbar to acquire all the selected measurements for the first selected channel, for example CH1, then all the measurements for the next selected channel, for example CH2, and so on. Capturing by measurements instructs the toolbar to acquire the first selected measurement, for example Period, for all the selected channels, then the second selected measurement, for example Frequency, for all the selected channels, and so on.

  • Click the Start button. The toolbar will then place measurement/s in the specified worksheet.

To specify multiple timed measurements:

  1. Click the Repeated Timed Capture button.

  2. Select the desired channel or channels in the Active Channels list box.

  3. Select one or more measurements from the Select Measurement(s) box. Alternatively, click the Select All button to select all measurements or click Reset to highlight only the first measurement in the list.

  4. Select whether to display data in the Active Sheet or a New Sheet.

  5. Select whether to place captured data in Columns or Rows.

  6. Select the Column and Row of the Start Display In: cell for displaying captured measurements.

  7. Select timing and charting options, as desired (see below).

  8. Click the Start button. The toolbar will then place measurement/s in the specified worksheet.

For repeated timed measurements, you can specify the starting time, Interval, and Record Length and Duration options in the Timing tab.

Excel worksheets are limited to 65,000 rows and 256 columns. On the TDS200, 1000 and 2000, you cannot take measurements on a math channel.

To select timing options:

For repeated timed measurements, you can specify the starting time, interval, and record length options on the Timing dialog form, as shown below.

Use the check boxes to select whether to specify measurements to start Immediately or at a Specified Time.

To specify a start time, use the arrow keys to adjust the day to begin the measurement capture and to specify the hour and minute to begin the capture. You can, alternatively, type the time directly into the Time edit box.

To change the interval or record length settings, use the arrow keys or enter the desired value in the appropriate box.

WARNING. Entering invalid values on this form will result in unpredictable side effects.

Click the Start button to begin measurement captures.

To select charting options:

For repeated timed measurements, you can specify charting options in the Charting dialog box, as shown below. These options include:

  • No chart: No chart is generated.

  • Periodically: The toolbar generates a chart every 10%, 20%, 25%, or 50% of the way through the points. For example, if you were capturing 24 points, the 25% option would cause the toolbar to update the chart every six points. All points taken would then be plotted.

  • Upon Completion: The toolbar generates a chart after it has captured all the points.

  • Active Sheet: The toolbar places the chart in the active worksheet.

  • New sheet: The toolbar places the chart in a new worksheet.

See Also.

Connection

Settings

Waveforms

Triggered Captures

Help


Capturing Triggered Waveforms

Click the Trigger Captures [image] button in the toolbar to capture waveform data and waveform measurements on a trigger.

The dialog box shown below displays when you select this toolbar button.

The Triggered Captures button captures the time and values of a triggered waveform and/or measurement(s) into the current worksheet, beginning at a chosen cell location. On the oscilloscope, before the capture, select:

  • Trigger event type (such as Edge or Glitch)

  • Waveform acquisition mode (such as Sample or Average)

The Trigger Capture button captures and charts a triggered waveform and or displays measurement(s) into the current document. Before you capture the trigger, select on the oscilloscope:

To capture triggered data into an Excel spreadsheet:

  1. Select the Triggered Captures button.

  2. A window similar to that displayed above appears. All active channels are displayed, and the waveform record length is displayed.

    3. NOTE. You can click the Refresh button to display any oscilloscope changes to the number of active channels, the measurement source channel, or the number of data samples.

  3. To capture triggered waveform data from a selected active channel or channels:

  • Check the Waveform checkbox. The waveform capture is limited to a maximum of 65,000 rows.

  • Select the desired active channel or channels from which to capture the data.

  1. Check the Waveform checkbox. The waveform capture is limited to a maximum of 65,000 rows.

  2. Select the desired active channel or channels from which to capture the data.

  3. To capture triggered measurement data from a selected active channel or channels:

  • Check the Measurement checkbox.

  • Highlight one or more measurements.

  1. Check the Measurement checkbox.

  2. Highlight one or more measurements.

  3. Select the starting cell in which to begin inserting the data, or leave the default as is (A1). You can specify the starting cell either by scrolling through the column and row values, or by directly entering the row and column values in the edit boxes inside the Start Data Display frame. Possible Excel starting cells range from A1 to AZ99. Starting cell designations must take the A1 format rather than the R1C1 format.

  4. Specify the number of captures to perform or leave the default value of 1.

  5. Click Start to begin the acquisition and display the data in the active sheet, starting at the designated cell.

For measurement data, a time stamp for the triggered event appears in the first row of a column, followed by the requested measurement(s).

For waveform data, times for each data point appear in the first column. The first row of subsequent columns contains a time stamp for each capture of a triggered event. Below the time stamp, waveform data values appear in successive rows (with a maximum of 65,000 rows). The number of columns of data varies, depending on the number of captures.

See Also.

Connection

Settings

Waveforms

Measurement

Help


Clearing the Active Sheet

Click the Clear Active Sheet button to clear the active sheet. The figure below shows the window for verifying that you want to clear the sheet.

  • Click Yes to clear the active sheet

  • Click No or Cancel to not clear the active sheet

Selecting Yes clears all:

  • Data from the worksheet cells

  • Cell formulas

  • Cell formatting

  • Any embedded charts inside the active worksheet if the active sheet is a Chart sheet


Viewing Source Code

To view or modify the toolbar code with the toolbar running, select Tools->Macro->Visual Basic Editor.

Most of the code is in the following sections:

  • Forms

  • Modules

  • Class Modules

The code is in the following Forms:

  • frmConnect: Selects the instrument for the other forms

  • frmHoldTVC: Holds the TekVISA ActiveX Control (used to communicate with the instruments)

  • frmSettings: Transfers settings between oscilloscopes, worksheets, and files

  • frmWFM: Captures waveforms into Excel and optionally graphs them

  • frmMeasurement: Captures single measurements or repetitive measurements into Excel and, optionally, graphs them

  • rmTrigger: Captures waveforms and measurements into Excel on oscilloscope trigger events

It is in the following code modules:

  • ToolbarCode: Builds the toolbar, contains common oscilloscope communication functions, and saves toolbar information

  • ThisWorkbook: Contains code that must be in the Workbook

It has one class module:

  • clsAppEvents: Handles events such as SRQs from the instrument.

The toolbar communicates with the oscilloscope through the TVC (TekVISA ActiveX Control) OCX control. The toolbar uses two additional ActiveX components for making timed measurements. These are:

  • p_TimedMeas.dll: Holds a timer and handles captured oscilloscope measurements and passes the data to p_ExcelInsert.exe.

  • p_ExcelInsert.exe: Formats and pastes the data into the active worksheet and updates the chart during timed measurements.

The source code for these two components is on the Tektronix OpenChoice TekVISA CD.


Displaying Online Help

Click the Help [image] button to display this help file.

See Also.

Connection

Settings

Waveforms

Measurement

Triggered Captures