Communicating With An External Controller - Agilent Technologies 4294A Programming Manual

Precision impedance analyzer
Hide thumbs Also See for 4294A:
Table of Contents

Advertisement

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
Line 30
Line 40
Lines 50 to 60
Lines 90 to 130
Line 160
Line 190
Example 11-1
Transferring a program to Instrument BASIC
10
20
30
40
50
60
70
80
90
100
110
120
130
140 Done:
150
160
170
180
190
200
150
This line resets GPIB bus and returns the control priority to the system
controller.
This line sets the GPIB address.
This line receives a user-entered file name of a program to transfer.
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).
These lines read program lines, one by one, and transfer them.
This line sends the signal of end of transmission (<LF>+EOI).
This line executes the program transferred.
DIM File_name$[20],Line$[1024]
ABORT 7
ASSIGN @Hp4294a TO 717
INPUT "FILENAME?",File_name$
OUTPUT @Hp4294a;"PROG:DEL:ALL"
OUTPUT @Hp4294a;"PROG:DEF #0"
ASSIGN @File TO File_name$
ON ERROR GOTO Done
LOOP
Line$=""
ENTER @File USING "K";Line$
OUTPUT @Hp4294a;Line$
END LOOP
!
OFF ERROR
OUTPUT @Hp4294a;" ",END
ASSIGN @File TO *
!
OUTPUT @Hp4294a;"PROG:EXEC ""RUN"""
END
Chapter 11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents