To Read And Store Calibration Data (Quickbasic) - HP 53131A/132A 225 MHz Programming Manual

225 mhz universal counter
Table of Contents

Advertisement

'Before calibrating the counter, it is a good idea to read
'and store the current calibration values in case something goes wrong with
'the calibration.
'This program reads the cal values, and stores them in a file on the computer
'hard drive. It then reads the data from the file and sends it back to
'the counter.
'The SUB sendhp sends commands to the counter
DECLARE SUB sendhp (code$)
REM $INCLUDE: 'QBSETUP.BAS'
DIM SHARED source AS LONG
DIM CALDATA AS STRING * 61
source& = 703
isc& = 7
state% = 1
CLS 0
CALL IOEOI(isc&, state%)
CALL IOCLEAR(source&)
CALL sendhp("*RST")
CALL sendhp("*CLS")
CALL sendhp("*SRE 0")
CALL sendhp("*ESE 0")
CALL sendhp(":STAT:PRES")
PRINT "Reading Calibration Data"
CALL sendhp(":CAL:DATA?")
CALL ioenters(source&, CALDATA, 61, actf%)
OPEN "CALDATA.DAT" FOR BINARY AS #1
PUT #1, 1, CALDATA
CLOSE #1
'The following lines show how to open a file with calibration data
'and send it back to the counter.
PRINT
PRINT "Sending calibration data to counter"
OPEN "CALDATA.DAT" FOR BINARY AS #1
GET #1, 1, CALDATA
CLOSE #1
CALL sendhp(":CAL:DATA " + CALDATA)
END
SUB sendhp (code$)
CALL iooutputs(source, code$, LEN(code$))
END SUB
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands

To Read and Store Calibration Data (QuickBASIC)

'Make sure EOI enabled
'Clear the counter and interface
'Reset HP counter
'Clear event registers and error queue
'Clear service request enable register
'Clear event status enable register
'Preset enable registers and transition
'filters for operation and questionable
'status structures.
Programming Guide
'Required by HP 82335A
'Address and select code
'Strings to be read
'Counter at address 3
'Select code 7
'Read the ASCII characters
'Store the cal data in a file
'Send the data just read to counter
3-85

Advertisement

Table of Contents
loading

This manual is also suitable for:

53131a53132a

Table of Contents