BOP HIPWR 031912
3-65
A zero to one transition of a condition register is added to the event register. Reading an event
register clears all of the bits found in the event register. If any bits are set in an event register,
the following condition register bit is then set. For example, if the STAT:QUES:ENB (enable)
register has bit 0 set and a voltage error is detected, the event registers bit 0 is set. The 1 in the
event register causes bit 3 of the status byte to be asserted. The Service Request register is
ANDed with its enable register for all bits except bit 6. The result is placed in bit 6 of the Service
Request register. If bit 6 is a 1 (true), it causes the power supply to assert the SRQ line to the
host controller.
Figure 3-20 also shows that if the error/event queue is not empty, bit 3 is set in the Service
Request register and bit 4 indicates that a message is available in the output buffer.
FIGURE 3-21. TYPICAL EXAMPLE OF BOP POWER SUPPLY PROGRAM USING SCPI COMMANDS
/**************************************************************************/
/* 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];
// 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
}
Содержание BOP-MG
Страница 2: ......
Страница 10: ......
Страница 20: ...x BOP 1K 031912 FIGURE 1 1 HIGH POWER BOP SERIES POWER SUPPLY...
Страница 37: ...BOP HIPWR 031912 1 17 FIGURE 1 3 BOP OUTPUT CHARACTERISTICS...
Страница 53: ...BOP HIPWR 031912 2 15 FIGURE 2 4 PARALLEL CONFIGURATION LOCAL SENSING TYPICAL...
Страница 54: ...2 16 BOP HIPWR 031912 FIGURE 2 5 PARALLEL CONFIGURATION REMOTE SENSING TYPICAL...
Страница 64: ......
Страница 132: ......
Страница 192: ......