Scpi Program Examples - KEPCO BOP 1000W Operator's Manual

High power bipolar power supply
Hide thumbs Also See for BOP 1000W:
Table of Contents

Advertisement

13 - Current Protect Error — 1 indicates a Current protection error has been detected.
14 - Sinking — 1 indicates the unit is absorbing energy from the load.
15 Not Used — always zero.
3.6.8

SCPI PROGRAM EXAMPLES

Refer to Appendix B, Figures B-1 through B-12 for examples illustrating the use of SCPI com-
mands.
Figure 3-21 is an example of a program using SCPI commands to program the BOP Power
Supply. The program illustrated is for a configuration using an IBM PC or compatible with a
National Instruments GPIB interface card. (It will be necessary to consult the manufacturer's
data to achieve comparable functions with an interface card from a different manufacturer.) This
program sets output voltage (Voltage mode) or voltage limit (Current mode) to 5V, and current
limit (Voltage mode) or output current (Current mode) to 1A, then reads the measured (actual)
voltage and current, then prints the measurements.
/**************************************************************************/
/* Sample Program For KEPCO power supply, using National Instruments */
/* GPIB interface card and IBM PC or compatible computer
/**************************************************************************/
#include <stdio.h>
#include "decl.h"
char rd_str[80];
char dat_str[80];
int bd,adr;
main() {
adr = ibfind("DEV6");
bd = ibfind ("GPIB0");
ibsic (bd);
ibsre(bd,1);
strcpy(dat_str,"VOLT 5;CURR 1");
strcat(dat_str,"\r\n");
ibwrt(adr,dat_str,strlen(dat_str));
strcpy(dat_str,"MEAS:VOLT?;CURR?");
strcat(dat_str,"\r\n");
ibwrt(adr,dat_str,strlen(dat_str));
strset(rd_str,'\0');
ibrd(adr,rd_str,64);
printf("received : %s\n",rd_str);
}
FIGURE 3-21.
TYPICAL EXAMPLE OF BOP POWER SUPPLY PROGRAM USING SCPI COMMANDS
BOP HIPWR 080709
*/
// Input buffer
// Output buffer
// Open DEV6 (defined by IBCONF)
// Open GPIB card
// Send Interface Clear
// Set remote line true
// Define a set command
// Append delimiter
// Send string to power supply
// Define a measure command
// Append delimiter
// Send string to power supply
// Clear input buffer
// Read result of measure
// Print voltage and current
3-63/(3-64 Blank)

Advertisement

Table of Contents
loading

Table of Contents