Programming Examples
The examples in this section demonstrate how to program a relay and FET
multiplexer switchbox at the register level. The examples include:
•
Reading the ID Register
•
Reading the Device Type Register
•
Resetting the Switchbox
•
Measuring the Bridge Excitation Voltage
•
FET Multiplexer Scanning
The programs assume the A16 address space is inside the HP E1300A/
E1301A mainframe, HP E1405/E1406 Command Module and that the
logical address of the switchbox is 112. The programs are written in
Hewlett-Packard BASIC, and use the SCPI commands
DIAGnostic:PEEK?
and
DIAGnostic:POKE
to read and write to the registers.
Reading the ID
Register
As previously mentioned, the ID Register indicates the classification,
addressing mode, and manufacturer of the device. This program reads the
ID Register and returns FFFF
16
.
!Convert the switchbox base address to decimal and store the value in a variable.
COM Base_addr
Base_addr=DVAL("1FDC00",16)
!Call the subroutine which reads the ID Register.
CALL Peek_id
END
!Subroutine to read the ID Register.
SUB Peek_id
COM Base_addr
OUTPUT 70900;"DIAG:PEEK?";Ba0;",16"
ENTER 70900;Register
Hex$=IVAL$(Register,16)
PRINT Hex$
SUBEND
This program returns
FFFF
.
Appendix D
Strain Gage Register-Based Programming 133
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com