Multi Device Connection¶
A data server connection shared by multiple devices.
A container for devices that ensures a single instrument connection (Data Server) is shared between multiple devices. The
MultiDeviceConnectionholds dictionaries of different device types. The devices are identified by the name they are given. The MultiDeviceConnection connects to a Data Server with mdc.setup() …
>>> import zhinst.toolkit as tk >>> mdc = tk.MultiDeviceConnection(host="localhost") >>> mdc.setup() Successfully connected to data server at localhost8004 api version: 6
and individual devices are added with mdc.connect_device().
>>> mdc.connect_device(tk.HDAWG("hdawg 1", "dev1234")) >>> mdc.connect_device(tk.HDAWG("hdawg 2", "dev5678")) >>> mdc.connect_device(tk.UHFQA("uhfqa 1", "dev9999")) Successfully connected to device DEV1234 on interface 1GBE Successfully connected to device DEV5678 on interface 1GBE Successfully connected to device DEV9999 on interface 1GBE
MultiDeviceConnectionholds dictionaries for every device type with the device name as keys:
>>> hdawg1 = mdc.hdawgs["hdawg 1"] >>> hdawg2 = mdc.hdawgs["hdawg 2"] >>> uhfqa = mdc.uhfqas["uhfqa 1"] >>> ...
- Keyword Arguments
host (str) – the host of the data server (default: ‘localhost’)
port (int) – the port for the data server (default: 8004)
api (int) – the API level for the data server (default: 6)
ToolkitError – if an unknown device is added
connect_device(device: zhinst.toolkit.control.drivers.base.base.BaseInstrument) → None¶
Connects a device to the
Adds a device to the
MultiDeviceConnectionand connects the device to the shared Data Server. Depending on the device type, the device is added to respective dictionary and can then be accessed from there.