C And Quickbasic Programs - HP E1340A User Manual

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

C and QuickBASIC
Programs
89
HP E1340A Sweeping and Frequency-Shift Keying
200
OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5V" !amplitude
210
OUTPUT @Afg;"INIT:IMM"
220
!
230
!Call subprogram which queries sweep parameters
240
CALL Query
250
!
260
WAIT .1
270
OFF INTR 8
280
END
290
!
300
SUB Query
310 Query: !Subprogram which queries sweep parameters
320
COM @Afg
330
OUTPUT @Afg;"SOUR:FREQ:STAR?"
340
ENTER @Afg;Sweep1$
350
OUTPUT @Afg;"SOUR:FREQ:STOP?"
360
ENTER @Afg;Sweep2$
370
OUTPUT @Afg;"SOUR:FREQ:CENT?"
380
ENTER @Afg;Sweep3$
390
OUTPUT @Afg;"SOUR:FREQ:SPAN?"
400
ENTER @Afg;Sweep4$
410
PRINT "START = ";Sweep1$,"STOP = ";Sweep2$
420
PRINT
430
PRINT "CENTER = ";Sweep3$,"SPAN = ";Sweep4$
440
SUBEND
450
!
460
SUB Rst
530
SUB Errmsg
The start, stop, center, and span values returned are:
START = +1.000000000E+003
CENTER = +1.100000000E+004
The C program SMPLSWP2.C is in directory "CPROG" , and the
QuickBASIC program SMPLSWP2.BAS is in directory "QBPROG" on
the example program disk HP P/N E1340-10036.
!wait-for-arm state
!allow interrupt to be serviced
STOP = +2.100000000E+004
SPAN = +2.000000000E+004
Chapter 4

Advertisement

Table of Contents
loading

Table of Contents