Programming Examples
I ntroduction
General Examples
Common Task
E x a m p l e s
Note
The following examples are an introduction to programming the
HP 8 1 1 2A using HP BASIC 5.0/5.1 for the HP 9000 Series 200/300
controllers. The examples cover the following subjects:
•
Testing communication with the HP 8 1 12A.
•
Performing the instrument self-test.
•
Using the
Buffer not Empty
Description
Program
D E L _ WID
Shows how to program and increment /decrement
some HP 8 1 1 2A parameters
SPOLL_2
Shows how to service a SRQ by directly
conducting a SPOLL
Shows how to service SRQ 's by using interrupts
INTR_2
and print the error bits which are set in the status
byte
ERROR_DEMO Demonstrates how to determine which error bits
are set in the status byte
LRN _DEMO
Shows how to read the Learn String with the
CST command and how to send it back to the
HP 8 1 1 2A
INTERROG
Demonstrates the usage of all types of interrogate
commands offered by the HP 81 12A
In the examples it is not strictly necessary to put the HP 8 1 12A into
remote mode using the REMOTE 712 command because:
•
The CLEAR 712 statement used to initialise the instrument also
selects remote mode.
•
The OUTPUT statement itself selects remote mode.
However, the REMOTE statement is included for completeness.
flag.
Programming Examples 7-1
7