Keysight E4428C ESG RF Programming Manual page 165

Signal generators
Table of Contents

Advertisement

120
INTEGER Num
130
DIM Str$[200],Str1$[20]
140
CONTROL 9,0;1
150
CONTROL 9,3;9600
160
STATUS 9,4;Stat
170
Num=BINAND(Stat,7)
180
CONTROL 9,4;Num
190
OUTPUT 9;"*IDN?"
200
ENTER 9;Str$
210
WAIT 2
220
PRINT "ID =",Str$
230
OUTPUT 9;"POW:AMPL -5 dbm" ! Sets the the power level to -5 dbm
240
OUTPUT 9;"POW?"
250
ENTER 9;Str1$
260
PRINT "Power = ",Str1$
270
END
Keysight Signal Generators Programming Guide
! Resets the RS-232 interface
! Sets the baud rate to match signal generator rate
! Reads the value of register 4
! Gets the AND value
! Sets the parity to NONE
! Querys the sig gen ID
! Reads the ID
! Waits 2 seconds
! Prints ID to the screen
! Querys the power level of the sig gen
! Reads the queried value
! Prints the power level to the screen
! End the program
RS-232 Programming Interface Examples (ESG/PSG Only)
Programming Examples
157

Advertisement

Table of Contents
loading

Table of Contents