
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);
}
/**************************************************************************/
Summary of Contents for E3631-90002
Page 9: ...8...
Page 14: ...1 1 General Information...
Page 25: ...24...
Page 26: ...2 2 Initial Operation...
Page 34: ...3 3 Front Panel Operation...
Page 64: ...4 4 Remote Interface Reference...
Page 113: ...112...
Page 114: ...5 5 Error Messages...
Page 124: ...6 6 Application Programs...
Page 137: ...136...
Page 138: ...7 7 Tutorial...
Page 153: ...152...
Page 154: ...8 8 Specifications...
Page 161: ...160...