Some instruments allow for sending the measured data in binary form. This has the advantage that the data transfer is much smaller and takes less time. PyVISA currently supports three forms of transfers:
You can set the form of transfer with the property values_format, either
with the generation of the object,
my_instrument = instrument("GPIB::12", values_format = single)
my_instrument.values_format = single
read_values() and
ask_for_values(). In particular, you must assure separately that the
device actually sends in this format.
In some cases it may be necessary to set the byte order, also known as endianness. PyVISA assumes little-endian as default. Some instruments call this ``swapped'' byte order. However, there is also big-endian byte order. In this case you have to append "| big_endian" to your values format:
my_instrument = instrument("GPIB::12", values_format = single | big_endian)