Reading The Query Response Register - HP E1326B User Manual

5 1/2 digit multimeter
Table of Contents

Advertisement

Reading the Query
Response Register
HP BASIC/WS Version
226
HP E1326B/E1411B Multimeter Register-Based Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
The following program sets the multimeter function to (2-wire) OHMS, and
then queries the function and reads it from the Query Response Register.
The number "2" is returned.
10
! Map the A16 address space in the HP V/382 and store the multimeter base
20
! address in a variable.
30
CONTROL 16,25;2
40
COM Base_addr
50
Base_addr=DVAL("C600",16)
60
! Call the subprogram which sets and queries the multimeter function.
70
CALL Func_qry
80
END
90
! This subprogram checks each bit in the multimeter Status register.
100
! The subprogram is called by subprograms Wait_not_bsy and Qry_ready
110
! to determine when a command and parameter can be written to the
120
! Command and Parameter registers, and when data is in the Query
130
! Response register.
140
SUB Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
150
COM Base_addr
160
Status=READIO(-16,Base_addr+4)
170
Rdy=BIT(Status,0)
180
Done=BIT(Status,7) AND Rdy
190
Indardy=BIT(Status,4) AND Done
200
Qryrdy=BIT(Status,1) AND Done
210
Noerr=NOT (NOT (BIT(Status,6)) AND Done)
220
Pass_fail=BIT(Status,2)
230
SUBEND
240
! This subprogram calls Read_status to check status bit 0 to determine
250
! when a command or parameter can be sent.
260
SUB Wait_not_bsy
270
REPEAT
280
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
290
UNTIL Rdy
300
SUBEND
310
! This subprogram calls Read_status to check status bit 1 to determine
320
! when data is in the Query Response register.
330
SUB Qry_ready
340
REPEAT
350
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
360
UNTIL Qryrdy
370
SUBEND
Continued on Next Page
Appendix C

Advertisement

Table of Contents
loading

This manual is also suitable for:

E1411b

Table of Contents