Basic Example Program - Agilent Technologies Agilent 3499A User Manual

Switch/control system
Hide thumbs Also See for Agilent 3499A:
Table of Contents

Advertisement

Note
8
Chapter 8 Application Programs

BASIC Example Program

BASIC Example Program
Sample programs in this section are written in BASIC 6.0 and have been
tested on a UNIX workstation.
Requirements:
GPIB interface selected and set to the address of 09 from the front-
panel;
Any one of the relay modules installed in Slot 1 of the mainframe;
A GPIB interface card installed in your UNIX workstation.
Either GPIB or RS-232 interface can be used in SCPI mode. However, we
only provide and test the BASIC program examples over the GPIB
interface.
10
! EXAMPLE.BAS: TEST 3499A/B/C IN SCPI MODE
20
DIM Retstr$[128]! String returned from the instrument.
30
OUTPUT 709; "SYSMODE SCPI"! Set 3499A/B/C to SCPI mode.
40
WAIT 4! Wait 4 seconds.
50
OUTPUT 709; "*RST"! Reset 3499A/B/C.
60
WAIT 4! Wait 4 second.
70
OUTPUT 709; "CLOSE (@100:103)"! Close channels 100 through 103.
80
OUTPUT 709; "OPEN (@100:103)"! Open channels 100 through 103.
100 ! LINES 150 TO 200 SET UP A TIMER CONTROLLED SCANNING.
110 ! 3499A/B/C SCAN SWEEP CHANNELS 100 THROUGH 139 TWO TIMES.
120 ! THE CHANNELS ARE SCANNED CONTINUOUSLY.
130 ! THE SECOND SCAN SWEEP STARTS 1 SECOND AFTER THE START
140 ! OF THE FIRST SCAN SWEEP.
150 OUTPUT 709; "SCAN (@100:103)"! Create a scan list.
160 OUTPUT 709; "ARM:SOUR TIMER"! Set arm source to timer.
170 OUTPUT 709; "ARM:TIMER 1"! Interval time between two scan sweeps
180 OUTPUT 709; "ARM:COUNT 2"! Set scan sweep 2 times.
190 OUTPUT 709; "TRIG:SOUR IMM"! Set trigger source to IMM (default).
200 OUTPUT 709; "CHAN:DELAY 0, (@100:103)"! Set channel delay time
210 OUTPUT 709; "INIT"! Start scanning
220 OUTPUT 709; "*OPC?"! Wait until scan finishes.
230 ENTER 709; Retstr$
240 Done: END
298
! is 1 second.
!to 0 (default).

Advertisement

Table of Contents
loading

This manual is also suitable for:

Agilent 3499cAgilent 3499b

Table of Contents