Numeric Base; Numeric Variables - HP 1650B Programming Reference Manual

Logic analyzers
Table of Contents

Advertisement

Numeric Base

Numeric Variables

Introduction to Programming an Instrument
The following example shows logic analyzer data being returned to a
string variable with headers off:
10
OUTPUT
XXX;":SYSTEM:HEAOER
20 DIM Rang$[30]
30 OUTPUT XXX;" :MACHINEl:TWAVEFORM:RANGE?"
40 ENTER XXX;Rang$
50 PRINT Rangf
60 END
After running this program, the controller displays:
+ l.OOOOOE-05
Most numeric data will be returned in the same base as shown on screen.
When the prefix #B precedes the returned data, the value is in the binary
base. Likewise, #Q is the octal base and #H is the hexadecimal base. If
no prefer precedes the returned numeric data, then the value is in the
decimal base.
If your host language can convert from ASCII to a numeric format, then
you can use numeric variables. Turning off the response headers will help
you avoid accidently trying to convert the header into a number.
The following example shows logic analyzer data being returned to a
numeric variable.
10
OUTPUT
XXX;":SYSTEM:HEAOER
20 OUTPUT XXX;" :MACHINEl:TWAVEFORM:RANGE?"
30 ENTER XXX;Rang
40 PRINT Rang
50 END
This time the format of the number (such as whether or not exponential
notation is used) is dependant upon your host language. In BASIC, the
output would look like:
OFF"
OFF"
HP 1650B/HP 16518
Programming Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

1651b

Table of Contents