Program Spoll_2 - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

Program SPOLL_2

Purpose
Important program lines
Comments
Note
7-1 O
Programming Examples
The main purpose of this program is to demonstrate how to service
an SRQ directly in the program. It also demonstrates how to:
initialize the interface of the HP 8 1 12A and set it to the standard
setting
clear the status byte
conduct a serial poll (SPOLL)
return the instrument to local mode
130
CLEAR 712
A = SPOLL (712)
170
210
OUTPUT 7 1 2 ; " XXX"
A = SPOLL ( 7 12)
270
PRINT "SPOLL = " ; A
280
3 1 0
LOCAL 7 1 2
Initialization section
The interface is initialized. The HP 8 1 12A is set to the Standard
Setting and the status byte is cleared
Main section
In the main section "XXX" is sent over the HP-IB to the instrument
(line 210) but it is not a valid command so it causes a syntax error
Since the instrument needs some time to parse "XXX" , the computer
should wait a sufficient amount of time before conducting the
following SPOLL (line 270). This is done by forcing the computer to
0 . 1 seconds ( line230).
for
wait
The HP 8 1 12A detects a syntax error and therefore sets the syntax
error bit of the Status Byte. As a result , bit 6 of STB is set and a
SRQ is generated. The result of the SPOLL printed in line 160 will
be value 68.
After every SPOLL the complete status byte is cleared. This means
the RQS bit is reset after the first SPOLL.
The status byte is updated after every command received by the
HP 8 1 12A
Initialize the HP 81 1 2A interface and
set it to the standard setting
Read the status byte to clear it
Case a syntax error
Conduct a serial poll
Print the result
Return the HP 81 1 2A b ack to local
mode

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents