connect_device#

Session.connect_device(serial: str, *, interface: Optional[str] = None) Union[BaseInstrument, HDAWG, PQSC, QHub, SHFQA, SHFSG, UHFLI, UHFQA, SHFQC][source]#

Establish a connection to a device.

Info:

It is allowed to call this function for an already connected device. In that case the function simply returns the device object of the device.

If the interface is not specified the interface will be auto detected. Meaning one of the available interfaces will be selected, prioritizing 1GbE over USB.

Parameters:
  • serial (str) – Serial number of the device, e.g. ‘dev12000’. The serial number can be found on the back panel of the instrument.

  • interface (Optional[str]) – Device interface (e.g. = “1GbE”). If not specified the default interface from the discover is used.

Returns:

Device object

Raises:
  • KeyError – Device is not found.

  • RuntimeError – Connection failed.

Return type:

Union[BaseInstrument, HDAWG, PQSC, QHub, SHFQA, SHFSG, UHFLI, UHFQA, SHFQC]