FormatPy#

SCPI Commands :

FORMat:BORDer
FORMat:SREGister
FORMat:[DATA]
Commands in total: 3
Subgroups: 0
Direct child commands: 3
get_border ( ) → ByteOrder
set_border ( border: ByteOrder ) → None
# FORMat:BORDer
# get:
value: enums.ByteOrder = driver.formatPy.get_border()
# set:
driver.formatPy.set_border(border = enums.ByteOrder.NORMal)

Determines the sequence of bytes within a binary block. This only affects blocks which use the IEEE754 format internally.

Parameters:

border – NORMal | SWAPped

  • NORMal: Expects/sends the least significant byte of each IEEE754 floating-point number first and the most significant byte last.

  • SWAPped: Expects/sends the most significant byte of each IEEE754 floating-point number first and the least significant byte last.

get_data ( ) → FormData
set_data ( data: FormData ) → None
# FORMat:[DATA]
# get:
value: enums.FormData = driver.formatPy.get_data()
# set:
driver.formatPy.set_data(data = enums.FormData.ASCii)

Determines the data format the instrument uses to return data via the IEC/IEEE bus. The instrument automatically detects the data format used by the controller, and assigns it accordingly. Data format determined by this SCPI command is in this case irrelevant.

Parameters:

data – ASCii | PACKed

  • ASCii: Transfers numerical data as plain text separated by commas.

  • PACKed: Transfers numerical data as binary block data.The format within the binary data depends on the command. The various binary data formats are explained in the description of the parameter types.

get_sregister ( ) → FormStatReg
set_sregister ( format_py: FormStatReg ) → None
# FORMat:SREGister
# get:
value: enums.FormStatReg = driver.formatPy.get_sregister()
# set:
driver.formatPy.set_sregister(format_py = enums.FormStatReg.ASCii)

Determines the numeric format for responses of the status register.

Parameters:

format_py – ASCii | BINary | HEXadecimal | OCTal

  • ASCii: Returns the register content as a decimal number.

  • BINary | HEXadecimal | OCTal: Returns the register content either as a binary, hexadecimal or octal number. According to the selected format, the number starts with #B (binary) , #H (hexadecimal) or #O (octal) .