Other topics about Reading-Writing Measurement Data
When you transfer data using the one of the following commands, you can choose among ASCII transfer format, IEEE 64-bit floating point binary transfer format and IEEE 32-bit floating point binary transfer format.
The instrument always uses the ASCII transfer format when you transfer data without using any of the following commands:
:CALC{1-160}:BLIM:REP?
:CALC{1-160}:DATA:FDAT
:CALC{1-160}:DATA:FMEM
:CALC{1-160}:DATA:SDAT
:CALC{1-160}:DATA:SMEM
:CALC{1-160}:FUNC:DATA?
:CALC{1-160}:LIM:DATA
:CALC{1-160}:LIM:REP?
:CALC{1-160}:LIM:REP:ALL?
:CALC{1-160}:RLIM:DATA
:CALC{1-160}:RLIM:REP?
:SENS{1-160}:CORR:COEF?
:SENS{1-160}:FREQ:DATA?
:SENS{1-160}:SEGM:DATA
:SOUR:POW:PORT:CORR:COLL:TABL:ASEN:DATA
:SOUR:POW:PORT:CORR:COLL:TABL:BSEN:DATA
:SOUR{1-160}:POW:PORT{1-4}:CORR:COLL:TABL:LOSS
:SOUR{1-160}:POW:PORT{1-4}:CORR:DATA
To set the data transfer format, use the following command:
:FORM:DATA
Executing the :SYST:PRES or *RST does not affect the current setting of the data transfer format.
When you select the ASCII transfer format as the data transfer format, numbers are transferred as ASCII bytes, each of which corresponds to one of the formats shown below. Note that numbers are separated from one another with a comma (,) in accordance with the IEEE 488.2 specification.
Numeric data strings vary in length. Keep this in mind when you extract some data from retrieved numeric data strings in your program.
The figure below shows this format. Numbers are expressed as integers. For example, 201 is expressed as "+201" or "201."
Integer format
The figure below shows this format. Numbers are expressed with floating points. For example, 1000 is expressed as "+1.00000000000E+003."
Floating-point number format
You can select the binary transfer format from the IEEE 64-bit floating point format or the IEEE 32-bit floating point format depending on the controller you use.
When you select the IEEE 64-bit floating point binary transfer format as the data transfer format, numbers are transferred in the format shown in the figure below.
Binary transfer format
This data transfer format uses a header that consists of a sharp character (#), a number of 6 (which indicates the byte size of the <number of bytes transferred> part), and the <number of bytes transferred> part in this order. The header is followed by the binary data (each number consists of 8 bytes and the total is the byte size indicated by <number of bytes transferred>) and the message terminator <new line>^END.
The binary data is expressed in the IEEE 754 64-bit floating-point number format shown in the figure below.
When you select the IEEE 32-bit floating point binary transfer format as the data transfer format, numbers are transferred in the format shown in the figure below.
IEEE 32-bit floating point binary transfer format
This data transfer format uses a header that consists of a sharp character (#), a number of 6 (which indicates the byte size of the <number of bytes transferred> part), and the <number of bytes transferred> part in this order. The header is followed by the binary data (each number consists of 4 bytes and the total is the byte size indicated by <number of bytes transferred>) and the message terminator <new line>^END.
The binary data is expressed in the IEEE 754 32-bit floating-point number format shown in the figure below.
When you opt to perform binary transfer, you can configure the instrument to transfer the bytes of the data in one of the following two byte orders:
Transfer begins with the byte that contains the MSB (Most Significant Bit); that is, the leftmost byte in 64 bit floating point format and 32 bit floating point data.
Transfer begins with the byte that contains the LSB (Least Significant Bit); that is, the rightmost byte in 64 bit floating point format and 32 bit floating point data.
To set the byte order, use the following command:
:FORM:BORD
Executing the :SYST:PRES or *RST does not affect the current setting of the byte order.