Chapter 7 Application Programs

Example Programs for Excel 7.0

Example Programs for Excel 7.0

This section contains two example programs written using Excel macros (Visual Basic® for Applications) to control the 34970A. Using Excel, you can send SCPI commands to configure the instrument and then record measurement data on the Excel spreadsheet.

To write an Excel macro you must first open a module in Excel. Go to the Insert menu, choose Macro, and then Module. Name this module “Send Commands” by clicking on the tab with the right mouse button. Create another module and name it “Port Configuration”. You will use the “Port Configuration” module to configure all of the overhead required to communicate with the instrument over the interface.

You will use the “Send Commands” module to send the SCPI commands to the instrument using the “Port Configuration” module.

Two Excel examples are included in this section. To enter the first example (“takeReadings”), type the text as shown on page 322 into the “Send Commands” module. Then type the text for configuring the interface as shown on page 323 into the “Port Configuration” module.

After entering the information for both modules, go to a spreadsheet and run the example program. Note that you must run the macro from a spreadsheet. With the cursor in the spreadsheet, select Macro from the Tools menu. Then double-click on the “takeReadings” macro in the Macro dialog box.

To run the second example (“ScanChannels”), type the text as shown on page 325 into the “Send Commands” module and reuse the “Port Configuration” module from the first example (page 323).

Make any changes necessary to suit your application in the “Send Commands” module. You must enter the information in the modules

exactly as shown or an error will be generated. If several system errors 7 occur while attempting to run a macro, you may have to reboot your PC

to get the GPIB port to work properly.

Note: To use these examples with Windows® 3.1, you will need to modify the declarations at the top of the “Port Configuration” module. Change visa32.dll to visa.dll in all declarations.

321

Page 323
Image 323
Agilent Technologies 34970A manual Example Programs for Excel

34970A specifications

Agilent Technologies 34970A is a versatile data acquisition and measurement system that has gained popularity in various industries, including research and development, manufacturing, and education. The primary purpose of the 34970A is to offer an efficient solution for data collection, monitoring, and analysis, which can significantly enhance productivity and accuracy in testing applications.

One of the main features of the 34970A is its modular design, allowing users to customize the system according to their specific measurement needs. The mainframe can accommodate up to three plug-in measurement modules, which can include various types of measurements such as analog, digital, temperature, and frequency. This modularity provides flexibility for users to tailor the system to their requirements, making it highly adaptable to different applications.

Another notable characteristic of the Agilent 34970A is its impressive channel configuration. The system can support up to 120 measurement channels when fully configured, enabling extensive data acquisition without the need for multiple devices. This capability is essential for applications requiring simultaneous monitoring of multiple parameters or locations.

The 34970A utilizes advanced signal processing technologies to ensure high-accuracy measurements. The internal 6.5-digit resolution multimeter provides precise readings, while the device also supports various input types, such as thermocouples and RTDs for temperature measurements. The ability to perform mathematical functions, such as summation and averaging, on the acquired data further enhances its usability.

For data storage and management, the Agilent 34970A features built-in memory for storing up to 20,000 readings. Users can also easily transfer data to a PC through the RS-232 interface or GPIB (IEEE 488) for further analysis and reporting. Additionally, it offers the capability to program automatic data logging and scheduling of measurements, which streamlines the testing process and reduces manual intervention.

In terms of user interface, the 34970A is equipped with a large graphical display that provides clear visualization of measurement data and easy navigation through settings and options. The menu-driven interface makes it accessible for users of all skill levels, simplifying the setup and operation of the device.

Overall, the Agilent Technologies 34970A stands out for its modularity, high channel capacity, advanced measurement technologies, and user-friendly interface. As a reliable and efficient data acquisition system, it is well-suited for a wide range of applications, making it an essential tool for engineers and technicians looking to enhance measurement precision and efficiency.