beautypg.com

KEPCO BHK-MG 200W (Full Rack) Series User Manual

Page 75

background image

BHK-MG (OPR) 022014

3-31

FIGURE 3-6. TYPICAL EXAMPLE OF BHK-MG POWER SUPPLY PROGRAM USING SCPI COMMANDS

3.6

REMOTE PROGRAMMING USING ANALOG PROGRAMMING TERMINALS

The BHK-MG power supply is designed with separate, but similar, circuits for analog voltage
programming (Figure 3-7) and analog current programming (Figure 3-8). The voltage program-
ming circuit is used for programming output voltage if the unit is in voltage mode, or voltage limit
if the unit is in current mode. Similarly, the current programming circuit programs output current
in current mode, and current limit in voltage mode.

For each circuit, the digital programming section provides a voltage (DP (V) for voltage, DP (C)
for current), between zero and -10V d-c, applied to the input of a summing and correction ampli-
fier. This amplifier drives, in turn, the voltage error amplifier and the pass element to produce the
output. Each circuit also includes an uncommitted amplifier which can be configured to be
summed with the output of the digital programming section at the input of the summing and cor-
rection amplifier. Configuration of the uncommitted amplifiers is accomplished at the ANALOG
PROGRAMMING TERMINALS at the rear panel: VOLTAGE PROG. terminal strip TB2 for volt-
age, CURRENT PROG. terminal strip TB3 for current.

/**************************************************************************/

/* Sample Program For KEPCO power supply, using National Instruments */

/* GPIB interface card and IBM PC or compatible computer */

/**************************************************************************/

#include

#include "decl.h"

char rd_str[80];

// Input buffer

char dat_str[80];

// Output buffer

int bd,adr;

main() {

adr = ibfind("DEV6");

// Open DEV6 (defined by IBCONF)

bd = ibfind ("GPIB0");

// Open GPIB card

ibsic (bd);

// Send Interface Clear

ibsre(bd,1);

// Set remote line true

strcpy(dat_str,"VOLT 5;CURR 1");

// Define a set command

strcat(dat_str,"\r\n");

// Append delimiter

ibwrt(adr,dat_str,strlen(dat_str));

// Send string to power supply

strcpy(dat_str,"MEAS:VOLT?;CURR?");

// Define a measure command

strcat(dat_str,"\r\n");

// Append delimiter

ibwrt(adr,dat_str,strlen(dat_str));

// Send string to power supply

strset(rd_str,'\0');

// Clear input buffer

ibrd(adr,rd_str,64);

// Read result of measure

printf("received : %s\n",rd_str);

// Print voltage and current

}