6
Example 1 - Checking Communication
Function
This program sends a queries
, and displays the reply.
Listing
10 !-------------------------------
20 !
30 ! HP 8167A/8D/8E/8F Programming Example 1
40 !
50 ! A Simple Communications Check
60 !
70 !-------------------------------
80 !
90 ! Definitions and initializations
100 !
110 Tls=724
This statement sets the address of the tunable laser source. The rst 7 is to access the HP-IB card in the
controller, the 24 is the HP-IB address of the tunable laser source
120 DIM String$[50]
130 !
140 CLEAR SCREEN
150 PRINT TABXY(5,10);"Programming Example 1, Simple Communications"
160 !
170 ! Send an IDN query to the TLS and get the TLS Identification
180 !
190 OUTPUT Tls;"*IDN?"
200 ENTER Tls;String$
210 PRINT TABXY(10,12);"Identification : ";String$
The *IDN? query gets the identication of the tunable laser source.
220 !
230 END
6-2 Programming Examples