
. . . 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
Summary of Contents for 33120A
Page 2: ......
Page 10: ...8 ...
Page 14: ...Contents Contents 12 ...
Page 15: ...1 Quick Start 1 ...
Page 31: ...2 Front Panel Menu Operation 2 ...
Page 55: ...3 Features and Functions 3 ...
Page 126: ...124 ...
Page 127: ...4 Remote Interface Reference 4 ...
Page 204: ...SCPI Status System Chapter 4 Remote Interface Reference The SCPI Status Registers 202 ...
Page 228: ...226 ...
Page 229: ...5 Error Messages 5 ...
Page 244: ...242 ...
Page 245: ...6 Application Programs 6 ...
Page 272: ...270 ...
Page 273: ...7 Tutorial 7 ...
Page 299: ...8 Specifications 8 ...
Page 304: ...302 ...