Application Programs
6
Keysight E3633A and E3634A User’s Guide
173
void main()
{
double voltage;
/* Value of voltage sent to power supply
*/
char Buffer[256];
/* String returned from power supply
*/
double current;
/* Value of current output of power supply
*/
OpenPort();
/* Query the power supply id, read response and print it */
sprintf(Buffer,"*IDN?");
SendSCPI(Buffer);
printf("Instrument identification string:\n
%s\n\n",Buffer);
SendSCPI("*RST");
/* Set power-on condition
*/
SendSCPI("Current 2");
/* Set current limit to 2A
*/
SendSCPI("Output on");
/* Turn output on
*/
printf("Voltage Current\n\n"); /* Print heading */
/*Step from 0.6 to 0.8 volt in 0.02 steps */
for(voltage = 0.6; voltage <=0.8001; v=0.02)
{
printf("%.3f",voltage); /* Display diode voltage
*/
/* Set output voltage */
ErrorStatus = viPrintf(power_supply,"Volt %f\n",voltage);
if(!bGPIB)
delay(500);/* 500 msec wating for RS-232 port*/
CheckError("Unable to set voltage");
/* Measure output current */
ErrorStatus = viPrintf(power_supply,"Measure:Current?\n");
CheckError("Unable to write device");
delay(500);
/* Allow output to wait for 500 msec */
/* Retrieve reading */
ErrorStatus = viScanf(power_supply,"%lf",¤t);
CheckError("Unable to read voltage");
printf("%6.4f\n",current); /* Display diode current */
}
SendSCPI("Output off"); /* Turn output off */
ClosePort()
}
/* Build the address required to open communication with GPIB card or RS-232.*/
/* The address format looks like this: "GPIB0::5::INSTR".
*/
/* To use the RS-232 interface using COM1 port, change it to "ASRL1::INSTR" */
/* address format
*/
Continued on next page
Содержание E3633A
Страница 1: ...Keysight E3633A and E3634A DC Power Supplies User s Guide ...
Страница 10: ...10 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Страница 18: ...18 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Страница 20: ...20 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Страница 133: ...Remote Interface Reference 4 Keysight E3633A and E3634A User s Guide 133 SCPI Status System ...
Страница 166: ...5 Error Messages 166 Keysight E3633A and E3634A User s Guide 631 System DAC test failed 632 Hardware test failed ...
Страница 170: ...5 Error Messages 170 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...
Страница 204: ...8 Specifications 204 Keysight E3633A and E3634A User s Guide THIS PAGE HAS BEEN INTENTIONALLY LEFT BLANK ...