Agilent Technologies 8714ET Switch User Manual


 
LAN Interface Supplement 6-25
Controlling the Analyzer via the LAN
IBASIC Communication across the LAN
100 !
110 ! This program demonstrates how IBASIC can communicate
120 ! with a remote computer via LAN. This is done using a
130 ! SCPI command that sends a LAN message to the computer:
140 ! DIAG:COMM:LAN:SEND '15.4.40.49',8003,'Ready!'
150 ! 8003 is an arbitrary unused port number.
160 !
170 DIM Cmd$[256]
180 DIM Msg$[128]
190 DIM Snum$[16]
200 !
210 ! Initialize the instrument
220 !
230 ASSIGN @Na TO 800
240 OUTPUT @Na;"SYST:PRES;*WAI"
250 OUTPUT @Na;"SENS1:STAT ON; *WAI"
260 OUTPUT @Na;"POW1:MODE FIXed" ! Freq sweep
270 OUTPUT @Na;"DISP:ANN:FREQ1:MODE CSPAN"
280 OUTPUT @Na;"SENS1:FREQ:CENT 177e6;SPAN 200e6;*WAI"
290 ! Put sweep in hold
300 OUTPUT @Na;"ABOR;:INIT1:CONT OFF;*WAI"
310 ! Sync up with analyzer
320 OUTPUT @Na;"*OPC?"
330 ENTER @Na;Opc
340 !
350 !
360 ! Get serial number
370 OUTPUT @Na;"DIAG:SNUM?"
380 ENTER @Na;Snum$
390 Snum$=Snum$[2,11] ! remove quotes
400 !
410 ! Begin infinite loop:
420 ! - Take sweep
430 ! - Compute bandwidth
440 ! - Send signal to computer