Programmer’s Guide 4-7
Data Types and Encoding
Data Encoding for Large Data Transfers
ASCII Encoding
The ANSI X3.4-1977 standard defines the ASCII 7-bit code. When an
ASCII-encoded byte is sent over the GPIB, bits 0 through 6 of the byte
(bit 0 being the least significant bit) correspond to the GPIB data lines
DIO1 through DIO7. DIO8 is ignored.
When ASCII encoding is used for large blocks of data, the number of
significant digits to be returned for each number in the block can be
specified. For example, the following command returns all numbers as
NR3 data with 7 significant digits.
FORMat:DATA ASCii,7
Binary Encoding
When binary encoding is used for large blocks of data, all numbers in the
block are transferred as 32-bit or 64-bit binary floating point numbers or
as an array of 16-bit integers. The binary floating-point formats are
defined in the IEEE 754-1985 standard.
FORMat:DATA REAL,32 selects the IEEE 32-bit format (not
supported by IBASIC or HP BASIC)
FORMat:DATA REAL,64 selects the IEEE 64-bit format.
FORMat:DATA INTeger,16 selects the 16-bit integer format.
Byte Swapping
PC compatibles frequently use a modification of the IEEE floating point
formats with the byte order reversed. To reverse the byte order for data
transfer into a PC, the FORMat:BORDer command should be used.
FORMat:BORDer SWAPped selects the byte-swapped format
FORMat:BORDer NORMal selects the standard format