Microsoft Excel Macro Example
You can use Windowsï›› Dynamic Data Exchange (DDE) to send
commands to the meter and return measurement results directly into a
Microsoft® Excel spreadsheet.
This example uses the Hewlett-Packard "Instrument Tools for Windows"
and the 82335B HB-IB Interface. The "Instrument Tools for
Windows" contains two programs to support HP-IB operations, an
Interactive HP-IB program and a HP-IB DDE Server.
To use the "Instrument Tools for Windows" with Microsoft® Excel, follow
this general procedure:
1Install Tools for Windows (if not already installed).
2 Start the Interactive HP-IB application and create and save a configuration
file (.IBC file) that describes the interface with the meter. Be sure EOI is
disabled and EOL is set to include the <lf> character. Refer to the
"Instrument Tools for Windows" User’s Manual for procedures and
descriptions of creating a configuration (.IBC) file.
You can test your interface connection in the Interactive HP-IB program
by sending an output string of *IDN? and entering the results. A typical
response is shown in the example in cell F4.
3 Start the HP-IB DDE server. This application starts and minimizes to an
icon.
4 Run the macro shown in the example.
In the macro, the following commands are part of the HP-IB DDE
program and are documented in the "Instrument Tools for Windows"
User’s Manual. All other commands are Microsoft® Excel commands and
are documented in the Excel function reference.
• [Abort]
• [clear(device)]
• EnterS
• EOL
• OutputS
6
Chapter 6 Application Programs
Microsoft Excel Macro Example
243
"Instrument Tools for Windows"