Example The following example shows logic analyzer data being returned to a string
variable with headers off:
10 OUTPUT XXX;":SYSTEM:HEADER OFF"
20 DIM Rang$[30 ]
30 OUTPUT XXX;":MACHINE1:TWAVEFORM:RANGE?"
40 ENTER XXX;Ra ng$
50 PRINT Rang$
60 END
After running this program, the controller displays: +1.00000E-05
Numeric Base
Most numeric data will be returned in the same base as shown onscreen.
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
prefix precedes the returned numeric data, then the value is in the decimal
base.
Numeric Variables
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.
Example The following example shows logic analyzer data being returned to a numeric
variable.
10 OUTPUT XXX;":SYSTEM:HEADER OFF"
20 OUTPUT XXX;":MACHINE1:TWAVEFORM:RANGE?"
30 ENTER XXX;Ra ng
40 PRINT Rang
50 END
Introduction to Programming
Numeric Base
1–19