58 Remote Programming
SAMPLE PROGRAM FOR Agilent SAS USING THE AGILENT BASIC PROGRAMMING LANGUAGE
10!RE-STORE"SAS_DEMO"
20 !
30 ! This example program demonstrates how to:
40 ! 1) use the Agilent SAS in Fixed Mode
50 ! 2) use the Agilent SAS in Simulator Mode
60 ! 3) use the Agilent SAS in Table Mode
70 ! This program assumes the Agilent SAS is at GPIB address 5
80 !======================================================
90 ! Resetting the Agilent SAS
100 !======================================================
110 CLEAR 705
120 OUTPUT 705;"*RST;*CLS"
130 !
140 ! Turn on the output with 5V and 1A current limit
150 Display_msg("FIXED MODE")
160 OUTPUT 705;"VOLT 5;:CURR 1"
170 Output_on
180 !
190 ! Set up and trigger a voltage change
200 OUTPUT 705;"VOLT:TRIG 6" ! set trigger output level
210 OUTPUT 705;"INIT" ! *** initiate trigger system ***
220 WAIT 2
230 OUTPUT 705;"TRIG"
240 WAIT 2
250 !
260 Output_off
270 !
280 ! Output a Simulator curve
290 Display_msg("SAS MODE")
300 OUTPUT 705;"CURR:SAS:ISC 4;IMP 3;:VOLT:SAS:VMP 40;VOC 55"
310 OUTPUT 705;"CURR:MODE SAS" ! put in Simulator mode
320 Output_on
330 WAIT 2
340 ! change the current curve to an auto-parallel "Slave" curve
350 OUTPUT 705;"CURR:SAS:ISC 0;IMP 0"
360 WAIT 2
370 Output_off
380 !
390 ! Table mode
400 Display_msg("TABLE MODE")
410 !
420 OUTPUT 705;"MEM:TABL:SEL T1" ! create table T1
430 ! Download data points for table T1
440 OUTPUT 705;"MEM:TABL:VOLT 0, 5, 10, 40, 45, 50"
450 OUTPUT 705;"MEM:TABL:CURR 4, 3.8, 3.6, 3, 1, 0"
460 !
470 OUTPUT 705;"CURR:TABL:NAME T1" ! activate table T1
480 OUTPUT 705;"CURR:MODE TABLE" ! put in Table mode
490 Output_on
500 WAIT 2
510 ! change voltage offset
520 OUTPUT 705;"VOLT:TABL:OFFS -2.25"
530 WAIT 2
540 ! change current offset
550 OUTPUT 705;"CURR:TABL:OFFS -0.5"
560 WAIT 2
Figure 6-3. Programming Agilent SAS Functions