Agilent Technologies HP 16500B Manual page 32

Logic analysis system
Hide thumbs Also See for HP 16500B:
Table of Contents

Advertisement

String Variables
Because there are so many ways to code numbers, the HP 16500B Logic
Analysis System 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 system, such as, including the headers with a query
response.
Example
This example combines variables and constants in order to make it easier to
switch from MACHINE1 to MACHINE2 in slot 3. In BASIC, the & operator is
used for string concatenation.
10 LET Machine$ = ":SELECT 3:MACHINE2"
!slot 3
20 OUTPUT XXX; Machine$ & ":TYPE STATE" !Make machine a state analyzer
30
! Assign all labels to be positive
40 OUTPUT XXX; Machine$ & ":SFORMAT:LABEL 'CHAN 1', POS"
50 OUTPUT XXX; Machine$ & ":SFORMAT:LABEL 'CHAN 2', POS"
60 OUTPUT XXX; Machine$ & ":SFORMAT:LABEL '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.
Example
This command line places the output of the query in the string variable
Result$.
ENTER XXX;Result$
In the language used for this guide (HP BASIC 6.2), string variables are case-
sensitive and must be expressed exactly the same each time they are used.
The output of the system may be numeric or character data depending on
what is queried. Refer to the specific commands, in Part 2 of this guide, for
the formats and types of data returned from queries.
Artisan Scientific - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisan-scientific.com
Introduction to Programming
!Send all instructions to machine 2 in
String Variables
1–19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 16501a

Table of Contents