Chapter 7 Application Programs

Example Programs for C and C++

C / C++ Example: dac_out.c

/* dac_out.c /***************************************************************************

* Required: 34907A Multifunction Module in slot 200; VISA library

*

* This program uses the VISA library to communicate with the

34970A.

*

* The program queries slot 200 and displays the response. It

then resets

*

* the instrument and sends the value ’voltage’ to the DAC on channel 205. *

****************************************************************************/

#include <visa.h>

 

#include <stdio.h>

 

#include <string.h>

 

#define ADDR "9"

/* Set GPIB address for instrument */

void main ()

 

{

 

ViSession defaultRM;

/* Resource manager id */

ViSession dac;

/* Identifies instrument */

char reply_string [256];

/* String returned from instrument */

char Visa_address[40];

/* VISA address sent to module */

double voltage;

/* Value of voltage sent to DAC */

/* Build the address required to open communication with GPIB card. The address format looks like this "GPIB0::9::INSTR". */

strcpy(Visa_address,"GPIB0::"); strcat(Visa_address, ADDR); strcat(Visa_address, "::INSTR");

/* Open communication (session) with the 34970A */

viOpenDefaultRM (&defaultRM);

viOpen (defaultRM, Visa_address,VI_NULL,VI_NULL, &dac);

/* Query the module id in slot 200; Read response and print. */ viPrintf (dac, "SYST:CTYPE? 200\n");

viScanf (dac, "%s", &reply_string);

printf("Instrument identification string:\n %s\n\n", reply_string);

viPrintf (dac, "*RST\n");

/*

Set

power-on

condition */

voltage = 5;

/*

Set

variable

to voltage setting */

viPrintf (dac, "SOURCE:VOLTAGE %f,(@205)\n",voltage); /* Set output voltage */ /* Close communication session */

viClose (dac); viClose (defaultRM);

}

7

329

Page 331
Image 331
Agilent Technologies 34970A manual ++ Example dacout.c

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.