EasyManua.ls Logo

Agilent Technologies 33120A - Page 258

Agilent Technologies 33120A
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
. . . continued
300 ! Download data points to volatile memory from array
310 !
320 DISP "Downloading Arb..."
330 OUTPUT @Fgen;"DATA VOLATILE,";Waveform(*)
340 DISP "Download Complete"
350 !
360 OUTPUT @Fgen;"DATA:COPY PULSE, VOLATILE" ! Copy arb to non-volatile memory
370 OUTPUT @Fgen;"FUNC:USER PULSE" ! Select the active arb waveform
380 OUTPUT @Fgen;"FUNC:SHAP USER" ! Output the selected arb waveform
390 !
400 OUTPUT @Fgen;"OUTP:LOAD 50" ! Output termination is 50 ohms
410 OUTPUT @Fgen;"FREQ 5000;VOLT 5" ! Output frequency is 5 kHz @ 5 Vpp
420 !
430 END
C / GPIB (Program 3)
/***************************************************************************
This program uses the arbitrary waveform function to download and
output a square wave pulse with a calculated rise time and fall time.
The waveform consists of 4000 points downloaded over the GPIB
interface as ASCII data.
***************************************************************************/
#include <stdio.h> /* Used for printf() */
#include <stdlib.h> /* Used for malloc(), free(), atoi() */
#include <string.h> /* Used for strlen() */
#include <cfunc.h> /* Header file from GPIB Command Library */
#define ISC 7L /* Assign GPIB select code */
#define ADDR 710L /* Set GPIB address for function generator */
/* Function Prototypes */
void rst_clear(void);
void get_data(void);
void download_data(float *waveform, int num_points);
void out_waveform(void);
void command_exe(char *commands[], int length);
void check_error(char *func_name);
/**************************************************************************/
Chapter 6 Application Programs
Downloading an Arbitrary Waveform over GPIB
256

Table of Contents

Other manuals for Agilent Technologies 33120A

Related product manuals