Visa-related support module visa_utils

Visa-related auxiliary functions for the keyoscacquire package

keyoscacquire.visa_utils.interpret_visa_id(idn)[source]

Interprets a VISA ID, including finding a oscilloscope model series if applicable

Parameters

idn (str) – VISA ID as returned by the *IDN? command

Returns

  • maker (str) – Maker of the instrument, e.g. Keysight Technologies

  • model (str) – Model of the instrument

  • serial (str) – Serial number of the instrument

  • firmware (str) – Firmware version

  • model_series (str) – “N/A” unless the instrument is a Keysight/Agilent DSO and MSO oscilloscope. Returns the model series, e.g. ‘2000’. Returns “not found” if the model name cannot be interpreted.

keyoscacquire.visa_utils.obtain_instrument_information(resource_manager, address, num, ask_idn=True, timeout=200)[source]

Obtain more information about a VISA resource

Parameters
  • resource_manager (pyvisa.resource_manager) –

  • address (str) – VISA address of the instrument to be investigated

  • num (int) – Sequential numbering of investigated instruments

  • ask_idn (bool) – If True: will query the instrument’s IDN and interpret it if possible

  • timeout (int, default 200) – VISA connection timeout

Returns

resource_info

List of information:

[num, address, alias, maker, model, serial, firmware, model_series]

when ask_idn is True, otherwise:

[num, address, alias]

Return type

list