Click or drag to resize

Reading and Writing IEEE 488.2 Binary Block Data

Numeric arrays (integer and floating-point) can be sent to the device as standard IEEE 488.2 binary blocks. Correspondingly, binary block data can be read from the device and stored in a numeric array output parameter. With the exception of indefinite blocks not being supported for output parameters (reading from the instrument), the format specification presented in this topic is the same for input and output numeric arrays.

Numeric arrays used as input parameters require a format specification of the following general form to read or write IEEE 488.2 binary block data.

%[b | B]

Modifier

Interpretation

b

Data is sent (or read) as an IEEE 488.2 definite-length binary block.

B

Data is sent as an IEEE 488.2 indefinite-length binary block.

Not valid when reading data (output parameters).

Examples: Numeric Array as IEEE 488.2 Binary Block

Parameter Tag

Interpretation

{AmplitudeArray:%b}

Data is sent (or read) as a definite-length binary block.

{AmplitudeArray:%B}

Data is sent as an indefinite-length binary block in IEEE 754 format.

A terminating linefeed character (\n) is sent after the last byte of the block.

Not valid for read operations.

See Also

Download a complete CHM version of this documentation here.