’ Start the readings and wait for instrument to put ’ one reading in memory
’ Get the number of readings stored

Chapter 7 Application Programs

Example Programs for Excel 7.0

Excel 7.0 Example: takeReadings Macro

’""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

This Excel Macro (Visual Basic) configures the 34970A for scanning with the 34901A,

34902A, or 34908A multiplexer modules. When this subroutine is executed, it will

take the specified number of readings on the selected channel. You can easily modify the

number of readings, channel delay, and channel number. To make these changes, modify the

code in the section titled ’SET UP’. Note that you must have one of the above

modules installed in slot 100 for this program to run properly. You must also have an

GPIB interface card installed in your PC with the VISA or VTL library. ’""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Option Explicit Sub takeReadings()

Columns(1).ClearContents

 

Columns(2).ClearContents

 

Dim I As Integer

’ Used for counter in For-Next loop

Dim numberMeasurements As Integer

’ Number of readings

Dim measurementDelay As Single

’ Delay between relay closure and measurement

Dim points As Integer

 

 

’""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

To change the GPIB address, modify the variable ’VISAaddr’ below.

VISAaddr = "9"

OpenPort

Open communications on GPIB

SendSCPI "*RST"

Issue a Factory Reset to the instrument

’""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

SET UP: Modify this section to select the number of readings, channel delay,

and channel number to be measured.

numberMeasurements

= 10

Number of

readings

measurementDelay =

0.1

Delay (in

secs) between relay closure and measurement

Configure the function, range, and channel (see page 201 for more information). SendSCPI "CONF:VOLT:DC (@103)" ’ Configure channel 103 for dc voltage ’""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Select channel delay and number of readings

SendSCPI "ROUT:CHAN:DELAY " & Str$(measurementDelay)

SendSCPI "TRIG:COUNT " & Str$(numberMeasurements)

Set up the spreadsheet headings Cells(2, 1) = "Chan Delay:" Cells(2, 2) = measurementDelay Cells(2, 3) = "sec"

Cells(3, 1) = "Reading #" Cells(3, 2) = "Value"

SendSCPI "INIT" Do

SendSCPI "DATA:POINTS?" points = Val(getScpi())

Loop Until points >= 1

Remove one reading at a time from memory For I = 1 To numberMeasurements

SendSCPI "DATA:REMOVE? 1"

’ Request 1 reading from memory

Cells(I + 3, 1)

= I

’ The reading number

Cells(I + 3, 2)

= Val(getScpi())

’ The reading value

Do

’ Wait for instrument to put another reading in memory

SendSCPI "DATA:POINTS?"

’ Get the number of readings stored

points = Val(getScpi())

 

Loop Until points >= 1 Or I >= numberMeasurements

Next I

 

 

 

ClosePort

’ Close communications on GPIB

End Sub

322

Page 324
Image 324
Agilent Technologies 34970A manual Excel 7.0 Example takeReadings Macro, VISAaddr =

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.