Data

SCPI Command :

FORMat[:DATA]
Commands in total: 1
Subgroups: 0
Direct child commands: 1
class DataStruct[source]

Response structure. Fields:

  • 1 Format_Py: enums.DataFormat: ASCii | REAL,32 | REAL,64 | INT,8 | INT,16 | INT,32

    • ASCii: Data values are returned in ASCII format as a list of comma-separated values in floating point format. The length can be omitted. It is 0, which means that the instrument selects the number of digits to be returned. The query returns both values (ASC,0) .

    • REAL,32: Physical data in single precision, 32 bit floating point format. The data is stored as binary data (Definite Length Block Data according to IEEE 488.2) . Each waveform value is formatted in the 32-Bit IEEE 754 floating point format.The schema of the result string is as follows: #41024value1value2…value n, with:#4 = number of digits (= 4 in the example) of the following number1024 = number of following data bytes (= 1024 in the example) value = 4-byte floating point valuesFor large data (≥ 1 GB) , the result string starts with ‘#(data length) ‘. The number inside the parentheses indicates the real data length in bytes.

    • REAL,64: Double precision, 64 bit floating point format.

    • INT,8 | INT,16 | INT,32: Signed integer data with length 8 bit, 16 bit, or 32 bit.The result string has the same schema as the REAL format.For INT,16, you can set the byte order using the command.For digital channel data, math and histogram data, INT formats are not available.

  • 2 Length: int: ASCii | REAL,32 | REAL,64 | INT,8 | INT,16 | INT,32

    • ASCii: Data values are returned in ASCII format as a list of comma-separated values in floating point format. The length can be omitted. It is 0, which means that the instrument selects the number of digits to be returned. The query returns both values (ASC,0) .

    • REAL,32: Physical data in single precision, 32 bit floating point format. The data is stored as binary data (Definite Length Block Data according to IEEE 488.2) . Each waveform value is formatted in the 32-Bit IEEE 754 floating point format.The schema of the result string is as follows: #41024value1value2…value n, with:#4 = number of digits (= 4 in the example) of the following number1024 = number of following data bytes (= 1024 in the example) value = 4-byte floating point valuesFor large data (≥ 1 GB) , the result string starts with ‘#(data length) ‘. The number inside the parentheses indicates the real data length in bytes.

    • REAL,64: Double precision, 64 bit floating point format.

    • INT,8 | INT,16 | INT,32: Signed integer data with length 8 bit, 16 bit, or 32 bit.The result string has the same schema as the REAL format.For INT,16, you can set the byte order using the command.For digital channel data, math and histogram data, INT formats are not available.

get() DataStruct[source]
# FORMat[:DATA]
value: DataStruct = driver.formatPy.data.get()

Selects the data type that is used for transmission of data from analog channels, math and reference waveforms, and some measurement results from the instrument to the controlling computer. For INT and REAL formats, use method RsMxo.formatPy.border() to set the byte order. If you need physical data (e.g. in Volt or Ampere) for further analysis, use the floating point formats (REAL) for export. No data conversion is needed.

Returns:

structure: for return value, see the help for DataStruct structure arguments.

set(format_py: DataFormat = None, length: int = None) None[source]
# FORMat[:DATA]
driver.formatPy.data.set(format_py = enums.DataFormat.ASCii, length = 1)

Selects the data type that is used for transmission of data from analog channels, math and reference waveforms, and some measurement results from the instrument to the controlling computer. For INT and REAL formats, use method RsMxo.formatPy.border() to set the byte order. If you need physical data (e.g. in Volt or Ampere) for further analysis, use the floating point formats (REAL) for export. No data conversion is needed.

Parameters:
  • format_py

    ASCii | REAL,32 | REAL,64 | INT,8 | INT,16 | INT,32

    • ASCii: Data values are returned in ASCII format as a list of comma-separated values in floating point format. The length can be omitted. It is 0, which means that the instrument selects the number of digits to be returned. The query returns both values (ASC,0) .

    • REAL,32: Physical data in single precision, 32 bit floating point format. The data is stored as binary data (Definite Length Block Data according to IEEE 488.2) . Each waveform value is formatted in the 32-Bit IEEE 754 floating point format.The schema of the result string is as follows: #41024value1value2…value n, with:#4 = number of digits (= 4 in the example) of the following number1024 = number of following data bytes (= 1024 in the example) value = 4-byte floating point valuesFor large data (≥ 1 GB) , the result string starts with ‘#(data length) ‘. The number inside the parentheses indicates the real data length in bytes.

    • REAL,64: Double precision, 64 bit floating point format.

    • INT,8 | INT,16 | INT,32: Signed integer data with length 8 bit, 16 bit, or 32 bit.The result string has the same schema as the REAL format.For INT,16, you can set the byte order using the command.For digital channel data, math and histogram data, INT formats are not available.

  • length

    ASCii | REAL,32 | REAL,64 | INT,8 | INT,16 | INT,32

    • ASCii: Data values are returned in ASCII format as a list of comma-separated values in floating point format. The length can be omitted. It is 0, which means that the instrument selects the number of digits to be returned. The query returns both values (ASC,0) .

    • REAL,32: Physical data in single precision, 32 bit floating point format. The data is stored as binary data (Definite Length Block Data according to IEEE 488.2) . Each waveform value is formatted in the 32-Bit IEEE 754 floating point format.The schema of the result string is as follows: #41024value1value2…value n, with:#4 = number of digits (= 4 in the example) of the following number1024 = number of following data bytes (= 1024 in the example) value = 4-byte floating point valuesFor large data (≥ 1 GB) , the result string starts with ‘#(data length) ‘. The number inside the parentheses indicates the real data length in bytes.

    • REAL,64: Double precision, 64 bit floating point format.

    • INT,8 | INT,16 | INT,32: Signed integer data with length 8 bit, 16 bit, or 32 bit.The result string has the same schema as the REAL format.For INT,16, you can set the byte order using the command.For digital channel data, math and histogram data, INT formats are not available.