.9 Sample Programs
The following sample programs are written in HP-BASIC, and assume that a
Hewlett Packard Series 300 microcomputer is being used as the controller for
the 3227. For detailed description of HP BASIC, refer to the Hewlett Packard
Series 300 user’s manual.
GP-IB commands in these sample programs are all written in their short
forms.
The address of the 3227 on the GP-IB bus is assumed to be 1.
(1) Querying the state of the 3227
Summary ・ This program resets the 3227.
・ This program queries the manufacturer’s name, the model name, and the
software version.
・ This program executes the self test, and queries that result.
Program List
100 ABORT 7
110 REMOTE 701
120 SEND 7;CMD 20
130 OUTPUT 701;"*RST"
140 OUTPUT 701;"*IDN?"
150 ENTER 701;A$
160 OUTPUT 701;*TST?"
170 ENTER 701;B$
180 PRINT A$, B$
190 END
Comments
100 Initialize the interface
110 Make the interface into remote state
120 Device clear (clear the input buffer and the output queue)
130 Initialize the 3227
140 Queries the manufacturer’s name, the model name, and the software
version
150 Get the device information
160 Execute the self test
170 Get the device information
180 Display the results
Output results
HIOKI,3227,0,V1.00 0
The programs from 100 to 130 initialize the GP-IB and the 3227. When the
occasion demands, they should be operated at the top of this program.