
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
Содержание 4294A
Страница 4: ...4 ...
Страница 18: ...18 Contents ...
Страница 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Страница 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Страница 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Страница 130: ...130 Chapter9 Communication with External Equipment Using the I O Ports Sample Program to Use the I O Port ...
Страница 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Страница 246: ...246 13 Application Sample Programs File Transfer Function ...
Страница 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Страница 507: ...Index Index 507 Index ...
Страница 508: ...508 Index Index ...
Страница 509: ...Index Index 509 Index ...
Страница 510: ...510 Index Index ...
Страница 511: ...Index Index 511 Index ...
Страница 512: ...512 Index Index ...
Страница 513: ...Index Index 513 Index ...
Страница 514: ...514 Index Index ...
Страница 515: ...Index Index 515 Index ...
Страница 516: ...516 Index Index ...
Страница 517: ...Index Index 517 Index ...
Страница 518: ...518 Index Index ...