HP Sander 16500C manual Numeric Base, Numeric Variables

Models: Sander 16500C

1 252
Download 252 pages 12.2 Kb
Page 34
Image 34

Example

Introduction to Programming

Numeric Base

The following example shows logic analyzer module data being returned to a string variable with headers off:

10 OUTPUT XXX;":SYSTEM:HEADER OFF"

20 DIM Rang$[30]

30 OUTPUT XXX;":SELECT 2:MACHINE1:TWAVEFORM:RANGE?"

40ENTER XXX;Rang$

50PRINT Rang$

60END

After running this program, the controller displays: +1.00000E-05

Numeric Base

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 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 accidentally trying to convert the header into a number.

1–20

Page 34
Image 34
HP Sander 16500C manual Numeric Base, Numeric Variables