Click or drag to resize

Reading and Writing Raw Binary Data

Integer arrays can be sent to the device as stream of raw binary data. Correspondingly, raw binary data can be read from the device and stored in an integer array output parameter. The format specification presented in this topic is the same for input and output integer arrays.

Note Note

Only integer array data can be read or written as raw binary. Floating-point array parameters cannot be read or written directly as raw binary data. However, floating-point array parameters can be read or written as IEEE 488.2 binary blocks. For more information, see the topic Reading and Writing IEEE 488.2 Binary Block Data.

Integer arrays used as input parameters require a format specification of the following general form to read or write raw binary data.

%[!ob | !ol] y

Modifier

Interpretation

!ob

Data is sent in big endian format. This is the default behavior if neither !ob nor !ol is present. Byte-swapping is automatically performed on all elements in the array argument.

!ol

Data is sent in little endian format.

Examples: Integer Array as Raw Binary

Parameter Tag

Interpretation

{AmplitudeArray:%y}

Data is sent as raw binary in big endian format.

{AmplitudeArray:%!oly}

Data is sent as raw binary in little endian format.

See Also

Download a complete CHM version of this documentation here.