
Chapter 6 Application Programs
Using the APPLy Command
126
C / GPIB (Program 1)
/***************************************************************************
This program sets up output voltages and currents for three outputs.
This program also shows how to use "state storage" to store the instrument
configuration in memory.
***************************************************************************/
#include <stdio.h> /* Used for printf() */
#include <stdlib.h> /* Used for atoi() */
#include <string.h> /* Used for strlen() */
#include <cfunc.h> /* Header file from GPIB Command Library */
#define ADDR 705L /* Set GPIB address for power supply */
/* Function Prototypes */
void rst_clear(void);
void out_setting(void);
void output_on(void);
void command_exe(char *commands[], int length);
void state_save(void);
void check_error(char *func_name);
/**************************************************************************/
void main(void) /* Start of main() */
{
rst_clear(); /* Reset the instrument and clear error queue */
output_on(); /* Enable the outputs
out_setting(); /* Set output voltages currents */
state_save(); /* Save a state of the power supply */
}
/**************************************************************************/
void rst_clear(void)
{
/* Reset the power supply, clear the error queue, and wait for
commands to complete. A "1" is sent to the output buffer from the
*OPC? command when *RST and *CLS are completed. */
IOOUTPUTS(ADDR, "*RST;*CLS;*OPC", 14);
}
/**************************************************************************/
Содержание E3631-90002
Страница 9: ...8...
Страница 14: ...1 1 General Information...
Страница 25: ...24...
Страница 26: ...2 2 Initial Operation...
Страница 34: ...3 3 Front Panel Operation...
Страница 64: ...4 4 Remote Interface Reference...
Страница 113: ...112...
Страница 114: ...5 5 Error Messages...
Страница 124: ...6 6 Application Programs...
Страница 137: ...136...
Страница 138: ...7 7 Tutorial...
Страница 153: ...152...
Страница 154: ...8 8 Specifications...
Страница 160: ...Chapter 8 Specifications Supplemental Characteristics 159 8 Figure 8 1 Dimensions of Agilent E3631A Power Supply...
Страница 161: ...160...