
150
Chapter 11
Using HP Instrument BASIC
Pass Control Involved with an External Controller
Communicating with an external controller
Example 11-1 shows an example of communication between an external controller and the
4294A Instrument BASIC. This example shows a program executable only on the external
controller. It is given a file name prg_xfer.bas and is stored in the sample program disk.
This program transfers a program file saved in the external controller's storage unit (hard
disk or the like) and executes the file.
Line 20
This line resets GPIB bus and returns the control priority to the system
controller.
Line 30
This line sets the GPIB address.
Line 40
This line receives a user-entered file name of a program to transfer.
Lines 50 to 60
These lines delete existing programs held in Instrument BASIC, then
transfer the header (the header that indicates that the size data portion
hasn't been defined).
Lines 90 to 130
These lines read program lines, one by one, and transfer them.
Line 160
This line sends the signal of end of transmission (<LF>+EOI).
Line 190
This line executes the program transferred.
Example 11-1
Transferring a program to Instrument BASIC
10 DIM File_name$[20],Line$[1024]
20 ABORT 7
30 ASSIGN @Hp4294a TO 717
40 INPUT "FILENAME?",File_name$
50 OUTPUT @Hp4294a;"PROG:DEL:ALL"
60 OUTPUT @Hp4294a;"PROG:DEF #0"
70 ASSIGN @File TO File_name$
80 ON ERROR GOTO Done
90 LOOP
100 Line$=""
110 ENTER @File USING "K";Line$
120 OUTPUT @Hp4294a;Line$
130 END LOOP
140 Done: !
150 OFF ERROR
160 OUTPUT @Hp4294a;" ",END
170 ASSIGN @File TO *
180 !
190 OUTPUT @Hp4294a;"PROG:EXEC ""RUN"""
200 END
Summary of Contents for 4294A
Page 4: ...4 ...
Page 18: ...18 Contents ...
Page 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Page 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Page 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Page 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Page 246: ...246 13 Application Sample Programs File Transfer Function ...
Page 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Page 507: ...Index Index 507 Index ...
Page 508: ...508 Index Index ...
Page 509: ...Index Index 509 Index ...
Page 510: ...510 Index Index ...
Page 511: ...Index Index 511 Index ...
Page 512: ...512 Index Index ...
Page 513: ...Index Index 513 Index ...
Page 514: ...514 Index Index ...
Page 515: ...Index Index 515 Index ...
Page 516: ...516 Index Index ...
Page 517: ...Index Index 517 Index ...
Page 518: ...518 Index Index ...