
String Variables
Since there are so many ways to code numbers, the HP
handles almost all data as ASCII strings. Depending on your host
language, you may be able to use other types when reading in responses.
Sometimes it is helpful to use string variables in place of constants to send
instructions to the HP
The example below combines variables
and constants in order to make it easier to switch from MACHINE1 to
MACHINE2 In BASIC, the operator is used for string concatenation.
10 LET
=
all instructions to machine 2
20 OUTPUT XXX;
STATE"
machine a state analyzer
30
all labels to be positive
40 OUTPUT XXX;
POS"
50 OUTPUT XXX;
'CHAN 2'. POS"
60 OUTPUT XXX;
'OUT', POS"
99 END
If you want to observe the headers for queries, you must bring the
returned data into a string variable. Reading queries into string variables
requires little attention to formatting. For example:
ENTER
places the output of the query in the string variable
guage used for this book (HP BASIC
string variables are
case sensitive and must be expressed exactly the same each time they are
used.
HP
1651B
Programming Reference
The output of the instrument may be numeric or character data
depending on what is queried. Refer to the specific commands for the
formats and types of data returned from queries.
Introduction to Programming an Instrument
1-15
Содержание 1650B
Страница 2: ......
Страница 16: ......
Страница 40: ......
Страница 48: ......
Страница 58: ......
Страница 74: ......
Страница 76: ...System Commands 6 2 Figure 6 l System Commands Syntax Diagram HP 1650B HP 1651B Programming Reference ...
Страница 112: ......
Страница 128: ......
Страница 134: ......
Страница 160: ......
Страница 184: ... L h E I Figure 13 1 SLlSt Subsystem Syntax Diagram SLIST Subsystem 13 2 HP 165081HP Is5 B Programming Reference ...
Страница 185: ...Figure 13 l SLlSt Subsystem Syntax Diagram continued HP 1650B HP 16518 Programming Reference SLIST Subsystem 13 3 ...
Страница 210: ......
Страница 236: ......
Страница 282: ......
Страница 318: ......
Страница 336: ......
Страница 346: ......