User`s manual

Do Binary Transfers to
the Computer
REAL 32 is fastest and is compatible with compiled languages.
REAL 64 is fast and is compatible with HP BASIC.
The default data format between the multimeter and the computer is ASCII.
This format is not efficient because the multimeter’s internal format is
32-bit REAL. Thus, the multimeter must convert its 32-bit REAL number
to ASCII, and then the computer must convert the ASCII number to its
internal format which is either 32- or 64-bit REAL.
A REAL number in HP BASIC is a 64-bit REAL. In the C language,
variable type "float" is a 32-bit REAL number, and variable type "double"
is a 64-bit REAL number.
When an instrument has been programmed to output its readings in either
REAL 32 or REAL 64 format, an ANSI/IEEE Standard 488.2-1987 definite
length arbitrary block header precedes the binary data. In the header format
#, <non-zero digit>, <digits>, and <8-bit data byte> :
# indicates the data is in an arbitrary block
<non-zero digit> is a single digit number which shows the number
of digits contained in "digits". For example, if the "digits" value is
100 or 2000, the "non-zero digit" value is 3 or 4, respectively.
<digits> is the number of 8-bit data bytes which follow the header.
<8-bit data byte> are the multimeter readings. For the PACKed
format, each reading is two bytes. For the REAL 64 format, each
reading is eight bytes.
Following the last reading in each block is the line feed (LF) character. The
line feed must be read from the buffer to prevent Error -410 “Query
Interrupted” occurs the next time data is read from the multimeter.
Here is a program which demonstrates the speed
differences.$ISpeed;differences This program was run on a BASIC
language co-processor. Note the actual program output at the end.
10 !re-save "DMM_FMTS"
20 !This main line code is reserved as a error handling shell.
30 !
All application code must be at lower level context.
40 !
Define I/O paths.
50 ASSIGN @Sys TO 70900
60 ASSIGN @Dmm TO 70903
70 ASSIGN @Dmm_bin TO 70903;FORMAT OFF
80 COM @Sys,@Dmm,@Dmm_bin
90 !
Turn TIMEOUTS to errors--this branch never taken.
100 ON TIMEOUT 7,3 GOTO End
110 !
This handles timeouts and errors not handled at lower level contexts.
120 ON ERROR RECOVER Kaboom
130 !
Put application code in this sub.
140 Main
Continued on Next Page
Appendix D Measurement Speed and Accuracy Tradeoffs 271