save_settings#

save_settings(daq: ziDAQServer, device: str, filename: str) None[source]#

Save settings from the specified device to a LabOne settings file.

This function is synchronous; it will block until saving the settings has finished.

Parameters:
  • daq (ziDAQServer) – A ziPython API session.

  • device (str) – The device ID specifying where to load the settings,

  • e.g.

  • 'dev123'.

  • filename (str) – The filename of the LabOne xml settings file. The filename

  • path. (can include a relative or full) –

Raises:

RuntimeError – If saving the settings times out.

Return type:

None

Examples

import zhinst.utils as utils daq = utils.autoConnect() dev = utils.autoDetect(daq)

# Then, e.g., save settings to a file in the current directory: utils.save_settings(daq, dev, ‘my_settings.xml’)

# Then, e.g., save settings to the default LabOne settings path: filename = ‘my_settings_example.xml’ path = utils.get_default_settings_path(daq) utils.save_settings(daq, dev, path + os.sep + filename)