EasyManua.ls Logo

Agilent Technologies 33120A - Downloading an Arbitrary Waveform over RS-232

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
void out_waveform(void)
{
/* Configure the waveform and enable FM modulation. The carrier waveform
is a 5 kHz sine wave and the modulating waveform is a 500 Hz sine wave.
The peak frequency deviation is 250 Hz. */
float value;
int stat_cond;
static char *cmd_string[]=
{
"OUTP:LOAD 50", /* Output termination is 50 ohms */
"APPL:SIN 5000,5", /* Carrier waveshape is sine wave,
output frequency is 5 kHz @ 5 Vpp */
"FM:INT:FUNC SIN", /* Modulating waveshape is sine wave */
"FM:INT:FREQ 500", /* Modulating frequency is 500 Hz */
"FM:DEV 250" /* Frequency deviation is 250 Hz */
};
/* Call the function to execute the command strings shown above */
command_exe(cmd_string, sizeof(cmd_string)/sizeof(char*));
/* Turn sweep on and send "1" to output buffer when setup is complete */
IOOUTPUTS(ADDR, "FM:STAT ON;*OPC?", 17);
IOENTER(ADDR, &value);
/* Determine the status of the SRQ line; return "1" if error occurred */
IOSTATUS(ISC, 1, &stat_cond);
if (stat_cond)
{
check_error("out_waveform"); /* Call function to check for errors */
}
else
{
printf("No Errors Were Detected.\n\n");
}
/* Use Serial Poll to read the Status Byte and clear all bits */
IOSPOLL(ADDR, &stat_cond);
}
/**************************************************************************/
6
Chapter 6 Application Programs
Using the Status Registers
265

Table of Contents

Other manuals for Agilent Technologies 33120A

Related product manuals