Purpose; Comments; Program Spoll-2; Important Program Lines - 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-10 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 8112A 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
170
210
OUTPUT 712;"XXX"
270
PRINT "SPOLL=
280
310
LOCAL 712

Initialization section

The interface is initialized. The HP 8112A 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
wait for
0.1
seconds (line230).
The HP 8112A 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 8112A
Initialize the HP 8112A 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
;A
Return the HP 8112A back to local
mode

Advertisement

Table of Contents
loading

Table of Contents