HP IBASIC Supplement 8-25
Interfacing with External Devices
Interfacing with an External Controller
Setting and Querying Variables
Another means of transferring data between an internal and an external
program involves the ability to set and query internal program variables
from an external program. The “PROGram[:SELected]:NUMBer” and
“PROGram[:SELected]:STRing” mnemonics (and their query
counterparts) are analyzer GPIB commands. The internal program must
not be running when these commands are executed.
The command
PROG:NUMB <string>, <value>
sets the value of a numeric variable in the program. The command
PROG:STR <string>, <value>
sets the value of a string variable in the program. In both the
PROG:NUMB and PROG:STR commands and queries, <string> is the
variable name and must be string data (in quotes). In the PROG:STR
command, <value> is also string data (in quotes).
Numeric and string parameters can also be queried. The query
PROG:NUMBer? <string>
returns the value of the specified numeric variable.
Arrays of REAL or INTEGER type may be sent or queried but arrays of
strings are not allowed. Array elements are separated by commas.
Examples
OUTPUT 716;”PROG:NUMBER 'Test',99”
OUTPUT @Ibasic;”PROG:STRING 'A$','String Data'”
OUTPUT 716;”PROG:NUMB? 'Iarray(*)'”